Package org.jboss.jms.client.remoting

Examples of org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener


 
        JMSRemotingConnection remotingConnection = state.getRemotingConnection();
 
        // remove the consolidated remoting connection listener
 
        ConsolidatedRemotingConnectionListener l = remotingConnection.removeConnectionListener();
        if (l != null)
        {
           l.clear();
        }
 
        // Finished with the connection - we need to shutdown callback server
        remotingConnection.stop();
        
View Full Code Here


         JMSRemotingConnection remotingConnection = connectionDelegate.getRemotingConnection();

         // install the consolidated remoting connection listener; it will be de-installed on
         // connection closing by ConnectionAspect

         ConsolidatedRemotingConnectionListener listener =
            new ConsolidatedRemotingConnectionListener();

         remotingConnection.addConnectionListener(listener);

         if (versionToUse == null)
         {
            throw new IllegalStateException("Connection version is null");
         }

         // We have one message id generator per unique server
         MessageIdGenerator idGenerator =
            MessageIdGeneratorFactory.instance.checkOutGenerator(serverID);

         ConnectionState connectionState =
            new ConnectionState(serverID, connectionDelegate,
                                remotingConnection, versionToUse, idGenerator);

         listener.setConnectionState(connectionState);
         
         connectionDelegate.setState(connectionState);
      }

      return res;
View Full Code Here

        ConnectionState state = getConnectionState(invocation);
 
        JMSRemotingConnection remotingConnection = state.getRemotingConnection();
 
         // remove the consolidated remoting connection listener
         ConsolidatedRemotingConnectionListener l = remotingConnection.removeConnectionListener();
       
         if (l != null)
         {
            if (l.setBeingHandled())
            {
               l.clear();
            }
         }

         // Finished with the connection - we need to shutdown callback server
        remotingConnection.stop();
View Full Code Here

 
        JMSRemotingConnection remotingConnection = state.getRemotingConnection();
 
        // remove the consolidated remoting connection listener
 
        ConsolidatedRemotingConnectionListener l = remotingConnection.removeConnectionListener();
        if (l != null)
        {
           l.clear();
        }
 
        // Finished with the connection - we need to shutdown callback server
        remotingConnection.stop();
        
View Full Code Here

     
      CreateConnectionResult res;
     
      try
      {        
         remotingConnection = new JMSRemotingConnection(serverLocatorURI, clientPing, strictTck, new ConsolidatedRemotingConnectionListener(), sendAcksAsync);
        
         remotingConnection.start();
  
         Client client = remotingConnection.getRemotingClient();
        
View Full Code Here

      }
   }

   public void testExceptionListener3() throws Exception
   {
      ConsolidatedRemotingConnectionListener jbmListener = new ConsolidatedRemotingConnectionListener();
      jbmListener.start();
      jbmListener.handleConnectionException(new Exception("bad connection"), null);
      MyJMSListener jmsListener = new MyJMSListener();
      jbmListener.addJMSExceptionListener(jmsListener);
     
      //because notifying the listener is from a separate thread
      try
      {
         Thread.sleep(5000);
View Full Code Here

/*     */
/*  93 */       int serverID = connectionDelegate.getServerID();
/*  94 */       Version versionToUse = connectionDelegate.getVersionToUse();
/*  95 */       JMSRemotingConnection remotingConnection = connectionDelegate.getRemotingConnection();
/*     */
/* 100 */       ConsolidatedRemotingConnectionListener listener = new ConsolidatedRemotingConnectionListener();
/*     */
/* 103 */       remotingConnection.addConnectionListener(listener);
/*     */
/* 105 */       if (versionToUse == null)
/*     */       {
/* 107 */         throw new IllegalStateException("Connection version is null");
/*     */       }
/*     */
/* 111 */       MessageIdGenerator idGenerator = MessageIdGeneratorFactory.instance.checkOutGenerator(serverID);
/*     */
/* 114 */       ConnectionState connectionState = new ConnectionState(serverID, connectionDelegate, remotingConnection, versionToUse, idGenerator);
/*     */
/* 118 */       listener.setConnectionState(connectionState);
/*     */
/* 120 */       connectionDelegate.setState(connectionState);
/*     */     }
/*     */
/* 123 */     return res;
View Full Code Here

/* 170 */       Object ret = invocation.invokeNext();
/*     */
/* 172 */       Object localObject1 = ret;
/*     */       ConnectionState state;
/*     */       JMSRemotingConnection remotingConnection;
/*     */       ConsolidatedRemotingConnectionListener l;
/*     */       return localObject1;
/*     */     }
/*     */     finally
/*     */     {
/* 178 */       ConnectionState state = getConnectionState(invocation);
/*     */
/* 180 */       JMSRemotingConnection remotingConnection = state.getRemotingConnection();
/*     */
/* 184 */       ConsolidatedRemotingConnectionListener l = remotingConnection.removeConnectionListener();
/* 185 */       if (l != null)
/*     */       {
/* 187 */         l.clear();
/*     */       }
/*     */
/* 191 */       remotingConnection.stop();
/*     */
/* 194 */       MessageIdGeneratorFactory.instance.checkInGenerator(state.getServerID());
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.