Package org.jboss.jms.client.delegate

Examples of org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858


      LoadBalancingPolicy lbp = loadBalancingFactory.createLoadBalancingPolicy(delegates);

      endpoint.updateTopology(delegates, failoverMap);

      return new ClientClusteredConnectionFactoryDelegate(uniqueName, delegates, failoverMap, lbp, supportsFailover);
   }
View Full Code Here


                        //We still replicate non clustered connection factories since the ClusterPullConnectionFactory
                        //is non clustered but needs to be available across the cluster
                     }
                     else
                     {
                        ClientClusteredConnectionFactoryDelegate del = (ClientClusteredConnectionFactoryDelegate)cfd;

                        Map updatedReplicantMap = replicator.get(key);

                        List newDels = sortDelegatesOnServerID(updatedReplicantMap.values());

                        ClientConnectionFactoryDelegate[] delArr =
                           (ClientConnectionFactoryDelegate[])newDels.
                              toArray(new ClientConnectionFactoryDelegate[newDels.size()]);

                        Map failoverMap = serverPeer.getPostOfficeInstance().getFailoverMap();

                        del.setDelegates(delArr);
                        del.setFailoverMap(failoverMap);

                        ServerConnectionFactoryEndpoint endpoint =
                           (ServerConnectionFactoryEndpoint)endpoints.get(uniqueName);

                        if (endpoint == null)
View Full Code Here

         {
            fail("Thre is a leak on ClusteredConnectionFactory");
         }
      }
      
      ClientClusteredConnectionFactoryDelegate cfDelegate =  (ClientClusteredConnectionFactoryDelegate)cf.getDelegate();

      log.info("(Before)Server0 - " + getCountOnServer(0, cfDelegate.getUniqueName()));
      log.info("(Before)Server1 - " + getCountOnServer(1, cfDelegate.getUniqueName()));
     
      assertEquals(1, getCountOnServer(0, cfDelegate.getUniqueName()));
      assertEquals(1, getCountOnServer(1, cfDelegate.getUniqueName()));
     
      cfDelegate.closeCallback();
     
      // Validates if closeCallback is working

      assertEquals(0, getCountOnServer(0, cfDelegate.getUniqueName()));
      assertEquals(0, getCountOnServer(1, cfDelegate.getUniqueName()));
     
      ClusterClientCrash command = new ClusterClientCrash(cf);

      assertEquals("OK", remoteServer.executeCommand(command));
     
     

      assertEquals(new Integer(1),ServerManagement.getServer(1).executeCommand(new VerifySizeOfCFClients(cfDelegate.getUniqueName())));

      ServerManagement.kill(2);
      Thread.sleep((long)(60000));

      assertEquals(0, getCountOnServer(1, cfDelegate.getUniqueName()));
      assertEquals(0, getCountOnServer(0, cfDelegate.getUniqueName()));
   }
View Full Code Here

   public void testRoundRobinLoadBalancingOneNode() throws Exception
   {
      // the round robin policy is default

      JBossConnectionFactory jbcf = (JBossConnectionFactory)cf;
      ClientClusteredConnectionFactoryDelegate clusteredDelegate =
         (ClientClusteredConnectionFactoryDelegate )jbcf.getDelegate();

      assertSame(RoundRobinLoadBalancingPolicy.class,
         clusteredDelegate.getLoadBalancingPolicy().getClass());

      Connection conn0 = cf.createConnection();

      final int oneId = getServerId(conn0);
      final int otherId = 1 - oneId;
View Full Code Here


   public void testRoundRobinLoadBalancingTwoNodes() throws Exception
   {
      JBossConnectionFactory jbcf = (JBossConnectionFactory)cf;
      ClientClusteredConnectionFactoryDelegate clusteredDelegate =
         (ClientClusteredConnectionFactoryDelegate )jbcf.getDelegate();

      assertSame(RoundRobinLoadBalancingPolicy.class,
         clusteredDelegate.getLoadBalancingPolicy().getClass());

      Connection conn0 = cf.createConnection();

      final int oneId = getServerId(conn0);
      final int otherId = 1 - oneId;
View Full Code Here

   {
      if (trace) { log.trace(this + " handling " + message); }

      ConnectionFactoryUpdate viewChange = (ConnectionFactoryUpdate)message;

      ClientClusteredConnectionFactoryDelegate delegate = delegateRef.get();

      if (delegate!=null)
      {
         delegate.updateFailoverInfo(viewChange.getTopology().getDelegates(),
                                           viewChange.getTopology().getFailoverMap());
      }
   }
View Full Code Here

   class CallbackConnectionListener implements ConnectionListener
   {

      public void handleConnectionException(Throwable throwable, Client client)
      {
         ClientClusteredConnectionFactoryDelegate delegate = delegateRef.get();

         if (delegate!=null)
         {
            delegate.establishCallback();
         }

         //remotingConnection.removePlainConnectionListener(this);
      }
View Full Code Here

                        //We still replicate non clustered connection factories since the ClusterPullConnectionFactory
                        //is non clustered but needs to be available across the cluster
                     }
                     else
                     {
                        ClientClusteredConnectionFactoryDelegate del = (ClientClusteredConnectionFactoryDelegate)cfd;

                        Map updatedReplicantMap = replicator.get(key);

                        List newDels = sortDelegatesOnServerID(updatedReplicantMap.values());

                        ClientConnectionFactoryDelegate[] delArr =
                           (ClientConnectionFactoryDelegate[])newDels.
                              toArray(new ClientConnectionFactoryDelegate[newDels.size()]);

                        Map failoverMap = serverPeer.getPostOfficeInstance().getFailoverMap();

                        del.setDelegates(delArr);
                        del.setFailoverMap(failoverMap);

                        ServerConnectionFactoryEndpoint endpoint =
                           (ServerConnectionFactoryEndpoint)endpoints.get(uniqueName);

                        if (endpoint == null)
View Full Code Here

      LoadBalancingPolicy lbp = loadBalancingFactory.createLoadBalancingPolicy(delegates);

      endpoint.updateTopology(delegates, failoverMap);

      return new ClientClusteredConnectionFactoryDelegate(uniqueName, delegates, failoverMap, lbp, supportsFailover);
   }
View Full Code Here

                        //We still replicate non clustered connection factories since the ClusterPullConnectionFactory
                        //is non clustered but needs to be available across the cluster
                     }
                     else
                     {
                        ClientClusteredConnectionFactoryDelegate del = (ClientClusteredConnectionFactoryDelegate)cfd;

                        Map updatedReplicantMap = replicator.get(key);

                        List newDels = sortDelegatesOnServerID(updatedReplicantMap.values());

                        ClientConnectionFactoryDelegate[] delArr =
                           (ClientConnectionFactoryDelegate[])newDels.
                              toArray(new ClientConnectionFactoryDelegate[newDels.size()]);

                        Map failoverMap = serverPeer.getPostOfficeInstance().getFailoverMap();

                        del.setDelegates(delArr);
                        del.setFailoverMap(failoverMap);

                        ServerConnectionFactoryEndpoint endpoint =
                           (ServerConnectionFactoryEndpoint)endpoints.get(uniqueName);

                        if (endpoint == null)
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858

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.