Package org.jboss.jms.client

Examples of org.jboss.jms.client.JBossConnectionFactory


  
   public void testUpdateConnectionFactoryOnStop() throws Exception
   {
      Connection conn = createConnectionOnServer(cf, 0);

      JBossConnectionFactory jbcf = (JBossConnectionFactory)cf;

      ClientClusteredConnectionFactoryDelegate cfDelegate =
         (ClientClusteredConnectionFactoryDelegate)jbcf.getDelegate();

      assertEquals(2, cfDelegate.getDelegates().length);

      Connection conn1 = cf.createConnection();
View Full Code Here


    */
   public void testUpdateConnectionFactoryRaceCondition() throws Exception
   {
      // This connection needs to be opened, as we need the callback to update CF from this conn
      Connection conn = createConnectionOnServer(cf, 0);
      JBossConnectionFactory jbcf = (JBossConnectionFactory) cf;
      ClientClusteredConnectionFactoryDelegate cfDelegate =
         (ClientClusteredConnectionFactoryDelegate) jbcf.getDelegate();
      assertEquals(2, cfDelegate.getDelegates().length);

      Connection conn1 = cf.createConnection();

      Connection conn2 = cf.createConnection();
View Full Code Here

   private void rebindConnectionFactory(Context ic, JNDIBindings jndiBindings,
                                        ConnectionFactoryDelegate delegate)
      throws NamingException
   {
      JBossConnectionFactory cf = new JBossConnectionFactory(delegate);

      if (jndiBindings != null)
      {
         List jndiNames = jndiBindings.getNames();
         for(Iterator i = jndiNames.iterator(); i.hasNext(); )
View Full Code Here

   private static int counter;

   private void killFailoverNode(boolean transactional) throws Exception
   {
      JBossConnectionFactory factory = (JBossConnectionFactory) ic[0]
            .lookup("/ClusteredConnectionFactory");

      Connection conn1 = createConnectionOnServer(factory, 1);

      try
View Full Code Here

      }
   }

   private void stopFailoverNode(boolean transactional) throws Exception
   {
      JBossConnectionFactory factory = (JBossConnectionFactory) ic[0]
            .lookup("/ClusteredConnectionFactory");

      Connection conn1 = createConnectionOnServer(factory, 1);

      try
View Full Code Here

      }
   }

   public void testRestartServer() throws Exception
   {
      JBossConnectionFactory cf2 = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory");

      ClientClusteredConnectionFactoryDelegate clusterCF = (ClientClusteredConnectionFactoryDelegate)cf.getDelegate();
      ClientConnectionFactoryDelegate delegates[] = clusterCF.getDelegates();
      clusterCF.closeCallback(false);

      ServerManagement.kill(1);

      //Restart the server on the same place
      ServiceAttributeOverrides attr = new ServiceAttributeOverrides();
      attr.put(ServiceContainer.REMOTING_OBJECT_NAME, "LocatorURI",delegates[1].getServerLocatorURI());
      ServerManagement.start(1,config,attr,false);

      // The server back on the same remoting port as before
      startDefaultServer(1, attr, false);

      Connection conn = null;
      try
      {
         conn = cf2.createConnection();
      }
      finally
      {
         try
         {
View Full Code Here

   /** testcase for http://jira.jboss.com/jira/browse/JBMESSAGING-1038 */
   public void testHopping() throws Exception
   {

      JBossConnectionFactory localcf = (JBossConnectionFactory)ic[0].lookup("/ClusteredConnectionFactory");
      ClientClusteredConnectionFactoryDelegate cfdelegate = (ClientClusteredConnectionFactoryDelegate)localcf.getDelegate();

      ((ClientClusteredConnectionFactoryDelegate)cf.getDelegate()).closeCallback(false);

      // After this, the CF won't get any callbacks
      cfdelegate.closeCallback(false);
View Full Code Here

      Connection conn1 = null;
      Connection conn2 = null;

      try
      {
         JBossConnectionFactory factory = (JBossConnectionFactory)ic[0].lookup("/ConnectionFactory");

         FakeClusterConnectionManager clusterConnMgr = new FakeClusterConnectionManager(0,
                                                                                        factory,
                                                                                        SecurityStore.SUCKER_USER,
                                                                                        SecurityMetadataStore.DEFAULT_SUCKER_USER_PASSWORD,
View Full Code Here

      Connection conn1 = null;
      Connection conn2 = null;

      try
      {
         JBossConnectionFactory factory = (JBossConnectionFactory)ic[0].lookup("/ConnectionFactory");

         FakeClusterConnectionManager clusterConnMgr = new FakeClusterConnectionManager(0,
                                                                                        factory,
                                                                                        SecurityStore.SUCKER_USER,
                                                                                        SecurityMetadataStore.DEFAULT_SUCKER_USER_PASSWORD,
View Full Code Here

     
      if (connections.get(nid) == null)
      {
        try
        {
           ConnectionInfo info = new ConnectionInfo(new JBossConnectionFactory(delegate), suckerUser,
                                                    suckerPassword, nid == this.nodeID, maxRetry, retryInterval);
          
           log.trace(this + " created connection info " + info);
          
           connections.put(nid, info);
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.JBossConnectionFactory

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.