User: user57  
  Date: 01/07/31 22:19:47

  Modified:    src/main/org/jbossmq/il/oil Tag: jboss_buildmagic
                        OILClientILService.java OILServerILService.java
  Log:
   o updated from HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +7 -10     jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java
  
  Index: OILClientILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- OILClientILService.java   2001/07/16 02:51:45     1.2
  +++ OILClientILService.java   2001/08/01 05:19:47     1.2.2.1
  @@ -58,7 +58,7 @@
        public void start() throws java.lang.Exception {
                
                running = true;
  -             worker = new Thread(connection.threadGroup, this, 
"UILClientILService");
  +             worker = new Thread(connection.threadGroup, this, 
"OILClientILService");
                worker.setDaemon(true);
                worker.start();         
                
  @@ -70,6 +70,7 @@
        public void stop() throws java.lang.Exception {
                running = false;
                worker.interrupt();
  +             socket.close();
        }
   
        static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(OILClientILService.class);
  @@ -85,12 +86,13 @@
        private ServerSocket serverSocket;
        //The thread that is doing the Socket reading work
        Thread worker;
  +     Socket socket=null;
   
        public void run() {
  -             Socket socket=null;
                int code = 0;
                ObjectOutputStream out = null;
                ObjectInputStream in = null;
  +             socket = null;
   
                try {
                        cat.debug("Waiting for the server to connect to me");
  @@ -106,7 +108,7 @@
                                        return;
                        }
                        serverSocket.close();
  -                     socket.setSoTimeout(30*1000);
  +                     socket.setSoTimeout(0);
                        out = new ObjectOutputStream(new 
BufferedOutputStream(socket.getOutputStream()));
                        out.flush();
                        in = new ObjectInputStream(new 
BufferedInputStream(socket.getInputStream()));
  @@ -124,12 +126,7 @@
                        } catch (java.io.InterruptedIOException e) {
                                continue;
                        } catch (IOException e) {
  -                             if (!running)
  -                                     break;
  -                                     
  -                             connection.asynchFailure("Connection failure", e);
  -                             e.printStackTrace();
  -                             return;
  +                             break;
                        }
   
                        try {
  
  
  
  1.3.2.2   +13 -11    jbossmq/src/main/org/jbossmq/il/oil/OILServerILService.java
  
  Index: OILServerILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILServerILService.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- OILServerILService.java   2001/07/28 02:28:16     1.3.2.1
  +++ OILServerILService.java   2001/08/01 05:19:47     1.3.2.2
  @@ -38,6 +38,7 @@
   import javax.jms.TemporaryQueue;
   import org.jbossmq.TransactionRequest;
   import java.io.IOException;
  +import java.io.EOFException;
   import org.jbossmq.SpyDestination;
   
   /**
  @@ -150,11 +151,15 @@
                try {
                        while( running && socket==null ) {
                                try {
  -                             socket = serverSocket.accept();
  +                                     socket = serverSocket.accept();
                                } catch ( java.io.InterruptedIOException e ) {
                                }
                        }
  -               
  +
  +                     if( !running )
  +                             return;
  +
  +                     socket.setSoTimeout(0);
                        new Thread(this,"OIL Worker").start();
                        
                        out = new ObjectOutputStream(new 
BufferedOutputStream(socket.getOutputStream()));
  @@ -171,17 +176,14 @@
                while (!closed && running) {
   
                        try {
  -                             
  -                             //socket.setSoTimeout(SO_TIMEOUT);
                                code=in.readByte();             
  -                             
  -                     } catch ( java.io.InterruptedIOException e ) {
  -                             if( !closed && !running )
  -                                     continue;
  -                     } catch (IOException e) {
  +                     }
  +                     catch ( EOFException e ) {
  +                             break;
  +                     }
  +                     catch ( IOException e ) {
                                if( closed || !running )
                                        break;
  -                                     
                                category.warn("Connection failure (1).", e);
                                break;
                        }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to