You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2010/03/30 23:35:13 UTC

svn commit: r929307 [4/5] - in /qpid/branches/qmf-devel0.7a: ./ qpid/ qpid/cpp/bindings/qmf/python/ qpid/cpp/bindings/qmf/ruby/ qpid/cpp/bindings/qmf/tests/ qpid/cpp/examples/messaging/ qpid/cpp/examples/tradedemo/ qpid/cpp/include/qmf/engine/ qpid/cpp...

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:805429-821809
 /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790
-/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:919043-928107
+/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -2,4 +2,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:805429-821809
 /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790
-/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:919043-928107
+/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -2,4 +2,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:805429-821809
 /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790
-/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:919043-928107
+/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -2,4 +2,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:805429-821809
 /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790
-/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:919043-928107
+/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -2,4 +2,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:805429-821809
 /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790
-/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:919043-928107
+/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -2,4 +2,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:805429-821809
 /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790
-/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:919043-928107
+/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/eclipse-plugin/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src:805429-821809
 /qpid/branches/jmx_mc_gsoc09/qpid/java/management/eclipse-plugin/src:788755
-/qpid/trunk/qpid/java/management/eclipse-plugin/src:919043-928107
+/qpid/trunk/qpid/java/management/eclipse-plugin/src:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java:805429-821809
-/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java:919043-928107
+/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java:805429-821809
-/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java:919043-928107
+/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java:805429-821809
-/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java:919043-928107
+/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java:805429-821809
-/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java:919043-928107
+/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc:805429-821809
-/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc:919043-928107
+/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc:919043-929244

Modified: qpid/branches/qmf-devel0.7a/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/module.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/module.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/module.xml Tue Mar 30 21:35:08 2010
@@ -188,7 +188,7 @@
     <echo message="Targeting : ${java.target}" level="info"/>
 
     <javac source="${java.source}" target="${java.target}" 
-           destdir="${module.classes}" debug="on"
+           destdir="${module.classes}" debug="on" includeantruntime="false"
            deprecation="${javac.deprecation}">
       <compilerarg line="${javac.compiler.args}"/>
       <src refid="module.src.path"/>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml Tue Mar 30 21:35:08 2010
@@ -18,9 +18,6 @@
  - specific language governing permissions and limitations
  - under the License.
  -
-
- This is an example config using the BDBMessageStore available from
- the Red Hat Messaging project at etp.108.redhat.com and distributed under GPL.
  -->
         
 <broker>
@@ -68,17 +65,8 @@
         </jmx>
     </security>
 
-    <virtualhosts>
-        <virtualhost>
-            <name>dev-only</name>
-            <dev-only>
-                <store>
-                    <class>org.apache.qpid.server.store.MemoryMessageStore</class>
-                    <environment-path>${work}/bdbstore/dev-only-store</environment-path>
-                </store>
-            </dev-only>
-        </virtualhost>
-    </virtualhosts>
+    <virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml</virtualhosts>
+    
     <heartbeat>
         <delay>0</delay>
         <timeoutFactor>2.0</timeoutFactor>
@@ -86,8 +74,6 @@
     <queue>
         <auto_register>true</auto_register>
     </queue>
-
-    <virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml</virtualhosts>
 </broker>
 
 

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl-settings.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl-settings.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl-settings.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl-settings.xml Tue Mar 30 21:35:08 2010
@@ -20,141 +20,7 @@
  -
  -->
 <broker>
-
-    <virtualhosts>
-
-        <virtualhost>
-            <name>test</name>
-            <test>
-                <queues>
-                    <exchange>amq.direct</exchange>
-                    <!-- 4Mb -->
-                    <maximumQueueDepth>4235264</maximumQueueDepth>
-                    <!-- 2Mb -->
-                    <maximumMessageSize>2117632</maximumMessageSize>
-                    <!-- 10 mins -->
-                    <maximumMessageAge>600000</maximumMessageAge>
-                </queues>
-
-
-                <security>
-                    <access>
-                        <class>org.apache.qpid.server.security.access.plugins.SimpleXML</class>
-                    </access>
-                    <access_control_list>
-                        <!-- This section grants pubish rights to an exchange + routing key pair -->
-                        <publish>
-                            <exchanges>
-                                <exchange>
-                                    <name>amq.direct</name>
-                                    <routing_keys>
-
-                                        <!-- Allow clients to publish requests -->
-                                        <routing_key>
-                                            <value>example.RequestQueue</value>
-                                            <users>
-                                                <user>client</user>
-                                            </users>
-                                        </routing_key>
-
-                                        <!-- Allow the processor to respond to a client on their Temporary Topic -->
-                                        <routing_key>
-                                            <value>tmp_*</value>
-                                            <users>
-                                                <user>server</user>
-                                            </users>
-                                        </routing_key>
-                                        <routing_key>
-                                            <value>TempQueue*</value>
-                                            <users>
-                                                <user>server</user>
-                                            </users>
-                                        </routing_key>
-                                    </routing_keys>
-
-                                </exchange>
-                            </exchanges>
-                        </publish>
-
-                        <!-- This section grants users the ability to consume from the broker -->
-                        <consume>
-                            <queues>
-                                <temporary>
-                                    <users>
-                                        <user>client</user>
-                                    </users>
-                                </temporary>
-
-                                <!-- Only allow the server to consume from the Request Queue-->
-                                <queue>
-                                    <name>example.RequestQueue</name>
-                                    <users>
-                                        <user>server</user>
-                                    </users>
-                                </queue>
-
-
-                            </queues>
-                        </consume>
-
-                        <!-- This section grants users the ability to create queues and exchanges -->
-                        <create>
-                            <queues>
-                                <temporary>
-                                    <users>
-                                        <user>client</user>
-                                    </users>
-                                </temporary>
-
-                                <!-- Allow clients to create queue on this exchange-->
-                                <queue>
-                                    <exchanges>                                    
-                                        <exchange>
-                                            <name>amq.direct</name>
-                                            <users>
-                                                <user>client</user>
-                                            </users>
-                                        </exchange>
-                                    </exchanges>
-                                </queue>
-                                <!-- Allow the server to create the Request Queue-->
-                                <queue>
-                                    <name>example.RequestQueue</name>
-                                    <users>
-                                        <user>server</user>
-                                    </users>
-                                </queue>
-
-                            </queues>
-                        </create>
-
-
-                    </access_control_list>
-
-                </security>
-            </test>
-        </virtualhost>
-
-        <virtualhost>
-            <name>test2</name>
-            <test2>
-                <security>
-                    <access>
-                        <class>org.apache.qpid.server.security.access.plugins.SimpleXML</class>
-                    </access>
-                    
-                    <access_control_list>
-                        <!-- This section grants specific users full permissions to all artifacts in this virtualhost -->
-                        <access>
-                            <users>
-                                <user>guest</user>
-                            </users>
-                        </access>
-                    </access_control_list>
-                </security>
-            </test2>
-        </virtualhost>
-    </virtualhosts>
+    <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-acl.xml</virtualhosts>
 </broker>
 
 

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-acl.xml Tue Mar 30 21:35:08 2010
@@ -22,7 +22,7 @@
 <configuration>
     <system/>
     <override>
-        <xml fileName="${test.config}" config-optional="true"/>
+        <xml fileName="${test.config}" optional="true"/>
         <xml fileName="${QPID_HOME}/etc/config-systests-acl-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config.xml"/>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby-settings.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby-settings.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby-settings.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby-settings.xml Tue Mar 30 21:35:08 2010
@@ -20,45 +20,7 @@
  -
  -->
 <broker>
-    <virtualhosts>
-        <directory>${conf}/virtualhosts</directory>
-
-        <virtualhost>
-            <name>localhost</name>
-            <localhost>
-                <store>
-                    <class>org.apache.qpid.server.store.DerbyMessageStore</class>
-                    <environment-path>${work}/derbyDB/localhost-store</environment-path>
-                </store>
-
-                <housekeeping>
-                    <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
-                </housekeeping>
-
-            </localhost>
-        </virtualhost>
-
-        <virtualhost>
-            <name>development</name>
-            <development>
-                <store>
-                    <class>org.apache.qpid.server.store.DerbyMessageStore</class>
-                    <environment-path>${work}/derbyDB/development-store</environment-path>                                        
-                </store>
-            </development>
-        </virtualhost>
-
-        <virtualhost>
-            <name>test</name>
-            <test>
-                <store>
-                    <class>org.apache.qpid.server.store.DerbyMessageStore</class>
-                    <environment-path>${work}/derbyDB/test-store</environment-path>
-                </store>
-            </test>
-        </virtualhost>
-
-    </virtualhosts>
+    <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-derby.xml</virtualhosts>
 </broker>
 
 

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-derby.xml Tue Mar 30 21:35:08 2010
@@ -22,7 +22,7 @@
 <configuration>
     <system/>
     <override>
-        <xml fileName="${test.config}" config-optional="true"/>
+        <xml fileName="${test.config}" optional="true"/>
         <xml fileName="${QPID_HOME}/etc/config-systests-derby-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config.xml"/>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-2.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-2.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-2.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-2.xml Tue Mar 30 21:35:08 2010
@@ -96,32 +96,8 @@
         </firewall>
     </security>
 
-    <virtualhosts>
-        <default>test</default>
-
-        <virtualhost>
-            <name>test</name>
-            <test>
-                <store>
-                    <class>org.apache.qpid.server.store.MemoryMessageStore
-                    </class>
-                </store>
-                <security>
-                    <firewall default-action="allow"/>
-		</security>
-            </test>
-        </virtualhost>
- 
-        <virtualhost>
-            <name>test2</name>
-            <test2>
-                <store>
-                    <class>org.apache.qpid.server.store.MemoryMessageStore
-                    </class>
-                </store>
-            </test2>
-        </virtualhost>
-    </virtualhosts>
+    <virtualhosts>${conf}/virtualhosts-systests-firewall-2.xml</virtualhosts>
+    
     <heartbeat>
         <delay>0</delay>
         <timeoutFactor>2.0</timeoutFactor>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-3.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-3.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-3.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-3.xml Tue Mar 30 21:35:08 2010
@@ -96,32 +96,8 @@
         </firewall>
     </security>
 
-    <virtualhosts>
-        <default>test</default>
-
-        <virtualhost>
-            <name>test</name>
-            <test>
-                <store>
-                    <class>org.apache.qpid.server.store.MemoryMessageStore
-                    </class>
-                </store>
-            </test>
-        </virtualhost>
- 
-        <virtualhost>
-            <name>test2</name>
-            <test2>
-                <store>
-                    <class>org.apache.qpid.server.store.MemoryMessageStore
-                    </class>
-                </store>
-                <security>
-	            <firewall default-action="deny"/>
-	        </security>
-            </test2>
-        </virtualhost>
-    </virtualhosts>
+    <virtualhosts>${conf}/virtualhosts-systests-firewall-3.xml</virtualhosts>
+    
     <heartbeat>
         <delay>0</delay>
         <timeoutFactor>2.0</timeoutFactor>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-settings.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-settings.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-settings.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall-settings.xml Tue Mar 30 21:35:08 2010
@@ -25,4 +25,6 @@
         <rule access="allow" network="127.0.0.1"/>
     </firewall>
     </security>
+    
+    <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-firewall.xml</virtualhosts>
 </broker>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-firewall.xml Tue Mar 30 21:35:08 2010
@@ -22,8 +22,9 @@
 <configuration>
     <system/>
     <override>
-        <xml fileName="${test.config}" config-optional="true"/>
-        <xml fileName="${QPID_FIREWALL_SETTINGS}"/>
+        <xml fileName="${test.config}" optional="true"/>
+        <xml fileName="${QPID_FIREWALL_CONFIG_SETTINGS}" optional="true"/>
+        <xml fileName="${QPID_HOME}/etc/config-systests-firewall-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config.xml"/>                
     </override>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-settings.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-settings.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-settings.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests-settings.xml Tue Mar 30 21:35:08 2010
@@ -26,4 +26,5 @@
             <enabled>false</enabled>
         </ssl>
     </management>
+    <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests.xml</virtualhosts>
 </broker>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/config-systests.xml Tue Mar 30 21:35:08 2010
@@ -22,7 +22,7 @@
 <configuration>
     <system/>
     <override>
-        <xml fileName="${test.config}" config-optional="true"/>
+        <xml fileName="${test.config}" optional="true"/>
         <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/>
         <xml fileName="${QPID_HOME}/etc/config.xml"/>                
     </override>

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml Tue Mar 30 21:35:08 2010
@@ -26,7 +26,7 @@
         <dev-only>            
             <queues>
                 <exchange>amq.direct</exchange>
-		<!-- Small defaults for development -->
+                <!-- Small defaults for development -->
                 <maximumQueueDepth>102400</maximumQueueDepth>  <!-- 100k -->
                 <maximumMessageSize>20480</maximumMessageSize> <!-- 20kb -->
                 <maximumMessageAge>60000</maximumMessageAge>  <!-- 1 mins -->
@@ -35,6 +35,11 @@
                     <name>dev-queue</name>
                 </queue>
             </queues>
+            <store>
+                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
+                <environment-path>${QPID_WORK}/bdbstore/dev-only-store</environment-path>
+            </store>
         </dev-only>
     </virtualhost>
 </virtualhosts>
+ 
\ No newline at end of file

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:443187-707694
 /qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:805429-821809
-/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:919043-928107
+/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:919043-929244

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java Tue Mar 30 21:35:08 2010
@@ -42,6 +42,8 @@ public class ServerConfigurationFileTest
         }
 
         saveTestConfiguration();
+        saveTestVirtualhosts();
+        
         _serverConfig = new ServerConfiguration(_configFile);
     }
 

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java Tue Mar 30 21:35:08 2010
@@ -20,19 +20,16 @@
 */
 package org.apache.qpid.server.logging;
 
+import javax.jms.Connection;
+import javax.jms.Queue;
+import javax.jms.Session;
+
 import org.apache.qpid.client.AMQDestination;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.util.FileUtils;
-import org.apache.qpid.util.LogMonitor;
-
-import javax.jms.Connection;
-import javax.jms.Queue;
-import javax.jms.Session;
-import java.io.File;
 
 public class AlertingTest extends AbstractTestLogging
 {
@@ -49,6 +46,7 @@ public class AlertingTest extends Abstra
     {
         // Update the configuration to make our virtualhost Persistent.
         makeVirtualHostPersistent(VIRTUALHOST);
+        setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.expiredMessageCheckPeriod", "5000");
 
         _numMessages = 50;
 
@@ -114,7 +112,7 @@ public class AlertingTest extends Abstra
             message.append(FileUtils.readFileAsString(getTestConfigFile()));
 
             message.append("\nVirtualhost maxMessageCount:\n");                        
-            message.append((new ServerConfiguration(_configFile)).getConfig().getString("virtualhosts.virtualhost." + VIRTUALHOST + ".queues.maximumMessageCount"));
+            message.append(new ServerConfiguration(_configFile).getVirtualHostConfig(VIRTUALHOST).getMaximumMessageCount());
 
             fail(message.toString());
         }
@@ -185,7 +183,7 @@ public class AlertingTest extends Abstra
         setupConnection();
 
         // Validate the queue depth is as expected
-        long messageCount = ((AMQSession) _session).getQueueDepth((AMQDestination) _destination);
+        long messageCount = ((AMQSession<?, ?>) _session).getQueueDepth((AMQDestination) _destination);
         assertEquals("Broker has invalid message count for test", 2, messageCount);
 
         // Ensure the alert has not occured yet
@@ -198,5 +196,4 @@ public class AlertingTest extends Abstra
         // Validate that the alert occured.
         wasAlertFired();
     }
-
 }

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java Tue Mar 30 21:35:08 2010
@@ -20,13 +20,13 @@
 */
 package org.apache.qpid.server.logging;
 
-import org.apache.commons.configuration.Configuration;
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.qpid.server.configuration.ServerConfiguration;
 import org.apache.qpid.server.logging.subjects.AbstractTestLogSubject;
 import org.apache.qpid.util.LogMonitor;
 
-import java.util.List;
-
 /**
  * The MessageStore test suite validates that the follow log messages as
  * specified in the Functional Specification.
@@ -90,7 +90,7 @@ public class MemoryMessageStoreLoggingTe
 
         // Load VirtualHost list from file.
         ServerConfiguration configuration = new ServerConfiguration(_configFile);
-        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
+        List<String> vhosts = Arrays.asList(configuration.getVirtualHosts());
 
         //Validate each vhost logs a creation
         results = _monitor.waitAndFindMatches("MST-1001", DEFAULT_LOG_WAIT);
@@ -101,15 +101,12 @@ public class MemoryMessageStoreLoggingTe
         {
             String result = getLog(results.get(index));
 
-            // getSlize will return extract the vhost from vh(/test) -> '/test'
+            // getSlice will return extract the vhost from vh(/test) -> '/test'
             // so remove the '/' to get the name
             String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);
 
-            // To get the store class used in the configuration we need to know
-            // the virtualhost name, found above. AND
-            // the index that the virtualhost is within the configuration.
-            // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            // Get the store class used in the configuration for the virtualhost.
+            String fullStoreName = configuration.getVirtualHostConfig(vhostName).getMessageStoreClass();
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -157,7 +154,7 @@ public class MemoryMessageStoreLoggingTe
 
         // Load VirtualHost list from file.
         ServerConfiguration configuration = new ServerConfiguration(_configFile);
-        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
+        List<String> vhosts = Arrays.asList(configuration.getVirtualHosts());
 
         //Validate each vhost logs a creation
         results = _monitor.waitAndFindMatches("MST-1003", DEFAULT_LOG_WAIT);
@@ -168,15 +165,12 @@ public class MemoryMessageStoreLoggingTe
         {
             String result = getLog(results.get(index));
 
-            // getSlize will return extract the vhost from vh(/test) -> '/test'
+            // getSlice will return extract the vhost from vh(/test) -> '/test'
             // so remove the '/' to get the name
             String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);
 
-            // To get the store class used in the configuration we need to know
-            // the virtualhost name, found above. AND
-            // the index that the virtualhost is within the configuration.
-            // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            // Get the store class used in the configuration for the virtualhost.
+            String fullStoreName = configuration.getVirtualHostConfig(vhostName).getMessageStoreClass();
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java Tue Mar 30 21:35:08 2010
@@ -21,11 +21,12 @@
 
 package org.apache.qpid.server.logging;
 
+import java.util.Arrays;
+import java.util.List;
+
 import junit.framework.AssertionFailedError;
-import org.apache.commons.configuration.Configuration;
-import org.apache.qpid.server.configuration.ServerConfiguration;
 
-import java.util.List;
+import org.apache.qpid.server.configuration.ServerConfiguration;
 
 /**
  * Virtualhost Test Cases
@@ -60,28 +61,26 @@ public class VirtualHostLoggingTest exte
     public void testVirtualhostCreation() throws Exception
     {
         //Wait for the correct VHT message to arrive.                                 
-        _monitor.waitForMessage("VHT-1001",DEFAULT_LOG_WAIT);
-
-        List<String> results = _monitor.findMatches(VHT_PREFIX);
+        _monitor.waitForMessage(VHT_PREFIX + "1001", DEFAULT_LOG_WAIT);
+        
+        //Validate each vhost logs a creation
+        List<String> results = _monitor.findMatches(VHT_PREFIX + "1001");
+        
         try
         {
-            // Validation
+            // Load VirtualHost list from file. 
             ServerConfiguration configuration = new ServerConfiguration(_configFile);
-            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
-
-            //Validate each vhost logs a creation
-            results = _monitor.findMatches("VHT-1001");
+            List<String> vhosts = Arrays.asList(configuration.getVirtualHosts());
 
             assertEquals("Each vhost did not create a store.", vhosts.size(), results.size());
 
             for (int index = 0; index < results.size(); index++)
             {
-                String result = getLog(results.get(index));
-
                 // Retrieve the vhostname from the log entry message 'Created : <vhostname>'
+                String result = getLog(results.get(index));
                 String vhostName = getMessageString(fromMessage(result)).split(" ")[2];
 
-                assertTrue("Virualhost named in log not found in config file:" + vhostName + ":" + vhosts, vhosts.contains(vhostName));
+                assertTrue("Virtualhost named in log not found in config file:" + vhostName + ":" + vhosts, vhosts.contains(vhostName));
             }
         }
         catch (AssertionFailedError afe)
@@ -114,21 +113,19 @@ public class VirtualHostLoggingTest exte
     {
         stopBroker();
 
-        //Wait for the correct VHT message to arrive.
-        _monitor.waitForMessage("VHT-1002",DEFAULT_LOG_WAIT);
-
-        List<String> results = _monitor.findMatches(VHT_PREFIX);
+        // Wait for the correct VHT message to arrive.                                 
+        _monitor.waitForMessage(VHT_PREFIX + "1002", DEFAULT_LOG_WAIT);
+        
+        // Validate each vhost logs a closure
+        List<String> results = _monitor.findMatches(VHT_PREFIX + "1002");
+        
         try
         {
-            // Validation
-
+            // Load VirtualHost list from file. 
             ServerConfiguration configuration = new ServerConfiguration(_configFile);
-            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
-
-            //Validate each vhost logs a creation
-            results = _monitor.findMatches("VHT-1002");
+            List<String> vhosts = Arrays.asList(configuration.getVirtualHosts());
 
-            assertEquals("Each vhost did not create a store.", vhosts.size(), results.size());
+            assertEquals("Each vhost did not close their store.", vhosts.size(), results.size());
         }
         catch (AssertionFailedError afe)
         {

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java Tue Mar 30 21:35:08 2010
@@ -33,8 +33,8 @@ import org.apache.qpid.test.utils.QpidTe
 
 public class FirewallConfigTest extends QpidTestCase 
 {
-
-    private File tmpFile = null;
+    private File _tmpConfig, _tmpVirtualhosts;
+    
     @Override
     protected void setUp() throws Exception
     {
@@ -46,22 +46,32 @@ public class FirewallConfigTest extends 
             fail("QPID_HOME not set");
         }
 
-        // Setup initial config.
+        // Setup initial config file.
         _configFile = new File(QPID_HOME, "etc/config-systests-firewall.xml");
-        tmpFile = File.createTempFile("config-systests-firewall", ".xml");
-        setSystemProperty("QPID_FIREWALL_SETTINGS", tmpFile.getAbsolutePath());
-        tmpFile.deleteOnExit();
+        
+        // Setup temporary config file
+        _tmpConfig = File.createTempFile("config-systests-firewall", ".xml");
+        setSystemProperty("QPID_FIREWALL_CONFIG_SETTINGS", _tmpConfig.getAbsolutePath());
+        _tmpConfig.deleteOnExit();
+
+        // Setup temporary virtualhosts file
+        _tmpVirtualhosts = File.createTempFile("virtualhosts-systests-firewall", ".xml");
+        setSystemProperty("QPID_FIREWALL_VIRTUALHOSTS_SETTINGS", _tmpVirtualhosts.getAbsolutePath());
+        _tmpVirtualhosts.deleteOnExit();
     }
 
     private void writeFirewallFile(boolean allow, boolean inVhost) throws IOException
     {
-        FileWriter out = new FileWriter(tmpFile);
+        FileWriter out = new FileWriter(inVhost ? _tmpVirtualhosts : _tmpConfig);
         String ipAddr = "127.0.0.1"; // FIXME: get this from InetAddress.getLocalHost().getAddress() ?
-        out.write("<broker>");
         if (inVhost) 
         {
             out.write("<virtualhosts><virtualhost><test>");
         }
+        else
+        {
+            out.write("<broker>");
+        }
         out.write("<security><firewall>");
         out.write("<rule access=\""+((allow) ? "allow" : "deny")+"\" network=\""+ipAddr +"\"/>");
         out.write("</firewall></security>");
@@ -69,7 +79,10 @@ public class FirewallConfigTest extends 
         {
             out.write("</test></virtualhost></virtualhosts>");
         }
-        out.write("</broker>");
+        else
+        {
+            out.write("</broker>");
+        }
         out.close();
     }
     
@@ -188,6 +201,23 @@ public class FirewallConfigTest extends 
         });
     }
     
+    public void testAllowOnReloadInVhost() throws Exception
+    {
+        testFirewall(false, true, new Runnable() {
+
+            public void run()
+            {
+                try
+                {
+                    reloadBroker();
+                } catch (Exception e)
+                {
+                    fail(e.getMessage());
+                }
+            }
+        });
+    }
+    
     public void testDenyOnReload() throws Exception
     {
         testDeny(false, new Runnable() {
@@ -224,18 +254,17 @@ public class FirewallConfigTest extends 
         );
        
     }
-    
+
     private void testDeny(boolean inVhost, Runnable restartOrReload) throws Exception
     {
-        if (_broker.equals(VM))
-        {
-            // No point running this test in a vm broker
-            return;
-        }
-        
-        writeFirewallFile(false, inVhost);        
-        super.setUp();
-        
+        testFirewall(true, inVhost, restartOrReload);
+    }
+    
+    /*
+     * Check we can get a connection
+     */
+    private boolean checkConnection() throws Exception
+    {
         Exception exception  = null;
         Connection conn = null;
         try 
@@ -246,22 +275,27 @@ public class FirewallConfigTest extends 
         {
             exception = e;
         }
-        assertNotNull(exception);
         
-        // Check we can get a connection
+        return conn != null;
+    }
+    
+    private void testFirewall(boolean initial, boolean inVhost, Runnable restartOrReload) throws Exception
+    {
+        if (_broker.equals(VM))
+        {
+            // No point running this test in a vm broker
+            return;
+        }
+        
+        writeFirewallFile(initial, inVhost);        
+        super.setUp();
+
+        assertEquals("Initial connection check failed", initial, checkConnection());
 
-        writeFirewallFile(true, inVhost);
+        // Reload changed firewall file after restart or reload
+        writeFirewallFile(!initial, inVhost);
         restartOrReload.run();
         
-        exception = null;
-        try 
-        {
-            conn = getConnection();
-        } 
-        catch (JMSException e)
-        {
-            exception = e;
-        }
-        assertNull(exception);
-    }    
+        assertEquals("Second connection check failed", !initial, checkConnection());
+    }
 }

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java Tue Mar 30 21:35:08 2010
@@ -19,6 +19,10 @@ package org.apache.qpid.test.unit.ct;
 
 import javax.jms.*;
 
+import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQQueue;
+import org.apache.qpid.client.AMQSession;
+import org.apache.qpid.client.AMQTopic;
 import org.apache.qpid.test.utils.QpidTestCase;
 
 /**
@@ -163,5 +167,301 @@ public class DurableSubscriberTest exten
             durConnection2.close();
         }
     }
+    
+    /**
+     * create and register a durable subscriber without a message selector and then unsubscribe it
+     * create and register a durable subscriber with a message selector and then close it
+     * restart the broker
+     * send matching and non matching messages
+     * recreate and register the durable subscriber with a message selector
+     * verify only the matching messages are received
+     */
+    public void testDurSubChangedToHaveSelectorThenRestart() throws Exception
+    {
+        if (! isBrokerStorePersistent())
+        {
+            _logger.warn("Test skipped due to requirement of a persistent store");
+            return;
+        }
+        
+        final String SUB_NAME=getTestQueueName();
+        
+        TopicConnectionFactory factory = getConnectionFactory();
+        Topic topic = (Topic) getInitialContext().lookup(_topicName);
+        
+        //create and register a durable subscriber then unsubscribe it
+        TopicConnection durConnection = factory.createTopicConnection("guest", "guest");
+        TopicSession durSession = durConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicSubscriber durSub1 = durSession.createDurableSubscriber(topic, SUB_NAME);
+        durConnection.start();
+        durSub1.close();
+        durSession.unsubscribe(SUB_NAME);
+        durSession.close();
+        durConnection.close();
+
+        //create and register a durable subscriber with a message selector and then close it
+        TopicConnection durConnection2 = factory.createTopicConnection("guest", "guest");
+        TopicSession durSession2 = durConnection2.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicSubscriber durSub2 = durSession2.createDurableSubscriber(topic, SUB_NAME, "testprop='true'", false);
+        durConnection2.start();
+        durSub2.close();
+        durSession2.close();
+        durConnection2.close();
+        
+        //now restart the server
+        try
+        {
+            restartBroker();
+        }
+        catch (Exception e)
+        {
+            _logger.error("problems restarting broker: " + e);
+            throw e;
+        }
+        
+        //send messages matching and not matching the selector
+        TopicConnection pubConnection = factory.createTopicConnection("guest", "guest");
+        TopicSession pubSession = pubConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicPublisher publisher = pubSession.createPublisher(topic);
+        for (int i = 0; i < 5; i++)
+        {
+            Message message = pubSession.createMessage();
+            message.setStringProperty("testprop", "true");
+            publisher.publish(message);
+            message = pubSession.createMessage();
+            message.setStringProperty("testprop", "false");
+            publisher.publish(message);
+        }
+        publisher.close();
+        pubSession.close();
+
+        //now recreate the durable subscriber with selector to check there are no exceptions generated
+        //and then verify the messages are received correctly
+        TopicConnection durConnection3 = (TopicConnection) factory.createConnection("guest", "guest");
+        TopicSession durSession3 = (TopicSession) durConnection3.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicSubscriber durSub3 = durSession3.createDurableSubscriber(topic, SUB_NAME, "testprop='true'", false);
+        durConnection3.start();
+        
+        for (int i = 0; i < 5; i++)
+        {
+            Message message = durSub3.receive(2000);
+            if (message == null)
+            {
+                fail("testDurSubChangedToHaveSelectorThenRestart test failed. Expected message " + i + " was not returned");
+            }
+            else
+            {
+                assertTrue("testDurSubChangedToHaveSelectorThenRestart test failed. Got message not matching selector",
+                           message.getStringProperty("testprop").equals("true"));
+            }
+        }
+
+        durSub3.close();
+        durSession3.unsubscribe(SUB_NAME);
+        durSession3.close();
+        durConnection3.close();
+    }
+
+    
+    /**
+     * create and register a durable subscriber with a message selector and then unsubscribe it
+     * create and register a durable subscriber without a message selector and then close it
+     * restart the broker
+     * send matching and non matching messages
+     * recreate and register the durable subscriber without a message selector
+     * verify ALL the sent messages are received
+     */
+    public void testDurSubChangedToNotHaveSelectorThenRestart() throws Exception
+    {
+        if (! isBrokerStorePersistent())
+        {
+            _logger.warn("Test skipped due to requirement of a persistent store");
+            return;
+        }
+        
+        final String SUB_NAME=getTestQueueName();
+        
+        TopicConnectionFactory factory = getConnectionFactory();
+        Topic topic = (Topic) getInitialContext().lookup(_topicName);
+        
+        //create and register a durable subscriber with selector then unsubscribe it
+        TopicConnection durConnection = factory.createTopicConnection("guest", "guest");
+        TopicSession durSession = durConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicSubscriber durSub1 = durSession.createDurableSubscriber(topic, SUB_NAME, "testprop='true'", false);
+        durConnection.start();
+        durSub1.close();
+        durSession.unsubscribe(SUB_NAME);
+        durSession.close();
+        durConnection.close();
+
+        //create and register a durable subscriber without the message selector and then close it
+        TopicConnection durConnection2 = factory.createTopicConnection("guest", "guest");
+        TopicSession durSession2 = durConnection2.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicSubscriber durSub2 = durSession2.createDurableSubscriber(topic, SUB_NAME);
+        durConnection2.start();
+        durSub2.close();
+        durSession2.close();
+        durConnection2.close();
+        
+        //now restart the server
+        try
+        {
+            restartBroker();
+        }
+        catch (Exception e)
+        {
+            _logger.error("problems restarting broker: " + e);
+            throw e;
+        }
+        
+        //send messages matching and not matching the original used selector
+        TopicConnection pubConnection = factory.createTopicConnection("guest", "guest");
+        TopicSession pubSession = pubConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicPublisher publisher = pubSession.createPublisher(topic);
+        for (int i = 1; i <= 5; i++)
+        {
+            Message message = pubSession.createMessage();
+            message.setStringProperty("testprop", "true");
+            publisher.publish(message);
+            message = pubSession.createMessage();
+            message.setStringProperty("testprop", "false");
+            publisher.publish(message);
+        }
+        publisher.close();
+        pubSession.close();
+
+        //now recreate the durable subscriber without selector to check there are no exceptions generated
+        //then verify ALL messages sent are received
+        TopicConnection durConnection3 = (TopicConnection) factory.createConnection("guest", "guest");
+        TopicSession durSession3 = (TopicSession) durConnection3.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        TopicSubscriber durSub3 = durSession3.createDurableSubscriber(topic, SUB_NAME);
+        durConnection3.start();
+        
+        for (int i = 1; i <= 10; i++)
+        {
+            Message message = durSub3.receive(2000);
+            if (message == null)
+            {
+                fail("testDurSubChangedToNotHaveSelectorThenRestart test failed. Expected message " + i + " was not received");
+            }
+        }
+        
+        durSub3.close();
+        durSession3.unsubscribe(SUB_NAME);
+        durSession3.close();
+        durConnection3.close();
+    }
+    
+    
+    public void testResubscribeWithChangedSelectorAndRestart() throws Exception
+    {
+        if (! isBrokerStorePersistent())
+        {
+            _logger.warn("Test skipped due to requirement of a persistent store");
+            return;
+        }
+        
+        Connection conn = getConnection();
+        conn.start();
+        Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        AMQTopic topic = new AMQTopic((AMQConnection) conn, "testResubscribeWithChangedSelectorAndRestart");
+        MessageProducer producer = session.createProducer(topic);
+        
+        // Create durable subscriber that matches A
+        TopicSubscriber subA = session.createDurableSubscriber(topic, 
+                "testResubscribeWithChangedSelector",
+                "Match = True", false);
+
+        // Send 1 matching message and 1 non-matching message
+        TextMessage msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart1");
+        msg.setBooleanProperty("Match", true);
+        producer.send(msg);
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart2");
+        msg.setBooleanProperty("Match", false);
+        producer.send(msg);
+
+        Message rMsg = subA.receive(1000);
+        assertNotNull(rMsg);
+        assertEquals("Content was wrong", 
+                     "testResubscribeWithChangedSelectorAndRestart1",
+                     ((TextMessage) rMsg).getText());
+        
+        rMsg = subA.receive(1000);
+        assertNull(rMsg);
+        
+        // Send another 1 matching message and 1 non-matching message
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart1");
+        msg.setBooleanProperty("Match", true);
+        producer.send(msg);
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart2");
+        msg.setBooleanProperty("Match", false);
+        producer.send(msg);
+        
+        // Disconnect subscriber without receiving the message to 
+        //leave it on the underlying queue
+        subA.close();
+        
+        // Reconnect with new selector that matches B
+        TopicSubscriber subB = session.createDurableSubscriber(topic, 
+                "testResubscribeWithChangedSelectorAndRestart","Match = False", false);
+        
+        //verify no messages are now present on the queue as changing selector should have issued
+        //an unsubscribe and thus deleted the previous durable backing queue for the subscription.
+        //check the dur sub's underlying queue now has msg count 1
+        AMQQueue subQueue = new AMQQueue("amq.topic", "clientid" + ":" + "testResubscribeWithChangedSelector");
+        assertEquals("Msg count should be 0", 0, ((AMQSession)session).getQueueDepth(subQueue));
+        
+        
+        // Check that new messages are received properly
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart1");
+        msg.setBooleanProperty("Match", true);
+        producer.send(msg);
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart2");
+        msg.setBooleanProperty("Match", false);
+        producer.send(msg);
+        
+        rMsg = subB.receive(1000);
+        assertNotNull(rMsg);
+        assertEquals("Content was wrong", 
+                     "testResubscribeWithChangedSelectorAndRestart2",
+                     ((TextMessage) rMsg).getText());
+        
+        rMsg = subB.receive(1000);
+        assertNull(rMsg);
+
+        //now restart the server
+        try
+        {
+            restartBroker();
+        }
+        catch (Exception e)
+        {
+            _logger.error("problems restarting broker: " + e);
+            throw e;
+        }
+        
+        // Check that new messages are still received properly
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart1");
+        msg.setBooleanProperty("Match", true);
+        producer.send(msg);
+        msg = session.createTextMessage("testResubscribeWithChangedSelectorAndRestart2");
+        msg.setBooleanProperty("Match", false);
+        producer.send(msg);
+        
+        rMsg = subB.receive(1000);
+        assertNotNull(rMsg);
+        assertEquals("Content was wrong", 
+                     "testResubscribeWithChangedSelectorAndRestart2",
+                     ((TextMessage) rMsg).getText());
+        
+        rMsg = subB.receive(1000);
+        assertNull(rMsg);
+        
+        session.unsubscribe("testResubscribeWithChangedSelectorAndRestart");
+        subB.close();
+        session.close();
+        conn.close();
+    }
+
 }
 

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java Tue Mar 30 21:35:08 2010
@@ -20,8 +20,13 @@
  */
 package org.apache.qpid.test.unit.topic;
 
+import java.io.IOException;
+import java.util.Set;
+
+import org.apache.qpid.management.common.JMXConnnectionFactory;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQQueue;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.AMQTopic;
 
@@ -39,6 +44,9 @@ import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
 import javax.jms.TopicSubscriber;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
 
 /**
  * @todo Code to check that a consumer gets only one particular method could be factored into a re-usable method (as
@@ -58,6 +66,36 @@ public class DurableSubscriptionTest ext
     /** Timeout for receive() if we are not expecting a message */
     private static final long NEGATIVE_RECEIVE_TIMEOUT = 1000;
     
+    private JMXConnector _jmxc;
+    private MBeanServerConnection _mbsc;
+    private static final String USER = "admin";
+    private static final String PASSWORD = "admin";
+    private boolean _jmxConnected;
+
+    public void setUp() throws Exception
+    {
+        setConfigurationProperty("management.enabled", "true");     
+        _jmxConnected=false;
+        super.setUp();
+    }
+
+    public void tearDown() throws Exception
+    {
+        if(_jmxConnected)
+        {
+            try
+            {
+                _jmxc.close();
+            }
+            catch (IOException e)
+            {
+                e.printStackTrace();
+            }
+        }
+        
+        super.tearDown();
+    }
+    
     public void testUnsubscribe() throws Exception
     {
         AMQConnection con = (AMQConnection) getConnection("guest", "guest");
@@ -79,6 +117,12 @@ public class DurableSubscriptionTest ext
 
         _logger.info("Producer sending message A");
         producer.send(session1.createTextMessage("A"));
+        
+        ((AMQSession)session1).sync();
+        
+        //check the dur sub's underlying queue now has msg count 1
+        AMQQueue subQueue = new AMQQueue("amq.topic", "clientid" + ":" + "MySubscription");
+        assertEquals("Msg count should be 1", 1, ((AMQSession)session1).getQueueDepth(subQueue));
 
         Message msg;
         _logger.info("Receive message on consumer 1:expecting A");
@@ -96,11 +140,46 @@ public class DurableSubscriptionTest ext
         msg = consumer2.receive(NEGATIVE_RECEIVE_TIMEOUT);
         _logger.info("Receive message on consumer 1 :expecting null");
         assertEquals(null, msg);
+        
+        ((AMQSession)session2).sync();
+        
+        //check the dur sub's underlying queue now has msg count 0
+        assertEquals("Msg count should be 0", 0, ((AMQSession)session2).getQueueDepth(subQueue));
 
         consumer2.close();
         _logger.info("Unsubscribe session2/consumer2");
         session2.unsubscribe("MySubscription");
-
+        
+        ((AMQSession)session2).sync();
+        
+        if(isJavaBroker() && isExternalBroker())
+        {
+            //Verify that the queue was deleted by querying for its JMX MBean
+            _jmxc = JMXConnnectionFactory.getJMXConnection(5000, "127.0.0.1",
+                    getManagementPort(getPort()), USER, PASSWORD);
+
+            _jmxConnected = true;
+            _mbsc = _jmxc.getMBeanServerConnection();
+            
+            //must replace the occurrence of ':' in queue name with '-'
+            String queueObjectNameText = "clientid" + "-" + "MySubscription";
+            
+            ObjectName objName = new ObjectName("org.apache.qpid:type=VirtualHost.Queue,name=" 
+                                                + queueObjectNameText + ",*");
+            
+            Set<ObjectName> objectInstances = _mbsc.queryNames(objName, null);
+            
+            if(objectInstances.size() != 0)
+            {
+                fail("Queue MBean was found. Expected queue to have been deleted");
+            }
+            else
+            {
+                _logger.info("Underlying dueue for the durable subscription was confirmed deleted.");
+            }
+        }
+        
+        //verify unsubscribing the durable subscriber did not affect the non-durable one
         _logger.info("Producer sending message B");
         producer.send(session1.createTextMessage("B"));
 
@@ -459,6 +538,9 @@ public class DurableSubscriptionTest ext
         rMsg = subA.receive(NEGATIVE_RECEIVE_TIMEOUT);
         assertNull(rMsg);
         
+        // Send another 1 matching message and 1 non-matching message
+        sendMatchingAndNonMatchingMessage(session, producer);
+        
         // Disconnect subscriber
         subA.close();
         
@@ -466,9 +548,15 @@ public class DurableSubscriptionTest ext
         TopicSubscriber subB = session.createDurableSubscriber(topic, 
                 "testResubscribeWithChangedSelector","Match = False", false);
         
+        //verify no messages are now present as changing selector should have issued
+        //an unsubscribe and thus deleted the previous backing queue for the subscription.
+        rMsg = subB.receive(NEGATIVE_RECEIVE_TIMEOUT);
+        assertNull("Should not have received message as the queue underlying the " +
+        		"subscription should have been cleared/deleted when the selector was changed", rMsg);
         
-        // Check messages are recieved properly
+        // Check that new messages are received properly
         sendMatchingAndNonMatchingMessage(session, producer);
+        
         rMsg = subB.receive(NEGATIVE_RECEIVE_TIMEOUT);
         assertNotNull(rMsg);
         assertEquals("Content was wrong", 

Modified: qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Tue Mar 30 21:35:08 2010
@@ -17,14 +17,41 @@
  */
 package org.apache.qpid.test.utils;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
 import junit.framework.TestCase;
 import junit.framework.TestResult;
+
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Level;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.qpid.AMQException;
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQConnectionFactory;
@@ -39,33 +66,8 @@ import org.apache.qpid.server.registry.C
 import org.apache.qpid.server.store.DerbyMessageStore;
 import org.apache.qpid.url.URLSyntaxException;
 import org.apache.qpid.util.LogMonitor;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
@@ -86,6 +88,7 @@ public class QpidTestCase extends TestCa
     private Map<org.apache.log4j.Logger, Level> _loggerLevelSetForTest = new HashMap<org.apache.log4j.Logger, Level>();
 
     private XMLConfiguration _testConfiguration = new XMLConfiguration();
+    private XMLConfiguration _testVirtualhosts = new XMLConfiguration();
 
     protected static final String INDEX = "index";
 
@@ -178,9 +181,10 @@ public class QpidTestCase extends TestCa
 
     protected static final String QPID_HOME = "QPID_HOME";
 
-    protected static int DEFAULT_VM_PORT = 1;
-    protected static int DEFAULT_PORT = Integer.getInteger("test.port", 5672);
-    protected static int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", 8999);
+    public static final int DEFAULT_VM_PORT = 1;
+    public static final int DEFAULT_PORT = Integer.getInteger("test.port", ServerConfiguration.DEFAULT_PORT);
+    public static final int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", ServerConfiguration.DEFAULT_JMXPORT);
+    public static final int DEFAULT_SSL_PORT = Integer.getInteger("test.sslport", ServerConfiguration.DEFAULT_SSL_PORT);
 
     protected String _brokerLanguage = System.getProperty(BROKER_LANGUAGE, JAVA);
     protected String _broker = System.getProperty(BROKER, VM);
@@ -208,6 +212,7 @@ public class QpidTestCase extends TestCa
     protected List<Connection> _connections = new ArrayList<Connection>();
     public static final String QUEUE = "queue";
     public static final String TOPIC = "topic";
+    
     /** Map to hold test defined environment properties */
     private Map<String, String> _env;
 
@@ -477,14 +482,16 @@ public class QpidTestCase extends TestCa
     {
         port = getPort(port);
 
-        // Save any configuratio changes that have been made
+        // Save any configuration changes that have been made
         saveTestConfiguration();
+        saveTestVirtualhosts();
 
         Process process = null;
         if (_broker.equals(VM))
         {
             setConfigurationProperty("management.jmxport", String.valueOf(getManagementPort(port)));
             saveTestConfiguration();
+            
             // create an in_VM broker
             final ConfigurationFileApplicationRegistry registry = new ConfigurationFileApplicationRegistry(_configFile);
             try
@@ -608,22 +615,41 @@ public class QpidTestCase extends TestCa
     public String getTestConfigFile()
     {
         String path = _output == null ? System.getProperty("java.io.tmpdir") : _output;
-        return path + "/" + getTestQueueName() + ".xml";
+        return path + "/" + getTestQueueName() + "-config.xml";
+    }
+
+    public String getTestVirtualhostsFile()
+    {
+        String path = _output == null ? System.getProperty("java.io.tmpdir") : _output;
+        return path + "/" + getTestQueueName() + "-virtualhosts.xml";
     }
 
     protected void saveTestConfiguration() throws ConfigurationException
     {
+        // Specifiy the test config file
         String testConfig = getTestConfigFile();
-        //Specifiy the test configuration
         setSystemProperty("test.config", testConfig);
 
-        // This is a work
+        // Create the file if configuration does not exist
         if (_testConfiguration.isEmpty())
         {
-            _testConfiguration.addProperty("test", getTestQueueName());
+            _testConfiguration.addProperty("__ignore", "true");
         }
+        _testConfiguration.save(testConfig);
+    }
 
-        _testConfiguration.save(getTestConfigFile());
+    protected void saveTestVirtualhosts() throws ConfigurationException
+    {
+        // Specifiy the test virtualhosts file
+        String testVirtualhosts = getTestVirtualhostsFile();
+        setSystemProperty("test.virtualhosts", testVirtualhosts);
+
+        // Create the file if configuration does not exist
+        if (_testVirtualhosts.isEmpty())
+        {
+            _testVirtualhosts.addProperty("__ignore", "true");
+        }
+        _testVirtualhosts.save(testVirtualhosts);
     }
 
     public void cleanBroker()
@@ -690,29 +716,23 @@ public class QpidTestCase extends TestCa
     protected void makeVirtualHostPersistent(String virtualhost)
             throws ConfigurationException, IOException
     {
-        Class storeClass = DerbyMessageStore.class;
-
-        Class bdb = null;
+        Class<?> storeClass = null;
         try
         {
-            bdb = Class.forName("org.apache.qpid.server.store.berkeleydb.BDBMessageStore");
+            // Try and lookup the BDB class
+            storeClass = Class.forName("org.apache.qpid.server.store.berkeleydb.BDBMessageStore");
         }
         catch (ClassNotFoundException e)
         {
             // No BDB store, we'll use Derby instead.
-        }
-
-        if (bdb != null)
-        {
-            storeClass = bdb;
+            storeClass = DerbyMessageStore.class;
         }
 
 
-        _testConfiguration.setProperty("virtualhosts.virtualhost." + virtualhost +
-                                  ".store.class", storeClass.getName());
-        _testConfiguration.setProperty("virtualhosts.virtualhost." + virtualhost +
-                                  ".store." + DerbyMessageStore.ENVIRONMENT_PATH_PROPERTY,
-                                  "${QPID_WORK}/" + virtualhost);
+        setConfigurationProperty("virtualhosts.virtualhost." + virtualhost + ".store.class",
+                                    storeClass.getName());
+        setConfigurationProperty("virtualhosts.virtualhost." + virtualhost + ".store." + DerbyMessageStore.ENVIRONMENT_PATH_PROPERTY,
+                                   "${QPID_WORK}/" + virtualhost);
     }
 
     /**
@@ -730,6 +750,7 @@ public class QpidTestCase extends TestCa
         // Call save Configuration to be sure we have saved the test specific
         // file. As the optional status
         saveTestConfiguration();
+        saveTestVirtualhosts();
 
         ServerConfiguration configuration = new ServerConfiguration(_configFile);
         return configuration.getConfig().getString(property);
@@ -753,9 +774,15 @@ public class QpidTestCase extends TestCa
     protected void setConfigurationProperty(String property, String value)
             throws ConfigurationException, IOException
     {
-        //Write the value in to this configuration file which will override the
-        // defaults.
-        _testConfiguration.setProperty(property, value);
+        // Choose which file to write the property to based on prefix.
+        if (property.startsWith("virtualhosts"))
+        {
+            _testVirtualhosts.setProperty(StringUtils.substringAfter(property, "virtualhosts."), value);
+        }
+        else
+        {
+            _testConfiguration.setProperty(property, value);
+        }
     }
 
     /**

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/08StandaloneExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/08StandaloneExcludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/CPPExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/010Excludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/010Excludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/CPPExcludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/CPPExcludes:919043-929244

Modified: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/Excludes
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/Excludes?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/Excludes (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/Excludes Tue Mar 30 21:35:08 2010
@@ -29,3 +29,5 @@ org.apache.qpid.test.unit.ack.Acknowledg
 org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverOnMessageTest#*
 org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverTest#*
 
+// QPID-2418 : The queue backing the dur sub is not currently deleted at subscription change, so the test will fail.
+org.apache.qpid.test.unit.ct.DurableSubscriberTest#testResubscribeWithChangedSelectorAndRestart

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/Excludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/Excludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/Excludes:919043-929244

Modified: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaExcludes
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaExcludes?rev=929307&r1=929306&r2=929307&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaExcludes (original)
+++ qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaExcludes Tue Mar 30 21:35:08 2010
@@ -16,6 +16,3 @@ org.apache.qpid.client.SessionCreateTest
 // QPID-2097 exclude it from the InVM test runs until InVM JMX Interface is reliable
 org.apache.qpid.management.jmx.ManagementActorLoggingTest#*
 org.apache.qpid.server.queue.ModelTest#*
-
-//QPID-2422: Derby currently doesnt persist queue arguments and 0-91 support causes exclusivity mismatch after restart
-org.apache.qpid.test.unit.ct.DurableSubscriberTest#*

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/08Excludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/08Excludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/JavaExcludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/JavaExcludes:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaStandaloneExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/08StandaloneExcludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/JavaStandaloneExcludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/JavaStandaloneExcludes:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/JavaTransientExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/08TransientExcludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/08TransientExcludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/08TransientExcludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:919043-929244

Propchange: qpid/branches/qmf-devel0.7a/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 21:35:08 2010
@@ -1,4 +1,4 @@
 /incubator/qpid/trunk/qpid/java/test-profiles/XAExcludes:443187-726139
 /qpid/branches/java-broker-0-10/qpid/java/test-profiles/XAExcludes:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/XAExcludes:805429-821809
-/qpid/trunk/qpid/java/test-profiles/XAExcludes:919043-928107
+/qpid/trunk/qpid/java/test-profiles/XAExcludes:919043-929244



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org