Package org.jboss.jms.server.endpoint

Examples of org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint


      // See http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076040#4076040
      String id = uniqueName;
     
      Version version = serverPeer.getVersion();

      ServerConnectionFactoryEndpoint endpoint =
         new ServerConnectionFactoryEndpoint(uniqueName, id, serverPeer, clientID,
                                             jndiBindings, prefetchSize,
                                             slowConsumers,
                                             defaultTempQueueFullSize,
                                             defaultTempQueuePageSize,
                                             defaultTempQueueDownCacheSize,
View Full Code Here


  
   public synchronized void unregisterConnectionFactory(String uniqueName, boolean supportsFailover, boolean supportsLoadBalancing)
      throws Exception
   {
      log.trace("ConnectionFactory " + uniqueName + " being unregistered");
      ServerConnectionFactoryEndpoint endpoint =
         (ServerConnectionFactoryEndpoint)endpoints.remove(uniqueName);

      if (endpoint == null)
      {
         throw new IllegalArgumentException("Cannot find endpoint with name " + uniqueName);
      }
     
      JNDIBindings jndiBindings = endpoint.getJNDIBindings();

      if (jndiBindings != null)
      {
         List jndiNames = jndiBindings.getNames();
         for(Iterator i = jndiNames.iterator(); i.hasNext(); )
         {
            String jndiName = (String)i.next();
            initialContext.unbind(jndiName);
            log.debug(jndiName + " unregistered");
         }
      }

      if (trace) { log.trace("Removing delegate from delegates list with key=" + uniqueName + " at serverPeerID=" + this.serverPeer.getServerPeerID()); }

      ConnectionFactoryDelegate delegate = (ConnectionFactoryDelegate)delegates.remove(uniqueName);

      if (delegate == null)
      {
         throw new IllegalArgumentException("Cannot find factory with name " + uniqueName);
      }

      if (replicator != null)
      {
        replicator.remove(Replicator.CF_PREFIX + uniqueName);
      }

      Dispatcher.instance.unregisterTarget(endpoint.getID(), endpoint);
     
      serverPeer.getConnectionManager().unregisterConnectionFactory(endpoint);
     
   }
View Full Code Here

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

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

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

                        if (endpoint == null)
                        {
                           throw new IllegalStateException("Cannot find endpoint with name " + uniqueName);
                        }

                        rebindConnectionFactory(initialContext, endpoint.getJNDIBindings(), del);

                        endpoint.updateClusteredClients(delArr, failoverMap);
                     }
                  }
               }
            }
            catch (Exception e)
View Full Code Here

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

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

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

                        if (endpoint == null)
                        {
                           throw new IllegalStateException("Cannot find endpoint with name " + uniqueName);
                        }

                        rebindConnectionFactory(initialContext, endpoint.getJNDIBindings(), del);

                        endpoint.updateClusteredClients(delArr, failoverMap);
                     }
                  }
               }
            }
            catch (Exception e)
View Full Code Here

      // See http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076040#4076040
      String id = uniqueName;
     
      Version version = serverPeer.getVersion();

      ServerConnectionFactoryEndpoint endpoint =
         new ServerConnectionFactoryEndpoint(uniqueName, id, serverPeer, clientID,
                                             jndiBindings, prefetchSize,
                                             slowConsumers,
                                             defaultTempQueueFullSize,
                                             defaultTempQueuePageSize,
                                             defaultTempQueueDownCacheSize,
View Full Code Here

  
   public synchronized void unregisterConnectionFactory(String uniqueName, boolean supportsFailover, boolean supportsLoadBalancing)
      throws Exception
   {
      log.trace("ConnectionFactory " + uniqueName + " being unregistered");
      ServerConnectionFactoryEndpoint endpoint =
         (ServerConnectionFactoryEndpoint)endpoints.remove(uniqueName);

      if (endpoint == null)
      {
         throw new IllegalArgumentException("Cannot find endpoint with name " + uniqueName);
      }

      JNDIBindings jndiBindings = endpoint.getJNDIBindings();

      if (jndiBindings != null)
      {
         List jndiNames = jndiBindings.getNames();
         for(Iterator i = jndiNames.iterator(); i.hasNext(); )
         {
            String jndiName = (String)i.next();
            initialContext.unbind(jndiName);
            log.debug(jndiName + " unregistered");
         }
      }

      if (trace) { log.trace("Removing delegate from delegates list with key=" + uniqueName + " at serverPeerID=" + this.serverPeer.getServerPeerID()); }

      ConnectionFactoryDelegate delegate = (ConnectionFactoryDelegate)delegates.remove(uniqueName);

      if (delegate == null)
      {
         throw new IllegalArgumentException("Cannot find factory with name " + uniqueName);
      }

      if (replicator != null)
      {
        if (!replicator.remove(Replicator.CF_PREFIX + uniqueName))
         {
            throw new IllegalStateException("Cannot find replicant to remove: " +
                Replicator.CF_PREFIX + uniqueName);
         }
      }

      Dispatcher.instance.unregisterTarget(endpoint.getID(), endpoint);
   }
View Full Code Here

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

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

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

                if (endpoint == null)
                {
                   throw new IllegalStateException("Cannot find endpoint with name " + uniqueName);
                }

                rebindConnectionFactory(initialContext, endpoint.getJNDIBindings(), del);

                endpoint.updateClusteredClients(delArr, failoverMap);
               }
            }
         }
      }
      catch (Exception e)
View Full Code Here

/*     */
/* 131 */     String id = uniqueName;
/*     */
/* 133 */     Version version = this.serverPeer.getVersion();
/*     */
/* 135 */     ServerConnectionFactoryEndpoint endpoint = new ServerConnectionFactoryEndpoint(uniqueName, id, this.serverPeer, clientID, jndiBindings, prefetchSize, slowConsumers, defaultTempQueueFullSize, defaultTempQueuePageSize, defaultTempQueueDownCacheSize, dupsOKBatchSize, supportsFailover);
/*     */
/* 144 */     this.endpoints.put(uniqueName, endpoint);
/*     */
/* 146 */     ConnectionFactoryDelegate delegate = null;
/*     */
View Full Code Here

/*     */
/*     */   public synchronized void unregisterConnectionFactory(String uniqueName, boolean supportsFailover, boolean supportsLoadBalancing)
/*     */     throws Exception
/*     */   {
/* 239 */     log.trace("ConnectionFactory " + uniqueName + " being unregistered");
/* 240 */     ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)this.endpoints.remove(uniqueName);
/*     */
/* 243 */     if (endpoint == null)
/*     */     {
/* 245 */       throw new IllegalArgumentException("Cannot find endpoint with name " + uniqueName);
/*     */     }
/*     */
/* 248 */     JNDIBindings jndiBindings = endpoint.getJNDIBindings();
/*     */     Iterator i;
/* 250 */     if (jndiBindings != null)
/*     */     {
/* 252 */       List jndiNames = jndiBindings.getNames();
/* 253 */       for (i = jndiNames.iterator(); i.hasNext(); )
/*     */       {
/* 255 */         String jndiName = (String)i.next();
/* 256 */         this.initialContext.unbind(jndiName);
/* 257 */         log.debug(jndiName + " unregistered");
/*     */       }
/*     */     }
/*     */
/* 261 */     if (trace) log.trace("Removing delegate from delegates list with key=" + uniqueName + " at serverPeerID=" + this.serverPeer.getServerPeerID());
/*     */
/* 263 */     ConnectionFactoryDelegate delegate = (ConnectionFactoryDelegate)this.delegates.remove(uniqueName);
/*     */
/* 265 */     if (delegate == null)
/*     */     {
/* 267 */       throw new IllegalArgumentException("Cannot find factory with name " + uniqueName);
/*     */     }
/*     */
/* 270 */     if (this.replicator != null)
/*     */     {
/* 272 */       if (!this.replicator.remove("CF_" + uniqueName))
/*     */       {
/* 274 */         throw new IllegalStateException("Cannot find replicant to remove: CF_" + uniqueName);
/*     */       }
/*     */
/*     */     }
/*     */
/* 279 */     Dispatcher.instance.unregisterTarget(endpoint.getID(), endpoint);
/*     */   }
View Full Code Here

/* 379 */             Map failoverMap = this.serverPeer.getPostOfficeInstance().getFailoverMap();
/*     */
/* 381 */             del.setDelegates(delArr);
/* 382 */             del.setFailoverMap(failoverMap);
/*     */
/* 384 */             ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)this.endpoints.get(uniqueName);
/*     */
/* 387 */             if (endpoint == null)
/*     */             {
/* 389 */               throw new IllegalStateException("Cannot find endpoint with name " + uniqueName);
/*     */             }
/*     */
/* 392 */             rebindConnectionFactory(this.initialContext, endpoint.getJNDIBindings(), del);
/*     */
/* 394 */             endpoint.updateClusteredClients(delArr, failoverMap);
/*     */           }
/*     */         }
/*     */       }
/*     */     }
/*     */     catch (Exception e)
View Full Code Here

TOP

Related Classes of org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint

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.