Package org.jboss.jms.client.delegate

Examples of org.jboss.jms.client.delegate.ClientConnectionDelegate$start_N8025343665958530775


               (attemptCount == 0 ? "first connection attempt" : attemptCount + " connection attempts"));
 
            CreateConnectionResult res = delegate.
               createConnectionDelegate(username, password, failedNodeIDToServer);
           
            ClientConnectionDelegate cd = (ClientConnectionDelegate)res.getDelegate();

            if (cd != null)
            {
               // valid connection
View Full Code Here


      ConnectionState currentState = getConnectionState(invocation);
      currentState.setJustCreated(false);
     
      if (connMetaData == null)
      {
         ClientConnectionDelegate delegate = (ClientConnectionDelegate)invocation.getTargetObject();
         connMetaData = new JBossConnectionMetaData(((ConnectionState)delegate.getState()).getVersionToUse());
      }
     
      return connMetaData;
   }
View Full Code Here

  
   private ConnectionState getConnectionState(Invocation invocation)
   {
      if (state == null)
      {
         ClientConnectionDelegate currentDelegate =
            ((ClientConnectionDelegate)invocation.getTargetObject());
        
         state = (ConnectionState)currentDelegate.getState();
         id = state.getDelegate().getID();

      }
      return state;
   }
View Full Code Here

   public void testResourceManagersForSameServer() throws Exception
   {
      Connection conn1 = cf.createConnection();     
           
      ClientConnectionDelegate del1 = (ClientConnectionDelegate)((JBossConnection)conn1).getDelegate();
     
      ConnectionState state1 = (ConnectionState)del1.getState();
     
      ResourceManager rm1 = state1.getResourceManager();
     
      Connection conn2 = cf.createConnection();     
     
      ClientConnectionDelegate del2 = (ClientConnectionDelegate)((JBossConnection)conn2).getDelegate();
     
      ConnectionState state2 = (ConnectionState)del2.getState();
     
      ResourceManager rm2 = state2.getResourceManager();

      //Two connections for same server should share the same resource manager
     
View Full Code Here

      {
         xaConn = cf.createXAConnection();
        
         JBossConnection jbConn = (JBossConnection)xaConn;
        
         ClientConnectionDelegate del = (ClientConnectionDelegate)jbConn.getDelegate();
        
         ConnectionState state = (ConnectionState)del.getState();
        
         ResourceManager rm = state.getResourceManager();
        
         XASession xaSession = xaConn.createXASession();
        
View Full Code Here

      {
         xaConn = cf.createXAConnection();
        
         JBossConnection jbConn = (JBossConnection)xaConn;
        
         ClientConnectionDelegate del = (ClientConnectionDelegate)jbConn.getDelegate();
        
         ConnectionState state = (ConnectionState)del.getState();
        
         ResourceManager rm = state.getResourceManager();
        
         XASession xaSession = xaConn.createXASession();
        
View Full Code Here

      ConnectionState currentState = getConnectionState(invocation);
      currentState.setJustCreated(false);
     
      if (connMetaData == null)
      {
         ClientConnectionDelegate delegate = (ClientConnectionDelegate)invocation.getTargetObject();
         connMetaData = new JBossConnectionMetaData(((ConnectionState)delegate.getState()).getVersionToUse());
      }
     
      return connMetaData;
   }
View Full Code Here

  
   private ConnectionState getConnectionState(Invocation invocation)
   {
      if (state == null)
      {
         ClientConnectionDelegate currentDelegate =
            ((ClientConnectionDelegate)invocation.getTargetObject());
        
         state = (ConnectionState)currentDelegate.getState();
         id = state.getDelegate().getID();

      }
      return state;
   }
View Full Code Here

   public Object handleCreateConnectionDelegate(Invocation inv) throws Throwable
   {
      CreateConnectionResult res = (CreateConnectionResult)inv.invokeNext();

      ClientConnectionDelegate connectionDelegate = (ClientConnectionDelegate)res.getDelegate();

      if (connectionDelegate != null && connectionDelegate.getState() == null)
      {
         // no state set yet, initialize and configure it

         if(trace) { log.trace(connectionDelegate + " not configured, configuring ..."); }

         int serverID = connectionDelegate.getServerID();
         Version versionToUse = connectionDelegate.getVersionToUse();
         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

               (attemptCount == 0 ? "first connection attempt" : attemptCount + " connection attempts"));
 
            CreateConnectionResult res = delegate.
               createConnectionDelegate(username, password, failedNodeIDToServer);
           
            ClientConnectionDelegate cd = (ClientConnectionDelegate)res.getDelegate();

            if (cd != null)
            {
               // valid connection
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.delegate.ClientConnectionDelegate$start_N8025343665958530775

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.