User: starksm 
  Date: 02/04/09 11:06:02

  Modified:    src/main/org/jboss/mq/il/oil Tag: Branch_2_4
                        OILClientIL.java OILClientILService.java
                        OILServerIL.java OILServerILService.java
  Log:
  Integrate connection ping patch
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.3   +18 -2     jbossmq/src/main/org/jboss/mq/il/oil/OILClientIL.java
  
  Index: OILClientIL.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/oil/OILClientIL.java,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- OILClientIL.java  28 Nov 2001 06:15:31 -0000      1.2.2.2
  +++ OILClientIL.java  9 Apr 2002 18:06:02 -0000       1.2.2.3
  @@ -30,7 +30,7 @@
    * @author     Norbert Lataille ([EMAIL PROTECTED])
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.2.2.2 $
  + * @version    $Revision: 1.2.2.3 $
    */
   public class OILClientIL implements ClientIL, java.io.Serializable
   {
  @@ -43,7 +43,8 @@
      final static int m_close = 2;
      final static int m_deleteTemporaryDestination = 1;
      final static int m_receive = 3;
  -   
  +   final static int m_pong = 4;
  +
      OILClientIL( InetAddress addr, int port )
      {
         this.addr = addr;
  @@ -141,5 +142,20 @@
         {
            throw throwException;
         }
  +   }
  +
  +   /**
  +    * #Description of the Method
  +    *
  +    * @param serverTime     Description of Parameter
  +    * @exception Exception  Description of Exception
  +    */
  +   public synchronized void pong(long serverTime)
  +          throws Exception
  +   {
  +      checkSocket();
  +      out.writeByte(m_pong);
  +      out.writeLong(serverTime);
  +      waitAnswer();
      }
   }
  
  
  
  1.2.2.4   +9 -5      jbossmq/src/main/org/jboss/mq/il/oil/OILClientILService.java
  
  Index: OILClientILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/oil/OILClientILService.java,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- OILClientILService.java   14 Dec 2001 03:19:13 -0000      1.2.2.3
  +++ OILClientILService.java   9 Apr 2002 18:06:02 -0000       1.2.2.4
  @@ -31,27 +31,28 @@
    * @author     Norbert Lataille ([EMAIL PROTECTED])
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.2.2.3 $
  + * @version    $Revision: 1.2.2.4 $
    */
   public class OILClientILService implements Runnable, org.jboss.mq.il.ClientILService
   {
      static Logger log = Logger.getLogger( OILClientILService.class );
      //the client IL
  -   OILClientIL      clientIL;
  +   OILClientIL clientIL;
      //The thread that is doing the Socket reading work
  -   Thread           worker;
  -   Socket           socket = null;
  +   Thread worker;
  +   Socket socket = null;
      //A link on my connection
      private Connection connection;
      //Should this service be running ?
      private boolean  running;
      //The server socket we listen for a connection on
      private ServerSocket serverSocket;
  -   
  +
      // Attributes ----------------------------------------------------
      final static int m_close = 2;
      final static int m_deleteTemporaryDestination = 1;
      final static int m_receive = 3;
  +   final static int m_pong = 4;
      
      /**
       *  getClientIL method comment.
  @@ -200,6 +201,9 @@
                     break;
                  case m_close:
                     connection.asynchClose();
  +                  break;
  +               case m_pong:
  +                  connection.asynchPong(in.readLong());
                     break;
                  default:
                     throw new RemoteException( "Bad method code !" );
  
  
  
  1.2.2.2   +18 -1     jbossmq/src/main/org/jboss/mq/il/oil/OILServerIL.java
  
  Index: OILServerIL.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/oil/OILServerIL.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- OILServerIL.java  23 Aug 2001 03:57:10 -0000      1.2.2.1
  +++ OILServerIL.java  9 Apr 2002 18:06:02 -0000       1.2.2.2
  @@ -37,7 +37,7 @@
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @author     Norbert Lataille ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.2.2.1 $
  + * @version    $Revision: 1.2.2.2 $
    */
   public class OILServerIL implements java.io.Serializable, Cloneable, 
org.jboss.mq.il.ServerIL {
   
  @@ -68,6 +68,7 @@
      final static int m_unsubscribe = 18;
      final static int m_destroySubscription = 19;
      final static int m_checkUser = 20;
  +   final static int m_ping = 21;
   
      public OILServerIL( InetAddress a, int port ) {
         this.addr = a;
  @@ -271,5 +272,21 @@
            Exception e = ( Exception )in.readObject();
            throw e;
         }
  +   }
  +
  +   /**
  +    * #Description of the Method
  +    *
  +    * @param dc             Description of Parameter
  +    * @param clientTime     Description of Parameter
  +    * @exception Exception  Description of Exception
  +    */
  +   public synchronized void ping(ConnectionToken dc, long clientTime)
  +          throws Exception
  +   {
  +      checkConnection();
  +      out.writeByte(m_ping);
  +      out.writeLong(clientTime);
  +      waitAnswer();
      }
   }
  
  
  
  1.2.2.8   +5 -1      jbossmq/src/main/org/jboss/mq/il/oil/OILServerILService.java
  
  Index: OILServerILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/oil/OILServerILService.java,v
  retrieving revision 1.2.2.7
  retrieving revision 1.2.2.8
  diff -u -r1.2.2.7 -r1.2.2.8
  --- OILServerILService.java   14 Dec 2001 03:19:13 -0000      1.2.2.7
  +++ OILServerILService.java   9 Apr 2002 18:06:02 -0000       1.2.2.8
  @@ -50,7 +50,7 @@
    *
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.2.2.7 $
  + * @version    $Revision: 1.2.2.8 $
    */
   public class OILServerILService extends org.jboss.mq.il.ServerILJMXService 
implements Runnable, OILServerILServiceMBean
   {
  @@ -83,6 +83,7 @@
      final static int m_unsubscribe = 18;
      final static int m_destroySubscription = 19;
      final static int m_checkUser = 20;
  +   final static int m_ping = 21;
      final static int SO_TIMEOUT = 5000;
      
      /**
  @@ -302,6 +303,9 @@
                     break;
                  case m_checkUser:
                     result = server.checkUser( ( String )in.readObject(), ( String 
)in.readObject() );
  +                  break;
  +               case m_ping:
  +                  server.ping(connectionToken, in.readLong());
                     break;
                  default:
                     throw new RemoteException( "Bad method code !" );
  
  
  

_______________________________________________________________

Sponsored by:
Looking for hip toys and fun scwag.  There is no better place
then the good friends at ThinkGeek. http://www.ThinkGeek.com/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to