[jboss-cvs] JBoss Messaging SVN: r2883 - in trunk: src/main/org/jboss/jms/client and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 12 19:36:17 EDT 2007


Author: timfox
Date: 2007-07-12 19:36:16 -0400 (Thu, 12 Jul 2007)
New Revision: 2883

Modified:
   trunk/src/etc/server/default/deploy/db2-persistence-service.xml
   trunk/src/etc/server/default/deploy/mssql-persistence-service.xml
   trunk/src/etc/server/default/deploy/mysql-persistence-service.xml
   trunk/src/etc/server/default/deploy/oracle-persistence-service.xml
   trunk/src/etc/server/default/deploy/postgresql-persistence-service.xml
   trunk/src/etc/server/default/deploy/sybase-persistence-service.xml
   trunk/src/main/org/jboss/jms/client/JBossSession.java
   trunk/src/main/org/jboss/jms/client/container/ClientConsumer.java
   trunk/src/main/org/jboss/jms/client/container/ClosedInterceptor.java
   trunk/src/main/org/jboss/jms/client/container/ConnectionFailureListener.java
   trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
   trunk/src/main/org/jboss/jms/client/remoting/ConsolidatedRemotingConnectionListener.java
   trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
   trunk/src/main/org/jboss/jms/client/state/SessionState.java
   trunk/src/main/org/jboss/jms/message/MessageIdGeneratorFactory.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
   trunk/src/main/org/jboss/messaging/core/impl/ChannelSupport.java
   trunk/tests/src/org/jboss/test/messaging/jms/message/MessageTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/stress/StressTestBase.java
   trunk/tests/src/org/jboss/test/messaging/jms/stress/Transactional2PCReceiver.java
Log:
few changes to logging mainly also added FK constraint to db


Modified: trunk/src/etc/server/default/deploy/db2-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/db2-persistence-service.xml	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/etc/server/default/deploy/db2-persistence-service.xml	2007-07-12 23:36:16 UTC (rev 2883)
@@ -31,13 +31,13 @@
       <attribute name="UsingBatchUpdates">true</attribute>
       
       <attribute name="SqlProperties"><![CDATA[
-   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT, TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
+   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY SMALLINT, HEADERS BLOB, PAYLOAD BLOB, CHANNEL_COUNT INTEGER, TYPE SMALLINT, PRIMARY KEY (MESSAGE_ID))   
+   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
    CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID)
    CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF (ORD)
    CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JBM_MSG_REF_PAGE_ORD ON JBM_MSG_REF (PAGE_ORD)
    CREATE_IDX_MESSAGE_REF_MESSAGE_ID=CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF (MESSAGE_ID)
    CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)
-   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY SMALLINT, HEADERS BLOB, PAYLOAD BLOB, CHANNEL_COUNT INTEGER, TYPE SMALLINT, PRIMARY KEY (MESSAGE_ID))
    CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID BIGINT, BRANCH_QUAL BLOB(254), FORMAT_ID INTEGER, GLOBAL_TXID BLOB(254), PRIMARY KEY (TRANSACTION_ID))
    CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME))
    INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)

Modified: trunk/src/etc/server/default/deploy/mssql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/mssql-persistence-service.xml	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/etc/server/default/deploy/mssql-persistence-service.xml	2007-07-12 23:36:16 UTC (rev 2883)
@@ -34,13 +34,13 @@
       <attribute name="UsingBatchUpdates">true</attribute>
       
       <attribute name="SqlProperties"><![CDATA[
-   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT, TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INT, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
+   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, HEADERS IMAGE, PAYLOAD IMAGE, CHANNEL_COUNT INT, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID))      
+   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INT, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
    CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID)
    CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF (ORD)
    CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JBM_MSG_REF_PAGE_ORD ON JBM_MSG_REF (PAGE_ORD)
    CREATE_IDX_MESSAGE_REF_MESSAGE_ID=CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF (MESSAGE_ID)
    CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)
-   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, HEADERS IMAGE, PAYLOAD IMAGE, CHANNEL_COUNT INT, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID))
    CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID BIGINT, BRANCH_QUAL VARBINARY(254), FORMAT_ID INT, GLOBAL_TXID VARBINARY(254), PRIMARY KEY (TRANSACTION_ID))
    CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME))
    INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)

Modified: trunk/src/etc/server/default/deploy/mysql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/mysql-persistence-service.xml	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/etc/server/default/deploy/mysql-persistence-service.xml	2007-07-12 23:36:16 UTC (rev 2883)
@@ -34,13 +34,13 @@
       <attribute name="UsingBatchUpdates">true</attribute>
       
       <attribute name="SqlProperties"><![CDATA[
-   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT, TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID)) ENGINE = INNODB
+   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, HEADERS MEDIUMBLOB, PAYLOAD LONGBLOB, CHANNEL_COUNT INTEGER, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID)) ENGINE = INNODB      
+   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID)) ENGINE = INNODB
    CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID)
    CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF (ORD)
    CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JBM_MSG_REF_PAGE_ORD ON JBM_MSG_REF (PAGE_ORD)
    CREATE_IDX_MESSAGE_REF_MESSAGE_ID=CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF (MESSAGE_ID)
    CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)
-   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, HEADERS MEDIUMBLOB, PAYLOAD LONGBLOB, CHANNEL_COUNT INTEGER, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID)) ENGINE = INNODB
    CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID BIGINT, BRANCH_QUAL VARBINARY(254), FORMAT_ID INTEGER, GLOBAL_TXID VARBINARY(254), PRIMARY KEY (TRANSACTION_ID)) ENGINE = INNODB
    CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME)) ENGINE = INNODB
    INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)

Modified: trunk/src/etc/server/default/deploy/oracle-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/oracle-persistence-service.xml	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/etc/server/default/deploy/oracle-persistence-service.xml	2007-07-12 23:36:16 UTC (rev 2883)
@@ -34,13 +34,13 @@
       <attribute name="UsingBatchUpdates">true</attribute>
       
       <attribute name="SqlProperties"><![CDATA[
-   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID INTEGER, MESSAGE_ID INTEGER, TRANSACTION_ID INTEGER, STATE CHAR(1), ORD INTEGER, PAGE_ORD INTEGER, DELIVERY_COUNT INTEGER, SCHED_DELIVERY INTEGER, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
+   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID INTEGER, RELIABLE CHAR(1), EXPIRATION INTEGER, TIMESTAMP INTEGER, PRIORITY INTEGER, HEADERS BLOB, PAYLOAD BLOB, CHANNEL_COUNT INTEGER, TYPE INTEGER, PRIMARY KEY (MESSAGE_ID))      
+   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID INTEGER, MESSAGE_ID INTEGER REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID INTEGER, STATE CHAR(1), ORD INTEGER, PAGE_ORD INTEGER, DELIVERY_COUNT INTEGER, SCHED_DELIVERY INTEGER, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
    CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID)
    CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF (ORD)
    CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JBM_MSG_REF_PAGE_ORD ON JBM_MSG_REF (PAGE_ORD)
    CREATE_IDX_MESSAGE_REF_MESSAGE_ID=CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF (MESSAGE_ID)
-   CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)
-   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID INTEGER, RELIABLE CHAR(1), EXPIRATION INTEGER, TIMESTAMP INTEGER, PRIORITY INTEGER, HEADERS BLOB, PAYLOAD BLOB, CHANNEL_COUNT INTEGER, TYPE INTEGER, PRIMARY KEY (MESSAGE_ID))
+   CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)   
    CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID INTEGER, BRANCH_QUAL RAW(254), FORMAT_ID INTEGER, GLOBAL_TXID RAW(254), PRIMARY KEY (TRANSACTION_ID))
    CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR2(255), NEXT_ID INTEGER, PRIMARY KEY(NAME))
    INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)

Modified: trunk/src/etc/server/default/deploy/postgresql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/postgresql-persistence-service.xml	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/etc/server/default/deploy/postgresql-persistence-service.xml	2007-07-12 23:36:16 UTC (rev 2883)
@@ -34,13 +34,13 @@
       <attribute name="UsingBatchUpdates">true</attribute>
       
       <attribute name="SqlProperties"><![CDATA[
-   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT, TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
+   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY SMALLINT, HEADERS BYTEA, PAYLOAD BYTEA, CHANNEL_COUNT INTEGER, TYPE SMALLINT, PRIMARY KEY (MESSAGE_ID))      
+   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
    CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID)
    CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF (ORD)
    CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JBM_MSG_REF_PAGE_ORD ON JBM_MSG_REF (PAGE_ORD)
    CREATE_IDX_MESSAGE_REF_MESSAGE_ID=CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF (MESSAGE_ID)
-   CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)
-   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY SMALLINT, HEADERS BYTEA, PAYLOAD BYTEA, CHANNEL_COUNT INTEGER, TYPE SMALLINT, PRIMARY KEY (MESSAGE_ID))
+   CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)   
    CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID BIGINT, BRANCH_QUAL BYTEA, FORMAT_ID INTEGER, GLOBAL_TXID BYTEA, PRIMARY KEY (TRANSACTION_ID))
    CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME))
    INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)

Modified: trunk/src/etc/server/default/deploy/sybase-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/sybase-persistence-service.xml	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/etc/server/default/deploy/sybase-persistence-service.xml	2007-07-12 23:36:16 UTC (rev 2883)
@@ -39,13 +39,13 @@
       <attribute name="UsingTrailingByte">true</attribute>
       
       <attribute name="SqlProperties"><![CDATA[
-   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID DECIMAL(19, 0), MESSAGE_ID DECIMAL(19, 0), TRANSACTION_ID DECIMAL(19, 0) NULL, STATE CHAR(1), ORD DECIMAL(19, 0), PAGE_ORD DECIMAL(19, 0) NULL, DELIVERY_COUNT INTEGER, SCHED_DELIVERY DECIMAL(19, 0), PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
+   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID DECIMAL(19, 0), RELIABLE CHAR(1), EXPIRATION DECIMAL(19, 0), TIMESTAMP DECIMAL(19, 0), PRIORITY TINYINT, HEADERS IMAGE NULL, PAYLOAD IMAGE NULL, CHANNEL_COUNT INTEGER, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID))      
+   CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID DECIMAL(19, 0), MESSAGE_ID DECIMAL(19, 0) REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID DECIMAL(19, 0) NULL, STATE CHAR(1), ORD DECIMAL(19, 0), PAGE_ORD DECIMAL(19, 0) NULL, DELIVERY_COUNT INTEGER, SCHED_DELIVERY DECIMAL(19, 0), PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
    CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID)
    CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF (ORD)
    CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JBM_MSG_REF_PAGE_ORD ON JBM_MSG_REF (PAGE_ORD)
    CREATE_IDX_MESSAGE_REF_MESSAGE_ID=CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF (MESSAGE_ID)
-   CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)
-   CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID DECIMAL(19, 0), RELIABLE CHAR(1), EXPIRATION DECIMAL(19, 0), TIMESTAMP DECIMAL(19, 0), PRIORITY TINYINT, HEADERS IMAGE NULL, PAYLOAD IMAGE NULL, CHANNEL_COUNT INTEGER, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID))
+   CREATE_IDX_MESSAGE_REF_SCHED_DELIVERY=CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF (SCHED_DELIVERY)   
    CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID DECIMAL(19, 0), BRANCH_QUAL VARBINARY(254) NULL, FORMAT_ID INTEGER NULL, GLOBAL_TXID VARBINARY(254) NULL, PRIMARY KEY (TRANSACTION_ID))
    CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR(255), NEXT_ID DECIMAL(19, 0), PRIMARY KEY(NAME))
    INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)

Modified: trunk/src/main/org/jboss/jms/client/JBossSession.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/JBossSession.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/JBossSession.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -232,7 +232,7 @@
          throw new InvalidDestinationException("Not a JBossDestination:" + d);
       }
 
-      log.debug("attempting to create consumer for destination:" + d + (messageSelector == null ? "" : ", messageSelector: " + messageSelector) + (noLocal ? ", noLocal = true" : ""));
+      log.trace("attempting to create consumer for destination:" + d + (messageSelector == null ? "" : ", messageSelector: " + messageSelector) + (noLocal ? ", noLocal = true" : ""));
 
       ConsumerDelegate cd = delegate.
          createConsumerDelegate((JBossDestination)d, messageSelector, noLocal, null, false, true);

Modified: trunk/src/main/org/jboss/jms/client/container/ClientConsumer.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ClientConsumer.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/container/ClientConsumer.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -344,7 +344,7 @@
    
    public void close(long lastDeliveryId) throws JMSException
    {     
-   	log.debug(this + " closing");
+   	log.trace(this + " closing");
          	
    	//Wait for the last delivery to arrive
       waitForLastDelivery(lastDeliveryId);

Modified: trunk/src/main/org/jboss/jms/client/container/ClosedInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ClosedInterceptor.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/container/ClosedInterceptor.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -254,7 +254,7 @@
    protected synchronized void closed() throws Throwable
    {
       state = CLOSED;
-      log.debug(this + " closed");
+      log.trace(this + " closed");
    }
 
    /**

Modified: trunk/src/main/org/jboss/jms/client/container/ConnectionFailureListener.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ConnectionFailureListener.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/container/ConnectionFailureListener.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -57,7 +57,7 @@
    {
       try
       {
-         log.debug(this + " is being notified of connection failure: " + throwable);
+         log.trace(this + " is being notified of connection failure: " + throwable);
 
          return fcc.failureDetected(throwable, this, remotingConnection);
       }

Modified: trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -122,7 +122,7 @@
          if (invocation.getTargetObject() instanceof ClientSessionDelegate &&
             (methodName.equals("send") || methodName.equals("sendTransaction")))
          {
-            log.debug(this + " caught " + methodName + "() invocation, enabling check for duplicates");
+            log.trace(this + " caught " + methodName + "() invocation, enabling check for duplicates");
 
             Object[] arguments = ((MethodInvocation)invocation).getArguments();
             arguments[1] = Boolean.TRUE;
@@ -136,13 +136,13 @@
          if (methodName.equals("cancelDelivery") ||
             methodName.equals("cancelDeliveries"))
          {
-            log.debug(this + " NOT resuming " + methodName + "(), let it wither and die");
+            log.trace(this + " NOT resuming " + methodName + "(), let it wither and die");
             
             return null;
          }
          else
          {            
-            log.debug(this + " resuming " + methodName + "()");
+            log.trace(this + " resuming " + methodName + "()");
             
             return invocation.invokeNext();
          }

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -95,7 +95,7 @@
       
       // It doesn't really matter which one
       
-      log.debug("Getting AOP stack, there are " + delegates.length + " delegates to choose from");
+      log.trace("Getting AOP stack, there are " + delegates.length + " delegates to choose from");
             
       for (int server = 0; server < delegates.length; server++)
       {
@@ -103,7 +103,7 @@
          {
             ConnectionFactoryDelegate aopStackProvider = delegates[server];
 
-            log.debug("getting AOP stack from " + aopStackProvider);
+            log.trace("getting AOP stack from " + aopStackProvider);
 
             return aopStackProvider.getClientAOPStack();
          }

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -101,7 +101,7 @@
 
    public void synchronizeWith(DelegateSupport nd) throws Exception
    {
-      log.debug(this + " synchronizing with " + nd);
+      log.trace(this + " synchronizing with " + nd);
 
       super.synchronizeWith(nd);
 

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -82,7 +82,7 @@
 
    public void synchronizeWith(DelegateSupport nd) throws Exception
    {
-      log.debug(this + " synchronizing with " + nd);
+      log.trace(this + " synchronizing with " + nd);
 
       super.synchronizeWith(nd);
 

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -109,7 +109,7 @@
 
    public void synchronizeWith(DelegateSupport nd) throws Exception
    {
-      log.debug(this + " synchronizing with " + nd);
+      log.trace(this + " synchronizing with " + nd);
 
       super.synchronizeWith(nd);
 

Modified: trunk/src/main/org/jboss/jms/client/remoting/ConsolidatedRemotingConnectionListener.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/ConsolidatedRemotingConnectionListener.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/remoting/ConsolidatedRemotingConnectionListener.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -73,7 +73,7 @@
       {
          try
          {
-            log.debug(this + " forwarding remoting failure \"" + throwable + "\" to " + remotingListenerCopy);
+            log.trace(this + " forwarding remoting failure \"" + throwable + "\" to " + remotingListenerCopy);
             
             //We only forward to the JMS listener if failover did not successfully handle the exception
             //If failover handled the exception transparently then there is effectively no problem
@@ -118,7 +118,7 @@
 
    public synchronized void setDelegateListener(ConnectionFailureListener l)
    {
-      log.debug(this + " setting delegate listener " + l);
+      log.trace(this + " setting delegate listener " + l);
       
       if (remotingListener != null)
       {
@@ -130,7 +130,7 @@
 
    public synchronized void addJMSExceptionListener(ExceptionListener jmsExceptionListener)
    {
-      log.debug(this + " adding JMS exception listener " + jmsExceptionListener);
+      log.trace(this + " adding JMS exception listener " + jmsExceptionListener);
       this.jmsExceptionListener = jmsExceptionListener;
    }
 
@@ -146,7 +146,7 @@
    {
       jmsExceptionListener = null;
       remotingListener = null;
-      log.debug(this + " cleared");
+      log.trace(this + " cleared");
    }
 
    public void setConnectionState(ConnectionState state)

Modified: trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -218,12 +218,12 @@
 
       if (doPushCallbacks)
       {
-         log.debug(configurer + " is doing push callbacks");
+         log.trace(configurer + " is doing push callbacks");
          client.addListener(invokerCallbackHandler, metadata, null, true);
       }
       else
       {
-         log.debug(configurer + " is simulating push callbacks");
+         log.trace(configurer + " is simulating push callbacks");
          client.addListener(invokerCallbackHandler, metadata);
       }
    }
@@ -249,7 +249,7 @@
       serverLocator = new InvokerLocator(serverLocatorURI);
       this.clientPing = clientPing;
 
-      log.debug(this + " created");
+      log.trace(this + " created");
    }
 
    // Public ---------------------------------------------------------------------------------------
@@ -285,12 +285,12 @@
 
       addInvokerCallbackHandler(this, client, metadata, serverLocator, callbackManager);
       
-      log.debug(this + " started");
+      log.trace(this + " started");
    }
 
    public void stop()
    {
-      log.debug(this + " closing");
+      log.trace(this + " closing");
 
       // explicitly remove the callback listener, to avoid race conditions on server
       // (http://jira.jboss.org/jira/browse/JBMESSAGING-535)
@@ -322,7 +322,7 @@
 
       client = null;
       
-      log.debug(this + " closed");
+      log.trace(this + " closed");
    }
 
    public Client getRemotingClient()
@@ -399,7 +399,7 @@
 
       client.removeConnectionListener(remotingConnectionListener);
 
-      log.debug(this + " removed consolidated connection listener from " + client);
+      log.trace(this + " removed consolidated connection listener from " + client);
       ConsolidatedRemotingConnectionListener toReturn = remotingConnectionListener;
       remotingConnectionListener = null;
       return toReturn;

Modified: trunk/src/main/org/jboss/jms/client/state/SessionState.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/state/SessionState.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/client/state/SessionState.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -222,10 +222,10 @@
                                       consState.isNoLocal(),
                                       consState.getSubscriptionName(),
                                       consState.isConnectionConsumer(), true);
-            log.debug(this + " created new consumer " + newConsDelegate);
+            log.trace(this + " created new consumer " + newConsDelegate);
 
             consDelegate.synchronizeWith(newConsDelegate);
-            log.debug(this + " synchronized failover consumer " + consDelegate);
+            log.trace(this + " synchronized failover consumer " + consDelegate);
          }
          else if (child instanceof ProducerState)
          {
@@ -235,10 +235,10 @@
             // create a new producer over the new session for each producer on the old session
             ClientProducerDelegate newProdDelegate = (ClientProducerDelegate)newDelegate.
                createProducerDelegate((JBossDestination)prodState.getDestination());
-            log.debug(this + " created new producer " + newProdDelegate);
+            log.trace(this + " created new producer " + newProdDelegate);
 
             prodDelegate.synchronizeWith(newProdDelegate);
-            log.debug(this + " synchronized failover producer " + prodDelegate);
+            log.trace(this + " synchronized failover producer " + prodDelegate);
          }
          else if (child instanceof BrowserState)
          {
@@ -250,10 +250,10 @@
             ClientBrowserDelegate newBrowserDelegate = (ClientBrowserDelegate)newDelegate.
                createBrowserDelegate(browserState.getJmsDestination(),
                                      browserState.getMessageSelector());
-            log.debug(this + " created new browser " + newBrowserDelegate);
+            log.trace(this + " created new browser " + newBrowserDelegate);
 
             browserDelegate.synchronizeWith(newBrowserDelegate);
-            log.debug(this + " synchronized failover browser " + browserDelegate);
+            log.trace(this + " synchronized failover browser " + browserDelegate);
          }
       }
 
@@ -273,7 +273,7 @@
          // Non transacted session or an XA session with no transaction set (it falls back
          // to AUTO_ACKNOWLEDGE)
 
-         log.debug(this + " is not transacted (or XA with no transaction set), " +
+         log.trace(this + " is not transacted (or XA with no transaction set), " +
             "retrieving deliveries from session state");
 
          // We remove any unacked non-persistent messages - this is because we don't want to ack
@@ -287,7 +287,7 @@
                if (!info.getMessageProxy().getMessage().isReliable())
                {
                   i.remove();
-                  log.debug("removed non persistent delivery " + info);
+                  log.trace("removed non persistent delivery " + info);
                }
             }
 
@@ -312,7 +312,7 @@
             }
          }
 
-         log.debug(this + " retrieved " + ackInfos.size() + " deliveries");
+         log.trace(this + " retrieved " + ackInfos.size() + " deliveries");
       }
       else
       {
@@ -340,7 +340,7 @@
       //Note! We ALWAYS call recoverDeliveries even if there are no deliveries since it also does other stuff
       //like remove from recovery Area refs corresponding to messages in client consumer buffers
       
-      log.debug(this + " sending delivery recovery " + recoveryInfos + " on failover");
+      log.trace(this + " sending delivery recovery " + recoveryInfos + " on failover");
       newDelegate.recoverDeliveries(recoveryInfos, oldSessionID);
    }
    

Modified: trunk/src/main/org/jboss/jms/message/MessageIdGeneratorFactory.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/MessageIdGeneratorFactory.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/message/MessageIdGeneratorFactory.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -85,7 +85,7 @@
          h.refCount++;
       }
 
-      log.debug("checked out MessageIdGenerator for " + serverId +
+      log.trace("checked out MessageIdGenerator for " + serverId +
                 ", reference count is " + h.refCount);
 
       return h.generator;
@@ -107,11 +107,11 @@
       if (h.refCount == 0)
       {
          holders.remove(in);
-         log.debug("checked in and removed MessageIdGenerator for " + serverId);
+         log.trace("checked in and removed MessageIdGenerator for " + serverId);
       }
       else
       {
-         log.debug("checked in MessageIdGenerator for " + serverId +
+         log.trace("checked in MessageIdGenerator for " + serverId +
                    ", reference count is " + h.refCount);
       }
    }
@@ -119,7 +119,7 @@
    public synchronized void clear()
    {
       holders.clear();
-      log.debug("cleared MessageIdGeneratorFactory");
+      log.trace("cleared MessageIdGeneratorFactory");
    }
 
    // Package protected ---------------------------------------------

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -91,7 +91,7 @@
             throw new IllegalStateException("Browser is closed");
          }
 
-         log.debug(this + " is being resetted");
+         log.trace(this + " is being resetted");
 
          iterator = createIterator();
       }
@@ -199,7 +199,7 @@
       {
          localClose();
          session.removeBrowser(id);
-         log.debug(this + " closed");
+         log.trace(this + " closed");
       }   
       catch (Throwable t)
       {

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -212,7 +212,7 @@
       }
       else
       {
-         log.debug("ServerInvokerCallbackHandler callback Client is not available: " +
+         log.trace("ServerInvokerCallbackHandler callback Client is not available: " +
                    "must be using pull callbacks");
       }
    }
@@ -226,7 +226,7 @@
    {
       try
       {
-         log.debug(this + " creating " + (transacted ? "transacted" : "non transacted") +
+         log.trace(this + " creating " + (transacted ? "transacted" : "non transacted") +
             " session, " + Util.acknowledgmentMode(acknowledgmentMode) + ", " +
             (isXA ? "XA": "non XA"));
          
@@ -261,11 +261,11 @@
 
          Dispatcher.instance.registerTarget(sessionID, sessionAdvised);
 
-         log.debug("created and registered " + ep);
+         log.trace("created and registered " + ep);
          
          ClientSessionDelegate d = new ClientSessionDelegate(sessionID, dupsOKBatchSize);
 
-         log.debug("created " + d);
+         log.trace("created " + d);
          
          return d;
       }
@@ -305,7 +305,7 @@
             throw new IllegalStateException("Cannot set clientID, already set as " + this.clientID);
          }
 
-         log.debug(this + "setting client ID to " + clientID);
+         log.trace(this + "setting client ID to " + clientID);
 
          this.clientID = clientID;
       }
@@ -324,7 +324,7 @@
             throw new IllegalStateException("Connection is closed");
          }
          setStarted(true);
-         log.debug(this + " started");
+         log.trace(this + " started");
       }
       catch (Throwable t)
       {
@@ -343,7 +343,7 @@
          
          setStarted(false);
          
-         log.debug("Connection " + id + " stopped");
+         log.trace("Connection " + id + " stopped");
       }
       catch (Throwable t)
       {
@@ -774,52 +774,49 @@
       // used on checkForDuplicates...
       // we only check the first iteration
       boolean firstIteration = true;
+        
+      for (Iterator i = txState.getSessionStates().iterator(); i.hasNext(); )
+      {
+         SessionTxState sessionState = (SessionTxState)i.next();
 
-      synchronized (sessions)
-      {         
-         for (Iterator i = txState.getSessionStates().iterator(); i.hasNext(); )
-         {
-            SessionTxState sessionState = (SessionTxState)i.next();
+         // send the messages
 
-            // send the messages
-
-            for (Iterator j = sessionState.getMsgs().iterator(); j.hasNext(); )
+         for (Iterator j = sessionState.getMsgs().iterator(); j.hasNext(); )
+         {
+            JBossMessage message = (JBossMessage)j.next();
+            if (checkForDuplicates && firstIteration)
             {
-               JBossMessage message = (JBossMessage)j.next();
-               if (checkForDuplicates && firstIteration)
+               firstIteration = false;
+               if (serverPeer.getPersistenceManagerInstance().
+                  referenceExists(message.getMessageID()))
                {
-                  firstIteration = false;
-                  if (serverPeer.getPersistenceManagerInstance().
-                     referenceExists(message.getMessageID()))
-                  {
-                     // This means the transaction was previously completed...
-                     // we are done here then... no need to even check for ACKs or anything else
-                     log.debug("Transaction " + tx + " was previously completed, ignoring call");
-                     return;
-                  }
+                  // This means the transaction was previously completed...
+                  // we are done here then... no need to even check for ACKs or anything else
+                  log.trace("Transaction " + tx + " was previously completed, ignoring call");
+                  return;
                }
-               sendMessage(message, tx, false);
             }
+            sendMessage(message, tx, false);
+         }
 
-            // send the acks
-                     
-            // We need to lookup the session in a global map maintained on the server peer. We can't
-            // just assume it's one of the sessions in the connection. This is because in the case
-            // of a connection consumer, the message might be delivered through one connection and
-            // the transaction committed/rolledback through another. ConnectionConsumers suck.
-            
-            ServerSessionEndpoint session = serverPeer.getSession(sessionState.getSessionId());
-            
-            if (session == null)
-            {               
-               throw new IllegalStateException("Cannot find session with id " +
-                  sessionState.getSessionId());
-            }
-
-            session.acknowledgeTransactionally(sessionState.getAcks(), tx);
+         // send the acks
+                  
+         // We need to lookup the session in a global map maintained on the server peer. We can't
+         // just assume it's one of the sessions in the connection. This is because in the case
+         // of a connection consumer, the message might be delivered through one connection and
+         // the transaction committed/rolledback through another. ConnectionConsumers suck.
+         
+         ServerSessionEndpoint session = serverPeer.getSession(sessionState.getSessionId());
+         
+         if (session == null)
+         {               
+            throw new IllegalStateException("Cannot find session with id " +
+               sessionState.getSessionId());
          }
+
+         session.acknowledgeTransactionally(sessionState.getAcks(), tx);
       }
-      
+            
       if (trace) { log.trace(this + " processed transaction " + tx); }
    }   
 

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -149,7 +149,7 @@
          }
          else
          {
-            log.debug(this + " received client-side failover request. Creating failover "+
+            log.trace(this + " received client-side failover request. Creating failover "+
                "connection to replace connection to failed node " + failedNodeID);
 
             // Wait for server side failover to complete
@@ -157,12 +157,12 @@
             
             if (failoverNodeID == -1 || failoverNodeID != serverPeer.getServerPeerID())
             {
-               log.debug(this + " realized that we are on the wrong node or no failover has occured");
+               log.trace(this + " realized that we are on the wrong node or no failover has occured");
                return new CreateConnectionResult(failoverNodeID);
             }
             else
             {
-               log.debug(this + " received notification that server-side failover completed, " +
+               log.trace(this + " received notification that server-side failover completed, " +
                   "creating connection delegate ...");
                ClientConnectionDelegate cd =
                   createConnectionDelegateInternal(username, password, failedNodeID,
@@ -193,7 +193,7 @@
                                        ServerInvokerCallbackHandler callbackHandler)
       throws Exception
    {
-      log.debug("creating a new connection for user " + username);
+      log.trace("creating a new connection for user " + username);
 
       // Authenticate. Successful autentication will place a new SubjectContext on thread local,
       // which will be used in the authorization process. However, we need to make sure we clean
@@ -241,7 +241,7 @@
       
       Dispatcher.instance.registerTarget(connectionID, connAdvised);
 
-      log.debug("created and registered " + endpoint);
+      log.trace("created and registered " + endpoint);
 
       // Need to synchronized to prevent a deadlock
       // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
@@ -304,7 +304,7 @@
 
          if (connEndpoint.getConnectionFactoryEndpoint() == this)
          {
-            log.debug(this + " sending cluster view update to " + connEndpoint);
+            log.trace(this + " sending cluster view update to " + connEndpoint);
 
             try
             {

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -184,7 +184,7 @@
 
       // We don't need to prompt delivery - this will come from the client in a changeRate request
 
-      log.debug(this + " constructed");
+      log.trace(this + " constructed");
    }
 
    // Receiver implementation ----------------------------------------------------------------------

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -695,7 +695,7 @@
    
    public void unsubscribe(String subscriptionName) throws JMSException
    {
-      log.debug(this + " unsubscribing " + subscriptionName);
+      log.trace(this + " unsubscribing " + subscriptionName);
       
       try
       {
@@ -1388,7 +1388,7 @@
          // I trust remoting to have already done its own cleanup via a CallbackErrorHandler,
          // I need to do my own cleanup at ConnectionManager level.
 
-         log.debug(this + " failed to handle callback", t);
+         log.trace(this + " failed to handle callback", t);
          
          //We stop the consumer - some time later the lease will expire and the connection will be closed        
          //which will remove the consumer
@@ -1715,7 +1715,7 @@
          consumers.put(consumerID, ep);
       }
          
-      log.debug(this + " created and registered " + ep);    
+      log.trace(this + " created and registered " + ep);    
       
       return stub;
    }
@@ -2031,7 +2031,7 @@
          consumers.put(consumerID, ep);
       }
          
-      log.debug(this + " created and registered " + ep);
+      log.trace(this + " created and registered " + ep);
       
       return stub;
    }   
@@ -2059,7 +2059,7 @@
          throw new InvalidDestinationException("No such destination: " + jmsDestination);
       }
 
-      log.debug(this + " creating browser for " + jmsDestination +
+      log.trace(this + " creating browser for " + jmsDestination +
          (selector == null ? "" : ", selector '" + selector + "'"));
 
       Binding binding = postOffice.getBindingForQueueName(jmsDestination.getName());
@@ -2092,7 +2092,7 @@
 
       ClientBrowserDelegate stub = new ClientBrowserDelegate(browserID);
 
-      log.debug(this + " created and registered " + ep);
+      log.trace(this + " created and registered " + ep);
 
       return stub;
    }

Modified: trunk/src/main/org/jboss/messaging/core/impl/ChannelSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/ChannelSupport.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/src/main/org/jboss/messaging/core/impl/ChannelSupport.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -87,7 +87,7 @@
 
    protected Object lock;
 
-   protected boolean active;
+   protected volatile boolean active;
    
    //TODO - I would like to get rid of this - the only reason we still keep a count of
    //refs being delivered is because many tests require this
@@ -346,26 +346,17 @@
 
    public void activate()
    {
-      synchronized (lock)
-      {
-         active = true;         
-      }
+      active = true;               
    }
 
    public void deactivate()
    {
-      synchronized (lock)
-      {
-         active = false;         
-      }
+      active = false;               
    }
 
    public boolean isActive()
    {
-      synchronized (lock)
-      {
-         return active;         
-      }
+      return active;               
    }   
    
    public int getMaxSize()

Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/MessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/MessageTest.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/MessageTest.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -1247,7 +1247,7 @@
       
       assertSame(queue, message.getJMSDestination());
       
-      Message receivedMessage = queueConsumer.receive(100L);
+      Message receivedMessage = queueConsumer.receive(2000);
       
       ensureEquivalent(receivedMessage, ((MessageProxy) message).getMessage());
    }
@@ -1262,7 +1262,7 @@
       
       queueProducer.send(jbossMessage);
       
-      Message receivedMessage = queueConsumer.receive(100L);
+      Message receivedMessage = queueConsumer.receive(2000);
 
       ensureEquivalent(receivedMessage, jbossMessage);
    }

Modified: trunk/tests/src/org/jboss/test/messaging/jms/stress/StressTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/stress/StressTestBase.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/tests/src/org/jboss/test/messaging/jms/stress/StressTestBase.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -45,7 +45,7 @@
    
    protected static final int NUM_NON_PERSISTENT_MESSAGES = 6000;
    
-   protected static final int NUM_PERSISTENT_PRESEND = 2000;
+   protected static final int NUM_PERSISTENT_PRESEND = 5000;
    
    protected static final int NUM_NON_PERSISTENT_PRESEND = 3000;
    

Modified: trunk/tests/src/org/jboss/test/messaging/jms/stress/Transactional2PCReceiver.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/stress/Transactional2PCReceiver.java	2007-07-12 18:22:33 UTC (rev 2882)
+++ trunk/tests/src/org/jboss/test/messaging/jms/stress/Transactional2PCReceiver.java	2007-07-12 23:36:16 UTC (rev 2883)
@@ -87,7 +87,7 @@
          MessagingXid xid = null;
          
          xid = new MessagingXid("bq1".getBytes(), 1, new GUID().toString().getBytes());
-            xaResource.start(xid, XAResource.TMNOFLAGS);
+         xaResource.start(xid, XAResource.TMNOFLAGS);
          
          for (int outerCount = 0; outerCount < iterations; outerCount++)
          {




More information about the jboss-cvs-commits mailing list