[jboss-cvs] JBoss Messaging SVN: r3057 - in trunk: src/main/org/jboss/jms/server/connectionmanager and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 27 14:07:53 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-08-27 14:07:52 -0400 (Mon, 27 Aug 2007)
New Revision: 3057

Modified:
   trunk/src/main/org/jboss/jms/server/ConnectionManager.java
   trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
   trunk/tests/build.xml
   trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java
   trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
   trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java
Log:
Test fixes

Modified: trunk/src/main/org/jboss/jms/server/ConnectionManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ConnectionManager.java	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/src/main/org/jboss/jms/server/ConnectionManager.java	2007-08-27 18:07:52 UTC (rev 3057)
@@ -60,7 +60,7 @@
     */
    List getActiveConnections();
 
-   void addConnectionFactoryCallback(String uniqueName, String JVMID, ServerInvokerCallbackHandler handler);
+   void addConnectionFactoryCallback(String uniqueName, String JVMID, String remotingSessionID, ServerInvokerCallbackHandler handler);
 
    void removeConnectionFactoryCallback(String uniqueName, String JVMID, ServerInvokerCallbackHandler handler);
    

Modified: trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java	2007-08-27 18:07:52 UTC (rev 3057)
@@ -67,7 +67,7 @@
    private Map</** VMID */String, Map</** RemoteSessionID */String, ConnectionEndpoint>> jmsClients;
 
    // Map<remotingClientSessionID<String> - jmsClientVMID<String>
-   private Map remotingSessions;
+   private Map<String, String> remotingSessions;
 
    // Set<ConnectionEndpoint>
    private Set activeConnectionEndpoints;
@@ -161,7 +161,7 @@
          (clientToServer ?
             "with the connection to remote client ":
             "trying to send a message to remote client ") +
-         remotingSessionID + ". It is possible the client has exited without closing " +
+         remotingSessionID + ", jmsClientID=" + jmsClientID + ". It is possible the client has exited without closing " +
          "its connection(s) or there is a network problem. All connection resources " +
          "corresponding to that client process will now be removed.");
 
@@ -197,8 +197,9 @@
    }
 
    /** Synchronized is not really needed.. just to be safe as this is not supposed to be highly contended */
-   public synchronized void addConnectionFactoryCallback(String uniqueName, String JVMID, ServerInvokerCallbackHandler handler)
+   public synchronized void addConnectionFactoryCallback(String uniqueName, String JVMID, String remotingSessionID, ServerInvokerCallbackHandler handler)
    {
+      remotingSessions.put(remotingSessionID, JVMID);
       getCFInfo(uniqueName).addClient(JVMID, handler);
    }
 
@@ -330,7 +331,11 @@
 
    private synchronized void closeConsumersForClientVMID(String jmsClientID)
    {
-   	// Remoting only provides one pinger per invoker, not per connection therefore when the pinger
+      if (jmsClientID == null)
+      {
+         return;
+      }
+      // Remoting only provides one pinger per invoker, not per connection therefore when the pinger
       // dies we must close ALL connections corresponding to that jms client ID.
 
       Map<String, ConnectionEndpoint> endpoints = jmsClients.get(jmsClientID);

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java	2007-08-27 18:07:52 UTC (rev 3057)
@@ -282,7 +282,7 @@
                            ServerInvokerCallbackHandler callbackHandler) throws JMSException
    {
       log.debug("Adding callbackHandler on ConnectionFactory");
-      serverPeer.getConnectionManager().addConnectionFactoryCallback(this.uniqueName, VMID, callbackHandler);
+      serverPeer.getConnectionManager().addConnectionFactoryCallback(this.uniqueName, VMID, remotingSessionID, callbackHandler);
    }
 
    public void removeCallback(String VMID, String remotingSessionID,

Modified: trunk/tests/build.xml
===================================================================
--- trunk/tests/build.xml	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/tests/build.xml	2007-08-27 18:07:52 UTC (rev 3057)
@@ -95,7 +95,7 @@
    <property name="build.tests.stylesheets" value="${tests.output}/stylesheets"/>
    <property name="build.tests.archive" value="jboss-messaging-tests.jar"/>
    <property name="build.tests.ejbarchive" value="jboss-messaging-tests-ejb.jar"/>
-   <property name="objectstore.dir" value="${tests.root}/bin/ObjectStore"/>
+   <property name="objectstore.dir" value="${tests.root}/output/ObjectStore"/>
 
    <!--
         JUnit configuration (values specified in ./build.properties have priority)

Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java	2007-08-27 18:07:52 UTC (rev 3057)
@@ -210,6 +210,9 @@
          catch (Throwable ignored)
          {
          }
+
+         // The next test will fail If I don't kill the server started here on this test
+         ServerManagement.kill(1);
       }
       
    }

Modified: trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java	2007-08-27 18:07:52 UTC (rev 3057)
@@ -374,6 +374,14 @@
             append(index).append(' ');
       }
 
+
+      String objectStoreDir = System.getProperty("objectstore.dir");
+
+      if (objectStoreDir != null)
+      {
+         sb.append("-Dobjectstore.dir=" + objectStoreDir).append(" ");
+      }
+
       String moduleOutput = System.getProperty("module.output");
       if (moduleOutput == null)
       {

Modified: trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java	2007-08-27 04:57:30 UTC (rev 3056)
+++ trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java	2007-08-27 18:07:52 UTC (rev 3057)
@@ -1049,8 +1049,17 @@
    {
       if (tm == null)
       {
-      	//We must ensure each node has its own object store
+
+         String objectStoreDir = System.getProperty("objectstore.dir");
+         log.trace("ObjectStoreDir===" + objectStoreDir);
+
+         //We must ensure each node has its own object store
          String newObjectStore = "TestObjectStore-" + new GUID().toString();
+
+         if (objectStoreDir != null)
+         {
+            newObjectStore = objectStoreDir + "/" + newObjectStore;
+         }
          
          log.info("Setting com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR to " + newObjectStore);
 




More information about the jboss-cvs-commits mailing list