Package org.jboss.jms.server.endpoint

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


      }

      int id = serverPeer.getNextObjectID();
      Version version = serverPeer.getVersion();

      ServerConnectionFactoryEndpoint endpoint =
         new ServerConnectionFactoryEndpoint(id, serverPeer, clientID,
                                             jndiBindings, prefetchSize,
                                             defaultTempQueueFullSize,
                                             defaultTempQueuePageSize,
                                             defaultTempQueueDownCacheSize,
                                             dupsOKBatchSize);
View Full Code Here


   public synchronized void unregisterConnectionFactory(String uniqueName, boolean clustered)
      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 (clustered)
      {
         setupReplicator();

         // Remove from replicants
         if (replicator != null)
         {
            //There may be no clustered post office deployed
            if (!replicator.remove(CF_PREFIX + uniqueName))
            {
               throw new IllegalStateException("Cannot find replicant to remove: " +
                  CF_PREFIX + uniqueName);
            }
         }

      }

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

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

            del.setDelegates(delArr);

            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)
      {
         log.error("Failed to rebind connection factory", e);
View Full Code Here

         return endpoint.getConnectionEndpoint().getServerPeer();
      }
      else if (obj instanceof ConnectionFactoryAdvised)
      {
         ConnectionFactoryAdvised adv = (ConnectionFactoryAdvised) obj;
         ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)adv.getEndpoint();
         return endpoint.getServerPeer();
      }
      else
      {
         throw new IllegalStateException("PoisonInterceptor doesn't support " +
            obj.getClass().getName() +
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)
      {
        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

                        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

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.