Package org.jboss.jms.client.delegate

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


/*     */
/* 111 */     this.delegates = new ClientConnectionFactoryDelegate[len];
/*     */
/* 113 */     for (int i = 0; i < len; i++)
/*     */     {
/* 115 */       this.delegates[i] = new ClientConnectionFactoryDelegate();
/*     */
/* 117 */       this.delegates[i].read(is);
/*     */     }
/*     */
/* 120 */     len = is.readInt();
View Full Code Here


/*  94 */     String username = (String)mi.getArguments()[0];
/*  95 */     String password = (String)mi.getArguments()[1];
/*  96 */     Integer failedNodeID = (Integer)mi.getArguments()[2];
/*     */
/* 101 */     int attemptCount = 0;
/* 102 */     ClientConnectionFactoryDelegate delegate = null;
/*     */
/* 104 */     while (attemptCount < 10)
/*     */     {
/* 108 */       attemptCount++;
/*     */
/* 110 */       int nextHopingServer = -1;
/*     */       try
/*     */       {
/* 113 */         int failedNodeIDToServer = -1;
/* 114 */         if (delegate == null)
/*     */         {
/* 116 */           if ((failedNodeID != null) && (failedNodeID.intValue() >= 0))
/*     */           {
/* 119 */             delegate = getFailoverDelegateForNode(failedNodeID);
/* 120 */             failedNodeIDToServer = failedNodeID.intValue();
/* 121 */             nextHopingServer = delegate.getServerID();
/*     */           }
/*     */           else
/*     */           {
/* 126 */             LoadBalancingPolicy loadBalancingPolicy = this.clusteredDelegate.getLoadBalancingPolicy();
/* 127 */             delegate = (ClientConnectionFactoryDelegate)loadBalancingPolicy.getNext();
/*     */           }
/*     */         }
/*     */
/* 131 */         log.trace(this + " has chosen " + delegate + " as target, " + (attemptCount == 0 ? "first connection attempt" : new StringBuilder().append(attemptCount).append(" connection attempts").toString()));
/*     */
/* 134 */         CreateConnectionResult res = delegate.createConnectionDelegate(username, password, failedNodeIDToServer);
/*     */
/* 137 */         ClientConnectionDelegate cd = res.getDelegate();
/*     */
/* 139 */         if (cd != null)
/*     */         {
View Full Code Here

/*     */     {
/* 410 */       Map.Entry entry = (Map.Entry)iter.next();
/*     */
/* 412 */       Integer nid = (Integer)entry.getKey();
/*     */
/* 414 */       ClientConnectionFactoryDelegate delegate = (ClientConnectionFactoryDelegate)entry.getValue();
/*     */
/* 416 */       if (this.connections.get(nid) == null)
/*     */       {
/*     */         try
/*     */         {
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

    {
      Map.Entry entry = (Map.Entry)iter.next();
     
      Integer nid = (Integer)entry.getKey();
     
      ClientConnectionFactoryDelegate delegate = (ClientConnectionFactoryDelegate)entry.getValue();
     
      if (connections.get(nid) == null)
      {
        try
        {
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.