Package org.jboss.messaging.core.impl

Examples of org.jboss.messaging.core.impl.IDManager


         // We get references to some plugins lazily to avoid problems with circular MBean
         // dependencies

         // Create the wired components
         messageIDManager = new IDManager("MESSAGE_ID", 4096, persistenceManager);
         channelIDManager = new IDManager("CHANNEL_ID", 10, persistenceManager);
         destinationJNDIMapper = new DestinationJNDIMapper(this);
         connFactoryJNDIMapper = new ConnectionFactoryJNDIMapper(this);
         connectionManager = new SimpleConnectionManager();
         connectorManager = new SimpleConnectorManager();
         memoryManager = new SimpleMemoryManager();
View Full Code Here


         // We get references to some plugins lazily to avoid problems with circular MBean
         // dependencies

         // Create the wired components
         messageIDManager = new IDManager("MESSAGE_ID", 4096, persistenceManager);
         channelIDManager = new IDManager("CHANNEL_ID", 10, persistenceManager);
         destinationJNDIMapper = new DestinationJNDIMapper(this);
         connFactoryJNDIMapper = new ConnectionFactoryJNDIMapper(this);
         connectionManager = new SimpleConnectionManager();
         connectorManager = new SimpleConnectorManager();
         memoryManager = new SimpleMemoryManager();
View Full Code Here

        
         PersistenceManager pm = serverPeer.getPersistenceManagerInstance();
        
         TransactionRepository tr = serverPeer.getTxRepository();
        
         IDManager idManager = serverPeer.getChannelIDManager();
        
         int nodeId = serverPeer.getServerPeerID();
        
         ClusterNotifier clusterNotifier = serverPeer.getClusterNotifier();
View Full Code Here

         // We get references to some plugins lazily to avoid problems with circular MBean
         // dependencies

         // Create the wired components
         messageIDManager = new IDManager("MESSAGE_ID", 4096, persistenceManager);
         channelIDManager = new IDManager("CHANNEL_ID", 10, persistenceManager);
         destinationJNDIMapper = new DestinationJNDIMapper(this);
         connFactoryJNDIMapper = new ConnectionFactoryJNDIMapper(this);
         connectionManager = new SimpleConnectionManager();
         connectorManager = new SimpleConnectorManager();
         memoryManager = new SimpleMemoryManager();
View Full Code Here

      super.tearDown();
   }
  
   public void test1() throws Exception
   {
      IDManager idm = new IDManager("test_counter", 1000, pm);
      idm.start();
     
      int blockSize = 37;
           
      long nextLow = Long.MIN_VALUE;
     
      for (int i = 0; i < 1000; i++)
      {
         IDBlock block = idm.getIDBlock(blockSize);
                  
         assertTrue(block.getLow() >= nextLow);
        
         assertEquals(blockSize, 1 + block.getHigh() - block.getLow());
        
         nextLow = block.getHigh() + 1;        
      }
     
      idm.stop();
   }
View Full Code Here

      idm.stop();
   }
  
   public void test2() throws Exception
   {
      IDManager idm = new IDManager("test_counter2", 100, pm);
      idm.start();
        
      for (int i = 0; i < 1000; i++)
      {
         long id = idm.getID();
        
         assertEquals(i, id);
      }
     
      idm.stop();
   }
View Full Code Here

        
         // We get references to some plugins lazily to avoid problems with circular MBean
         // dependencies

         // Create the wired components
         messageIDManager = new IDManager("MESSAGE_ID", 4096, persistenceManager);
         channelIDManager = new IDManager("CHANNEL_ID", 10, persistenceManager);
         transactionIDManager = new IDManager("TRANSACTION_ID", 1024, persistenceManager);
         destinationJNDIMapper = new DestinationJNDIMapper(this);
         connFactoryJNDIMapper = new ConnectionFactoryJNDIMapper(this);
         connectionManager = new SimpleConnectionManager();        
         connectorManager = new SimpleConnectorManager();
         memoryManager = new SimpleMemoryManager();
View Full Code Here

                                                      PersistenceManager pm)
      throws Exception
   {
      FilterFactory ff = new SimpleFilterFactory();
      ConditionFactory cf = new SimpleConditionFactory();
      IDManager idm = new IDManager("channel_id", 10, pm);
      idm.start();
      ClusterNotifier cn = new DefaultClusterNotifier();

      // we're testing with JGroups stack configurations we're shipping with the release

      String configFilePath = sc.getPersistenceConfigFile(true);
View Full Code Here

                                                          PersistenceManager pm)
     throws Exception
   {
     FilterFactory ff = new SimpleFilterFactory();
     ConditionFactory cf = new SimpleConditionFactory();
      IDManager idm = new IDManager("channel_id", 10, pm);
      ClusterNotifier cn = new DefaultClusterNotifier();

     MessagingPostOffice postOffice =
       new MessagingPostOffice(sc.getDataSource(), sc.getTransactionManager(),
                             sc.getPostOfficeSQLProperties(),
View Full Code Here

                  sc.getPersistenceManagerSQLProperties(),
                  true, true, true, false, 100, !sc.getDatabaseName().equals("oracle"));
      ((JDBCPersistenceManager)pm).injectNodeID(1);
      pm.start();

      transactionIDManager = new IDManager("TRANSACTION_ID", 10, pm);
      transactionIDManager.start();

      ms = new SimpleMessageStore();
      ms.start();

      tr = new TransactionRepository(pm, ms, transactionIDManager);
      tr.start();

      channelIDManager = new IDManager("CHANNEL_ID", 10, pm);
      channelIDManager.start();

      conditionFactory = new SimpleConditionFactory();

      log.debug("setup done");
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.impl.IDManager

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.