[jboss-cvs] JBoss Messaging SVN: r3299 - in branches/Branch_MC_Integration_New/src/main/org/jboss: messaging/core/contract and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 8 04:47:30 EST 2007


Author: ataylor
Date: 2007-11-08 04:47:30 -0500 (Thu, 08 Nov 2007)
New Revision: 3299

Modified:
   branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java
   branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/contract/PostOffice.java
   branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
initial microcontainer integration, fix for message store

Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java	2007-11-08 00:28:02 UTC (rev 3298)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java	2007-11-08 09:47:30 UTC (rev 3299)
@@ -46,7 +46,6 @@
 import org.jboss.messaging.core.impl.JDBCPersistenceManager;
 import org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager;
 import org.jboss.messaging.core.impl.memory.SimpleMemoryManager;
-import org.jboss.messaging.core.impl.message.SimpleMessageStore;
 import org.jboss.messaging.core.impl.postoffice.MessagingPostOffice;
 import org.jboss.messaging.core.impl.tx.TransactionRepository;
 import org.jboss.messaging.util.ExceptionUtil;
@@ -118,7 +117,6 @@
    private IDManager channelIDManager;
    private IDManager transactionIDManager;
    private MemoryManager memoryManager;
-   private MessageStore messageStore;
    private MessageCounterManager messageCounterManager;
    private ClusterConnectionManager clusterConnectionManager;
    private ClusterNotifier clusterNotifier;
@@ -193,11 +191,10 @@
          connectionManager = new SimpleConnectionManager();
          connectorManager = new SimpleConnectorManager();
          memoryManager = new SimpleMemoryManager();
-         messageStore = new SimpleMessageStore();
          destinationDeployer = new DestinationDeployer(this);
          connectionFactoryDeployer = new ConnectionFactoryDeployer(this, connector);
          txRepository =
-                 new TransactionRepository(persistenceManager, messageStore, transactionIDManager);
+                 new TransactionRepository(persistenceManager, getPostOffice().getMessageStore(), transactionIDManager);
          messageCounterManager = new MessageCounterManager(configuration.getMessageCounterSamplePeriod());
          configuration.addPropertyChangeListener(new PropertyChangeListener()
          {
@@ -236,7 +233,6 @@
          connectionManager.start();
          connectorManager.start();
          memoryManager.start();
-         messageStore.start();
          securityStore.setSuckerPassword(configuration.getSuckerPassword());
          securityStore.start();
          txRepository.start();
@@ -327,8 +323,6 @@
          connectorManager = null;
          memoryManager.stop();
          memoryManager = null;
-         messageStore.stop();
-         messageStore = null;
          securityStore.stop();
          //securityStore = null; - if securitySTore is set to null, The ServerPeer won't survive a restart of the service (stop/start)
          txRepository.stop();
@@ -870,7 +864,7 @@
 
    public MessageStore getMessageStore()
    {
-      return messageStore;
+      return getPostOffice().getMessageStore();
    }
 
    public MemoryManager getMemoryManager()
@@ -901,7 +895,7 @@
       this.jmsUserManager = jmsUserManager;
    }
 
-   public PostOffice getPostOffice() throws Exception
+   public PostOffice getPostOffice()
    {
       return postOffice;
    }

Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/contract/PostOffice.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/contract/PostOffice.java	2007-11-08 00:28:02 UTC (rev 3298)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/contract/PostOffice.java	2007-11-08 09:47:30 UTC (rev 3299)
@@ -143,5 +143,7 @@
    int getRecoveryMapSize(String queueName);
 
    void setClusterNotifier(ClusterNotifier clusterNotifier);
+
+   MessageStore getMessageStore();
 }
 

Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2007-11-08 00:28:02 UTC (rev 3298)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2007-11-08 09:47:30 UTC (rev 3299)
@@ -34,6 +34,7 @@
 import org.jboss.messaging.core.impl.JDBCSupport;
 import org.jboss.messaging.core.impl.MessagingQueue;
 import org.jboss.messaging.core.impl.jchannelfactory.MultiplexerChannelFactory;
+import org.jboss.messaging.core.impl.message.SimpleMessageStore;
 import org.jboss.messaging.core.impl.tx.Transaction;
 import org.jboss.messaging.core.impl.tx.TransactionRepository;
 import org.jboss.messaging.core.impl.tx.TxCallback;
@@ -202,6 +203,8 @@
          conditionFactory = new JMSConditionFactory();
 
          waitForBindUnbindLock = new Object();
+
+         ms = new SimpleMessageStore();
       }
 
 
@@ -2964,6 +2967,16 @@
       this.configuration = configuration;
    }
 
+   public MessageStore getMessageStore()
+   {
+      return ms;
+   }
+
+   public void setMessageStore(MessageStore ms)
+   {
+      this.ms = ms;
+   }
+
    // Inner classes --------------------------------------------------------------------------------
    
    private class SendReplicatedDeliveriesRunnable implements Runnable




More information about the jboss-cvs-commits mailing list