[jboss-cvs] JBoss Messaging SVN: r1519 - in trunk: docs docs/examples/ejb3mdb docs/examples/ejb3mdb/src/org/jboss/example/jms/ejb3mdb docs/examples/http docs/examples/mdb docs/examples/queue docs/examples/secure-socket docs/examples/topic docs/gettingstarted/en/modules src/etc/server/default/deploy src/main/org/jboss/jms/server src/main/org/jboss/jms/server/endpoint tests tests/etc tests/etc/stress tests/lib tests/smoke tests/src/org/jboss/test/messaging/jms tests/src/org/jboss/test/messaging/jms/server tests/src/org/jboss/test/messaging/jms/server/destination tests/src/org/jboss/test/messaging/tools/jmx util

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 26 15:28:28 EDT 2006


Author: timfox
Date: 2006-10-26 15:28:04 -0400 (Thu, 26 Oct 2006)
New Revision: 1519

Added:
   trunk/tests/lib/jdbc-drivers/
Modified:
   trunk/docs/README.html
   trunk/docs/examples/ejb3mdb/README.html
   trunk/docs/examples/ejb3mdb/build.xml
   trunk/docs/examples/ejb3mdb/do-not-distribute.properties
   trunk/docs/examples/ejb3mdb/src/org/jboss/example/jms/ejb3mdb/EJB3MDBExample.java
   trunk/docs/examples/http/README.html
   trunk/docs/examples/mdb/README.html
   trunk/docs/examples/queue/README.html
   trunk/docs/examples/secure-socket/README.html
   trunk/docs/examples/topic/README.html
   trunk/docs/gettingstarted/en/modules/installation.xml
   trunk/src/etc/server/default/deploy/mssql-persistence-service.xml
   trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
   trunk/tests/build.xml
   trunk/tests/etc/container.xml
   trunk/tests/etc/stress/log4j.xml
   trunk/tests/smoke/build.xml
   trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java
   trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
   trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
   trunk/util/do-not-distribute.properties
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-625 http://jira.jboss.com/jira/browse/JBMESSAGING-610


Modified: trunk/docs/README.html
===================================================================
--- trunk/docs/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -36,110 +36,8 @@
 </h2>
 <h2 style="margin-left: 40px;">Bug</h2>
 <ul style="margin-left: 40px;">
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-171">JBMESSAGING-171</a>]
-- Remoting timeouts</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-247">JBMESSAGING-247</a>]
-- Race condition - out of order delivery</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-302">JBMESSAGING-302</a>]
-- Invoking Topic management interface's listMessagesDurableSub()/
-listMessagesNonDurableSub() with empty params throws exception</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-331">JBMESSAGING-331</a>]
-- Message id generator and resource manager Memory leak</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-424">JBMESSAGING-424</a>]
-- Cannot access the first message when starting the JMS subscriber</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-435">JBMESSAGING-435</a>]
-- PointToPoint delivery with multiple consumers and selectors is broken</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-499">JBMESSAGING-499</a>]
-- get-test-execution-classpath assumes windows</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-525">JBMESSAGING-525</a>]
-- postgresql-persistence-service.xml contains invalid SQL syntax</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-526">JBMESSAGING-526</a>]
-- JMSRedelivered flag not correctly set on true in certain redelivery
-scenarios</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-536">JBMESSAGING-536</a>]
-- The CallbackServer cannot be contacted for some particular network
-interface configurations</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-564">JBMESSAGING-564</a>]
-- Session.unsubscribe() leaves an active associated consumer (durable
-subscriber) in an undefined state</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-565">JBMESSAGING-565</a>]
-- Race Condition between Topic/Queue.getMessageCount and Deliver Thread</li>
+  <li>TO DO</li>
 </ul>
-<h2 style="margin-left: 40px;">Feature Request</h2>
-<ul style="margin-left: 40px;">
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-4">JBMESSAGING-4</a>]
-- Load balancing</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-193">JBMESSAGING-193</a>]
-- Enable configurable timeout on all calls of
-RpcServerCall.remoteInvoke(...)</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-561">JBMESSAGING-561</a>]
-- Write a simple example (distributed topic) and include it in the set
-shipped with the release</li>
-</ul>
-<h2 style="margin-left: 40px;">Task</h2>
-<ul style="margin-left: 40px;">
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-43">JBMESSAGING-43</a>]
-- Change the module name to "messaging"</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-89">JBMESSAGING-89</a>]
-- Repository reorganization</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-139">JBMESSAGING-139</a>]
-- Consider whether core can be refactored to remove concept of delivery</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-175">JBMESSAGING-175</a>]
-- Unnecessary junit.timeout2 used by tests/build.xml</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-192">JBMESSAGING-192</a>]
-- Refactor Replicator so it won't be forced to provide noop
-implementation for Distributor's methods.</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-197">JBMESSAGING-197</a>]
-- Refactor Channel, Distributor etc so there is only one receiver per
-channel</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-199">JBMESSAGING-199</a>]
-- Fix or mothball remotetopic so it does not require multiple
-deliveries per message reference</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-200">JBMESSAGING-200</a>]
-- Complete XA transaction recovery</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-227">JBMESSAGING-227</a>]
-- Complete extension of smoke test to deploy/test non-scoped Messaging
-with JBoss 5.0</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-228">JBMESSAGING-228</a>]
-- Re-enable DistributedTopicTest testDistributedTopic_2() and
-testDistributedTopic_4()</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-229">JBMESSAGING-229</a>]
-- Peristence Optimizations</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-255">JBMESSAGING-255</a>]
-- Change signature of core interfaces to deal with MessageReferences
-only</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-267">JBMESSAGING-267</a>]
-- Re-enable distributed tests</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-269">JBMESSAGING-269</a>]
-- Review ChannelMapper interface for possible functionality separation</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-310">JBMESSAGING-310</a>]
-- Investigate whether rw lock on ServerConnectionEndpoint is necessary</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-319">JBMESSAGING-319</a>]
-- Enable the Messaging build to use component-info.xml and versioned
-dependencies</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-332">JBMESSAGING-332</a>]
-- Consider how best to factor paging logic out of channel state</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-398">JBMESSAGING-398</a>]
-- Summarize clustering design discussions and forum threads in a
-Clustering Design document</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-404">JBMESSAGING-404</a>]
-- Remove Channel::deliver(Receiver r) method</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-414">JBMESSAGING-414</a>]
-- Simplify delivery hierarchy</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-422">JBMESSAGING-422</a>]
-- Move channel mapper logic into Queue, Topic, Subscription classes</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-425">JBMESSAGING-425</a>]
-- Naming of Pipe and Distributed Pipe</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-444">JBMESSAGING-444</a>]
-- Release 1.2.0.Alpha1</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-550">JBMESSAGING-550</a>]
-- Add JBoss 4.0.5.CR1 (expanded and installer-generated) to the smoke
-test suite</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-562">JBMESSAGING-562</a>]
-- Adjust the installation script to support a clustered installation</li>
-  <li>[<a href="http://jira.jboss.com/jira/browse/JBMESSAGING-563">JBMESSAGING-563</a>]
-- Update the documentation with a Clustering Intro</li>
-</ul>
 <br>
 <hr style="width: 100%; height: 2px;">
 </body>

Modified: trunk/docs/examples/ejb3mdb/README.html
===================================================================
--- trunk/docs/examples/ejb3mdb/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/ejb3mdb/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -87,8 +87,9 @@
 use the JBoss Installer.<br>
 <br>
 <span style="font-weight: bold;">Note</span>: The current example was
-tested with <span class="tdwn">JBoss EJB 3.0 RC5 - PFD</span> but more
-recent EJB3 versions are liable to introduce API changes that may break
+tested with <span class="tdwn">the EJB3 release bundled with JBoss
+4.0.5. Earlier </span>EJB3 versions may use slightly different APIs
+that may break
 the example. If this is the case, please modify the example
 accordingly. Most likely, you will only need to modify the import fully
 qualified class names.<br>
@@ -176,7 +177,7 @@
 sent to the testQueue queue<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: !olleH<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.CR3 (1.0)<br>
+Messaging version 1.0.1.GA (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;

Modified: trunk/docs/examples/ejb3mdb/build.xml
===================================================================
--- trunk/docs/examples/ejb3mdb/build.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/ejb3mdb/build.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -79,15 +79,12 @@
    </target>
 
    <target name="jar" depends="compile">
-      <!-- TODO: uncomment this when http://jira.jboss.org/jira/browse/JBMESSAGING-351 is done -->
-      <!--
       <copy todir="./output/classes/META-INF" filtering="true">
          <fileset dir="./etc/META-INF" includes="*"/>
          <filterset>
             <filter token="QUEUE_NAME" value="${example.queue.name}"/>
          </filterset>
       </copy>
-      -->
       <jar destfile="./output/lib/mdb-example.ejb3"
            basedir="./output/classes"
            includes="META-INF/**,org/jboss/example/**/EJB3MDBExample.class"/>

Modified: trunk/docs/examples/ejb3mdb/do-not-distribute.properties
===================================================================
--- trunk/docs/examples/ejb3mdb/do-not-distribute.properties	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/ejb3mdb/do-not-distribute.properties	2006-10-26 19:28:04 UTC (rev 1519)
@@ -4,4 +4,5 @@
 #
 messaging.client.jar.path=../../../output/lib
 messaging.client.jar.name=jboss-messaging-client.jar
-jboss.configuration=messaging
+jboss.configuration=messaging-smoke-test
+jboss.home=C:\\work\\src\\jboss-4.0.5.CR1-src\\build\\output\\jboss-4.0.5.CR1-ejb3

Modified: trunk/docs/examples/ejb3mdb/src/org/jboss/example/jms/ejb3mdb/EJB3MDBExample.java
===================================================================
--- trunk/docs/examples/ejb3mdb/src/org/jboss/example/jms/ejb3mdb/EJB3MDBExample.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/ejb3mdb/src/org/jboss/example/jms/ejb3mdb/EJB3MDBExample.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -8,7 +8,6 @@
 
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
-import javax.ejb.MessageDrivenContext;
 
 import javax.naming.InitialContext;
 import javax.jms.TextMessage;

Modified: trunk/docs/examples/http/README.html
===================================================================
--- trunk/docs/examples/http/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/http/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -142,7 +142,7 @@
 the testQueue queue<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello!<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.CR3 (1.0)<br>
+Messaging version 1.0.1.GA (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;

Modified: trunk/docs/examples/mdb/README.html
===================================================================
--- trunk/docs/examples/mdb/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/mdb/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -132,7 +132,7 @@
 sent to the testQueue queue<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: !olleH<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.CR3 (1.0)<br>
+Messaging version 1.0.1.GA (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;

Modified: trunk/docs/examples/queue/README.html
===================================================================
--- trunk/docs/examples/queue/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/queue/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -104,7 +104,7 @@
 the testQueue queue<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello!<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.CR3 (1.0)<br>
+Messaging version 1.0.1.GA (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;

Modified: trunk/docs/examples/secure-socket/README.html
===================================================================
--- trunk/docs/examples/secure-socket/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/secure-socket/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -142,7 +142,7 @@
 the testQueue queue<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello!<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.CR3 (1.0)<br>
+Messaging version 1.0.1.GA (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;

Modified: trunk/docs/examples/topic/README.html
===================================================================
--- trunk/docs/examples/topic/README.html	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/examples/topic/README.html	2006-10-26 19:28:04 UTC (rev 1519)
@@ -100,7 +100,7 @@
 on the topic<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello!<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.CR3 (1.0)<br>
+Messaging version 1.0.1.GA (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;

Modified: trunk/docs/gettingstarted/en/modules/installation.xml
===================================================================
--- trunk/docs/gettingstarted/en/modules/installation.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/docs/gettingstarted/en/modules/installation.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -82,7 +82,7 @@
                          Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
                          Using an isolation level more strict than READ_COMMITTED may lead to deadlock.
 
-14:23:57,276 INFO  [ServerPeer] JBoss Messaging 1.0.1.CR3 server [server.0] started
+14:23:57,276 INFO  [ServerPeer] JBoss Messaging 1.0.1.GA server [server.0] started
 14:23:57,937 INFO  [ConnectionFactory] Connector has leasing enabled, lease period 20000 milliseconds
 14:23:57,937 INFO  [ConnectionFactory] [/ConnectionFactory, /XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory] deployed
 14:23:57,987 INFO  [Queue] Queue[/queue/DLQ] started, fullSize=75000, pageSize=2000, downCacheSize=2000

Modified: trunk/src/etc/server/default/deploy/mssql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/mssql-persistence-service.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/src/etc/server/default/deploy/mssql-persistence-service.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -1,84 +1,84 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Microsoft SQL Server persistence deployment descriptor.
-
-     $Id: postgresql-persistence-service.xml 1222 2006-08-10 18:51:44Z ovidiu.feodorov at jboss.com $
- -->
-
-<server>
-
-   <mbean code="org.jboss.messaging.core.plugin.JDBCPersistenceManager"
-          name="jboss.messaging:service=PersistenceManager"
-          xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
-      <depends>jboss.jca:service=DataSourceBinding,name=MSSQLDS</depends>
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-      <depends optional-attribute-name="ChannelMapper">jboss.messaging:service=ChannelMapper</depends>
-      <attribute name="DataSource">java:/MSSQLDS</attribute>
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      <attribute name="UsingBatchUpdates">true</attribute>
-      <attribute name="SqlProperties"><![CDATA[
-CREATE_MESSAGE_REF=CREATE TABLE JMS_MESSAGE_REFERENCE (CHANNELID BIGINT, MESSAGEID BIGINT, TRANSACTIONID BIGINT, STATE CHAR(1), ORD BIGINT, DELIVERYCOUNT INTEGER, RELIABLE CHAR(1), LOADED CHAR(1), PRIMARY KEY(CHANNELID, MESSAGEID))
-CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JMS_MESSAGE_REF_TX ON JMS_MESSAGE_REFERENCE (TRANSACTIONID)
-CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JMS_MESSAGE_REF_ORD ON JMS_MESSAGE_REFERENCE (ORD)
-CREATE_IDX_MESSAGE_REF_MESSAGEID=CREATE INDEX JMS_MESSAGE_REF_MESSAGEID ON JMS_MESSAGE_REFERENCE (MESSAGEID)
-CREATE_IDX_MESSAGE_REF_LOADED=CREATE INDEX JMS_MESSAGE_REF_LOADED ON JMS_MESSAGE_REFERENCE (LOADED)
-CREATE_IDX_MESSAGE_REF_RELIABLE=CREATE INDEX JMS_MESSAGE_REF_RELIABLE ON JMS_MESSAGE_REFERENCE (RELIABLE)
-INSERT_MESSAGE_REF=INSERT INTO JMS_MESSAGE_REFERENCE (CHANNELID, MESSAGEID, TRANSACTIONID, STATE, ORD, DELIVERYCOUNT, RELIABLE, LOADED) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
-DELETE_MESSAGE_REF=DELETE FROM JMS_MESSAGE_REFERENCE WHERE MESSAGEID=? AND CHANNELID=? AND STATE='C'
-UPDATE_MESSAGE_REF=UPDATE JMS_MESSAGE_REFERENCE SET TRANSACTIONID=?, STATE='-' WHERE MESSAGEID=? AND CHANNELID=? AND STATE='C'
-UPDATE_MESSAGE_REF_NOT_LOADED=UPDATE JMS_MESSAGE_REFERENCE SET LOADED='N' WHERE MESSAGEID=? AND CHANNELID=?
-COMMIT_MESSAGE_REF1=UPDATE JMS_MESSAGE_REFERENCE SET STATE='C', TRANSACTIONID = NULL WHERE TRANSACTIONID=? AND STATE='+'
-COMMIT_MESSAGE_REF2=DELETE FROM JMS_MESSAGE_REFERENCE WHERE TRANSACTIONID=? AND STATE='-'
-ROLLBACK_MESSAGE_REF1=DELETE FROM JMS_MESSAGE_REFERENCE WHERE TRANSACTIONID=? AND STATE='+'
-ROLLBACK_MESSAGE_REF2=UPDATE JMS_MESSAGE_REFERENCE SET STATE='C', TRANSACTIONID = NULL WHERE TRANSACTIONID=? AND STATE='-'
-LOAD_REF_INFO=SELECT MESSAGEID, ORD, DELIVERYCOUNT, RELIABLE FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID=? AND STATE <> '+' AND LOADED = 'N' AND ORD BETWEEN ? AND ? ORDER BY ORD
-SELECT_COUNT_REFS=SELECT COUNT(MESSAGEID) FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID=? AND STATE <> '+' AND LOADED='N'
-UPDATE_RELIABLE_REFS=UPDATE JMS_MESSAGE_REFERENCE SET LOADED='Y' WHERE ORD BETWEEN ? AND ? AND CHANNELID=? AND RELIABLE='Y' AND STATE <> '+'
-UPDATE_RELIABLE_REFS_NOT_LOADED=UPDATE JMS_MESSAGE_REFERENCE SET LOADED='N' WHERE CHANNELID=?
-SELECT_MIN_ORDERING=SELECT MIN(ORD) FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID=? AND STATE <> '+' AND LOADED = 'N'
-DELETE_UNRELIABLE_REFS=DELETE FROM JMS_MESSAGE_REFERENCE WHERE RELIABLE = 'N'
-CREATE_MESSAGE=CREATE TABLE JMS_MESSAGE (MESSAGEID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, COREHEADERS IMAGE, PAYLOAD IMAGE, CHANNELCOUNT INTEGER, TYPE TINYINT, JMSTYPE VARCHAR(255), CORRELATIONID VARCHAR(255), CORRELATIONID_BYTES IMAGE, DESTINATION_ID BIGINT, REPLYTO_ID BIGINT, JMSPROPERTIES IMAGE, PRIMARY KEY (MESSAGEID))
-LOAD_MESSAGES=SELECT MESSAGEID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, COREHEADERS, PAYLOAD, CHANNELCOUNT, TYPE, JMSTYPE, CORRELATIONID, CORRELATIONID_BYTES, DESTINATION_ID, REPLYTO_ID, JMSPROPERTIES FROM JMS_MESSAGE
-INSERT_MESSAGE=INSERT INTO JMS_MESSAGE (MESSAGEID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, COREHEADERS, PAYLOAD, CHANNELCOUNT, TYPE, JMSTYPE, CORRELATIONID, CORRELATIONID_BYTES, DESTINATION_ID, REPLYTO_ID, JMSPROPERTIES) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-UPDATE_MESSAGE_CHANNELCOUNT=UPDATE JMS_MESSAGE SET CHANNELCOUNT=? WHERE MESSAGEID=?
-DELETE_MESSAGE=DELETE FROM JMS_MESSAGE WHERE MESSAGEID=?
-MESSAGEID_COLUMN=MESSAGEID
-UPDATE_UNRELIABLE_CHANNELCOUNT=UPDATE JMS_MESSAGE M SET M.CHANNELCOUNT = M.CHANNELCOUNT - 1 WHERE M.MESSAGEID IN (SELECT MR.MESSAGEID FROM JMS_MESSAGE_REFERENCE MR WHERE MR.RELIABLE = 'N' AND MR.CHANNELID = ?)
-DELETE_UNREFFED_MESSAGES=DELETE FROM JMS_MESSAGE WHERE CHANNELCOUNT = 0
-CREATE_TRANSACTION=CREATE TABLE JMS_TRANSACTION (TRANSACTIONID BIGINT, BRANCH_QUAL IMAGE, FORMAT_ID INTEGER, GLOBAL_TXID IMAGE, PRIMARY KEY (TRANSACTIONID))
-INSERT_TRANSACTION=INSERT INTO JMS_TRANSACTION (TRANSACTIONID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID) VALUES(?, ?, ?, ?)
-DELETE_TRANSACTION=DELETE FROM JMS_TRANSACTION WHERE TRANSACTIONID = ?
-SELECT_PREPARED_TRANSACTIONS=SELECT TRANSACTIONID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID FROM JMS_TRANSACTION
-DELETE_ALL_TRANSACTIONS=DELETE FROM JMS_TRANSACTION
-CREATE_COUNTER=CREATE TABLE JMS_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME))
-UPDATE_COUNTER=UPDATE JMS_COUNTER SET NEXT_ID = ? WHERE NAME=?
-SELECT_COUNTER=SELECT NEXT_ID FROM JMS_COUNTER WHERE NAME=?
-INSERT_COUNTER=INSERT INTO JMS_COUNTER (NAME, NEXT_ID) VALUES (?, ?)
-DELETE_ALL_COUNTERS=DELETE FROM JMS_COUNTER
-SELECT_ALL_CHANNELS=SELECT DISTINCT(CHANNELID) FROM JMS_MESSAGE_REFERENCE
-           ]]></attribute>
-      <attribute name="MaxParams">500</attribute>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.plugin.JDBCChannelMapper"
-          name="jboss.messaging:service=ChannelMapper"
-          xmbean-dd="xmdesc/JDBCChannelMapper-xmbean.xml">
-      <depends>jboss.jca:service=DataSourceBinding,name=MSSQLDS</depends>
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-      <attribute name="DataSource">java:/MSSQLDS</attribute>
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      <attribute name="SqlProperties"><![CDATA[
-CREATE_USER_TABLE=CREATE TABLE JMS_USER (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
-CREATE_ROLE_TABLE=CREATE TABLE JMS_ROLE (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, PRIMARY KEY(USERID, ROLEID))
-SELECT_PRECONF_CLIENTID=SELECT CLIENTID FROM JMS_USER WHERE USERID=?
-CREATE_MAPPING_TABLE=CREATE TABLE JMS_CHANNEL_MAPPING (ID BIGINT, TYPE CHAR(1), JMS_DEST_NAME VARCHAR(1024), JMS_SUB_NAME VARCHAR(1024), CLIENT_ID VARCHAR(128), SELECTOR VARCHAR(1024), NO_LOCAL CHAR(1), PRIMARY KEY(ID))
-INSERT_MAPPING=INSERT INTO JMS_CHANNEL_MAPPING (ID, TYPE, JMS_DEST_NAME, JMS_SUB_NAME, CLIENT_ID, SELECTOR, NO_LOCAL) VALUES (?, ?, ?, ?, ?, ?, ?)
-DELETE_MAPPING=DELETE FROM JMS_CHANNEL_MAPPING WHERE ID = ?
-SELECT_ID_FOR_DESTINATION=SELECT ID FROM JMS_CHANNEL_MAPPING WHERE TYPE=? AND JMS_DEST_NAME=?
-SELECT_DURABLE_SUB=SELECT JMS_DEST_NAME, ID, SELECTOR, NO_LOCAL FROM JMS_CHANNEL_MAPPING WHERE CLIENT_ID=? AND JMS_SUB_NAME=?
-SELECT_SUBSCRIPTIONS_FOR_TOPIC=SELECT ID, CLIENT_ID, JMS_SUB_NAME, SELECTOR, NO_LOCAL FROM JMS_CHANNEL_MAPPING WHERE TYPE='D' AND JMS_DEST_NAME=?
-           ]]></attribute>
-   </mbean>
-
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+     Microsoft SQL Server persistence deployment descriptor.
+
+     $Id: postgresql-persistence-service.xml 1222 2006-08-10 18:51:44Z ovidiu.feodorov at jboss.com $
+ -->
+
+<server>
+
+   <mbean code="org.jboss.messaging.core.plugin.JDBCPersistenceManager"
+          name="jboss.messaging:service=PersistenceManager"
+          xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
+      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
+      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
+      <depends optional-attribute-name="ChannelMapper">jboss.messaging:service=ChannelMapper</depends>
+      <attribute name="DataSource">java:/DefaultDS</attribute>
+      <attribute name="CreateTablesOnStartup">true</attribute>
+      <attribute name="UsingBatchUpdates">true</attribute>
+      <attribute name="SqlProperties"><![CDATA[
+CREATE_MESSAGE_REF=CREATE TABLE JMS_MESSAGE_REFERENCE (CHANNELID BIGINT, MESSAGEID BIGINT, TRANSACTIONID BIGINT, STATE CHAR(1), ORD BIGINT, DELIVERYCOUNT INTEGER, RELIABLE CHAR(1), LOADED CHAR(1), PRIMARY KEY(CHANNELID, MESSAGEID))
+CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JMS_MESSAGE_REF_TX ON JMS_MESSAGE_REFERENCE (TRANSACTIONID)
+CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JMS_MESSAGE_REF_ORD ON JMS_MESSAGE_REFERENCE (ORD)
+CREATE_IDX_MESSAGE_REF_MESSAGEID=CREATE INDEX JMS_MESSAGE_REF_MESSAGEID ON JMS_MESSAGE_REFERENCE (MESSAGEID)
+CREATE_IDX_MESSAGE_REF_LOADED=CREATE INDEX JMS_MESSAGE_REF_LOADED ON JMS_MESSAGE_REFERENCE (LOADED)
+CREATE_IDX_MESSAGE_REF_RELIABLE=CREATE INDEX JMS_MESSAGE_REF_RELIABLE ON JMS_MESSAGE_REFERENCE (RELIABLE)
+INSERT_MESSAGE_REF=INSERT INTO JMS_MESSAGE_REFERENCE (CHANNELID, MESSAGEID, TRANSACTIONID, STATE, ORD, DELIVERYCOUNT, RELIABLE, LOADED) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
+DELETE_MESSAGE_REF=DELETE FROM JMS_MESSAGE_REFERENCE WHERE MESSAGEID=? AND CHANNELID=? AND STATE='C'
+UPDATE_MESSAGE_REF=UPDATE JMS_MESSAGE_REFERENCE SET TRANSACTIONID=?, STATE='-' WHERE MESSAGEID=? AND CHANNELID=? AND STATE='C'
+UPDATE_MESSAGE_REF_NOT_LOADED=UPDATE JMS_MESSAGE_REFERENCE SET LOADED='N' WHERE MESSAGEID=? AND CHANNELID=?
+COMMIT_MESSAGE_REF1=UPDATE JMS_MESSAGE_REFERENCE SET STATE='C', TRANSACTIONID = NULL WHERE TRANSACTIONID=? AND STATE='+'
+COMMIT_MESSAGE_REF2=DELETE FROM JMS_MESSAGE_REFERENCE WHERE TRANSACTIONID=? AND STATE='-'
+ROLLBACK_MESSAGE_REF1=DELETE FROM JMS_MESSAGE_REFERENCE WHERE TRANSACTIONID=? AND STATE='+'
+ROLLBACK_MESSAGE_REF2=UPDATE JMS_MESSAGE_REFERENCE SET STATE='C', TRANSACTIONID = NULL WHERE TRANSACTIONID=? AND STATE='-'
+LOAD_REF_INFO=SELECT MESSAGEID, ORD, DELIVERYCOUNT, RELIABLE FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID=? AND STATE <> '+' AND LOADED = 'N' AND ORD BETWEEN ? AND ? ORDER BY ORD
+SELECT_COUNT_REFS=SELECT COUNT(MESSAGEID) FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID=? AND STATE <> '+' AND LOADED='N'
+UPDATE_RELIABLE_REFS=UPDATE JMS_MESSAGE_REFERENCE SET LOADED='Y' WHERE ORD BETWEEN ? AND ? AND CHANNELID=? AND RELIABLE='Y' AND STATE <> '+'
+UPDATE_RELIABLE_REFS_NOT_LOADED=UPDATE JMS_MESSAGE_REFERENCE SET LOADED='N' WHERE CHANNELID=?
+SELECT_MIN_ORDERING=SELECT MIN(ORD) FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID=? AND STATE <> '+' AND LOADED = 'N'
+DELETE_UNRELIABLE_REFS=DELETE FROM JMS_MESSAGE_REFERENCE WHERE RELIABLE = 'N'
+CREATE_MESSAGE=CREATE TABLE JMS_MESSAGE (MESSAGEID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, COREHEADERS IMAGE, PAYLOAD IMAGE, CHANNELCOUNT INTEGER, TYPE TINYINT, JMSTYPE VARCHAR(255), CORRELATIONID VARCHAR(255), CORRELATIONID_BYTES IMAGE, DESTINATION_ID BIGINT, REPLYTO_ID BIGINT, JMSPROPERTIES IMAGE, PRIMARY KEY (MESSAGEID))
+LOAD_MESSAGES=SELECT MESSAGEID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, COREHEADERS, PAYLOAD, CHANNELCOUNT, TYPE, JMSTYPE, CORRELATIONID, CORRELATIONID_BYTES, DESTINATION_ID, REPLYTO_ID, JMSPROPERTIES FROM JMS_MESSAGE
+INSERT_MESSAGE=INSERT INTO JMS_MESSAGE (MESSAGEID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, COREHEADERS, PAYLOAD, CHANNELCOUNT, TYPE, JMSTYPE, CORRELATIONID, CORRELATIONID_BYTES, DESTINATION_ID, REPLYTO_ID, JMSPROPERTIES) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+UPDATE_MESSAGE_CHANNELCOUNT=UPDATE JMS_MESSAGE SET CHANNELCOUNT=? WHERE MESSAGEID=?
+DELETE_MESSAGE=DELETE FROM JMS_MESSAGE WHERE MESSAGEID=?
+MESSAGEID_COLUMN=MESSAGEID
+UPDATE_UNRELIABLE_CHANNELCOUNT=UPDATE JMS_MESSAGE SET CHANNELCOUNT = CHANNELCOUNT - 1 WHERE MESSAGEID IN (SELECT MR.MESSAGEID FROM JMS_MESSAGE_REFERENCE MR WHERE MR.RELIABLE = 'N' AND MR.CHANNELID = ?)
+DELETE_UNREFFED_MESSAGES=DELETE FROM JMS_MESSAGE WHERE CHANNELCOUNT = 0
+CREATE_TRANSACTION=CREATE TABLE JMS_TRANSACTION (TRANSACTIONID BIGINT, BRANCH_QUAL IMAGE, FORMAT_ID INTEGER, GLOBAL_TXID IMAGE, PRIMARY KEY (TRANSACTIONID))
+INSERT_TRANSACTION=INSERT INTO JMS_TRANSACTION (TRANSACTIONID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID) VALUES(?, ?, ?, ?)
+DELETE_TRANSACTION=DELETE FROM JMS_TRANSACTION WHERE TRANSACTIONID = ?
+SELECT_PREPARED_TRANSACTIONS=SELECT TRANSACTIONID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID FROM JMS_TRANSACTION
+DELETE_ALL_TRANSACTIONS=DELETE FROM JMS_TRANSACTION
+CREATE_COUNTER=CREATE TABLE JMS_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME))
+UPDATE_COUNTER=UPDATE JMS_COUNTER SET NEXT_ID = ? WHERE NAME=?
+SELECT_COUNTER=SELECT NEXT_ID FROM JMS_COUNTER WHERE NAME=?
+INSERT_COUNTER=INSERT INTO JMS_COUNTER (NAME, NEXT_ID) VALUES (?, ?)
+DELETE_ALL_COUNTERS=DELETE FROM JMS_COUNTER
+SELECT_ALL_CHANNELS=SELECT DISTINCT(CHANNELID) FROM JMS_MESSAGE_REFERENCE
+           ]]></attribute>
+      <attribute name="MaxParams">500</attribute>
+   </mbean>
+
+   <mbean code="org.jboss.jms.server.plugin.JDBCChannelMapper"
+          name="jboss.messaging:service=ChannelMapper"
+          xmbean-dd="xmdesc/JDBCChannelMapper-xmbean.xml">
+      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
+      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
+      <attribute name="DataSource">java:/DefaultDS</attribute>
+      <attribute name="CreateTablesOnStartup">true</attribute>
+      <attribute name="SqlProperties"><![CDATA[
+CREATE_USER_TABLE=CREATE TABLE JMS_USER (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
+CREATE_ROLE_TABLE=CREATE TABLE JMS_ROLE (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, PRIMARY KEY(USERID, ROLEID))
+SELECT_PRECONF_CLIENTID=SELECT CLIENTID FROM JMS_USER WHERE USERID=?
+CREATE_MAPPING_TABLE=CREATE TABLE JMS_CHANNEL_MAPPING (ID BIGINT, TYPE CHAR(1), JMS_DEST_NAME VARCHAR(1024), JMS_SUB_NAME VARCHAR(1024), CLIENT_ID VARCHAR(128), SELECTOR VARCHAR(1024), NO_LOCAL CHAR(1), PRIMARY KEY(ID))
+INSERT_MAPPING=INSERT INTO JMS_CHANNEL_MAPPING (ID, TYPE, JMS_DEST_NAME, JMS_SUB_NAME, CLIENT_ID, SELECTOR, NO_LOCAL) VALUES (?, ?, ?, ?, ?, ?, ?)
+DELETE_MAPPING=DELETE FROM JMS_CHANNEL_MAPPING WHERE ID = ?
+SELECT_ID_FOR_DESTINATION=SELECT ID FROM JMS_CHANNEL_MAPPING WHERE TYPE=? AND JMS_DEST_NAME=?
+SELECT_DURABLE_SUB=SELECT JMS_DEST_NAME, ID, SELECTOR, NO_LOCAL FROM JMS_CHANNEL_MAPPING WHERE CLIENT_ID=? AND JMS_SUB_NAME=?
+SELECT_SUBSCRIPTIONS_FOR_TOPIC=SELECT ID, CLIENT_ID, JMS_SUB_NAME, SELECTOR, NO_LOCAL FROM JMS_CHANNEL_MAPPING WHERE TYPE='D' AND JMS_DEST_NAME=?
+           ]]></attribute>
+   </mbean>
+
 </server>
\ No newline at end of file

Modified: trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -260,9 +260,9 @@
 
    public void stop() throws Exception
    {
-      Set queues = new HashSet(queueMap.keySet());
+      Set queues = new HashSet(queueMap.values());
       
-      Set topics = new HashSet(topicMap.keySet());
+      Set topics = new HashSet(topicMap.values());
       
       // remove all destinations from JNDI
       for(Iterator i = queues.iterator(); i.hasNext(); )

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -71,7 +71,7 @@
 
 /**
  * Concrete implementation of SessionEndpoint.
- * 
+ *
  * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  * @version <tt>$Revision$</tt>
@@ -87,11 +87,11 @@
    // Static --------------------------------------------------------
 
    // Attributes ----------------------------------------------------
-   
+
    private boolean trace = log.isTraceEnabled();
 
    private int sessionID;
-   
+
    private boolean closed;
 
    private ServerConnectionEndpoint connectionEndpoint;
@@ -108,15 +108,15 @@
    private PostOffice topicPostOffice;
    private PostOffice queuePostOffice;
    private int nodeId;
-   
-   
+
+
    // Constructors --------------------------------------------------
 
    protected ServerSessionEndpoint(int sessionID, ServerConnectionEndpoint connectionEndpoint)
       throws Exception
    {
       this.sessionID = sessionID;
-      
+
       this.connectionEndpoint = connectionEndpoint;
 
       ServerPeer sp = connectionEndpoint.getServerPeer();
@@ -132,11 +132,11 @@
       tr = sp.getTxRepository();
 
       consumers = new HashMap();
-		browsers = new HashMap();  
+		browsers = new HashMap();
    }
-   
+
    // SessionDelegate implementation --------------------------------
-   
+
 	public ConsumerDelegate createConsumerDelegate(JBossDestination jmsDestination,
                                                   String selectorString,
                                                   boolean noLocal,
@@ -149,21 +149,21 @@
          {
             throw new IllegalStateException("Session is closed");
          }
-         
+
          if ("".equals(selectorString))
          {
             selectorString = null;
          }
-         
+
          log.debug("creating consumer for " + jmsDestination + ", selector " + selectorString + ", " + (noLocal ? "noLocal, " : "") + "subscription " + subscriptionName);
-   
+
          ManagedDestination mDest = dm.getDestination(jmsDestination.getName(), jmsDestination.isQueue());
-         
+
          if (mDest == null)
          {
             throw new InvalidDestinationException("No such destination: " + jmsDestination);
          }
-         
+
          if (jmsDestination.isTemporary())
          {
             // Can only create a consumer for a temporary destination on the same connection
@@ -174,60 +174,60 @@
                             "to that which created the temporary destination";
                throw new IllegalStateException(msg);
             }
-         }          
-             
+         }
+
          int consumerID = connectionEndpoint.getServerPeer().getNextObjectID();
-        
+
          Binding binding = null;
-         
+
          // Always validate the selector first
          Selector selector = null;
          if (selectorString != null)
          {
             selector = new Selector(selectorString);
          }
-   
+
          if (jmsDestination.isTopic())
          {
             if (subscriptionName == null)
             {
                // non-durable subscription
                if (log.isTraceEnabled()) { log.trace("creating new non-durable subscription on " + jmsDestination); }
-                     
+
                //Create the non durable sub
                QueuedExecutor executor = (QueuedExecutor)pool.get();
-               
+
                PagingFilteredQueue q;
-               
+
                if (topicPostOffice.isLocal())
                {
-                  q = new PagingFilteredQueue(new GUID().toString(), idm.getId(), ms, pm, true, false,                              
+                  q = new PagingFilteredQueue(new GUID().toString(), idm.getId(), ms, pm, true, false,
                                               executor, selector,
                                               mDest.getFullSize(),
                                               mDest.getPageSize(),
                                               mDest.getDownCacheSize());
-                  
-                  binding = topicPostOffice.bindQueue(jmsDestination.getName(), q);      
+
+                  binding = topicPostOffice.bindQueue(jmsDestination.getName(), q);
                }
                else
                {
-                  q = new LocalClusteredQueue(topicPostOffice, nodeId, new GUID().toString(), idm.getId(), ms, pm, true, false,                              
+                  q = new LocalClusteredQueue(topicPostOffice, nodeId, new GUID().toString(), idm.getId(), ms, pm, true, false,
                                               executor, selector, tr,
                                               mDest.getFullSize(),
                                               mDest.getPageSize(),
                                               mDest.getDownCacheSize());
-                  
+
                   ClusteredPostOffice cpo = (ClusteredPostOffice)topicPostOffice;
-                  
+
                   if (mDest.isClustered())
-                  {                  
-                     binding = cpo.bindClusteredQueue(jmsDestination.getName(), (LocalClusteredQueue)q);  
+                  {
+                     binding = cpo.bindClusteredQueue(jmsDestination.getName(), (LocalClusteredQueue)q);
                   }
                   else
                   {
-                     binding = cpo.bindQueue(jmsDestination.getName(), q); 
+                     binding = cpo.bindQueue(jmsDestination.getName(), q);
                   }
-               }       
+               }
             }
             else
             {
@@ -235,168 +235,168 @@
                {
                   throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic");
                }
-               
+
                // we have a durable subscription, look it up
                String clientID = connectionEndpoint.getClientID();
                if (clientID == null)
                {
                   throw new JMSException("Cannot create durable subscriber without a valid client ID");
                }
-               
+
                // See if there any bindings with the same client_id.subscription_name name
-               
+
                String name = MessageQueueNameHelper.createSubscriptionName(clientID, subscriptionName);
-               
+
                binding = topicPostOffice.getBindingForQueueName(name);
-                  
+
                if (binding == null)
                {
                   //Does not already exist
-                  
+
                   if (trace) { log.trace("creating new durable subscription on " + jmsDestination); }
-                  
+
                   QueuedExecutor executor = (QueuedExecutor)pool.get();
                   PagingFilteredQueue q;
-                  
+
                   if (topicPostOffice.isLocal())
                   {
-                     q = new PagingFilteredQueue(name, idm.getId(), ms, pm, true, true,                              
+                     q = new PagingFilteredQueue(name, idm.getId(), ms, pm, true, true,
                                                  executor, selector,
                                                  mDest.getFullSize(),
                                                  mDest.getPageSize(),
                                                  mDest.getDownCacheSize());
-                     
-                     binding = topicPostOffice.bindQueue(jmsDestination.getName(), q);      
+
+                     binding = topicPostOffice.bindQueue(jmsDestination.getName(), q);
                   }
                   else
                   {
-                     q = new LocalClusteredQueue(topicPostOffice, nodeId, name, idm.getId(), ms, pm, true, true,                              
+                     q = new LocalClusteredQueue(topicPostOffice, nodeId, name, idm.getId(), ms, pm, true, true,
                                                  executor, selector, tr,
                                                  mDest.getFullSize(),
                                                  mDest.getPageSize(),
                                                  mDest.getDownCacheSize());
-                     
+
                      ClusteredPostOffice cpo = (ClusteredPostOffice)topicPostOffice;
-                     
+
                      if (mDest.isClustered())
-                     {                     
+                     {
                         binding = cpo.bindClusteredQueue(jmsDestination.getName(), (LocalClusteredQueue)q);
                      }
                      else
                      {
                         binding = cpo.bindQueue(jmsDestination.getName(), q);
                      }
-                  }                 
+                  }
                }
                else
                {
                   //Durable sub already exists
-                  
+
                   if (trace) { log.trace("subscription " + subscriptionName + " already exists"); }
-                  
+
                   // From javax.jms.Session Javadoc (and also JMS 1.1 6.11.1):
                   // A client can change an existing durable subscription by creating a durable
                   // TopicSubscriber with the same name and a new topic and/or message selector.
                   // Changing a durable subscriber is equivalent to unsubscribing (deleting) the old
                   // one and creating a new one.
-   
+
                   String filterString = binding.getQueue().getFilter() != null ? binding.getQueue().getFilter().getFilterString() : null;
-                  
+
                   boolean selectorChanged =
                      (selectorString == null && filterString != null) ||
                      (filterString == null && selectorString != null) ||
                      (filterString != null && selectorString != null &&
                      !filterString.equals(selectorString));
-                  
+
                   if (trace) { log.trace("selector " + (selectorChanged ? "has" : "has NOT") + " changed"); }
-   
+
                   boolean topicChanged = !binding.getCondition().equals(jmsDestination.getName());
-                  
+
                   if (log.isTraceEnabled()) { log.trace("topic " + (topicChanged ? "has" : "has NOT") + " changed"); }
-                  
+
                   if (selectorChanged || topicChanged)
-                  {    
+                  {
                      if (trace) { log.trace("topic or selector changed so deleting old subscription"); }
-   
+
                      // Unbind the durable subscription
-                     
+
                      if (mDest.isClustered() && !topicPostOffice.isLocal())
                      {
                         ClusteredPostOffice cpo = (ClusteredPostOffice)topicPostOffice;
-                        
+
                         cpo.unbindClusteredQueue(name);
                      }
                      else
-                     {         
+                     {
                         topicPostOffice.unbindQueue(name);
                      }
-                        
+
                      // create a fresh new subscription
-                     
+
                      QueuedExecutor executor = (QueuedExecutor)pool.get();
                      PagingFilteredQueue q;
-                     
+
                      if (topicPostOffice.isLocal())
                      {
-                        q = new PagingFilteredQueue(name, idm.getId(), ms, pm, true, true,                              
+                        q = new PagingFilteredQueue(name, idm.getId(), ms, pm, true, true,
                                                     executor, selector,
                                                     mDest.getFullSize(),
                                                     mDest.getPageSize(),
                                                     mDest.getDownCacheSize());
-                        binding = topicPostOffice.bindQueue(jmsDestination.getName(), q);      
+                        binding = topicPostOffice.bindQueue(jmsDestination.getName(), q);
                      }
                      else
                      {
-                        q = new LocalClusteredQueue(topicPostOffice, nodeId, name, idm.getId(), ms, pm, true, true,                              
+                        q = new LocalClusteredQueue(topicPostOffice, nodeId, name, idm.getId(), ms, pm, true, true,
                                                     executor, selector, tr,
                                                     mDest.getFullSize(),
                                                     mDest.getPageSize(),
                                                     mDest.getDownCacheSize());
-                        
+
                         ClusteredPostOffice cpo = (ClusteredPostOffice)topicPostOffice;
-                        
+
                         if (mDest.isClustered())
-                        {                        
-                           binding = cpo.bindClusteredQueue(jmsDestination.getName(), (LocalClusteredQueue)q);    
+                        {
+                           binding = cpo.bindClusteredQueue(jmsDestination.getName(), (LocalClusteredQueue)q);
                         }
                         else
                         {
                            binding = cpo.bindQueue(jmsDestination.getName(), (LocalClusteredQueue)q);
                         }
-                     }    
-                  }               
+                     }
+                  }
                }
             }
          }
          else
          {
             //Consumer on a jms queue
-            
+
             //Let's find the binding
             binding = queuePostOffice.getBindingForQueueName(jmsDestination.getName());
-            
+
             if (binding == null)
             {
                throw new IllegalStateException("Cannot find binding for jms queue: " + jmsDestination.getName());
             }
          }
-         
+
          int prefetchSize = connectionEndpoint.getPrefetchSize();
-         
+
          ServerConsumerEndpoint ep =
             new ServerConsumerEndpoint(consumerID, (PagingFilteredQueue)binding.getQueue(), binding.getQueue().getName(),
                                        this, selectorString, noLocal, jmsDestination, prefetchSize);
-          
+
          JMSDispatcher.instance.registerTarget(new Integer(consumerID), new ConsumerAdvised(ep));
-                     
+
          ClientConsumerDelegate stub = new ClientConsumerDelegate(consumerID, prefetchSize);
-                       
+
          putConsumerEndpoint(consumerID, ep); // caching consumer locally
-         
+
          connectionEndpoint.getServerPeer().putConsumerEndpoint(consumerID, ep); // cachin consumer in server peer
-         
+
          log.debug("created and registered " + ep);
-   
+
          return stub;
       }
       catch (Throwable t)
@@ -404,7 +404,7 @@
          throw ExceptionUtil.handleJMSInvocation(t, this + " createConsumerDelegate");
       }
    }
-	
+
 	public BrowserDelegate createBrowserDelegate(JBossDestination jmsDestination, String messageSelector)
 	   throws JMSException
 	{
@@ -414,37 +414,37 @@
    	   {
    	      throw new IllegalStateException("Session is closed");
    	   }
-   	   
+
    	   if (jmsDestination == null)
    	   {
    	      throw new InvalidDestinationException("null destination");
    	   }
-         
+
          if (jmsDestination.isTopic())
          {
             throw new IllegalStateException("Cannot browse a topic");
          }
-   	   
+
          if (dm.getDestination(jmsDestination.getName(), jmsDestination.isQueue()) == null)
          {
             throw new InvalidDestinationException("No such destination: " + jmsDestination);
          }
-         
+
          Binding binding = queuePostOffice.getBindingForQueueName(jmsDestination.getName());
-         
+
    	   int browserID = connectionEndpoint.getServerPeer().getNextObjectID();
-   	   
+
    	   ServerBrowserEndpoint ep =
    	      new ServerBrowserEndpoint(this, browserID, (PagingFilteredQueue)binding.getQueue(), messageSelector);
-   	   
+
    	   putBrowserDelegate(browserID, ep);
-   	   
+
          JMSDispatcher.instance.registerTarget(new Integer(browserID), new BrowserAdvised(ep));
-   	   
+
    	   ClientBrowserDelegate stub = new ClientBrowserDelegate(browserID);
-   	   
+
          log.debug("created and registered " + ep);
-   
+
    	   return stub;
       }
       catch (Throwable t)
@@ -461,14 +461,14 @@
          {
             throw new IllegalStateException("Session is closed");
          }
-         
+
          ManagedDestination dest = (ManagedDestination)dm.getDestination(name, true);
-         
+
          if (dest == null)
          {
             throw new JMSException("There is no administratively defined queue with name:" + name);
-         }        
-   
+         }
+
          return new JBossQueue(dest.getName());
       }
       catch (Throwable t)
@@ -485,14 +485,14 @@
          {
             throw new IllegalStateException("Session is closed");
          }
-         
+
          ManagedDestination dest = (ManagedDestination)dm.getDestination(name, false);
-                  
+
          if (dest == null)
          {
             throw new JMSException("There is no administratively defined topic with name:" + name);
-         }        
-   
+         }
+
          return new JBossTopic(name);
       }
       catch (Throwable t)
@@ -509,21 +509,21 @@
          {
             throw new IllegalStateException("Session is already closed");
          }
-         
+
          if (trace) log.trace(this + " close()");
-               
+
          // clone to avoid ConcurrentModificationException
          HashSet consumerSet = new HashSet(consumers.values());
-         
+
          for(Iterator i = consumerSet.iterator(); i.hasNext(); )
          {
             ((ServerConsumerEndpoint)i.next()).remove();
-         }           
-         
+         }
+
          connectionEndpoint.removeSessionDelegate(sessionID);
-         
+
          JMSDispatcher.instance.unregisterTarget(new Integer(sessionID));
-         
+
          closed = true;
       }
       catch (Throwable t)
@@ -531,7 +531,7 @@
          throw ExceptionUtil.handleJMSInvocation(t, this + " close");
       }
    }
-   
+
    public void closing() throws JMSException
    {
       // currently does nothing
@@ -542,11 +542,11 @@
    {
       return closed;
    }
-   
+
    public void send(JBossMessage message) throws JMSException
    {
       try
-      {       
+      {
          connectionEndpoint.sendMessage(message, null);
       }
       catch (Throwable t)
@@ -554,17 +554,17 @@
          throw ExceptionUtil.handleJMSInvocation(t, this + " send");
       }
    }
-   
+
    public void acknowledgeBatch(List ackInfos) throws JMSException
-   {      
+   {
       try
       {
          Iterator iter = ackInfos.iterator();
-         
+
          while (iter.hasNext())
          {
             AckInfo ackInfo = (AckInfo)iter.next();
-            
+
             acknowledgeInternal(ackInfo);
          }
       }
@@ -573,46 +573,46 @@
          throw ExceptionUtil.handleJMSInvocation(t, this + " acknowledgeBatch");
       }
    }
-   
+
    public void acknowledge(AckInfo ackInfo) throws JMSException
    {
       try
       {
-         acknowledgeInternal(ackInfo);      
+         acknowledgeInternal(ackInfo);
       }
       catch (Throwable t)
       {
          throw ExceptionUtil.handleJMSInvocation(t, this + " acknowledge");
       }
-   }      
-         
+   }
+
    public void cancelDeliveries(List ackInfos) throws JMSException
    {
       try
       {
          // deliveries must be cancelled in reverse order
-          
+
          Set consumers = new HashSet();
-         
+
          for (int i = ackInfos.size() - 1; i >= 0; i--)
          {
             AckInfo ack = (AckInfo)ackInfos.get(i);
-            
+
             // We look in the global map since the message might have come from connection consumer
             ServerConsumerEndpoint consumer =
                this.connectionEndpoint.getConsumerEndpoint(ack.getConsumerID());
-   
+
             if (consumer == null)
             {
                throw new IllegalArgumentException("Cannot find consumer id: " + ack.getConsumerID());
             }
-            
+
             consumer.cancelDelivery(new Long(ack.getMessageID()));
             consumers.add(consumer);
          }
-         
+
          // need to prompt delivery for all consumers
-         
+
          for(Iterator i = consumers.iterator(); i.hasNext(); )
          {
             ServerConsumerEndpoint consumer = (ServerConsumerEndpoint)i.next();
@@ -638,15 +638,15 @@
             throw new InvalidDestinationException("Destination:" + dest + " is not a temporary destination");
          }
          connectionEndpoint.addTemporaryDestination(dest);
-         
+
          //Register with the destination manager
-         
+
          ManagedDestination mDest;
-         
+
          int fullSize = connectionEndpoint.getDefaultTempQueueFullSize();
          int pageSize = connectionEndpoint.getDefaultTempQueuePageSize();
          int downCacheSize = connectionEndpoint.getDefaultTempQueueDownCacheSize();
-         
+
          if (dest.isTopic())
          {
             mDest = new ManagedTopic(dest.getName(), fullSize, pageSize, downCacheSize);
@@ -655,29 +655,29 @@
          {
             mDest = new ManagedQueue(dest.getName(), fullSize, pageSize, downCacheSize);
          }
-         
+
          dm.registerDestination(mDest);
-         
+
          if (dest.isQueue())
          {
             QueuedExecutor executor = (QueuedExecutor)pool.get();
-            
-            PagingFilteredQueue q = 
+
+            PagingFilteredQueue q =
                new PagingFilteredQueue(dest.getName(), idm.getId(), ms, pm, true, false,
                                        executor, null, fullSize, pageSize, downCacheSize);
-            
-            
-            
+
+
+
             //Make a binding for this queue
-            queuePostOffice.bindQueue(dest.getName(), q);  
-         }         
+            queuePostOffice.bindQueue(dest.getName(), q);
+         }
       }
       catch (Throwable t)
       {
          throw ExceptionUtil.handleJMSInvocation(t, this + " addTemporaryDestination");
       }
    }
-   
+
    public void deleteTemporaryDestination(JBossDestination dest) throws JMSException
    {
       try
@@ -686,19 +686,19 @@
          {
             throw new IllegalStateException("Session is closed");
          }
-   
+
          if (!dest.isTemporary())
          {
             throw new InvalidDestinationException("Destination:" + dest + " is not a temporary destination");
          }
-         
+
          ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
-         
+
          if (mDest == null)
          {
             throw new InvalidDestinationException("No such destination: " + dest);
          }
-                  
+
          if (dest.isQueue())
          {
             //Unbind
@@ -706,17 +706,17 @@
          }
          else
          {
-            //Topic            
+            //Topic
             Collection bindings = topicPostOffice.listBindingsForCondition(dest.getName());
-            
+
             if (!bindings.isEmpty())
             {
                throw new IllegalStateException("Cannot delete temporary destination, since it has active consumer(s)");
             }
          }
-         
-         dm.unregisterDestination(mDest);         
-            
+
+         dm.unregisterDestination(mDest);
+
          connectionEndpoint.removeTemporaryDestination(dest);
       }
       catch (Throwable t)
@@ -724,11 +724,11 @@
          throw ExceptionUtil.handleJMSInvocation(t, this + " deleteTemporaryDestination");
       }
    }
-   
+
    public void unsubscribe(String subscriptionName) throws JMSException
    {
       log.debug(this + " unsubscribing " + subscriptionName);
-      
+
       try
       {
          if (closed)
@@ -739,50 +739,50 @@
          {
             throw new InvalidDestinationException("Destination is null");
          }
-   
+
          String clientID = connectionEndpoint.getClientID();
-   
+
          if (clientID == null)
          {
             throw new JMSException("null clientID on connection");
          }
-         
+
          String queueName = MessageQueueNameHelper.createSubscriptionName(clientID, subscriptionName);
-         
+
          Binding binding = topicPostOffice.getBindingForQueueName(queueName);
-         
+
          if (binding == null)
          {
             throw new InvalidDestinationException("Cannot find durable subscription with name " +
                                                   subscriptionName + " to unsubscribe");
          }
-         
+
          // Section 6.11. JMS 1.1.
          // "It is erroneous for a client to delete a durable subscription while it has an active
          // TopicSubscriber for it or while a message received by it is part of a current
          // transaction or has not been acknowledged in the session."
-         
+
          Queue sub = binding.getQueue();
-         
+
          if (sub.numberOfReceivers() != 0)
          {
             throw new IllegalStateException("Cannot unsubscribe durable subscription " +
                                             subscriptionName + " since it has active subscribers");
          }
-         
+
          //Look up the topic
          ManagedDestination mDest = dm.getDestination(binding.getCondition(), false);
-         
+
          //Unbind it
-    
+
          if (mDest.isClustered() && !topicPostOffice.isLocal())
          {
             ClusteredPostOffice cpo = (ClusteredPostOffice)topicPostOffice;
-            
+
             cpo.unbindClusteredQueue(queueName);
          }
          else
-         {         
+         {
             topicPostOffice.unbindQueue(queueName);
          }
       }
@@ -791,9 +791,9 @@
          throw ExceptionUtil.handleJMSInvocation(t, this + " unsubscribe");
       }
    }
-    
+
    // Public --------------------------------------------------------
-   
+
    public ServerConnectionEndpoint getConnectionEndpoint()
    {
       return connectionEndpoint;
@@ -813,9 +813,9 @@
    {
       return consumers.keySet();
    }
-   
+
    // Protected -----------------------------------------------------
-   
+
    protected void acknowledgeInternal(AckInfo ackInfo) throws Throwable
    {
       //If the message was delivered via a connection consumer then the message needs to be acked
@@ -828,10 +828,10 @@
       {
          throw new IllegalArgumentException("Cannot find consumer id: " + ackInfo.getConsumerID());
       }
-      
+
       consumer.acknowledge(ackInfo.getMessageID());
    }
-   
+
    protected ServerConsumerEndpoint putConsumerEndpoint(int consumerID, ServerConsumerEndpoint d)
    {
       if (trace) { log.trace(this + " caching consumer " + consumerID); }
@@ -842,23 +842,23 @@
    {
       return (ServerConsumerEndpoint)consumers.get(new Integer(consumerID));
    }
-   
+
    protected ServerConsumerEndpoint removeConsumerEndpoint(int consumerID)
    {
       if (trace) { log.trace(this + " removing consumer " + consumerID + " from cache"); }
       return (ServerConsumerEndpoint)consumers.remove(new Integer(consumerID));
    }
-   
+
    protected ServerBrowserEndpoint putBrowserDelegate(int browserID, ServerBrowserEndpoint sbd)
    {
       return (ServerBrowserEndpoint)browsers.put(new Integer(browserID), sbd);
    }
-   
+
    protected ServerBrowserEndpoint getBrowserDelegate(int browserID)
    {
       return (ServerBrowserEndpoint)browsers.get(new Integer(browserID));
    }
-   
+
    protected ServerBrowserEndpoint removeBrowserDelegate(int browserID)
    {
       return (ServerBrowserEndpoint)browsers.remove(new Integer(browserID));
@@ -884,7 +884,7 @@
             }
          }
       }
-   }   
+   }
 
    // Private -------------------------------------------------------
 

Modified: trunk/tests/build.xml
===================================================================
--- trunk/tests/build.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/build.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -133,7 +133,11 @@
    <!--
        JDBC Drivers.
    -->
+   <path id="any.jdbc.driver.classpath">
+	       <fileset dir="${tests.root}/lib/jdbc-drivers" includes="*.jar"/>
+   </path>
 
+
    <path id="mysql.jdbc.driver.classpath">
       <pathelement path="${tests.root}/lib/mysql-connector-java-3.1.13-bin.jar"/>
    </path>
@@ -154,6 +158,7 @@
       <path refid="compilation.classpath"/>
       <path location="../output/lib/jboss-messaging.jar"/>
       <path refid="junit.junit.classpath"/>
+      <path refid="any.jdbc.driver.classpath"/>
       <path refid="hsqldb.hsqldb.classpath"/>
       <path refid="jboss.server.classpath"/> <!-- for org.jboss.jms.jndi.JNDIProviderAdapter -->
       <path refid="jboss.jca.classpath"/>  <!-- for org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory, etc -->

Modified: trunk/tests/etc/container.xml
===================================================================
--- trunk/tests/etc/container.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/etc/container.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -48,6 +48,15 @@
          <password>jboss</password>
       </database-configuration>
 
+      <database-configuration name="mssql">
+          <url>jdbc:jtds:sqlserver://localhost:1433/messaging</url>
+          <driver>net.sourceforge.jtds.jdbc.Driver</driver>
+          <isolation>TRANSACTION_READ_COMMITTED</isolation>
+          <username>messaging</username>
+          <password>messaging</password>
+      </database-configuration>
+
+
    </database-configurations>
 
    <!--

Modified: trunk/tests/etc/stress/log4j.xml
===================================================================
--- trunk/tests/etc/stress/log4j.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/etc/stress/log4j.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -30,7 +30,7 @@
    <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
 
-      <param name="File" value="${module.output}/logs/messaging-tests${remote.test.suffix}.stress.trace.log"/>
+      <param name="File" value="${module.output}/logs/messaging-tests${remote.test.suffix}.stress.log"/>
 
       <!-- since majority of the tests are ran in fork mode by ant, the log file is overwritten
            for each test. We need to append if we want to preserve a full testsuite run log.

Copied: trunk/tests/lib/jdbc-drivers (from rev 1518, branches/Branch_1_0/tests/lib/jdbc-drivers)

Modified: trunk/tests/smoke/build.xml
===================================================================
--- trunk/tests/smoke/build.xml	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/smoke/build.xml	2006-10-26 19:28:04 UTC (rev 1519)
@@ -61,7 +61,7 @@
 
       <antcall target="old-server-compatibility-tests">
          <param name="smoke.test.type" value="client.compatibility"/>
-      </antcall>                                           
+      </antcall>
       <antcall target="old-client-compatibility-tests">
          <param name="smoke.test.type" value="server.compatibility"/>
       </antcall>
@@ -73,8 +73,6 @@
 
       <!-- 4.0.0, 4.0.1 NOT SUPPORTED -->
 
-                                                                                                <!--
-
       <antcall target="installation-test">
          <param name="jboss.home" value="${jboss401sp1.home}"/>
          <param name="run.secure-socket.example" value="false"/>
@@ -113,7 +111,6 @@
          <param name="run.secure-socket.example" value="false"/>
       </antcall>
 
-                                                                                                 -->
       <antcall target="installation-test">
          <param name="jboss.home" value="${jboss404GA.home}"/>
       </antcall>
@@ -129,7 +126,7 @@
          <param name="run.stateless.example" value="false"/>
          <param name="run.secure-socket.example" value="false"/>
       </antcall>
-                                                                                                <!--
+
       <antcall target="installation-test">
          <param name="jboss.home" value="${jboss405CR1.home}"/>
       </antcall>
@@ -142,7 +139,11 @@
          <param name="run.secure-socket.example" value="false"/>
       </antcall>
 
-                                                                                                 -->
+      <antcall target="installation-test">
+         <param name="jboss.home" value="${jboss405CR1ejb3.home}"/>
+         <param name="no.java4" value="true"/>
+         <param name="run.ejb3mdb.example" value="true"/>
+      </antcall>
 
       <!--
          Stateless Session Bean installation test will fail on this because the client talks to
@@ -476,7 +477,7 @@
    <!--      Internal Targets                                                    -->
    <!-- ======================================================================== -->
 
-   <target name="installation-test" depends="check-jboss-availability">
+   <target name="installation-test" depends="check-java-version, check-jboss-availability" unless="skip.current.java">
 
       <echo message="Testing installation on ${jboss.home}"/>
       <!--
@@ -494,6 +495,21 @@
                                                                                                  -->
    </target>
 
+   <target name="check-java-version">
+      <condition property="skip.current.java" value="true">
+         <or>
+            <and>
+               <istrue value="${no.java4}"/>
+               <equals arg1="1.4" arg2="${ant.java.version}"/>
+            </and>
+            <and>
+               <istrue value="${no.java5}"/>
+               <equals arg1="1.5" arg2="${ant.java.version}"/>
+            </and>
+         </or>
+      </condition>
+   </target>
+
    <target name="old-server-compatibility-test" depends="check-jboss-availability">
 
       <echo message="Checking current client's compatibility with a ${jboss.messaging.version} server"/>
@@ -681,7 +697,9 @@
 
       <ant dir="../.." antfile="build.xml" target="clean" inheritAll="false"/>
       <ant dir="../.." antfile="build.xml" target="artifacts" inheritAll="false"/>
-      <!-- I need this because the smoke test itself uses org.jboss.test.messaging.tools classes -->
+      <!--
+           I need this because the smoke test itself uses org.jboss.test.messaging.tools classes.
+      -->
       <ant dir="../../tests" antfile="build.xml" target="compile" inheritAll="false"/>
 
    </target>

Modified: trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -66,7 +66,7 @@
    // Constants -----------------------------------------------------
 
    // Static --------------------------------------------------------
-   
+
    // Attributes ----------------------------------------------------
 
    protected Connection producerConnection, consumerConnection;
@@ -94,11 +94,11 @@
       super.setUp();
 
       ServerManagement.start("all");
-                  
+
       ServerManagement.undeployTopic("Topic");
       ServerManagement.undeployQueue("Queue");
       ServerManagement.undeployQueue("Queue2");
-      
+
       ServerManagement.deployTopic("Topic");
       ServerManagement.deployQueue("Queue");
       ServerManagement.deployQueue("Queue2");
@@ -122,7 +122,7 @@
       queueProducer = producerSession.createProducer(queue);
       queueProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
       queueConsumer = consumerSession.createConsumer(queue);
-      
+
       this.drainDestination(cf, queue);
       this.drainDestination(cf, queue2);
 
@@ -142,48 +142,48 @@
       ServerManagement.undeployTopic("Topic");
       ServerManagement.undeployQueue("Queue");
       ServerManagement.undeployQueue("Queue2");
-      
+
       super.tearDown();
    }
-   
+
    public void testRelayMessage() throws Exception
    {
       Connection conn = cf.createConnection();
-      
+
       conn.start();
-      
+
       final Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
+
       MessageConsumer cons = sess.createConsumer(queue);
-      
+
       final Object lock = new Object();
-      
+
       final int numMessages = 100;
-      
-      
+
+
       class MyListener implements MessageListener
       {
          boolean failed;
-         
+
          int count;
-         
+
          public void onMessage(Message m)
          {
             try
             {
                MessageProducer prod = sess.createProducer(queue2);
-            
+
                prod.send(m);
-               
+
                count++;
-               
+
                if (count == numMessages)
                {
                   synchronized (lock)
                   {
                      lock.notify();
                   }
-                  
+
                }
             }
             catch (JMSException e)
@@ -192,29 +192,29 @@
             }
          }
       }
-      
+
       MyListener listener = new MyListener();
-         
+
       cons.setMessageListener(listener);
-      
+
       MessageProducer prod = sess.createProducer(queue);
-      
+
       for (int i = 0; i < numMessages; i++)
       {
          prod.send(sess.createMessage());
       }
-      
+
       synchronized (lock)
       {
-         lock.wait();         
+         lock.wait();
       }
-      
+
       conn.close();
-     
+
       assertFalse(listener.failed);
    }
-   
-   
+
+
    /*
     * If there are two competing consumers on a queue/subscription then if one closes
     * and has unacknowledged deliveries these should be cancelled but also
@@ -229,105 +229,105 @@
    public void testRedeliveryToCompetingConsumerOnQueue() throws Exception
    {
       Connection conn = cf.createConnection();
-      
+
       Session sessSend = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
+
       MessageProducer prod = sessSend.createProducer(queue);
-      
+
       conn.start();
-      
+
       Session sessConsume1 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-      
+
       MessageConsumer cons1 = sessConsume1.createConsumer(queue);
-      
+
       TextMessage tm = sessSend.createTextMessage();
-      
+
       tm.setText("Your mum");
-      
+
       prod.send(tm);
-      
+
       TextMessage tm2 = (TextMessage)cons1.receive();
-      
+
       assertNotNull(tm2);
-      
+
       assertEquals("Your mum", tm2.getText());
-      
+
       // Don't ack
-      
+
       // Create another consumer
-      
+
       Session sessConsume2 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-      
+
       MessageConsumer cons2 = sessConsume2.createConsumer(queue);
-      
+
       // this should cancel message and cause delivery to other consumer
-      
+
       sessConsume1.close();
-      
+
       TextMessage tm3 = (TextMessage)cons2.receive(1000);
-      
+
       assertNotNull(tm3);
-      
+
       assertEquals("Your mum", tm3.getText());
-      
+
       tm3.acknowledge();
-      
+
       conn.close();
-      
-      
+
+
    }
-  
-   
+
+
    public void testRedeliveryToCompetingConsumerOnSubscription() throws Exception
    {
       Connection conn = cf.createConnection();
-      
+
       conn.setClientID("wibble");
-      
+
       Session sessSend = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
+
       MessageProducer prod = sessSend.createProducer(topic);
-      
+
       conn.start();
-      
+
       Session sessConsume1 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-      
+
       MessageConsumer cons1 = sessConsume1.createDurableSubscriber(topic, "sub1");
-      
+
       TextMessage tm = sessSend.createTextMessage();
-      
+
       tm.setText("Your mum");
-      
+
       prod.send(tm);
-      
+
       TextMessage tm2 = (TextMessage)cons1.receive();
-      
+
       assertNotNull(tm2);
-      
+
       assertEquals("Your mum", tm2.getText());
-      
+
       //Don't ack
-      
+
       //Create another consumer
-                 
+
       Session sessConsume2 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-       
+
       MessageConsumer cons2 = sessConsume2.createDurableSubscriber(topic, "sub1");
-          
+
       //this should cancel message and cause delivery to other consumer
-      
+
       sessConsume1.close();
-               
+
       TextMessage tm3 = (TextMessage)cons2.receive(1000);
-      
+
       assertNotNull(tm3);
-      
+
       assertEquals("Your mum", tm3.getText());
-      
-      tm3.acknowledge();            
-      
+
+      tm3.acknowledge();
+
       conn.close();
-      
+
    }
 
    /**
@@ -388,14 +388,14 @@
 
       // start consumer connection after the message is submitted
       consumerConnection.start();
-      
+
       //NOTE! There semantics of receiveNoWait do not guarantee the message is available
       //immediately after the message is sent
       //It will be available some indeterminate time later.
       //This is fine and as per spec.
       //To implement receiveNoWait otherwise would be very costly
       //Also other messaging systems e.g. Sun implement it this way
-      
+
       Thread.sleep(500);
 
       TextMessage m = (TextMessage)queueConsumer.receiveNoWait();
@@ -455,9 +455,9 @@
    // closed consumer tests
    //
 
-   //This test is not valid - 
+   //This test is not valid -
    //The message will not be in the new consumer it will be in the original consumer
-   
+
 //   public void testClose1() throws Exception
 //   {
 //      // there is a consumer already open by setup
@@ -895,13 +895,13 @@
           assertEquals("hello1", rm1.getText());
 
           cons1.close();
-          
+
           //rollback should cause redelivery of messages
 
           //in this case redelivery occurs to a different receiver
 
           sess.rollback();
-  
+
           MessageConsumer cons2 = sess.createConsumer(queue);
 
           TextMessage rm2 = (TextMessage)cons2.receive(1500);
@@ -1010,12 +1010,12 @@
           assertEquals("hello1", rm1.getText());
 
           cons1.close();
-         
+
           log.debug("sess.recover()");
 
           //redeliver
           sess.recover();
-          
+
           MessageConsumer cons2 = sess.createConsumer(queue);
 
           log.debug("receiving ...");
@@ -1067,26 +1067,26 @@
           prod.send(sess.createTextMessage("1"));
           prod.send(sess.createTextMessage("2"));
           prod.send(sess.createTextMessage("3"));
-          
+
           MessageConsumer cons1 = sess.createConsumer(queue);
 
           Message r1 = cons1.receive();
-          
+
           log.trace("Got first message");
-          
+
           cons1.close();
-          
+
           log.trace("Closed consumer");
-          
+
           MessageConsumer cons2 = sess.createConsumer(queue);
-          
+
           log.trace("Wairting for second message");
           Message r2 = cons2.receive();
-                  
+
           log.trace("got second message");
-          
+
           Message r3 = cons2.receive();
-          
+
           r1.acknowledge();
           r2.acknowledge();
           r3.acknowledge();
@@ -1152,8 +1152,8 @@
     * Test server-side consumer delegate activation (on receive())
     */
 // This test is not valid since the message will be in the first consumer, not c2
-   
-   
+
+
 //   public void testReceive1() throws Exception
 //   {
 //      Connection conn = null;
@@ -1193,9 +1193,9 @@
    /**
     * Test server-side consumer delegate activation (on receive())
     */
-   
+
    //This test is not valid since the message will be in the first consumer, not c2
-   
+
 //   public void testReceive2() throws Exception
 //   {
 //      Connection conn = null;
@@ -1321,9 +1321,9 @@
    /**
     * TODO Get rid of this (http://jira.jboss.org/jira/browse/JBMESSAGING-92)
     */
-   
+
    //This test is no longer valid since we only use one listener per connection now
-   
+
 //   public void testRemotingInternals() throws Exception
 //   {
 //      if (ServerManagement.isRemote())
@@ -1767,114 +1767,112 @@
       latch.acquire();
    }
 
-
     /** to be used by testTimeoutReceiveOnClose */
-    private class ThreadCloser extends Thread
-    {
+	   private class ThreadCloser extends Thread
+	   {
 
-        Object waitMonitor;
-        long timeToSleep;
+	       Object waitMonitor;
+	       long timeToSleep;
 
-        public ThreadCloser( Object waitMonitor, long timeToSleep)
-        {
-            this.waitMonitor=waitMonitor;
-            this.timeToSleep=timeToSleep;
-        }
+	       public ThreadCloser( Object waitMonitor, long timeToSleep)
+	       {
+	           this.waitMonitor=waitMonitor;
+	           this.timeToSleep=timeToSleep;
+	       }
 
 
-        public void run()
-        {
-            try
-            {
-                log.trace("(ThreadCloser)Waiting on monitor to close thread");
-                synchronized (waitMonitor)
-                {
-                    waitMonitor.wait();
-                }
-                log.trace("(ThreadCloser)Notification received");
-                Thread.sleep(timeToSleep);
-                topicConsumer.close();
+	       public void run()
+	       {
+	           try
+	           {
+	               log.info("(ThreadCloser)Waiting on monitor to close thread");
+	               synchronized (waitMonitor)
+	               {
+	                   waitMonitor.wait();
+	               }
+	               log.info("(ThreadCloser)Notification received");
+	               Thread.sleep(timeToSleep);
+	               topicConsumer.close();
 
-            }
-            catch (Exception e)
-            {
-                log.error(e);
-                e.printStackTrace();
-            }
-        }
-    }
+	           }
+	           catch (Exception e)
+	           {
+	               log.error(e);
+	               e.printStackTrace();
+	           }
+	       }
+	   }
 
-    /** to be used by testTimeoutReceiveOnClose */
-    private class ThreadReceiver extends Thread
-    {
+	   /** to be used by testTimeoutReceiveOnClose */
+	   private class ThreadReceiver extends Thread
+	   {
 
-        long timeToWait;
-        Object waitMonitor;
-        long t1;
-        long t2;
-        Object receivedObject;
+	       long timeToWait;
+	       Object waitMonitor;
+	       long t1;
+	       long t2;
+	       Object receivedObject;
 
-        public ThreadReceiver(Object waitMonitor, long timeToWait)
-        {
-            this.waitMonitor=waitMonitor;
-            this.timeToWait=timeToWait;
-        }
+	       public ThreadReceiver(Object waitMonitor, long timeToWait)
+	       {
+	           this.waitMonitor=waitMonitor;
+	           this.timeToWait=timeToWait;
+	       }
 
-        public void run()
-        {
-            try
-            {
-                log.trace("(ThreadReceiver)Waiting on monitor to close thread");
-                synchronized(waitMonitor)
-                {
-                    waitMonitor.wait();
-                }
-                log.trace("(ThreadReceiver)Notification received");
-                t1=System.currentTimeMillis();
-                receivedObject=topicConsumer.receive(timeToWait);
-                t2=System.currentTimeMillis();
+	       public void run()
+	       {
+	           try
+	           {
+	               log.info("(ThreadReceiver)Waiting on monitor to close thread");
+	               synchronized(waitMonitor)
+	               {
+	                   waitMonitor.wait();
+	               }
+	               log.info("(ThreadReceiver)Notification received");
+	               t1=System.currentTimeMillis();
+	               receivedObject=topicConsumer.receive(timeToWait);
+	               t2=System.currentTimeMillis();
 
-            }
-            catch (Exception e)
-            {
-                log.error(e);
-                e.printStackTrace();
-            }
-        }
-    }
+	           }
+	           catch (Exception e)
+	           {
+	               log.error(e);
+	               e.printStackTrace();
+	           }
+	       }
+	   }
 
-   public void testTimeoutReceiveOnClose() throws Exception
-   {
-      System.gc();       /// If A GC need to be execute, it' s better to be executed now
-      Thread.sleep(1000);
-      if (log.isTraceEnabled()) log.trace("testTimeoutReceiveOnClose");
+	  public void testTimeoutReceiveOnClose() throws Exception
+	  {
+	     System.gc();       /// If A GC need to be executed, it' s better to be executed now
+	     Thread.sleep(1000);
+	     if (log.isTraceEnabled()) log.trace("testTimeoutReceiveOnClose");
 
-      Object monitor = new Object();
-      ThreadCloser closer = null;
-      ThreadReceiver receiver = new ThreadReceiver(monitor,2000);
+	     Object monitor = new Object();
+	     ThreadCloser closer = null;
+	     ThreadReceiver receiver = new ThreadReceiver(monitor,2000);
 
-      closer = new ThreadCloser(monitor,1000);
-      receiver= new ThreadReceiver(monitor,2000);
-      closer.start();
-      receiver.start();
-      Thread.sleep(2000);
-      synchronized (monitor)
-      {
-         monitor.notifyAll();
-      }
-      closer.join();
-      receiver.join();
+	     closer = new ThreadCloser(monitor,1000);
+	     receiver= new ThreadReceiver(monitor,2000);
+	     closer.start();
+	     receiver.start();
+	     Thread.sleep(2000);
+	     synchronized (monitor)
+	     {
+	        monitor.notifyAll();
+	     }
+	     closer.join();
+	     receiver.join();
 
 
-      assertNull(receiver.receivedObject);
+	     assertNull(receiver.receivedObject);
 
-      log.trace("Elapsed time was " + (receiver.t2-receiver.t1));
+	     log.info("Elapsed time was " + (receiver.t2-receiver.t1));
 
-      // We need to make sure the
-      assertTrue("Receive was supposed to receive a notification before 2 seconds",receiver.t2-receiver.t1<=1500);
-   }
+	     // We need to make sure the
+	     assertTrue("Receive was supposed to receive a notification before 2 seconds",receiver.t2-receiver.t1<=1500);
+	  }
 
-
    //
    // MessageListener tests
    //
@@ -2107,7 +2105,7 @@
    //
    // NoLocal
    //
-   
+
    public void testNoLocal() throws Exception
    {
       if (log.isTraceEnabled()) log.trace("testNoLocal");
@@ -2232,17 +2230,17 @@
          Session sess1 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE);
          Session sess2 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE);
 
-         
+
          log.trace("careting consumer1");
          MessageConsumer cons1 = sess1.createConsumer(topic);
-         
+
          log.trace("creating consumer2");
          MessageConsumer cons2 = sess2.createConsumer(topic);
-         
+
          log.trace("starting connection");
-         
+
          conn1.start();
-         
+
          log.trace("started connection");
 
          Session sess3 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -2494,7 +2492,7 @@
          }
 
          assertEquals(NUM_MESSAGES, count);
-         
+
          durable.close();
 
          sess1.unsubscribe("mySubscription");
@@ -2692,7 +2690,7 @@
          }
 
          log.debug("unsubscribing mySubscription");
-         
+
          durable.close();
          sess5.unsubscribe("mySubscription");
          log.debug("unsubscribing done");
@@ -2707,7 +2705,7 @@
 
          TextMessage tm3 = (TextMessage)durable.receive(1000);
          assertNull(tm3);
-         
+
          durable.close();
       }
       finally
@@ -2733,7 +2731,7 @@
             conn5.close();
          }
          if (sess6 != null)
-         {            
+         {
             sess6.unsubscribe("mySubscription");
          }
          if (conn6 != null)
@@ -2820,7 +2818,7 @@
          log.trace("Received " + count  + " messages");
 
          assertEquals(NUM_MESSAGES - NUM_TO_RECEIVE, count);
-         
+
          durable2.close();
 
          sess2.unsubscribe("mySubscription");
@@ -2909,7 +2907,7 @@
          }
 
          assertEquals(0, count);
-         
+
          durable2.close();
 
          sess2.unsubscribe("mySubscription");
@@ -3005,7 +3003,7 @@
    {
       producerSession.close();
       consumerSession.close();
-            
+
       Session sessProducer = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
       MessageProducer prod = sessProducer.createProducer(queue);
       TextMessage tm = sessProducer.createTextMessage("testRedeliveredDifferentSessions");
@@ -3238,7 +3236,7 @@
 
    }
 
-   
+
    // Package protected ---------------------------------------------
 
    // Protected -----------------------------------------------------
@@ -3250,31 +3248,31 @@
    private class ExceptionRedelMessageListenerImpl implements MessageListener
    {
       private Latch latch = new Latch();
-      
+
       private int count;
-      
+
       private Session sess;
-      
+
       private boolean failed;
-      
+
       public void waitForMessages() throws InterruptedException
       {
          latch.acquire();
          //Thread.sleep(2000); //enough time for postdeliver to be called
       }
-       
+
       public ExceptionRedelMessageListenerImpl(Session sess)
       {
          this.sess = sess;
       }
-      
+
       public void onMessage(Message m)
       {
          TextMessage tm = (TextMessage)m;
          count++;
-         
+
          log.trace("Got message:" + count);
-                  
+
          try
          {
             log.trace("message:" + tm.getText());
@@ -3340,7 +3338,7 @@
                   latch.release();
                }
             }
-            
+
             else if (count == 4)
             {
                if (sess.getAcknowledgeMode() == Session.AUTO_ACKNOWLEDGE || sess.getAcknowledgeMode() == Session.DUPS_OK_ACKNOWLEDGE)
@@ -3362,25 +3360,25 @@
             }
          }
          catch (JMSException e)
-         {           
+         {
             failed = true;
             latch.release();
          }
       }
    }
-   
+
    private class RedelMessageListenerImpl implements MessageListener
    {
       private Session sess;
-      
+
       private int count;
-      
+
       private boolean failed;
-      
+
       private Latch latch = new Latch();
-      
+
       private boolean transacted;
-      
+
       public RedelMessageListenerImpl(boolean transacted)
       {
          this.transacted = transacted;
@@ -3392,15 +3390,15 @@
          latch.acquire();
          //Thread.sleep(2000); //enough time for postdeliver to be called
       }
-      
+
       public void onMessage(Message m)
       {
          try
          {
             TextMessage tm = (TextMessage)m;
-            
+
             log.trace("Got message:" + tm.getText() + " count is " + count);
-            
+
             if (count == 0)
             {
                if (!("a".equals(tm.getText())))
@@ -3421,7 +3419,7 @@
                   log.trace("recover() called");
                }
             }
-            
+
             if (count == 1)
             {
                if (!("a".equals(tm.getText())))
@@ -3443,7 +3441,7 @@
                   log.trace("Should be b but was " + tm.getText());
                   failed = true;
                   latch.release();
-               }               
+               }
             }
             if (count == 3)
             {
@@ -3452,7 +3450,7 @@
                   log.trace("Should be c but was " + tm.getText());
                   failed = true;
                   latch.release();
-               }               
+               }
                if (transacted)
                {
                   sess.commit();
@@ -3474,7 +3472,7 @@
          }
       }
    }
-   
+
    private class MessageListenerImpl implements MessageListener
    {
       private List messages = Collections.synchronizedList(new ArrayList());

Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/DestinationManagerTest.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -21,11 +21,18 @@
   */
 package org.jboss.test.messaging.jms.server;
 
+import java.util.Set;
+
 import javax.jms.Queue;
 import javax.jms.Topic;
 import javax.naming.InitialContext;
 import javax.naming.NameNotFoundException;
 
+import org.jboss.jms.server.DestinationManager;
+import org.jboss.jms.server.ServerPeer;
+import org.jboss.jms.server.destination.ManagedDestination;
+import org.jboss.jms.server.destination.ManagedQueue;
+import org.jboss.jms.server.destination.ManagedTopic;
 import org.jboss.test.messaging.MessagingTestCase;
 import org.jboss.test.messaging.tools.ServerManagement;
 
@@ -367,6 +374,69 @@
       Topic q = (Topic)initialContext.lookup(ServerManagement.DEFAULT_TOPIC_CONTEXT + "/" + name);
       assertEquals(name, q.getTopicName());      
    }
+   
+   public void testDestinationManager() throws Exception
+   {
+      ServerPeer sp = ServerManagement.getServer().getServerPeer();
+      
+      DestinationManager dm = sp.getDestinationManager();
+      
+      dm.stop();
+      
+      dm.start();
+        
+      ManagedQueue queue1 = new ManagedQueue("queue1", 1000, 10, 10);
+      
+      ManagedTopic topic1 = new ManagedTopic("topic1", 1000, 10, 10);
+      
+      dm.registerDestination(queue1);
+      
+      dm.registerDestination(topic1);
+      
+      ManagedDestination queue2 = dm.getDestination("not exists", true);
+      
+      assertNull(queue2);
+      
+      ManagedDestination topic2 = dm.getDestination("not exists", false);
+      
+      assertNull(topic2);
+      
+      ManagedQueue queue3 = (ManagedQueue)dm.getDestination("queue1", true);
+      
+      assertTrue(queue1 == queue3);
+      
+      ManagedDestination queue4 = dm.getDestination("queue1", false);
+      
+      assertNull(queue4);
+      
+      ManagedTopic topic3 = (ManagedTopic)dm.getDestination("topic1", false);
+      
+      assertTrue(topic1 == topic3);
+      
+      ManagedDestination topic4 = dm.getDestination("topic1", true);
+      
+      assertNull(topic4);            
+            
+      dm.unregisterDestination(queue1);
+      
+      ManagedDestination queue5 = dm.getDestination("queue1", true);
+      
+      assertNull(queue5);
+      
+      dm.unregisterDestination(topic1);
+      
+      ManagedDestination topic5 = dm.getDestination("topic1", false);
+      
+      assertNull(topic5);
+      
+      dm.registerDestination(queue1);
+      
+      dm.registerDestination(topic1);
+      
+      dm.stop();
+      
+      dm.start();
+   }
 
 
 

Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/destination/QueueManagementTest.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -53,7 +53,7 @@
    private static final String MESSAGE_TWO = "message two";
 
    // Static --------------------------------------------------------
-   
+
    // Attributes ----------------------------------------------------
 
    // Constructors --------------------------------------------------
@@ -75,16 +75,16 @@
    {
       super.tearDown();
    }
-   
+
    public void testReloadQueue() throws Exception
-   {      
+   {
       String config =
          "<mbean code=\"org.jboss.jms.server.destination.QueueService\" " +
          "       name=\"somedomain:service=Queue,name=ReloadQueue\"" +
          "       xmbean-dd=\"xmdesc/Queue-xmbean.xml\">" +
          "    <depends optional-attribute-name=\"ServerPeer\">jboss.messaging:service=ServerPeer</depends>" +
          "</mbean>";
-      
+
       ObjectName destObjectName = deploy(config);
 
       assertEquals("ReloadQueue", ServerManagement.getAttribute(destObjectName, "Name"));
@@ -92,82 +92,82 @@
       String jndiName = "/queue/ReloadQueue";
       String s = (String)ServerManagement.getAttribute(destObjectName, "JNDIName");
       assertEquals(jndiName, s);
-      
+
       //Send some messages
-      
+
       InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment());
-      
+
       ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
-      
+
       Queue queue = (Queue)ic.lookup("/queue/ReloadQueue");
 
       Connection conn = cf.createConnection();
-      
+
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
+
       MessageProducer prod = sess.createProducer(queue);
       prod.setDeliveryMode(DeliveryMode.PERSISTENT);
-  
+
       for (int i = 0; i < 10; i++)
       {
          TextMessage tm = sess.createTextMessage();
-         
+
          tm.setText("message:" + i);
-         
+
          prod.send(tm);
       }
-      
+
       conn.close();
-      
+
       //Receive half of them
-      
+
       conn = cf.createConnection();
-      
+
       sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
+
       MessageConsumer cons = sess.createConsumer(queue);
-      
+
       conn.start();
-      
+
       for (int i = 0; i < 5; i++)
       {
          TextMessage tm = (TextMessage)cons.receive(1000);
-         
+
          assertNotNull(tm);
-         
+
          assertEquals("message:" + i, tm.getText());
       }
-      
+
       conn.close();
-      
+
       //Undeploy and redeploy the queue
       //The last 5 persistent messages should still be there
-      
+
       undeployDestination("ReloadQueue");
-      
+
       deploy(config);
-      
+
       queue = (Queue)ic.lookup("/queue/ReloadQueue");
-      
+
       conn = cf.createConnection();
-      
+
       sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      
+
       cons = sess.createConsumer(queue);
-      
+
       conn.start();
-      
+
       for (int i = 5; i < 10; i++)
       {
          TextMessage tm = (TextMessage)cons.receive(1000);
-         
+
          assertNotNull(tm);
-         
+
          assertEquals("message:" + i, tm.getText());
       }
-      
-      conn.close();      
-      
+
+      conn.close();
+
       undeployDestination("ReloadQueue");
    }
 
@@ -175,43 +175,43 @@
    {
       InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment());
       ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
-      
+
       ServerManagement.deployQueue("QueueMessageCount");
-      
+
       try
       {
          Queue queue = (Queue)ic.lookup("/queue/QueueMessageCount");
-         
+
          // Test MessageCount, should be 0 msg
-         ObjectName destObjectName = 
+         ObjectName destObjectName =
             new ObjectName("jboss.messaging.destination:service=Queue,name=QueueMessageCount");
          Integer count = (Integer)ServerManagement.getAttribute(destObjectName, "MessageCount");
          assertEquals(0, count.intValue());
-         
+
          // Send 1 message to queue
          Connection conn = cf.createConnection();
          Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
          MessageProducer prod = session.createProducer(queue);
          prod.setDeliveryMode(DeliveryMode.PERSISTENT);
-         
+
          TextMessage m = session.createTextMessage("message one");
          prod.send(m);
-         conn.close();           
-         
+         conn.close();
+
          // Test MessageCount again, should be 1 msg
          count = (Integer)ServerManagement.getAttribute(destObjectName, "MessageCount");
          assertEquals(1, count.intValue());
-         
-         
+
+
          // Consume the message
          conn = cf.createConnection();
          session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
          MessageConsumer cons = session.createConsumer(queue);
          conn.start();
-         
+
          cons.receive();
          conn.close();
-         
+
          //Need to pause for a bit since the message is not necessarily removed
          //in memory until sometime after receive has completed
          Thread.sleep(1000);
@@ -275,6 +275,7 @@
             receivedCount++;
 
             Thread.sleep(500);
+
             int mc = ((Integer)ServerManagement.
                getAttribute(destObjectName, "MessageCount")).intValue();
 
@@ -374,72 +375,72 @@
          ServerManagement.undeployQueue("QueueRemoveMessages");
       }
    }
-   
+
    public void testListMessages() throws Exception
    {
       InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment());
       ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
-      
+
       ServerManagement.deployQueue("QueueListMessages");
-      
+
       try
       {
-         
+
          Queue queue = (Queue)ic.lookup("/queue/QueueListMessages");
-         
+
          // Test listMessages, should be 0 msg
-         ObjectName destObjectName = 
+         ObjectName destObjectName =
             new ObjectName("jboss.messaging.destination:service=Queue,name=QueueListMessages");
-         
+
          List list = (List)ServerManagement.invoke(
-               destObjectName, 
-               "listMessages", 
-               new Object[] {null}, 
+               destObjectName,
+               "listMessages",
+               new Object[] {null},
                new String[] {"java.lang.String"});
          assertNotNull(list);
          assertEquals(0, list.size());
-         
+
          // Send 1 message to queue
          Connection conn = cf.createConnection();
          Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
          MessageProducer prod = session.createProducer(queue);
          prod.setDeliveryMode(DeliveryMode.PERSISTENT);
-         
+
          TextMessage m = session.createTextMessage("message one");
          prod.send(m);
          conn.close();
-           
+
          // Test listMessages again, should be 1 msg
          list = (List)ServerManagement.invoke(
-               destObjectName, 
-               "listMessages", 
-               new Object[] {null}, 
+               destObjectName,
+               "listMessages",
+               new Object[] {null},
                new String[] {"java.lang.String"});
          assertEquals(1, list.size());
          assertTrue(list.get(0) instanceof TextMessage);
          TextMessage m1 = (TextMessage)list.get(0);
          assertEquals(m1.getText(), m.getText());
-         
+
          // Consume the message
          conn = cf.createConnection();
          session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
          MessageConsumer cons = session.createConsumer(queue);
          conn.start();
-         
+
          cons.receive();
          conn.close();
-         
+
          // Test MessageCount again, should be 0 msg
          list = (List)ServerManagement.invoke(
-               destObjectName, 
-               "listMessages", 
-               new Object[] {null}, 
+               destObjectName,
+               "listMessages",
+               new Object[] {null},
                new String[] {"java.lang.String"});
          assertEquals(0, list.size());
       }
       finally
       {
-      
+
          ServerManagement.undeployQueue("QueueListMessages");
       }
    }
@@ -471,9 +472,9 @@
 
       ServerManagement.undeployQueue("QueueListMessages");
    }
-   
+
    // Package protected ---------------------------------------------
-   
+
    // Protected -----------------------------------------------------
 
    protected boolean isQueue()

Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -482,7 +482,7 @@
       String persistenceConfigFile =
          "server/default/deploy/" + databaseType + "-persistence-service.xml";
       
-      log.info("********* LOADING CONFIG FILE: " + persistenceConfigFile);
+      log.info("********* Using config file: " + persistenceConfigFile);
       
       URL persistenceConfigFileURL = getClass().getClassLoader().getResource(persistenceConfigFile);
       if (persistenceConfigFileURL == null)
@@ -497,8 +497,6 @@
       
       String props = persistenceManagerConfig.getAttributeValue("SqlProperties");
       
-      log.info("sql properties are: " + props);
-      
       if (props != null)
       {         
          ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());
@@ -522,7 +520,7 @@
       String persistenceConfigFile =
          "server/default/deploy/" + databaseType + "-persistence-service.xml";
       
-      log.info("********* LOADING CONFIG FILE: " + persistenceConfigFile);
+      log.info("********* Using config file: " + persistenceConfigFile);
       
       URL persistenceConfigFileURL = getClass().getClassLoader().getResource(persistenceConfigFile);
       if (persistenceConfigFileURL == null)
@@ -557,10 +555,19 @@
    {
       String databaseType = getDatabaseType();
       
-      String persistenceConfigFile =
-         "server/default/deploy/clustered-" + databaseType + "-persistence-service.xml";
+      String persistenceConfigFile;
+      if (databaseType.equals("hsqldb"))
+      {
+         persistenceConfigFile =
+            "server/default/deploy/" + databaseType + "-persistence-service.xml";
+      }
+      else
+      {
+         persistenceConfigFile =
+            "server/default/deploy/clustered-" + databaseType + "-persistence-service.xml";
+      }
       
-      log.info("********* LOADING CONFIG FILE: " + persistenceConfigFile);
+      log.info("********* Using config file: " + persistenceConfigFile);
       
       URL persistenceConfigFileURL = getClass().getClassLoader().getResource(persistenceConfigFile);
       if (persistenceConfigFileURL == null)

Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java	2006-10-26 19:28:04 UTC (rev 1519)
@@ -95,7 +95,12 @@
    public String getDatabaseType()
    {
       DatabaseConfiguration dbc = (DatabaseConfiguration)dbConfigurations.get(database);
-      return dbc.getDatabaseType();
+      String databaseType = dbc.getDatabaseType();
+      if (databaseType.equals("jtds"))
+      {
+    	  databaseType="mssql";
+      }
+      return databaseType; 
    }
 
    public String getDatabaseConnectionURL()

Modified: trunk/util/do-not-distribute.properties
===================================================================
--- trunk/util/do-not-distribute.properties	2006-10-25 20:30:08 UTC (rev 1518)
+++ trunk/util/do-not-distribute.properties	2006-10-26 19:28:04 UTC (rev 1519)
@@ -6,6 +6,7 @@
 #jboss.home=C:\\work/src/cvs/jboss-head/build/output/jboss-5.0.0.Alpha
 #jboss.home=C:\\work\\src\\jboss-4.0.3SP1-src\\build\\output\\jboss-4.0.3SP1
 jboss.home=C:\\work\\src\\jboss-4.0.4.GA-src\\build\\output\\jboss-4.0.4.GA
+#jboss.home=C:\\work\\src\\jboss-4.0.5.CR1-src\\build\\output\\jboss-4.0.5.CR1-ejb3
 messaging.config.name=messaging
 main.artifact.location=../output/lib
 auxiliary.artifacts.location=../src/etc/server/default/deploy




More information about the jboss-cvs-commits mailing list