ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/CIWrapper.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/CIWrapper.java (file contents):
Revision 1.10 by tdb, Tue May 29 17:02:35 2001 UTC vs.
Revision 1.11 by tdb, Mon Nov 26 19:21:40 2001 UTC

# Line 50 | Line 50 | public class CIWrapper extends Thread {
50       */
51      public void run() {
52          String xml = null;
53 <        while(true) {
53 >        boolean run = true;
54 >        while(run) {
55 >            // get a line of XML from the queue
56              try {
57                  xml = (String) _queue.get(_queueID);
58              }
59              catch (InvalidQueueException e) {
60                  _logger.write(toString(), Logger.ERROR, "Queue error: "+e);
61              }
62 <            _destination.receiveXML(xml);
62 >            // pass it on to the destination
63 >            try {
64 >                _destination.receiveXML(xml);
65 >            }
66 >            catch (org.omg.CORBA.COMM_FAILURE e) {
67 >                run = false;
68 >                _logger.write(toString(), Logger.ERROR, "Connection failure (COMM_FAILURE), client interface shutdown? : "+e);
69 >            }
70 >            catch (org.omg.CORBA.TRANSIENT e) {
71 >                run = false;
72 >                _logger.write(toString(), Logger.ERROR, "Connection failure (TRANSIENT), client interface shutdown? : "+e);
73 >            }
74          }
75 +        // looks like something when wrong in communication
76 +        // rather than fall over in a heap, lets just stop
77 +        // cleanly and shutdown our queue...
78 +        _logger.write(toString(), Logger.SYSMSG, "Shutting Down...");
79 +        _queue.removeQueue(_queueID);
80      }
81  
82      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines