Package org.jboss.jms.client.delegate

Examples of org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate


      boolean creatingClustered = (supportsFailover || supportsLoadBalancing) && replicator != null;
     
      //The server peer strict setting overrides the connection factory
      boolean useStrict = serverPeer.isStrictTck() || strictTck;

      ClientConnectionFactoryDelegate localDelegate =
         new ClientConnectionFactoryDelegate(uniqueName, id, serverPeer.getServerPeerID(),
                                             locatorURI, version, clientPing, useStrict);

      log.debug(this + " created local delegate " + localDelegate);

      // When registering a new clustered connection factory I should first create it with the
View Full Code Here


      Collections.sort(localDels,
         new Comparator()
         {
            public int compare(Object obj1, Object obj2)
            {
               ClientConnectionFactoryDelegate del1 = (ClientConnectionFactoryDelegate)obj1;
               ClientConnectionFactoryDelegate del2 = (ClientConnectionFactoryDelegate)obj2;
               return del1.getServerID() - del2.getServerID();
            }
         });

      return localDels;
   }
View Full Code Here

   {
     Iterator iter = factories.iterator();
     InvokerLocator prevLocator = null;
     while (iter.hasNext())
     {
       ClientConnectionFactoryDelegate fact = (ClientConnectionFactoryDelegate)iter.next();
      
       //Sanity check - the locator protocol and params MUST be the same on each node
       String locatorString = fact.getServerLocatorURI();
      
       InvokerLocator locator = new InvokerLocator(locatorString);
      
       if (prevLocator != null)
       {
View Full Code Here

      //Last one shares the same connector
      ObjectName cf4 = deployConnectionFactory("jboss.messaging.destination:service=TestConnectionFactory4", name3, "/TestConnectionFactory4", "clientid4", false);
     
     
      JBossConnectionFactory f1 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory1");           
      ClientConnectionFactoryDelegate del1 = (ClientConnectionFactoryDelegate)f1.getDelegate();     
     
      assertTrue(del1.getServerLocatorURI().startsWith("bisocket://localhost:1234"));
     
      JBossConnectionFactory f2 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory2");           
      ClientConnectionFactoryDelegate del2 = (ClientConnectionFactoryDelegate)f2.getDelegate();     
      assertTrue(del2.getServerLocatorURI().startsWith("bisocket://localhost:1235"));
     
      JBossConnectionFactory f3 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory3");           
      ClientConnectionFactoryDelegate del3 = (ClientConnectionFactoryDelegate)f3.getDelegate();     
      assertTrue(del3.getServerLocatorURI().startsWith("bisocket://localhost:1236"));
     
      JBossConnectionFactory f4 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory4");           
      ClientConnectionFactoryDelegate del4 = (ClientConnectionFactoryDelegate)f4.getDelegate();     
      assertTrue(del4.getServerLocatorURI().startsWith("bisocket://localhost:1236"));
     
      Connection con1 = f1.createConnection();
      Connection con2 = f2.createConnection();
      Connection con3 = f3.createConnection();
      Connection con4 = f4.createConnection();
View Full Code Here

                                               "/TestConnectionFactory4",
                                               "clientid4",
                                               false);

      JBossConnectionFactory f1 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory1");
      ClientConnectionFactoryDelegate del1 = (ClientConnectionFactoryDelegate)f1.getDelegate();

      assertTrue(del1.getServerLocatorURI().startsWith("bisocket://localhost:1234"));

      JBossConnectionFactory f2 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory2");
      ClientConnectionFactoryDelegate del2 = (ClientConnectionFactoryDelegate)f2.getDelegate();
      assertTrue(del2.getServerLocatorURI().startsWith("bisocket://localhost:1235"));

      JBossConnectionFactory f3 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory3");
      ClientConnectionFactoryDelegate del3 = (ClientConnectionFactoryDelegate)f3.getDelegate();
      assertTrue(del3.getServerLocatorURI().startsWith("bisocket://localhost:1236"));

      JBossConnectionFactory f4 = (JBossConnectionFactory)ic.lookup("/TestConnectionFactory4");
      ClientConnectionFactoryDelegate del4 = (ClientConnectionFactoryDelegate)f4.getDelegate();
      assertTrue(del4.getServerLocatorURI().startsWith("bisocket://localhost:1236"));

      Connection con1 = f1.createConnection();
      Connection con2 = f2.createConnection();
      Connection con3 = f3.createConnection();
      Connection con4 = f4.createConnection();
View Full Code Here

      ClientClusteredConnectionFactoryDelegate delegate =
         (ClientClusteredConnectionFactoryDelegate)cf.getDelegate();

      assertEquals(3, delegate.getDelegates().length);

      ClientConnectionFactoryDelegate cf1 = delegate.getDelegates()[0];

      ClientConnectionFactoryDelegate cf2 = delegate.getDelegates()[1];

      ClientConnectionFactoryDelegate cf3 = delegate.getDelegates()[2];

      assertEquals(0, cf1.getServerID());

      assertEquals(1, cf2.getServerID());

      assertEquals(2, cf3.getServerID());

      assertEquals(3, ServerManagement.getServer(0).getNodeIDView().size());

      Connection conn1 = null;
View Full Code Here

   // Validate if two distinct CFs are valid
   private void validateCFs(ClientClusteredConnectionFactoryDelegate cfDelegate,
                            ClientClusteredConnectionFactoryDelegate httpcfDelegate)
   {
      ClientConnectionFactoryDelegate delegatesSocket[] = cfDelegate.getDelegates();
      ClientConnectionFactoryDelegate delegatesHTTP[] = httpcfDelegate.getDelegates();

      log.info("ValidateCFs:");

      assertEquals(delegatesSocket.length, delegatesHTTP.length);
      for (int i=0;i<delegatesSocket.length;i++)
View Full Code Here

/*     */
/* 165 */     boolean creatingClustered = ((supportsFailover) || (supportsLoadBalancing)) && (this.replicator != null);
/*     */
/* 168 */     boolean useStrict = (this.serverPeer.isStrictTck()) || (strictTck);
/*     */
/* 170 */     ClientConnectionFactoryDelegate localDelegate = new ClientConnectionFactoryDelegate(uniqueName, id, this.serverPeer.getServerPeerID(), locatorURI, version, clientPing, useStrict);
/*     */
/* 174 */     log.debug(this + " created local delegate " + localDelegate);
/*     */
/* 183 */     if (creatingClustered)
/*     */     {
View Full Code Here

/*     */
/* 476 */     Collections.sort(localDels, new Comparator()
/*     */     {
/*     */       public int compare(Object obj1, Object obj2)
/*     */       {
/* 481 */         ClientConnectionFactoryDelegate del1 = (ClientConnectionFactoryDelegate)obj1;
/* 482 */         ClientConnectionFactoryDelegate del2 = (ClientConnectionFactoryDelegate)obj2;
/* 483 */         return del1.getServerID() - del2.getServerID();
/*     */       }
/*     */     });
/* 487 */     return localDels;
/*     */   }
View Full Code Here

/*     */   {
/* 492 */     Iterator iter = factories.iterator();
/* 493 */     InvokerLocator prevLocator = null;
/* 494 */     while (iter.hasNext())
/*     */     {
/* 496 */       ClientConnectionFactoryDelegate fact = (ClientConnectionFactoryDelegate)iter.next();
/*     */
/* 499 */       String locatorString = fact.getServerLocatorURI();
/*     */
/* 501 */       InvokerLocator locator = new InvokerLocator(locatorString);
/*     */
/* 503 */       if (prevLocator != null)
/*     */       {
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate

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.