[jboss-cvs] JBoss Messaging SVN: r6261 - in trunk: examples/jms and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 1 10:46:36 EDT 2009


Author: ataylor
Date: 2009-04-01 10:46:36 -0400 (Wed, 01 Apr 2009)
New Revision: 6261

Added:
   trunk/examples/jms/common/config/ant.properties
   trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java
   trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java
   trunk/src/config/AS/
   trunk/src/config/AS/build.xml
   trunk/src/config/AS/jbm-jboss-beans.xml
   trunk/src/config/AS/login-config.xml
   trunk/src/config/AS/messaging-roles.properties
   trunk/src/config/AS/messaging-users.properties
   trunk/src/config/AS/ra.xml
Removed:
   trunk/examples/jms/build.xml
   trunk/src/config/jbm-jboss-beans.xml
   trunk/src/config/messaging-roles.properties
   trunk/src/config/messaging-users.properties
   trunk/src/config/multiplexer-service.xml
   trunk/src/config/multiplexer-stacks.xml
Modified:
   trunk/build-messaging.xml
   trunk/examples/jms/common/build.xml
   trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
   trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java
   trunk/src/bin/run.sh
   trunk/src/config/jbm-queues.xml
   trunk/src/config/jbm-security.xml
   trunk/src/main/org/jboss/messaging/integration/bootstrap/JBMBootstrapServer.java
   trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java
   trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java
Log:
updated examples to spwan server in seperate vm

Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/build-messaging.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1447,6 +1447,7 @@
          <jvmarg value="-Djava.library.path=${native.bin.dir}"/>
          <jvmarg value="-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory"/>
          <jvmarg value="-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"/>
+         <!--<jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>-->
          <arg line="jbm-standalone-beans.xml"/>
          <classpath refid="jms.standalone.server.classpath"/>
       </java>

Deleted: trunk/examples/jms/build.xml
===================================================================
--- trunk/examples/jms/build.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/examples/jms/build.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,289 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- =========================================================================================== -->
-<!--                                                                                             -->
-<!-- JBoss, Home of Professional Open Source                                                     -->
-<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
-<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
-<!-- full listing of individual contributors.                                                    -->
-<!--                                                                                             -->
-<!-- This is free software; you can redistribute it and/or modify it                             -->
-<!-- under the terms of the GNU Lesser General Public License as                                 -->
-<!-- published by the Free Software Foundation; either version 2.1 of                            -->
-<!-- the License, or (at your option) any later version.                                         -->
-<!--                                                                                             -->
-<!-- This software is distributed in the hope that it will be useful,                            -->
-<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of                              -->
-<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU                            -->
-<!-- Lesser General Public License for more details.                                             -->
-<!--                                                                                             -->
-<!-- You should have received a copy of the GNU Lesser General Public                            -->
-<!-- License along with this software; if not, write to the Free                                 -->
-<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
-<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
-<!--                                                                                             -->
-<!-- =========================================================================================== -->
-
-
-<!-- =========================================================================================== -->
-<!--                                                                                             -->
-<!-- $Id: build.xml 4037 2008-04-11 13:12:57Z ataylor $ -->
-<!--                                                                                             -->
-<!-- =========================================================================================== -->
-
-
-<project default="help" name="JBoss Messaging JMS Examples">
-
-   <property file="../build.properties"/>
-
-   <property name="src.dir" value="src"/>
-   <property name="config.dir" value="config"/>
-   <property name="build.dir" value="build"/>
-   <property name="other.system.client.dir" value="other-system-client-dir"/>
-
-   <!--perf props-->
-   <property name="message.count" value="200000"/>
-   <property name="message.warmup.count" value="10000"/>
-   <!-- in bytes -->
-   <property name="message.size" value="1024"/>
-   <property name="delivery.mode" value="NON_PERSISTENT"/>
-   <property name="sess.trans" value="false"/>
-   <property name="sess.ackmode" value="DUPS_OK"/>
-   <property name="sess.trans.size" value="1000"/>
-   <property name="drain.queue" value="true"/>
-   <property name="queue.lookup" value="MyQueue"/>
-   <property name="cf.lookup" value="ConnectionFactory"/>
-   <property name="throttle.rate" value="-1"/>
-   <property name="throughput.queue" value="NONE"/>
-   <property name="example.queue.name" value="testQueue"/>
-
-   <path id="other.system.client.classpath">
-       <fileset dir="${other.system.client.dir}">
-         <include name="**/*.jar"/>
-      </fileset>
-   </path>
-
-   <path id="compile.classpath">
-      <fileset dir="${lib.dir}">
-         <include name="**/*.jar"/>
-      </fileset>
-      <pathelement location="${client.core.jar}"/>
-      <pathelement location="${transports.jar}"/>
-      <pathelement location="${jms.jar}"/>
-   </path>
-
-   <path id="runtime.classpath">
-      <path refid="other.system.client.classpath"/>
-      <path refid="compile.classpath"/>
-      <pathelement location="${build.dir}"/>
-      <pathelement location="config"/>
-   </path>
-
-   <property name="jboss.home" value="${JBOSS_HOME}" />
-
-   <path id="as.classpath">
-      <path refid="runtime.classpath"/>
-		<fileset file="${jboss.home}/client/" >
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset file="${jboss.home}/common/lib/" >
-         <include name="**/*.jar"/>
-      </fileset>
-	</path>
-
-   <target name="help" description="-> display help">
-      <echo>*****************************************************************</echo>
-      <echo>* to run examples execute one of the following *</echo>
-      <echo>* ant queueExample *</echo>
-      <echo>* ant topicExample *</echo>
-      <echo>* ant durSubExample *</echo>
-   	<echo>* etc               *</echo>
-      <echo>*****************************************************************</echo>
-   </target>
-
-   <target name="clean">
-      <delete dir="${build.dir}"/>
-   </target>
-
-   <target name="init">
-      <mkdir dir="${build.dir}"/>
-   </target>
-
-
-   <target name="compile" depends="init">
-      <javac srcdir="${src.dir}" destdir="${build.dir}" debug="on"
-             source="1.5">
-         <classpath refid="compile.classpath"/>
-      </javac>
-   </target>
-
-   <target name="queueExample" depends="compile" description="-> point to point example using a queue">
-      <java classname="org.jboss.jms.example.QueueExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-      </java>
-   </target>
-
-   <target name="topicExample" depends="compile" description="-> publish/subscribe example using a topic">
-      <java classname="org.jboss.jms.example.TopicExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-      </java>
-   </target>
-
-   <target name="durSubExample" depends="compile"
-           description="-> publish/subscribe example using a topic and a durable subscriber">
-      <java classname="org.jboss.jms.example.DurableSubscriberExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-      </java>
-   </target>
-
-   <target name="wildcardExample" depends="compile"
-           description="-> publish/subscribe example using a topic and a durable subscriber">
-      <java classname="org.jboss.jms.example.WildcardExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-      </java>
-   </target>
-
-   <target name="messageGroupingExample" depends="compile"
-           description="-> publish/subscribe example using a topic and a durable subscriber">
-      <java classname="org.jboss.jms.example.MessageGroupingExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-      </java>
-   </target>
-
-   <target name="scheduledExample" depends="compile" description="-> point to point example using a queue">
-      <java classname="org.jboss.jms.example.ScheduledExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-      </java>
-   </target>
-
-   <target name="echo-params">
-      <echo>
-***********************************************************************************
-* available parameters (-Dmessage.count=1000)
-*
-* parameter            current (default)                 description                     
-* ---------            -----------------                 -----------                     
-* message.count        ${message.count} (200000)         number of messages    
-* message.size         ${message.size} (1024)            size of message in bytes      	
-* message.warmup.count ${message.warmup.count} (10000)   number of messages to warm up   
-* delivery.mode        ${delivery.mode} (NON_PERSISTENT) PERSISTENT/NON_PERSISTENT       
-* sess.trans           ${sess.trans} (false)             Is session transacted           
-* sess.trans.size      ${sess.trans.size} (1000)         batch size to commit            
-* sess.ackmode         ${sess.ackmode} (DUPS_OK)         Ack mode DUPS_OK/AUTO_ACK       
-* drain.queue          ${drain.queue} (true)             drain the queue (listener only) 
-* queue.lookup         ${queue.lookup} (MyQueue)         Queue JNDI lookup               
-* cf.lookup            ${cf.lookup} (ConnectionFactory)  ConnectionFactory JNDI lookup   
-* throttle.rate        ${throttle.rate} (-1)             The max rate to throttle senders to in msgs/sec, -1 = no throttle
-* throughput.queue     ${throughput.queue} (NONE)        The queue used to calculate throughput on consuming messages
-***********************************************************************************
-      </echo>
-   </target>
-
-   <target name="perfListener" depends="compile" description="-> run performance test when listening to a queue">
-      <antcall target="echo-params"/>
-
-      <java classname="org.jboss.jms.example.PerfExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-         <jvmarg value="-Xmx1024M"/>
-         <jvmarg value="-XX:+UseParallelGC"/>
-         <jvmarg value="-XX:+AggressiveOpts"/>
-         <jvmarg value="-XX:+UseFastAccessorMethods"/>
-         <arg value="-l"/>
-         <arg value="${message.count}"/>
-         <arg value="${message.warmup.count}"/>
-         <arg value="${message.size}"/>      	
-         <arg value="${delivery.mode}"/>
-         <arg value="${sess.trans}"/>
-         <arg value="${sess.trans.size}"/>
-         <arg value="${sess.ackmode}"/>
-         <arg value="${drain.queue}"/>
-         <arg value="${queue.lookup}"/>
-         <arg value="${cf.lookup}"/>
-         <arg value="${throttle.rate}"/>
-         <arg value="${throughput.queue}"/>
-      </java>
-   </target>
-
-
-   <target name="perfSender" depends="compile" description="-> run performance test when sending to a queue">
-      <antcall target="echo-params"/>
-      <java classname="org.jboss.jms.example.PerfExample" fork="true">
-         <classpath refid="runtime.classpath"/>
-         <jvmarg value="-Xmx512M"/>
-         <jvmarg value="-XX:+UseParallelGC"/>
-         <jvmarg value="-XX:+AggressiveOpts"/>
-         <jvmarg value="-XX:+UseFastAccessorMethods"/>
-         <arg value="-s"/>
-         <arg value="${message.count}"/>
-         <arg value="${message.warmup.count}"/>
-         <arg value="${message.size}"/>      	
-         <arg value="${delivery.mode}"/>
-         <arg value="${sess.trans}"/>
-         <arg value="${sess.trans.size}"/>
-         <arg value="${sess.ackmode}"/>
-         <arg value="false"/>
-         <arg value="${queue.lookup}"/>
-         <arg value="${cf.lookup}"/>
-         <arg value="${throttle.rate}"/>
-         <arg value="${throughput.queue}"/>
-      </java>
-   </target>
-
-   <target name="Sender" depends="compile" description="-> run performance test when sending to a queue">
-      <java classname="org.jboss.jms.example.Sender" fork="true">
-         <classpath refid="as.classpath"/>
-         <jvmarg value="-Xmx512M"/>
-         <jvmarg value="-XX:+UseParallelGC"/>
-         <jvmarg value="-XX:+AggressiveOpts"/>
-         <jvmarg value="-XX:+UseFastAccessorMethods"/>
-      </java>
-   </target>
-
-   <target name="perfNonTransactionalSender" depends="compile"
-           description="-> run performance test when sending to a queue">
-      <antcall target="perfSender">
-         <param name="sess.trans" value="false"/>
-      </antcall>
-   </target>
-
-   <target name="perfTransactionalSender" depends="compile"
-           description="-> run performance test when sending to a queue">
-      <antcall target="perfSender">
-         <param name="sess.trans" value="true"/>
-      </antcall>
-   </target>
-
-   <target name="perfAutoAckListener" depends="compile" description="-> run performance test when listening to a queue">
-      <antcall target="perfListener">
-         <param name="sess.ackmode" value="AUTO_ACK"/>
-      </antcall>
-   </target>
-
-   <target name="perfDupsOKListener" depends="compile" description="-> run performance test when listening to a queue">
-      <antcall target="perfListener">
-         <param name="sess.ackmode" value="DUPS_OK"/>
-      </antcall>
-   </target>
-
-   <target name="perfTransactionalListener" depends="compile"
-           description="-> run performance test when listening to a queue">
-      <antcall target="perfListener">
-         <param name="sess.trans" value="true"/>
-      </antcall>
-   </target>
-
-
-   <target name="jar" depends="compile">
-      <jar destfile="${build.dir}/mdb-example.jar"
-           basedir="${build.dir}"
-           includes="**/EJB3*.class">
-      </jar>
-   </target>
-
-   <target name="ear" depends="jar">
-      <jar destfile="${build.dir}/mdb-example.ear">
-         <zipfileset dir="${build.dir}" includes="mdb-example.jar"/>
-      </jar>
-   </target>
-
-</project>

Modified: trunk/examples/jms/common/build.xml
===================================================================
--- trunk/examples/jms/common/build.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/examples/jms/common/build.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -30,6 +30,7 @@
 
 <project default="compile" name="jmsexample" basedir=".">
    <dirname property="imported.basedir" file="${ant.file.jmsexample}"/>
+   <property file="${imported.basedir}/config/ant.properties"/>
 
    <!--
        This module is based on Java 1.5
@@ -118,6 +119,7 @@
       </javac>
    </target>
 
+
    <target name="runExample" depends="compile">
       <java classname="${example.classname}" fork="true" resultproperty="example-result">
          <jvmarg value="-XX:+UseParallelGC"/>
@@ -132,6 +134,7 @@
          <jvmarg value="-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory"/>
          <jvmarg value="-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"/>
          <jvmarg value="-Djbm.example.runServer=${jbm.example.runServer}"/>
+         <jvmarg value="-Djbm.example.logserveroutput=${jbm.example.logserveroutput}"/>
          <!--<jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>-->
          <arg line="${jbm.example.beans.file}"/>
          <classpath refid="jms.runtime.classpath"/>

Added: trunk/examples/jms/common/config/ant.properties
===================================================================
--- trunk/examples/jms/common/config/ant.properties	                        (rev 0)
+++ trunk/examples/jms/common/config/ant.properties	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1 @@
+jbm.example.logserveroutput=true
\ No newline at end of file

Modified: trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -23,7 +23,6 @@
 
 import static org.jboss.messaging.core.config.impl.ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS;
 import org.jboss.messaging.core.management.ObjectNames;
-import org.jboss.messaging.integration.bootstrap.JBMBootstrapServer;
 import org.jboss.messaging.jms.JBossQueue;
 import org.jboss.messaging.jms.server.management.impl.JMSManagementHelper;
 
@@ -51,7 +50,7 @@
 {
    protected static Logger log = Logger.getLogger(JMSExample.class.getName());
 
-   private JBMBootstrapServer[] servers;
+   private Process[] servers;
 
    private Connection conn;
 
@@ -62,15 +61,17 @@
    protected void run(String[] args)
    {
       String runServerProp = System.getProperty("jbm.example.runServer");
+      String logServerOutputProp = System.getProperty("jbm.example.logserveroutput");
       boolean runServer = runServerProp == null ? true : Boolean.valueOf(runServerProp);
+      boolean logServerOutput = logServerOutputProp == null?false:Boolean.valueOf(logServerOutputProp);
       log.info("jbm.example.runServer is " + runServer);
       try
       {
          if (runServer)
          {
-            startServer(getServerNames(args));
+            startServer(getServerNames(args), logServerOutput);
          }
-         InitialContext ic = new InitialContext();
+         InitialContext ic = getContext();
          ConnectionFactory cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");
          conn = cf.createConnection("admin", "admin");
          Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -138,26 +139,24 @@
       return new InitialContext(props);
    }
 
-   private void startServer(String[][] args) throws Throwable
+   private void startServer(String[][] args, boolean logServerOutput) throws Throwable
    {
-      servers = new JBMBootstrapServer[args.length];
+      servers = new Process[args.length];
       for (int i = 0; i < args.length; i++)
       {
          String[] arg = args[i];
-         log.info("starting server with config '" + arg[0] + "'");
-         servers[i] = new JBMBootstrapServer(arg);
+         log.info("starting server with config '" + arg[0] + "' " + "logServerOutput " + logServerOutput);
+         servers[i] = SpawnedVMSupport.spawnVM(SpawnedJMSServer.class.getName(), new String[]{}, logServerOutput, "STARTED::", "FAILED::", args[0]);
       }
-      for (JBMBootstrapServer server : servers)
-      {
-         server.run();
-      }
    }
 
    private void stopServer() throws Throwable
    {
-      for (JBMBootstrapServer server : servers)
+      for (Process server : servers)
       {
-         server.shutDown();
+         server.getInputStream().close();
+         server.getErrorStream().close();
+         server.destroy();
       }
    }
 

Added: trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java	                        (rev 0)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jms.example;
+
+import org.jboss.messaging.integration.bootstrap.JBMBootstrapServer;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ */
+public class SpawnedJMSServer
+{
+   public static void main(String[] args)
+   {
+      JBMBootstrapServer bootstrap;
+      try
+      {
+         System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+         System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+         System.setProperty("java.util.logging.config.file", "../../../src/config/logging.properties");
+         System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.messaging.integration.logging.JBMLoggerPlugin");
+         bootstrap = new JBMBootstrapServer(args);
+         bootstrap.run();
+         System.out.println("STARTED::");
+      }
+      catch (Throwable e)
+      {
+         System.out.println("FAILED::" + e.getMessage());
+      }
+   }
+}

Copied: trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java (from rev 6258, trunk/tests/src/org/jboss/messaging/tests/util/SpawnedVMSupport.java)
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java	                        (rev 0)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jms.example;
+
+import org.jboss.messaging.core.logging.Logger;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
+ * @author <a href="mailto:csuconic at redhat.com">Clebert Suconic</a>
+ * @version <tt>$Revision$</tt>
+ */
+public class SpawnedVMSupport
+{
+   // Constants -----------------------------------------------------
+
+   private static final Logger log = Logger.getLogger(SpawnedVMSupport.class);
+
+   // Attributes ----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+
+   public static Process spawnVM(final String className,
+                                 final String[] vmargs,
+                                 final boolean logOutput,
+                                 final String success,
+                                 final String failure,
+                                 final String... args) throws Exception
+   {
+      StringBuffer sb = new StringBuffer();
+
+      sb.append("java").append(' ');
+
+      sb.append("-Xms512m -Xmx512m ");
+
+      for (String vmarg : vmargs)
+      {
+         sb.append(vmarg).append(' ');
+      }
+
+      String classPath = System.getProperty("java.class.path");
+
+      // I guess it'd be simpler to check if the OS is Windows...
+      if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").equals("Mac OS X"))
+      {
+         sb.append("-cp").append(" ").append(classPath).append(" ");
+      }
+      else
+      {
+         sb.append("-cp").append(" \"").append(classPath).append("\" ");
+      }
+
+      sb.append("-Djava.library.path=").append(System.getProperty("java.library.path", "./native/bin")).append(" ");
+
+      // sb.append("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 ");
+      sb.append(className).append(' ');
+
+      for (String arg : args)
+      {
+         sb.append(arg).append(' ');
+      }
+
+      String commandLine = sb.toString();
+
+      log.trace("command line: " + commandLine);
+
+      Process process = Runtime.getRuntime().exec(commandLine);
+
+      log.trace("process: " + process);
+
+      CountDownLatch latch = new CountDownLatch(1);
+
+      ProcessLogger outputLogger = new ProcessLogger(logOutput, process.getInputStream(), className, false, success, failure, latch);
+      outputLogger.start();
+
+      // Adding a reader to System.err, so the VM won't hang on a System.err.println as identified on this forum thread:
+      // http://www.jboss.org/index.html?module=bb&op=viewtopic&t=151815
+      ProcessLogger errorLogger = new ProcessLogger(true, process.getErrorStream(), className, true, success, failure, latch);
+      errorLogger.start();
+
+      if (!latch.await(30, TimeUnit.SECONDS))
+      {
+         process.destroy();
+         throw new RuntimeException("Timed out waiting for server to start");
+      }
+
+      if (outputLogger.failed || errorLogger.failed)
+      {
+         throw new RuntimeException("server failed to start");
+      }
+      return process;
+   }
+
+   /**
+    * Redirect the input stream to a logger (as debug logs)
+    */
+   static class ProcessLogger extends Thread
+   {
+      private InputStream is;
+
+      private String className;
+
+      private final boolean print;
+
+      private final boolean sendToErr;
+
+      private final String success;
+
+      private final String failure;
+
+      private final CountDownLatch latch;
+
+      boolean failed = false;
+
+      ProcessLogger(final boolean print, final InputStream is, final String className, boolean sendToErr, String success, String failure, CountDownLatch latch) throws ClassNotFoundException
+      {
+         this.is = is;
+         this.print = print;
+         this.className = className;
+         this.sendToErr = sendToErr;
+         this.success = success;
+         this.failure = failure;
+         this.latch = latch;
+         setDaemon(false);
+      }
+
+      @Override
+      public void run()
+      {
+         try
+         {
+            InputStreamReader isr = new InputStreamReader(is);
+            BufferedReader br = new BufferedReader(isr);
+            String line;
+            while ((line = br.readLine()) != null)
+            {
+               if (line.startsWith(success))
+               {
+                  failed = false;
+                  latch.countDown();
+               }
+               else if (line.startsWith(failure))
+               {
+                  failed = true;
+                  latch.countDown();
+               }
+               if (print)
+               {
+                  if (sendToErr)
+                  {
+                     System.err.println(className + " err:" + line);
+                  }
+                  else
+                  {
+                     System.out.println(className + " out:" + line);
+                  }
+               }
+            }
+         }
+         catch (IOException e)
+         {
+            //ok, stream closed
+         }
+
+      }
+   }
+
+   // Constructors --------------------------------------------------
+
+   // Public --------------------------------------------------------
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+
+}
\ No newline at end of file


Property changes on: trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java
===================================================================
--- trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/examples/jms/queue/src/org/jboss/jms/example/QueueExample.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -23,8 +23,6 @@
 
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Queue;
@@ -85,6 +83,8 @@
          TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
 
          System.out.println("Received message: " + messageReceived.getText());
+
+         initialContext.close();
       }
       finally
       {

Modified: trunk/src/bin/run.sh
===================================================================
--- trunk/src/bin/run.sh	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/bin/run.sh	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,4 +1,5 @@
 export JBM_HOME=..
+if [ a"$1" = a ]; then FILENAME=jbm-standalone-beans.xml; else FILENAME="$1"; fi
 export CLASSPATH=$JBM_HOME/config/:$JBM_HOME/schemas/
 export JVM_ARGS="-XX:+UseParallelGC -Xms512M -Xmx1024M -Djava.util.logging.config.file=$JBM_HOME/config/logging.properties -Dorg.jboss.logging.Logger.pluginClass=org.jboss.messaging.integration.logging.JBMLoggerPlugin -Djava.library.path=."
 #export JVM_ARGS="-Xmx512M -Djava.util.logging.config.file=$JBM_HOME/config/logging.properties -Dorg.jboss.logging.Logger.pluginClass=org.jboss.messaging.integration.logging.JBMLoggerPlugin -Djava.library.path=. -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
@@ -6,6 +7,6 @@
 	CLASSPATH=$i:$CLASSPATH
 done
 echo ***********************************************************************************
-echo "java $JVM_ARGS -classpath $CLASSPATH org.jboss.messaging.integration.bootstrap.JBMBootstrapServer jbm-standalone-beans.xml"
+echo "java $JVM_ARGS -classpath $CLASSPATH org.jboss.messaging.integration.bootstrap.JBMBootstrapServer $FILENAME"
 echo ***********************************************************************************
-java $JVM_ARGS -classpath $CLASSPATH -Dcom.sun.management.jmxremote org.jboss.messaging.integration.bootstrap.JBMBootstrapServer jbm-standalone-beans.xml
\ No newline at end of file
+java $JVM_ARGS -classpath $CLASSPATH -Dcom.sun.management.jmxremote org.jboss.messaging.integration.bootstrap.JBMBootstrapServer $FILENAME
\ No newline at end of file

Added: trunk/src/config/AS/build.xml
===================================================================

Copied: trunk/src/config/AS/jbm-jboss-beans.xml (from rev 6252, trunk/src/config/jbm-jboss-beans.xml)
===================================================================
--- trunk/src/config/AS/jbm-jboss-beans.xml	                        (rev 0)
+++ trunk/src/config/AS/jbm-jboss-beans.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+   <bean name="JBMDeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
+      <constructor>
+         <!-- The scan time in milliseconds -->
+         <parameter>5000</parameter>
+      </constructor>
+   </bean>
+   
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.integration.security.JBossASSecurityManager">
+      <depends>JBossSecurityJNDIContextEstablishment</depends>
+   </bean>
+
+   <!-- <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <constructor>
+         <parameter>false</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+      <property name="jbmSecurityManager">
+         <inject bean="JBMSecurityManager"/>
+      </property>
+      <property name="messagingServer">
+         <inject bean="MessagingServer"/>
+      </property>
+   </bean>-->
+
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
+      <depends>AddressSettingsDeployer</depends>
+      <property name="storageManager">
+         <inject bean="StorageManager"/>
+      </property>
+      <property name="remotingService">
+         <inject bean="RemotingService"/>
+      </property>
+      <property name="configuration">
+         <inject bean="Configuration"/>
+      </property>
+      <property name="securityManager">
+         <inject bean="JBMSecurityManager"/>
+      </property>      
+      <property name="managementService">
+         <inject bean="ManagementService"/>
+      </property>      
+   </bean>
+
+   <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+   <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+      </constructor> 
+      <property name="managementService">
+         <inject bean="ManagementService"/>
+      </property>
+   </bean>
+
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>
+         <parameter>
+            <inject bean="MessagingServer" property="serverManagement"/>
+         </parameter>
+         <parameter>
+            <inject bean="MessagingServer" property="postOffice"/>
+         </parameter>
+         <parameter>
+            <inject bean="MessagingServer" property="storageManager"/>
+         </parameter>
+         <parameter>
+            <inject bean="MessagingServer" property="addressSettingsRepository"/>
+         </parameter>
+         <parameter>
+            <inject bean="JMSManagementService"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+   <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
+      <constructor>
+         <parameter>
+            <inject bean="JBMDeploymentManager"/>
+         </parameter>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+      </constructor>
+      <property name="jmsServerManager">
+         <inject bean="JMSServerManager"/>
+      </property>
+   </bean>
+
+   <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
+      <constructor>
+         <parameter>
+            <inject bean="JBMDeploymentManager"/>
+         </parameter>
+         <parameter>
+            <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
+         </parameter>
+      </constructor>
+   </bean>
+   
+   <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
+      <constructor>
+         <parameter>
+            <inject bean="JBMDeploymentManager"/>
+         </parameter>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+   <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
+      <constructor>
+         <parameter>
+            <inject bean="JBMDeploymentManager"/>
+         </parameter>
+         <parameter>
+            <inject bean="MessagingServer" property="securityRepository"/>
+         </parameter>
+      </constructor>
+   </bean>
+   
+   <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
+      <constructor>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="Configuration" property="JMXManagementEnabled" />
+         </parameter>
+      </constructor>
+   </bean>
+   
+   <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
+      <constructor>
+         <parameter>
+            <inject bean="ManagementService"/>
+         </parameter>
+      </constructor>
+   </bean>
+   
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+</deployment>
\ No newline at end of file

Copied: trunk/src/config/AS/login-config.xml (from rev 6252, trunk/src/config/login-config.xml)
===================================================================
--- trunk/src/config/AS/login-config.xml	                        (rev 0)
+++ trunk/src/config/AS/login-config.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+  <authentication>
+    <login-module code="login.module1.class.name" flag="control_flag">
+      <module-option name = "option1-name">option1-value</module-option>
+      <module-option name = "option2-name">option2-value</module-option>
+      ...
+    </login-module>
+
+    <login-module code="login.module2.class.name" flag="control_flag">
+      ...
+    </login-module>
+    ...
+  </authentication>
+</application-policy>
+
+$Id: login-config.xml 76444 2008-07-29 23:50:53Z sguilhen at redhat.com $
+$Revision: 76444 $
+-->
+
+<policy>
+  <!-- Used by clients within the application server VM such as
+  mbeans and servlets that access EJBs.
+  -->
+  <application-policy name="client-login">
+    <authentication>
+      <login-module code="org.jboss.security.ClientLoginModule"
+        flag="required">
+         <!-- Any existing security context will be restored on logout -->
+         <module-option name="restore-login-identity">true</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- Security domains for testing new jca framework -->
+  <application-policy name="HsqlDbRealm">
+    <authentication>
+      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+        flag="required">
+        <module-option name="principal">sa</module-option>
+        <module-option name="userName">sa</module-option>
+        <module-option name="password"></module-option>
+        <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <application-policy name="JmsXARealm">
+    <authentication>
+      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+        flag="required">
+        <module-option name="principal">guest</module-option>
+        <module-option name="userName">guest</module-option>
+        <module-option name="password">guest</module-option>
+        <module-option name="managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for messaging. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+<application-policy name="messaging">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+	<module-option name = "unauthenticatedIdentity">guest</module-option>
+        <module-option name="usersProperties">props/messaging-users.properties</module-option>
+        <module-option name="rolesProperties">props/messaging-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for the jmx-console web application. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="jmx-console">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+        <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for the web-console web application. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="web-console">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">web-console-users.properties</module-option>
+        <module-option name="rolesProperties">web-console-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!--
+    A template configuration for the JBossWS security domain.
+    This defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="JBossWS">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+        <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+        <module-option name="unauthenticatedIdentity">anonymous</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- The default login configuration used by any security domain that
+  does not have a application-policy entry with a matching name
+  -->
+  <application-policy name="other">
+    <!-- A simple server login module, which can be used when the number
+    of users is relatively small. It uses two properties files:
+    users.properties, which holds users (key) and their password (value).
+    roles.properties, which holds users (key) and a comma-separated list of
+    their roles (value).
+    The unauthenticatedIdentity property defines the name of the principal
+    that will be used when a null username and password are presented as is
+    the case for an unuathenticated web client or MDB. If you want to
+    allow such users to be authenticated add the property, e.g.,
+    unauthenticatedIdentity="nobody"
+    -->
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required"/>
+    </authentication>
+  </application-policy>
+
+</policy>

Copied: trunk/src/config/AS/messaging-roles.properties (from rev 6252, trunk/src/config/messaging-roles.properties)
===================================================================
--- trunk/src/config/AS/messaging-roles.properties	                        (rev 0)
+++ trunk/src/config/AS/messaging-roles.properties	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,4 @@
+#
+# user=role1,role2,...
+#
+guest=guest


Property changes on: trunk/src/config/AS/messaging-roles.properties
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/src/config/AS/messaging-users.properties (from rev 6252, trunk/src/config/messaging-users.properties)
===================================================================
--- trunk/src/config/AS/messaging-users.properties	                        (rev 0)
+++ trunk/src/config/AS/messaging-users.properties	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,4 @@
+#
+# user=password
+#
+guest=guest


Property changes on: trunk/src/config/AS/messaging-users.properties
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/src/config/AS/ra.xml (from rev 6252, trunk/src/config/ra.xml)
===================================================================
--- trunk/src/config/AS/ra.xml	                        (rev 0)
+++ trunk/src/config/AS/ra.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <description>JBoss Messaging 2.0 Resource Adapter</description>
+   <display-name>JBoss Messaging 2.0 Resource Adapter</display-name>
+
+   <vendor-name>Red Hat Middleware LLC</vendor-name>
+   <eis-type>JMS 1.1 Server</eis-type>
+   <resourceadapter-version>1.0</resourceadapter-version>
+
+   <license>
+      <description>
+ JBoss, Home of Professional Open Source.
+ Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ as indicated by the @author tags. See the copyright.txt file in the
+ distribution for a full listing of individual contributors.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+      </description>
+      <license-required>true</license-required>
+   </license>
+
+   <resourceadapter>
+      <resourceadapter-class>org.jboss.messaging.ra.JBMResourceAdapter</resourceadapter-class>
+      <config-property>
+         <description>The transport type</description>
+         <config-property-name>TransportType</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
+      </config-property>
+      <config-property>
+         <description>The transport configuration. These values must be in the form of key:val:type;key:val:type; where type is Integer, String, Long or boolean</description>
+         <config-property-name>TransportConfiguration</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>jbm.remoting.invm.serverid:0:Integer</config-property-value>
+      </config-property>
+       <config-property>
+        <description>Use XA methods to obtain connections?</description>
+        <config-property-name>UseXA</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value>true</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The user name used to login to the JMS server</description>
+        <config-property-name>UserName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The password used to login to the JMS server</description>
+        <config-property-name>Password</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <!--<config-property>
+         <description>The Backup transport type</description>
+         <config-property-name>BackUpTransportType</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+         <description>The Backup transport configuration. These values must be in the form of key=val;key=val;</description>
+         <config-property-name>TransportConfiguration</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery group address</description>
+        <config-property-name>DiscoveryGroupAddress</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery group port</description>
+        <config-property-name>DiscoveryGroupPort</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery refresh timeout</description>
+        <config-property-name>DiscoveryRefreshTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery initial wait timeout</description>
+        <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The load balancing policy class name</description>
+        <config-property-name>LoadBalancingPolicyClassName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The ping period</description>
+        <config-property-name>PingPeriod</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The connection TTL</description>
+        <config-property-name>ConnectionTTL</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The call timeout</description>
+        <config-property-name>CallTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The dups ok batch size</description>
+        <config-property-name>DupsOKBatchSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The transaction batch size</description>
+        <config-property-name>TransactionBatchSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The consumer window size</description>
+        <config-property-name>ConsumerWindowSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The consumer max rate</description>
+        <config-property-name>ConsumerMaxRate</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The send window size</description>
+        <config-property-name>SendWindowSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The producer max rate</description>
+        <config-property-name>ProducerMaxRate</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The min large message size</description>
+        <config-property-name>MinLargeMessageSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on acknowledge</description>
+        <config-property-name>BlockOnAcknowledge</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on non persistent send</description>
+        <config-property-name>BlockOnNonPersistentSend</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on persistent send</description>
+        <config-property-name>BlockOnPersistentSend</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The auto group</description>
+        <config-property-name>AutoGroup</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The max connections</description>
+        <config-property-name>MaxConnections</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The pre acknowledge</description>
+        <config-property-name>PreAcknowledge</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The retry interval</description>
+        <config-property-name>RetryInterval</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The retry interval multiplier</description>
+        <config-property-name>RetryIntervalMultiplier</config-property-name>
+        <config-property-type>java.lang.Double</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>Should clean server shutdown trigger failover?</description>
+        <config-property-name>FailoverOnServerShutdown</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The client id</description>
+        <config-property-name>ClientID</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>-->
+
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.messaging.ra.JBMManagedConnectionFactory</managedconnectionfactory-class>
+
+            <config-property>
+               <description>The default session type</description>
+               <config-property-name>SessionDefaultType</config-property-name>
+               <config-property-type>java.lang.String</config-property-type>
+               <config-property-value>javax.jms.Queue</config-property-value>
+            </config-property>
+            <config-property>
+               <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
+               <config-property-name>UseTryLock</config-property-name>
+               <config-property-type>java.lang.Integer</config-property-type>
+               <config-property-value>0</config-property-value>
+            </config-property>
+
+            <connectionfactory-interface>org.jboss.messaging.ra.JBMConnectionFactory</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.messaging.ra.JBMConnectionFactoryImpl</connectionfactory-impl-class>
+            <connection-interface>javax.jms.Session</connection-interface>
+            <connection-impl-class>org.jboss.messaging.ra.JBMSession</connection-impl-class>
+         </connection-definition>
+         <transaction-support>XATransaction</transaction-support>
+         <authentication-mechanism>
+            <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+            <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+         </authentication-mechanism>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+
+      <inbound-resourceadapter>
+         <messageadapter>
+            <messagelistener>
+               <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.messaging.ra.inflow.JBMActivationSpec</activationspec-class>
+                  <required-config-property>
+                      <config-property-name>destination</config-property-name>
+                  </required-config-property>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+
+   </resourceadapter>
+</connector>

Deleted: trunk/src/config/jbm-jboss-beans.xml
===================================================================
--- trunk/src/config/jbm-jboss-beans.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/jbm-jboss-beans.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
-
-   <bean name="JBMDeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
-      <constructor>
-         <!-- The scan time in milliseconds -->
-         <parameter>5000</parameter>
-      </constructor>
-   </bean>
-   
-   <bean name="JBMSecurityManager" class="org.jboss.messaging.integration.security.JBossASSecurityManager">
-      <depends>JBossSecurityJNDIContextEstablishment</depends>
-   </bean>
-
-   <!-- <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
-      <constructor>
-         <parameter>false</parameter>
-      </constructor>
-   </bean>
-
-   <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
-      <property name="jbmSecurityManager">
-         <inject bean="JBMSecurityManager"/>
-      </property>
-      <property name="messagingServer">
-         <inject bean="MessagingServer"/>
-      </property>
-   </bean>-->
-
-   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
-      <depends>AddressSettingsDeployer</depends>
-      <property name="storageManager">
-         <inject bean="StorageManager"/>
-      </property>
-      <property name="remotingService">
-         <inject bean="RemotingService"/>
-      </property>
-      <property name="configuration">
-         <inject bean="Configuration"/>
-      </property>
-      <property name="securityManager">
-         <inject bean="JBMSecurityManager"/>
-      </property>      
-      <property name="managementService">
-         <inject bean="ManagementService"/>
-      </property>      
-   </bean>
-
-   <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
-      <constructor>
-         <parameter>
-            <inject bean="Configuration"/>
-         </parameter>
-      </constructor>
-   </bean>
-
-   <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
-      <constructor>
-         <parameter>
-            <inject bean="Configuration"/>
-         </parameter>
-      </constructor> 
-      <property name="managementService">
-         <inject bean="ManagementService"/>
-      </property>
-   </bean>
-
-   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
-      <constructor>
-         <parameter>
-            <inject bean="MessagingServer" property="serverManagement"/>
-         </parameter>
-         <parameter>
-            <inject bean="MessagingServer" property="postOffice"/>
-         </parameter>
-         <parameter>
-            <inject bean="MessagingServer" property="storageManager"/>
-         </parameter>
-         <parameter>
-            <inject bean="MessagingServer" property="addressSettingsRepository"/>
-         </parameter>
-         <parameter>
-            <inject bean="JMSManagementService"/>
-         </parameter>
-      </constructor>
-   </bean>
-
-   <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
-      <constructor>
-         <parameter>
-            <inject bean="JBMDeploymentManager"/>
-         </parameter>
-         <parameter>
-            <inject bean="Configuration"/>
-         </parameter>
-      </constructor>
-      <property name="jmsServerManager">
-         <inject bean="JMSServerManager"/>
-      </property>
-   </bean>
-
-   <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
-      <constructor>
-         <parameter>
-            <inject bean="JBMDeploymentManager"/>
-         </parameter>
-         <parameter>
-            <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
-         </parameter>
-      </constructor>
-   </bean>
-   
-   <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
-      <constructor>
-         <parameter>
-            <inject bean="JBMDeploymentManager"/>
-         </parameter>
-         <parameter>
-            <inject bean="Configuration"/>
-         </parameter>
-      </constructor>
-   </bean>
-
-   <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
-      <constructor>
-         <parameter>
-            <inject bean="JBMDeploymentManager"/>
-         </parameter>
-         <parameter>
-            <inject bean="MessagingServer" property="securityRepository"/>
-         </parameter>
-      </constructor>
-   </bean>
-   
-   <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
-      <constructor>
-         <parameter>
-            <inject bean="MBeanServer"/>
-         </parameter>
-         <parameter>
-            <inject bean="Configuration" property="JMXManagementEnabled" />
-         </parameter>
-      </constructor>
-   </bean>
-   
-   <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
-      <constructor>
-         <parameter>
-            <inject bean="ManagementService"/>
-         </parameter>
-      </constructor>
-   </bean>
-   
-   <bean name="MBeanServer" class="javax.management.MBeanServer">
-      <constructor factoryClass="java.lang.management.ManagementFactory"
-                   factoryMethod="getPlatformMBeanServer"/>
-   </bean> 
-
-</deployment>
\ No newline at end of file

Modified: trunk/src/config/jbm-queues.xml
===================================================================
--- trunk/src/config/jbm-queues.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/jbm-queues.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -7,6 +7,7 @@
       <!--  only the admin role can interact with the management address  -->
       <permission type="consume" roles="admin"/>
       <permission type="send" roles="admin"/>
+      <permission type="manage" roles="admin"/>
    </security>
    
    <security match="topicjms.testTopic">

Modified: trunk/src/config/jbm-security.xml
===================================================================
--- trunk/src/config/jbm-security.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/jbm-security.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -4,7 +4,8 @@
    <defaultuser name="guest" password="guest">
       <role name="guest"/>
    </defaultuser>
-   <!--<user name="user" password="pass">
-      <role name="role"/>
-   </user>-->
+   <user name="admin" password="admin">
+      <role name="admin"/>
+      <role name="guest"/>
+   </user>
 </deployment>
\ No newline at end of file

Deleted: trunk/src/config/messaging-roles.properties
===================================================================
--- trunk/src/config/messaging-roles.properties	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/messaging-roles.properties	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,4 +0,0 @@
-#
-# user=role1,role2,...
-#
-guest=guest

Deleted: trunk/src/config/messaging-users.properties
===================================================================
--- trunk/src/config/messaging-users.properties	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/messaging-users.properties	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,4 +0,0 @@
-#
-# user=password
-#
-guest=guest

Deleted: trunk/src/config/multiplexer-service.xml
===================================================================
--- trunk/src/config/multiplexer-service.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/multiplexer-service.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-
-
-    <!--
-    An example for setting up the JChannelFactory MBean
-    Author: Bela Ban
-    Version: $Id$
-    -->
-    <mbean code="org.jgroups.jmx.JChannelFactory" name="jgroups.mux:name=Multiplexer">
-    <!--mbean code="org.jgroups.JChannelFactory" name="jgroups.mux:name=Multiplexer" xmbean-dd="resource:META-INF/multiplexer-xmbean.xml" -->
-        <attribute name="Domain">jgroups.mux</attribute>
-        <attribute name="MultiplexerConfig">multiplexer-stacks.xml</attribute>
-        <attribute name="ExposeChannels">true</attribute>
-        <attribute name="ExposeProtocols">true</attribute>
-
-        <!-- The address used to determine the node name  -->
-        <!-- <attribute name="NodeAddress">${jboss.bind.address}</attribute> -->
-
-    </mbean>
-
-
-</server>

Deleted: trunk/src/config/multiplexer-stacks.xml
===================================================================
--- trunk/src/config/multiplexer-stacks.xml	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/config/multiplexer-stacks.xml	2009-04-01 14:46:36 UTC (rev 6261)
@@ -1,330 +0,0 @@
-
-<!--
-  Sample file that defines a number of stacks, used by the multiplexer
-  Author: Bela Ban
-  Version: $Id$
--->
-<protocol_stacks>
-    <stack name="udp"
-           description="Default: IP multicast based stack, with flow control and message bundling">
-        <config>
-          <UDP
-             mcast_port="${jgroups.udp.mcast_port:45688}"
-             mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
-             tos="8"
-             ucast_recv_buf_size="20000000"
-             ucast_send_buf_size="640000"
-             mcast_recv_buf_size="25000000"
-             mcast_send_buf_size="640000"
-             loopback="false"
-             discard_incompatible_packets="true"
-             max_bundle_size="64000"
-             max_bundle_timeout="30"
-             use_incoming_packet_handler="true"
-             use_outgoing_packet_handler="false"
-             ip_ttl="${jgroups.udp.ip_ttl:2}"
-             down_thread="false" up_thread="false"
-             enable_bundling="true"/>
-          <PING timeout="2000"
-             down_thread="false" up_thread="false" num_initial_members="3"/>
-          <MERGE2 max_interval="100000"
-             down_thread="false" up_thread="false" min_interval="20000"/>
-          <FD_SOCK down_thread="false" up_thread="false"/>
-          <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
-          <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
-          <pbcast.NAKACK max_xmit_size="60000"
-                   use_mcast_xmit="false" gc_lag="0"
-                   retransmit_timeout="300,600,1200,2400,4800"
-                   down_thread="false" up_thread="false"
-                   discard_delivered_msgs="true"/>
-          <UNICAST timeout="300,600,1200,2400,3600"
-             down_thread="false" up_thread="false"/>
-          <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                   down_thread="false" up_thread="false"
-                   max_bytes="400000"/>
-          <pbcast.GMS print_local_addr="true" join_timeout="3000"
-                   down_thread="false" up_thread="false"
-                   join_retry_timeout="2000" shun="true"
-                   view_bundling="true"/>
-          <FC max_credits="2000000" down_thread="false" up_thread="false"
-              min_threshold="0.10"/>
-          <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
-          <!-- pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
-                   use_flush="true" use_reading_thread="true"/ -->
-          <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-          <pbcast.FLUSH down_thread="false" up_thread="false"/>
-        </config>
-    </stack>
-
-
-    <stack name="udp-sync"
-           description="IP multicast based stack, without flow control and without message bundling. This should be used
-           instead of udp if (1) synchronous calls are used and (2) the message volume (rate and size)
-            is not that large. Don't use this configuration if you send messages at a high sustained rate, or you might
-            run out of memory">
-        <config>
-            <UDP
-                 mcast_port="${jgroups.udp.mcast_port:45699}"
-                 mcast_addr="${jgroups.udp.mcast_addr:229.11.11.11}"
-                 tos="8"
-                 ucast_recv_buf_size="20000000"
-                 ucast_send_buf_size="640000"
-                 mcast_recv_buf_size="25000000"
-                 mcast_send_buf_size="640000"
-                 loopback="false"
-                 discard_incompatible_packets="true"
-                 max_bundle_size="64000"
-                 max_bundle_timeout="30"
-                 use_incoming_packet_handler="true"
-                 use_outgoing_packet_handler="false"
-                 ip_ttl="${jgroups.udp.ip_ttl:2}"
-                 down_thread="false" up_thread="false"
-                 enable_bundling="false"/>
-            <PING timeout="2000"
-                  down_thread="false" up_thread="false" num_initial_members="3"/>
-            <MERGE2 max_interval="100000"
-                    down_thread="false" up_thread="false" min_interval="20000"/>
-            <FD_SOCK down_thread="false" up_thread="false"/>
-            <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
-            <pbcast.NAKACK max_xmit_size="60000"
-                    use_mcast_xmit="false" gc_lag="0"
-                    retransmit_timeout="300,600,1200,2400,4800"
-                    down_thread="false" up_thread="false"
-                    discard_delivered_msgs="true"/>
-            <UNICAST timeout="300,600,1200,2400,3600"
-                    down_thread="false" up_thread="false"/>
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                    down_thread="false" up_thread="false"
-                    max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="3000"
-                    down_thread="false" up_thread="false"
-                    join_retry_timeout="2000" shun="true"
-                    view_bundling="true"/>
-            <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
-            <!--pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
-                    use_flush="true" use_reading_thread="true"/ -->
-            <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-            <pbcast.FLUSH down_thread="false" up_thread="false"/>
-        </config>
-    </stack>
-
-
-    <stack name="tcp"
-           description="TCP based stack, with flow control and message bundling. This is usually used when IP
-           multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast)">
-        <config>
-            <TCP start_port="7600"
-                 loopback="true"
-                 recv_buf_size="20000000"
-                 send_buf_size="640000"
-                 discard_incompatible_packets="true"
-                 max_bundle_size="64000"
-                 max_bundle_timeout="30"
-                 use_incoming_packet_handler="true"
-                 use_outgoing_packet_handler="false"
-                 down_thread="false" up_thread="false"
-                 enable_bundling="true"
-                 use_send_queues="false"
-                 sock_conn_timeout="300"
-                 skip_suspected_members="true"/>
-            <TCPPING timeout="3000"
-                     down_thread="false" up_thread="false"
-                     initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7600],localhost[7601]}"
-                     port_range="1"
-                     num_initial_members="3"/>
-            <MERGE2 max_interval="100000"
-                    down_thread="false" up_thread="false" min_interval="20000"/>
-            <FD_SOCK down_thread="false" up_thread="false"/>
-            <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
-            <pbcast.NAKACK max_xmit_size="60000"
-                           use_mcast_xmit="false" gc_lag="0"
-                           retransmit_timeout="300,600,1200,2400,4800"
-                           down_thread="false" up_thread="false"
-                           discard_delivered_msgs="true"/>
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                           down_thread="false" up_thread="false"
-                           max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="3000"
-                        down_thread="false" up_thread="false"
-                        join_retry_timeout="2000" shun="true"
-                        view_bundling="true"/>
-            <FC max_credits="2000000" down_thread="false" up_thread="false"
-                min_threshold="0.10"/>
-            <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
-            <!-- pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
-                      use_flush="true" use_reading_thread="true"/ -->
-            <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-            <pbcast.FLUSH down_thread="false" up_thread="false"/>
-        </config>
-    </stack>
-
-
-    <stack name="tcp-sync"
-           description="TCP based stack, without flow control and without message bundling. This is usually used when IP
-           multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast). This
-           configuration should be used instead of tcp when (1) synchronous calls are used and (2) the message volume
-           (rate and size) is not that large">
-        <config>
-            <TCP start_port="7650"
-                 loopback="true"
-                 recv_buf_size="20000000"
-                 send_buf_size="640000"
-                 discard_incompatible_packets="true"
-                 max_bundle_size="64000"
-                 max_bundle_timeout="30"
-                 use_incoming_packet_handler="true"
-                 use_outgoing_packet_handler="false"
-                 down_thread="false" up_thread="false"
-                 enable_bundling="false"
-                 use_send_queues="false"
-                 sock_conn_timeout="300"
-                 skip_suspected_members="true"/>
-            <TCPPING timeout="3000"
-                     down_thread="false" up_thread="false"
-                     initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7650],localhost[7651]}"
-                     port_range="1"
-                     num_initial_members="3"/>
-            <MERGE2 max_interval="100000"
-                    down_thread="false" up_thread="false" min_interval="20000"/>
-            <FD_SOCK down_thread="false" up_thread="false"/>
-            <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
-            <pbcast.NAKACK max_xmit_size="60000"
-                           use_mcast_xmit="false" gc_lag="0"
-                           retransmit_timeout="300,600,1200,2400,4800"
-                           down_thread="false" up_thread="false"
-                           discard_delivered_msgs="true"/>
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                           down_thread="false" up_thread="false"
-                           max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="3000"
-                        down_thread="false" up_thread="false"
-                        join_retry_timeout="2000" shun="true"
-                        view_bundling="true"/>
-            <!-- pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
-                         use_flush="true" use_reading_thread="true"/ -->
-            <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-            <pbcast.FLUSH down_thread="false" up_thread="false"/>
-        </config>
-    </stack>
-
-
-    <stack name="tcp_nio"
-           description="TCP_NIO based stack, with flow control and message bundling. This is usually used when IP
-           multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast)">
-        <config>
-            <TCP_NIO
-                   recv_buf_size="20000000"
-                   send_buf_size="640000"
-                   loopback="false"
-                   discard_incompatible_packets="true"
-                   max_bundle_size="64000"
-                   max_bundle_timeout="30"
-                   use_incoming_packet_handler="true"
-                   use_outgoing_packet_handler="false"
-                   down_thread="false" up_thread="false"
-                   enable_bundling="true"
-                   start_port="7700"
-                   use_send_queues="false"
-                   sock_conn_timeout="300" skip_suspected_members="true"
-                   reader_threads="8"
-                   writer_threads="8"
-                   processor_threads="8"
-                   processor_minThreads="8"
-                   processor_maxThreads="8"
-                   processor_queueSize="100"
-                   processor_keepAliveTime="-1"/>
-            <TCPPING timeout="3000"
-                     initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7700],localhost[7701]}"
-                     port_range="1"
-                     num_initial_members="3"
-                     down_thread="false" up_thread="false"/>
-            <MERGE2 max_interval="100000"
-                  down_thread="false" up_thread="false" min_interval="20000"/>
-            <FD_SOCK down_thread="false" up_thread="false"/>
-            <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
-            <pbcast.NAKACK max_xmit_size="60000"
-                   use_mcast_xmit="false" gc_lag="0"
-                   retransmit_timeout="300,600,1200,2400,4800"
-                   down_thread="false" up_thread="false"
-                   discard_delivered_msgs="true"/>
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                   down_thread="false" up_thread="false"
-                   max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="3000"
-                   down_thread="false" up_thread="false"
-                   join_retry_timeout="2000" shun="true"
-                   view_bundling="true"/>
-            <FC max_credits="2000000" down_thread="false" up_thread="false"
-                min_threshold="0.10"/>
-            <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
-            <!-- pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
-                   use_flush="true" use_reading_thread="true"/ -->
-            <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-            <pbcast.FLUSH down_thread="false" up_thread="false"/>
-        </config>
-    </stack>
-
-
-    <stack name="tcp_nio-sync"
-           description="TCP_NIO based stack, with flow control and message bundling. This is usually used when IP
-           multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast). This
-           configuration should be used instead of tcp when (1) synchronous calls are used and (2) the message volume
-           (rate and size) is not that large">
-        <config>
-            <TCP_NIO
-                     recv_buf_size="20000000"
-                     send_buf_size="640000"
-                     loopback="false"
-                     discard_incompatible_packets="true"
-                     max_bundle_size="64000"
-                     max_bundle_timeout="30"
-                     use_incoming_packet_handler="true"
-                     use_outgoing_packet_handler="false"
-                     down_thread="false" up_thread="false"
-                     enable_bundling="false"
-                     start_port="7750"
-                     use_send_queues="false"
-                     sock_conn_timeout="300" skip_suspected_members="true"
-                     reader_threads="8"
-                     writer_threads="8"
-                     processor_threads="8"
-                     processor_minThreads="8"
-                     processor_maxThreads="8"
-                     processor_queueSize="100"
-                     processor_keepAliveTime="-1"/>
-            <TCPPING timeout="3000"
-                     initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7750],localhost[7751]}"
-                     port_range="1"
-                     num_initial_members="3"
-                     down_thread="false" up_thread="false"/>
-            <MERGE2 max_interval="100000"
-                    down_thread="false" up_thread="false" min_interval="20000"/>
-            <FD_SOCK down_thread="false" up_thread="false"/>
-            <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
-            <pbcast.NAKACK max_xmit_size="60000"
-                        use_mcast_xmit="false" gc_lag="0"
-                        retransmit_timeout="300,600,1200,2400,4800"
-                        down_thread="false" up_thread="false"
-                        discard_delivered_msgs="true"/>
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                        down_thread="false" up_thread="false"
-                        max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="3000"
-                        down_thread="false" up_thread="false"
-                        join_retry_timeout="2000" shun="true"
-                        view_bundling="true"/>
-            <!-- pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
-                        use_flush="true" use_reading_thread="true"/ -->
-            <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-            <pbcast.FLUSH down_thread="false" up_thread="false"/>
-        </config>
-    </stack>
-
-</protocol_stacks>
-
-

Modified: trunk/src/main/org/jboss/messaging/integration/bootstrap/JBMBootstrapServer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/bootstrap/JBMBootstrapServer.java	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/src/main/org/jboss/messaging/integration/bootstrap/JBMBootstrapServer.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -22,8 +22,15 @@
 
 package org.jboss.messaging.integration.bootstrap;
 
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.kernel.spi.config.KernelConfig;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.messaging.core.logging.Logger;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.PrintStream;
 import java.net.URL;
 import java.util.List;
@@ -31,12 +38,6 @@
 import java.util.Properties;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
-import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
-import org.jboss.kernel.spi.config.KernelConfig;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.messaging.core.logging.Logger;
-
 /**
  * This is the method in which the JBM server can be deployed externall outside of jBoss. Alternatively a user can embed
  * by using the same code as in main
@@ -157,6 +158,14 @@
       {
          url = getClass().getClassLoader().getResource(arg);
       }
+      if(url == null)
+      {
+         File file = new File(arg);
+         if(file.exists())
+         {
+            url = file.toURL();
+         }
+      }
       if (url == null)
       {
          throw new RuntimeException("Unable to find resource:" + arg);

Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -21,12 +21,14 @@
    */
 package org.jboss.test.messaging;
 
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
+import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.core.security.Role;
+import org.jboss.messaging.core.server.MessagingServer;
+import org.jboss.messaging.jms.server.JMSServerManager;
+import org.jboss.test.messaging.tools.ServerManagement;
+import org.jboss.test.messaging.tools.container.Server;
+import org.jboss.test.messaging.util.ProxyAssertSupport;
 
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
@@ -40,17 +42,13 @@
 import javax.jms.XAConnectionFactory;
 import javax.naming.InitialContext;
 import javax.transaction.TransactionManager;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
-import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
-
-import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.security.Role;
-import org.jboss.messaging.core.server.MessagingServer;
-import org.jboss.messaging.jms.server.JMSServerManager;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.tools.container.Server;
-import org.jboss.test.messaging.util.ProxyAssertSupport;
-
 /**
  * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
  * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
@@ -260,7 +258,7 @@
 
    public String[] getContainerConfig()
    {
-         return new String[]{ "invm-beans.xml", "jbm-jboss-beans.xml"};
+         return new String[]{ "invm-beans.xml", "/src/config/AS/jbm-jboss-beans.xml"};
    }
 
    protected MessagingServer getJmsServer() throws Exception

Modified: trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java	2009-04-01 14:21:23 UTC (rev 6260)
+++ trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java	2009-04-01 14:46:36 UTC (rev 6261)
@@ -22,18 +22,7 @@
 
 package org.jboss.test.jms;
 
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.util.Hashtable;
-
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
 import junit.framework.Assert;
-
 import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientRequestor;
 import org.jboss.messaging.core.client.ClientSession;
@@ -47,6 +36,15 @@
 import org.jboss.messaging.tests.util.SpawnedVMSupport;
 import org.objectweb.jtests.jms.admin.Admin;
 
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.Hashtable;
+
 /**
  * A JBossMessagingAdmin
  *
@@ -244,7 +242,7 @@
                      String line = null;
                      while ((line = br.readLine()) != null)
                      {
-                        System.out.println("JoramServerOutput: " + line);
+                        System.out.println("server output: " + line);
                      }
                   }
                   catch (Exception e)




More information about the jboss-cvs-commits mailing list