[jboss-cvs] JBoss Messaging SVN: r6604 - in trunk: src/main/org/jboss/messaging/core/remoting/impl and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 28 13:54:14 EDT 2009


Author: timfox
Date: 2009-04-28 13:54:14 -0400 (Tue, 28 Apr 2009)
New Revision: 6604

Modified:
   trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java
   trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
   trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
   trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
   trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java
   trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTestBase.java
Log:
flush confirmations on server stop

Modified: trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -72,7 +72,7 @@
    // Constants -----------------------------------------------------
 
    private static final Logger log = Logger.getLogger(MessagingServerControl.class);
-   
+
    private static DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
 
    // Attributes ----------------------------------------------------
@@ -92,12 +92,12 @@
    private final NotificationBroadcasterSupport broadcaster;
 
    private boolean messageCounterEnabled;
-   
+
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
 
-   public MessagingServerControl(final PostOffice postOffice,                                
+   public MessagingServerControl(final PostOffice postOffice,
                                  final Configuration configuration,
                                  final ResourceManager resourceManager,
                                  final RemotingService remotingService,
@@ -105,7 +105,7 @@
                                  final MessageCounterManager messageCounterManager,
                                  final NotificationBroadcasterSupport broadcaster) throws Exception
    {
-      this.postOffice = postOffice;      
+      this.postOffice = postOffice;
       this.configuration = configuration;
       this.resourceManager = resourceManager;
       this.remotingService = remotingService;
@@ -117,7 +117,7 @@
 
    // Public --------------------------------------------------------
 
-    public Configuration getConfiguration()
+   public Configuration getConfiguration()
    {
       return configuration;
    }
@@ -238,7 +238,7 @@
    {
       return configuration.isSecurityEnabled();
    }
-   
+
    public void deployQueue(final String address, final String name) throws Exception
    {
       server.deployQueue(new SimpleString(address), new SimpleString(name), null, true, false);
@@ -247,7 +247,7 @@
    public void deployQueue(final String address, final String name, final String filterStr, final boolean durable) throws Exception
    {
       SimpleString filter = filterStr == null ? null : new SimpleString(filterStr);
-      
+
       server.deployQueue(new SimpleString(address), new SimpleString(name), filter, durable, false);
    }
 
@@ -259,7 +259,7 @@
    public void createQueue(final String address, final String name, final String filterStr, final boolean durable) throws Exception
    {
       SimpleString filter = filterStr == null ? null : new SimpleString(filterStr);
-      
+
       server.createQueue(new SimpleString(address), new SimpleString(name), filter, durable, false);
    }
 
@@ -309,7 +309,8 @@
    {
       if (newPeriod < MessageCounterManagerImpl.MIN_SAMPLE_PERIOD)
       {
-         throw new IllegalArgumentException("Cannot set MessageCounterSamplePeriod < " + MessageCounterManagerImpl.MIN_SAMPLE_PERIOD + " ms");
+         throw new IllegalArgumentException("Cannot set MessageCounterSamplePeriod < " + MessageCounterManagerImpl.MIN_SAMPLE_PERIOD +
+                                            " ms");
       }
 
       if (messageCounterManager != null && newPeriod != messageCounterManager.getSamplePeriod())
@@ -390,7 +391,7 @@
    public String[] listRemoteAddresses()
    {
       Set<RemotingConnection> connections = remotingService.getConnections();
-      
+
       String[] remoteAddresses = new String[connections.size()];
       int i = 0;
       for (RemotingConnection connection : connections)

Modified: trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -72,8 +72,8 @@
    // Constructors --------------------------------------------------
 
    public ReplicationOperationInvokerImpl(final String clusterPassword,
-                                         final SimpleString managementAddress,
-                                         final long managementRequestTimeout)
+                                          final SimpleString managementAddress,
+                                          final long managementRequestTimeout)
    {
       this.timeout = managementRequestTimeout;
       this.clusterPassword = clusterPassword;
@@ -82,9 +82,7 @@
 
    // Public --------------------------------------------------------
 
-   public synchronized Object invoke(final String resourceName,
-                                           final String operationName,
-                                           final Object... parameters) throws Exception
+   public synchronized Object invoke(final String resourceName, final String operationName, final Object... parameters) throws Exception
    {
       if (clientSession == null)
       {
@@ -108,22 +106,22 @@
       else
       {
          throw new Exception(ManagementHelper.getOperationExceptionMessage(reply));
-      }      
+      }
    }
-   
-   public void stop() 
+
+   public void stop()
    {
       if (requestor != null && !clientSession.isClosed())
       {
          try
          {
-            requestor.close();            
+            requestor.close();
          }
          catch (Exception e)
          {
             // this will happen if the remoting server is stopped before this method is called
             log.warn("Got Exception while closing requestor", e);
-         }                 
+         }
       }
    }
    // Package protected ---------------------------------------------

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -1261,8 +1261,6 @@
 
       private void doExecuteOutstandingDelayedResults()
       {
-         log.info("execute outstanding results");
-         
          List<Runnable> toRun = new ArrayList<Runnable>();
          
          synchronized (replicationLock)

Modified: trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -637,8 +637,7 @@
       }
 
       private synchronized void clearBindings() throws Exception
-      {
-         log.info("clearing bindings for " + name);
+      {       
          for (RemoteQueueBinding binding : new HashSet<RemoteQueueBinding>(bindings.values()))
          {
             removeBinding(binding.getClusterName(), replicatingChannel);

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -270,6 +270,13 @@
       {
          clusterManager.stop();
       }
+      
+      //Need to flush all sessions to make sure all confirmations get sent back to client
+      
+      for (ServerSession session: sessions.values())
+      {
+         session.getChannel().flushConfirmations();
+      }
 
       remotingService.stop();
 
@@ -789,8 +796,6 @@
    {
       if (configuration.isBackup())
       {
-         log.info("*** activating");
-         
          synchronized (this)
          {
             freezeBackupConnection();
@@ -942,7 +947,6 @@
 
       pagingManager.start();
 
-      log.info("starting management service");
       managementService.start();
 
       resourceManager.start();

Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -145,12 +145,9 @@
     * @throws Exception .
     */
    private void createAndBindObject(final Node node) throws Exception
-   {
-      log.info("** deploying node " + node.getNodeName());
-      
+   {           
       if (node.getNodeName().equals(CONNECTION_FACTORY_NODE_NAME))
-      {
-         log.info("Got connecti0on factory node");
+      {        
          NodeList children = node.getChildNodes();
 
          long pingPeriod = ClientSessionFactoryImpl.DEFAULT_PING_PERIOD;
@@ -401,8 +398,7 @@
       }
       else if (node.getNodeName().equals(QUEUE_NODE_NAME))
       {                 
-         String queueName = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
-         log.info("got queue " + queueName);
+         String queueName = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();      
          NodeList children = node.getChildNodes();
          for (int i = 0; i < children.getLength(); i++)
          {

Modified: trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -193,7 +193,7 @@
 
       this.ctx = ctx;
 
-      log.info("JBoss Messaging 2.0 resource adapter started");
+      log.info("JBoss Messaging resource adaptor started");
    }
 
    /**

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTestBase.java	2009-04-28 16:58:08 UTC (rev 6603)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTestBase.java	2009-04-28 17:54:14 UTC (rev 6604)
@@ -56,7 +56,6 @@
  */
 public abstract class MultiThreadRandomFailoverTestBase extends MultiThreadFailoverSupport
 {
-
    private final Logger log = Logger.getLogger(getClass());
 
    // Constants -----------------------------------------------------




More information about the jboss-cvs-commits mailing list