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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 14 10:14:59 EDT 2009


Author: timfox
Date: 2009-04-14 10:14:59 -0400 (Tue, 14 Apr 2009)
New Revision: 6419

Added:
   trunk/examples/jms/application-layer-failover/
   trunk/examples/jms/application-layer-failover/build.xml
   trunk/examples/jms/application-layer-failover/readme.html
   trunk/examples/jms/application-layer-failover/server0/
   trunk/examples/jms/application-layer-failover/server0/client-jndi.properties
   trunk/examples/jms/application-layer-failover/server0/jbm-configuration.xml
   trunk/examples/jms/application-layer-failover/server0/jbm-jms.xml
   trunk/examples/jms/application-layer-failover/server0/jbm-queues.xml
   trunk/examples/jms/application-layer-failover/server0/jbm-security.xml
   trunk/examples/jms/application-layer-failover/server0/jbm-standalone-beans.xml
   trunk/examples/jms/application-layer-failover/server1/
   trunk/examples/jms/application-layer-failover/server1/client-jndi.properties
   trunk/examples/jms/application-layer-failover/server1/jbm-configuration.xml
   trunk/examples/jms/application-layer-failover/server1/jbm-jms.xml
   trunk/examples/jms/application-layer-failover/server1/jbm-queues.xml
   trunk/examples/jms/application-layer-failover/server1/jbm-security.xml
   trunk/examples/jms/application-layer-failover/server1/jbm-standalone-beans.xml
   trunk/examples/jms/application-layer-failover/src/
   trunk/examples/jms/application-layer-failover/src/org/
   trunk/examples/jms/application-layer-failover/src/org/jboss/
   trunk/examples/jms/application-layer-failover/src/org/jboss/jms/
   trunk/examples/jms/application-layer-failover/src/org/jboss/jms/example/
   trunk/examples/jms/application-layer-failover/src/org/jboss/jms/example/ApplicationLayerFailoverExample.java
   trunk/examples/jms/common/src/org/jboss/jms/example/KillChecker.java
Modified:
   trunk/.classpath
   trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
   trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
   trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
   trunk/src/schemas/jbm-jms.xsd
Log:
mainly application-layer failover example

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2009-04-14 11:54:47 UTC (rev 6418)
+++ trunk/.classpath	2009-04-14 14:14:59 UTC (rev 6419)
@@ -19,6 +19,7 @@
 	<classpathentry kind="src" path="examples/jms/queue-selector/src"/>
 	<classpathentry kind="src" path="examples/jms/message-priority/src"/>
 	<classpathentry kind="src" path="examples/jms/automatic-failover/src"/>
+	<classpathentry kind="src" path="examples/jms/application-layer-failover/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-queue/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-topic/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-durable-subscription/src"/>

Added: trunk/examples/jms/application-layer-failover/build.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/build.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/build.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+      <!ENTITY libraries SYSTEM "../../../thirdparty/libraries.ent">
+      ]>
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- 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.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+
+<project default="run" name="JBoss Messaging JMS Automatic Failover Example">
+
+   <import file="../common/build.xml"/>
+
+   <target name="run" depends="delete-files">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.ApplicationLayerFailoverExample"/>
+         <param name="jbm.example.beans.file" value="server0 server1"/>
+      </antcall>
+   </target>
+
+   <target name="runRemote" depends="delete-files">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.ApplicationLayerFailoverExample"/>
+         <param name="jbm.example.runServer" value="false"/>
+      </antcall>
+   </target>
+   
+   <target name="delete-files">
+      <delete file="./server1/KILL_ME"/>
+      <!-- Need to delete the server data dirs before each run since after failover cannot just rerun test since backup is now live -->
+      <delete dir="./server0/data"/>
+      <delete dir="./server0/logs"/>
+      <delete dir="./server1/data"/>
+      <delete dir="./server1/logs"/>
+   </target>
+
+</project>

Added: trunk/examples/jms/application-layer-failover/readme.html
===================================================================
--- trunk/examples/jms/application-layer-failover/readme.html	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/readme.html	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,147 @@
+<html>
+  <head>
+    <title>JBoss Messaging Application-Layer Failover Example</title>
+    <link rel="stylesheet" type="text/css" href="../common/common.css">
+  </head>
+  <body>
+     <h1>JBoss Messaging Application-Layer Failover Example</h1>
+     <br>
+     <p>JBoss Messaging implements fully transparent <b>automatic</b> failover of connections from a live to backup node, this requires
+     no special coding for failover, and is described in a different example. Automatic failover requires server replication.</p>
+     <p>However, JBoss Messaging also supports <b>Application-Layer</b> failover, useful in the case that replication is not enabled
+     on the server side.</p>
+     <p>With Application-Layer failover, it's up to the application to register a JMS ExceptionListener with JBoss Messaging which will be 
+     called by JBoss Messaging in the event that connection failure is detected.</p>
+     <p>The code in the ExceptionListener then recreates the JMS Connection, Session, etc on another node and the application
+     can continue.</p>
+     <p>Application-Layer failover is an alternative approach to High Availabilty (HA).</p>
+     <p>Application-Layer failover differs from automatic failover in that some client side coding is required in order
+     to implement this. Also, with Application-Layer failover, since the old Session object dies and a new is created, any uncommitted
+     work in the old Session will be lost, and any unacknowledged messages might be redelivered.</p>    
+     <p>For more information on JBoss Messaging failover and HA, and clustering in general, please see the clustering
+     section of the user manual.</p>      
+     <h2>Example step-by-step</h2>
+     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
+     <p>In this example, the live server is server 1, which will failover onto server 0.</p>
+     <p>The connection will initially be created to server1, server 1 will crash, and the client will carry on
+     on server 0, the new  server. With Application-Layer failover the node that is failed over onto, does not need to
+     be specially configured as a backup server, it can be any node.</p>
+     <br>
+     <ol>
+        <li> We create our JMS Connection, Session, MessageProducer and MessageConsumer on server 1</li>
+        <pre>
+           <code>createJMSObjects(1);</code>
+        </pre>
+
+        <li>We set a JMS ExceptionListener on the connection. On failure this will be called and the connection,
+         session, etc. will be manually recreated on the backup node.</li>
+        <pre>
+           <code>connection.setExceptionListener(new ExampleListener());</code>
+        </pre>
+
+        <li>We send some messages to server 1, the live server.</li>
+        <pre>
+           <code>
+         final int numMessages = 10;
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message = session.createTextMessage("This is text message " + i);
+
+            producer.send(message);
+
+            System.out.println("Sent message: " + message.getText());
+         }
+           </code>
+        </pre>
+
+        <li>We consume those messages on server 1.</li>
+        <pre>
+          <code>
+          for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message0 = (TextMessage)consumer.receive(5000);
+
+            System.out.println("Got message: " + message0.getText());
+         }
+          </code>
+        </pre>
+        
+        <li>We now cause server 1, the live server to crash. After a little while the connection's
+            ExceptionListener will register the failure and reconnection will occur.</li>
+        <pre>
+           <code>killServer(1);</code>
+        </pre>
+        
+        <li>The connection's ExceptionListener gets called, and we lookup the JMS objects and
+        recreate the connection, session, etc on the other node 0.</li>
+        <pre>
+           <code>
+   private class ExampleListener implements ExceptionListener
+   {
+      public void onException(JMSException exception)
+      {
+         try
+         {
+            // Close the old resources
+
+            closeResources();
+
+            // Create new JMS objects on the backup server
+
+            createJMSObjects(0);
+
+            failoverLatch.countDown();
+         }
+         catch (Exception e)
+         {
+            System.err.println("Failed to handle failover");
+
+            e.printStackTrace();
+         }
+      }
+   }   
+           </code>
+        </pre>
+
+        <li>We are now connected to the other node. We now send some more messages.</li>
+        <pre>
+           <code>
+   for (int i = numMessages; i < numMessages * 2; i++)
+         {
+            TextMessage message = session.createTextMessage("This is text message " + i);
+
+            producer.send(message);
+
+            System.out.println("Sent message: " + message.getText());
+         }
+           </code>
+        </pre>
+        
+        <li>And consume them.</li>
+        <pre>
+           <code>
+   for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message0 = (TextMessage)consumer.receive(5000);
+
+            System.out.println("Got message: " + message0.getText());
+         }
+           </code>
+        </pre>
+
+
+        <li>And finally (no pun intended), <b>always</b> remember to close your resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
+
+        <pre>
+           <code>
+	finally
+	{
+	   closeResources();
+	}
+           </code>
+        </pre>
+
+     </ol>
+  </body>
+</html>
\ No newline at end of file

Added: trunk/examples/jms/application-layer-failover/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/application-layer-failover/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server0/client-jndi.properties	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/application-layer-failover/server0/jbm-configuration.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server0/jbm-configuration.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server0/jbm-configuration.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,28 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
+   <configuration>
+
+      <clustered>true</clustered>
+      
+      <!-- Connectors -->
+
+      <connector name="netty-connector">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5445" type="Integer"/>
+      </connector>
+      
+      <!-- Acceptors -->
+
+      <acceptor name="netty-acceptor">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5445" type="Integer"/>
+      </acceptor>
+
+      <!-- Other config -->
+
+      <journal-min-files>2</journal-min-files>
+
+   </configuration>
+
+</deployment>

Added: trunk/examples/jms/application-layer-failover/server0/jbm-jms.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server0/jbm-jms.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server0/jbm-jms.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,18 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-jms.xsd ">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <connector-ref connector-name="netty-connector"/>
+      <entry name="ConnectionFactory"/>
+      <entry name="XAConnectionFactory"/>
+      <entry name="java:/ConnectionFactory"/>
+      <entry name="java:/XAConnectionFactory"/>
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</deployment>

Added: trunk/examples/jms/application-layer-failover/server0/jbm-queues.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server0/jbm-queues.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server0/jbm-queues.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,15 @@
+<settings xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-queues.xsd ">
+
+   <!--security for example queue-->
+   <security match="jms.queue.exampleQueue">
+      <permission type="createDurableQueue" roles="guest"/>
+      <permission type="deleteDurableQueue" roles="guest"/>
+      <permission type="createTempQueue" roles="guest"/>
+      <permission type="deleteTempQueue" roles="guest"/>
+      <permission type="consume" roles="guest"/>
+      <permission type="send" roles="guest"/>
+   </security>
+
+</settings>

Added: trunk/examples/jms/application-layer-failover/server0/jbm-security.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server0/jbm-security.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server0/jbm-security.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,7 @@
+<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-security.xsd ">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/application-layer-failover/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server0/jbm-standalone-beans.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server0/jbm-standalone-beans.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+   <!-- JNDI server. Disable this if you don't want JNDI -->
+   <bean name="JNDIServer" class="org.jnp.server.Main">
+      <property name="namingInfo">
+         <inject bean="Naming"/>
+      </property>
+      <property name="port">1099</property>
+      <property name="bindAddress">localhost</property>
+      <property name="rmiPort">1098</property>
+      <property name="rmiBindAddress">localhost</property>
+   </bean>
+   
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+	<!-- The security manager -->
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl"> 
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="JBMSecurityManager"/>
+         </parameter>        
+      </constructor>         
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="MessagingServer"/>
+         </parameter>         
+      </constructor>
+   </bean>
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/application-layer-failover/server1/client-jndi.properties
===================================================================
--- trunk/examples/jms/application-layer-failover/server1/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server1/client-jndi.properties	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:2099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/application-layer-failover/server1/jbm-configuration.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server1/jbm-configuration.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server1/jbm-configuration.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,28 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
+   <configuration>
+
+      <clustered>true</clustered>
+      
+      <!-- Connectors -->
+
+      <connector name="netty-connector">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5446" type="Integer"/>
+      </connector>
+      
+      <!-- Acceptors -->
+
+      <acceptor name="netty-acceptor">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5446" type="Integer"/>
+      </acceptor>
+
+      <!-- Other config -->
+
+      <journal-min-files>2</journal-min-files>
+
+   </configuration>
+
+</deployment>

Added: trunk/examples/jms/application-layer-failover/server1/jbm-jms.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server1/jbm-jms.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server1/jbm-jms.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,18 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-jms.xsd ">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <connector-ref connector-name="netty-connector"/>
+      <entry name="ConnectionFactory"/>
+      <entry name="XAConnectionFactory"/>
+      <entry name="java:/ConnectionFactory"/>
+      <entry name="java:/XAConnectionFactory"/>
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</deployment>

Added: trunk/examples/jms/application-layer-failover/server1/jbm-queues.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server1/jbm-queues.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server1/jbm-queues.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,15 @@
+<settings xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-queues.xsd ">
+
+   <!--security for example queue-->
+   <security match="jms.queue.exampleQueue">
+      <permission type="createDurableQueue" roles="guest"/>
+      <permission type="deleteDurableQueue" roles="guest"/>
+      <permission type="createTempQueue" roles="guest"/>
+      <permission type="deleteTempQueue" roles="guest"/>
+      <permission type="consume" roles="guest"/>
+      <permission type="send" roles="guest"/>
+   </security>
+
+</settings>

Added: trunk/examples/jms/application-layer-failover/server1/jbm-security.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server1/jbm-security.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server1/jbm-security.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,7 @@
+<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-security.xsd ">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/application-layer-failover/server1/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/server1/jbm-standalone-beans.xml	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/server1/jbm-standalone-beans.xml	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+   <!-- JNDI server. Disable this if you don't want JNDI -->
+   <bean name="JNDIServer" class="org.jnp.server.Main">
+      <property name="namingInfo">
+         <inject bean="Naming"/>
+      </property>
+      <property name="port">2099</property>
+      <property name="bindAddress">localhost</property>
+      <property name="rmiPort">2098</property>
+      <property name="rmiBindAddress">localhost</property>
+   </bean>
+   
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+	<!-- The security manager -->
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl"> 
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="JBMSecurityManager"/>
+         </parameter>        
+      </constructor>         
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="MessagingServer"/>
+         </parameter>         
+      </constructor>
+   </bean>
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/application-layer-failover/src/org/jboss/jms/example/ApplicationLayerFailoverExample.java
===================================================================
--- trunk/examples/jms/application-layer-failover/src/org/jboss/jms/example/ApplicationLayerFailoverExample.java	                        (rev 0)
+++ trunk/examples/jms/application-layer-failover/src/org/jboss/jms/example/ApplicationLayerFailoverExample.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,218 @@
+/*
+   * 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 java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+/**
+ * A simple example that demonstrates application-layer failover of the JMS connection from one node to another
+ * when the live server crashes
+ *
+ * @author <a href="tim.fox at jboss.com>Tim Fox</a>
+ */
+public class ApplicationLayerFailoverExample extends JMSExample
+{
+   public static void main(String[] args)
+   {
+      new ApplicationLayerFailoverExample().run(args);
+   }
+
+   private volatile InitialContext initialContext;
+
+   private volatile Connection connection;
+
+   private volatile Session session;
+
+   private volatile MessageConsumer consumer;
+
+   private volatile MessageProducer producer;
+
+   private final CountDownLatch failoverLatch = new CountDownLatch(1);
+
+   public boolean runExample() throws Exception
+   {
+      try
+      {
+         // Step 1. We create our JMS Connection, Session, MessageProducer and MessageConsumer on server 1.
+         createJMSObjects(1);
+
+         // Step 2. We set a JMS ExceptionListener on the connection. On failure this will be called and the connection,
+         // session, etc. will be then recreated on the backup node.
+         connection.setExceptionListener(new ExampleListener());
+
+         System.out.println("The initial JMS objects have been created, and the ExceptionListener set");
+
+         // Step 3. We send some messages to server 1, the live server
+
+         final int numMessages = 10;
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message = session.createTextMessage("This is text message " + i);
+
+            producer.send(message);
+
+            System.out.println("Sent message: " + message.getText());
+         }
+
+         // Step 4. We consume those messages on server 1.
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message0 = (TextMessage)consumer.receive(5000);
+
+            System.out.println("Got message: " + message0.getText());
+         }
+
+         // Step 5. We now cause server 1, the live server to crash. After a little while the connection's
+         // ExceptionListener will register the failure and reconnection will occur.
+
+         System.out.println("Killing the server");
+
+         killServer(1);
+
+         // Step 6. Wait for the client side to register the failure and reconnect
+
+         boolean ok = failoverLatch.await(5000, TimeUnit.MILLISECONDS);
+
+         if (!ok)
+         {
+            return false;
+         }
+
+         System.out.println("Reconnection has occurred. Now sending more messages.");
+
+         // Step 8. We now send some more messages
+
+         for (int i = numMessages; i < numMessages * 2; i++)
+         {
+            TextMessage message = session.createTextMessage("This is text message " + i);
+
+            producer.send(message);
+
+            System.out.println("Sent message: " + message.getText());
+         }
+
+         // Step 9. And consume them.
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message0 = (TextMessage)consumer.receive(5000);
+
+            System.out.println("Got message: " + message0.getText());
+         }
+
+         return true;
+      }
+      finally
+      {
+         // Step 14. Be sure to close our resources!
+
+         closeResources();
+      }
+   }
+
+   private void createJMSObjects(final int server) throws Exception
+   {
+      // Step 1. Get an initial context for looking up JNDI from the server
+      initialContext = getContext(server);
+
+      // Step 2. Look-up the JMS Queue object from JNDI
+      Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+
+      // Step 3. Look-up a JMS Connection Factory object from JNDI on server 1
+      ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+
+      // Step 4. We create a JMS Connection connection
+      connection = connectionFactory.createConnection();
+
+      // Step 6. We start the connection to ensure delivery occurs
+      connection.start();
+
+      // Step 5. We create a JMS Session
+      session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+      // Step 7. We create a JMS MessageConsumer object
+      consumer = session.createConsumer(queue);
+
+      // Step 8. We create a JMS MessageProducer object
+      producer = session.createProducer(queue);
+   }
+
+   private void closeResources() throws Exception
+   {
+      if (initialContext != null)
+      {
+         initialContext.close();
+      }
+
+      if (connection != null)
+      {
+         connection.close();
+      }
+   }
+
+   private class ExampleListener implements ExceptionListener
+   {
+      public void onException(JMSException exception)
+      {
+         try
+         {
+            // Step 7. The ExceptionListener gets called and we recreate the JMS objects on the new node
+
+            System.out.println("Connection failure has been detected on a the client.");
+
+            // Close the old resources
+
+            // closeResources();
+
+            System.out.println("The old resources have been closed.");
+
+            // Create new JMS objects on the backup server
+
+            createJMSObjects(0);
+
+            System.out.println("The new resources have been created.");
+
+            failoverLatch.countDown();
+         }
+         catch (Exception e)
+         {
+            System.err.println("Failed to handle failover");
+
+            e.printStackTrace();
+         }
+      }
+   }
+}

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-14 11:54:47 UTC (rev 6418)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -60,7 +60,7 @@
       {
          if (runServer)
          {
-            startServer(serverVMArgs, args, logServerOutput);
+            startServers(serverVMArgs, args, logServerOutput);
          }
          if (!runExample())
          {
@@ -109,11 +109,12 @@
    {
       System.out.println("Killing server " + id);
       
-      servers[id].destroy();
+      //We kill the server by creating a new file in the server dir which is checked for by the server
+      //We can't use Process.destroy() since this does not do a hard kill - it causes shutdown hooks
+      //to be called which cleanly shutdown the server
+      File file = new File("server" + id + "/KILL_ME");
       
-      int exitValue = servers[id].waitFor();
-      
-      log.info("Process exited with value " + exitValue);
+      file.createNewFile();
    }
    
    protected InitialContext getContext(int serverId) throws Exception
@@ -138,7 +139,7 @@
       return new InitialContext(props);
    }
   
-   private void startServer(String[] vmArgs, String[] args, boolean logServerOutput) throws Throwable
+   private void startServers(String[] vmArgs, String[] args, boolean logServerOutput) throws Throwable
    {
       List<String> allVMArgsList = new ArrayList<String>();
       if (vmArgs != null)

Added: trunk/examples/jms/common/src/org/jboss/jms/example/KillChecker.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/KillChecker.java	                        (rev 0)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/KillChecker.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, 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 java.io.File;
+
+/**
+ * A KillChecker
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class KillChecker extends Thread
+{
+   private final File file;
+   
+   public KillChecker(final String dir)
+   {      
+      file = new File(dir + "/KILL_ME");
+   }
+   
+   @Override
+   public void run()
+   {      
+      while (true)
+      {    
+         if (file.exists())
+         {
+            //Hard kill the VM without running any shutdown hooks
+            
+            //Goodbye!
+            
+            Runtime.getRuntime().halt(666);
+         }
+         
+         try
+         {
+            Thread.sleep(50);
+         }
+         catch (Exception ignore)
+         {         
+         }
+      }
+   }  
+}

Modified: trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java	2009-04-14 11:54:47 UTC (rev 6418)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedJMSServer.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -33,6 +33,10 @@
       JBMBootstrapServer bootstrap;
       try
       {
+         Thread killChecker = new KillChecker(".");
+         killChecker.setDaemon(true);
+         killChecker.start();
+         
          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("org.jboss.logging.Logger.pluginClass", "org.jboss.messaging.integration.logging.JBMLoggerPlugin");

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java	2009-04-14 11:54:47 UTC (rev 6418)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -65,7 +65,7 @@
  *          $Id$
  */
 public class JBossConnection implements Connection, QueueConnection, TopicConnection, XAConnection, XAQueueConnection,
-                                        XATopicConnection
+         XATopicConnection
 {
    // Constants ------------------------------------------------------------------------------------
 
@@ -280,9 +280,9 @@
          finally
          {
             if (initialSession != null)
-               {
-                  initialSession.close();
-               }
+            {
+               initialSession.close();
+            }
          }
 
          closed = true;
@@ -501,8 +501,7 @@
    {
       try
       {
-         initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0);
-         initialSession.addFailureListener(listener);
+         initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0);        
       }
       catch (MessagingException me)
       {

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java	2009-04-14 11:54:47 UTC (rev 6418)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -358,7 +358,6 @@
       this.failoverOnServerShutdown = ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
    }
 
-   
    public JBossConnectionFactory(final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
                                  final boolean blockOnAcknowledge,
                                  final boolean blockOnNonPersistentSend,
@@ -389,11 +388,11 @@
       this.maxConnections = ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
       this.preAcknowledge = preAcknowledge;
       this.retryInterval = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL;
-      this.retryIntervalMultiplier = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER;      
+      this.retryIntervalMultiplier = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER;
       this.reconnectAttempts = ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS;
       this.failoverOnServerShutdown = ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
    }
-   
+
    public JBossConnectionFactory(final TransportConfiguration connectorConfig)
    {
       this.discoveryGroupAddress = null;
@@ -532,12 +531,12 @@
    {
       return dupsOKBatchSize;
    }
-   
+
    public int getTransactionBatchSize()
    {
       return transactionBatchSize;
    }
-   
+
    public long getConnectionTTL()
    {
       return connectionTTL;
@@ -567,22 +566,22 @@
    {
       return minLargeMessageSize;
    }
-   
+
    public int getMaxConnections()
    {
       return maxConnections;
    }
-   
+
    public int getReconnectAttempts()
    {
       return reconnectAttempts;
    }
-   
+
    public boolean isFailoverOnServerShutdown()
    {
       return failoverOnServerShutdown;
    }
-   
+
    public boolean isBlockOnAcknowledge()
    {
       return blockOnAcknowledge;
@@ -612,7 +611,7 @@
    {
       return retryInterval;
    }
-   
+
    public double getRetryIntervalMultiplier()
    {
       return retryIntervalMultiplier;
@@ -638,15 +637,17 @@
       {
          throw JMSExceptionHelper.convertFromMessagingException(me);
       }
+
       JBossConnection connection = new JBossConnection(username,
-                                 password,
-                                 type,
-                                 clientID,
-                                 dupsOKBatchSize,
-                                 transactionBatchSize,
-                                 sessionFactory);
+                                                       password,
+                                                       type,
+                                                       clientID,
+                                                       dupsOKBatchSize,
+                                                       transactionBatchSize,
+                                                       sessionFactory);
 
       connection.authorize();
+      
       return connection;
    }
 

Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-04-14 11:54:47 UTC (rev 6418)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-04-14 14:14:59 UTC (rev 6419)
@@ -59,7 +59,7 @@
 
    private static final String PRODUCER_MAX_RATE_ELEMENT = "producer-max-rate";
 
-   private static final String BIG_MESSAGE_ELEMENT = "big-message-size";
+   private static final String MIN_LARGE_MESSAGE_SIZE = "min-large-message-size";
 
    private static final String BLOCK_ON_ACKNOWLEDGE_ELEMENT = "block-on-acknowledge";
 
@@ -73,15 +73,13 @@
 
    private static final String PRE_ACKNOWLEDGE_ELEMENT = "pre-acknowledge";
 
-   private static final String RETRY_ON_FAILURE_ELEMENT = "retry-on-failure";
-
    private static final String RETRY_INTERVAL = "retry-interval";
 
    private static final String RETRY_INTERVAL_MULTIPLIER = "retry-interval-multiplier";
 
    private static final String CONNECT_ATTEMPTS = "reconnect-attempts";
    
-   private static final String FAILOVER_ON_NODE_SHUTDOWN = "failover-on-node-shutdown";
+   private static final String FAILOVER_ON_NODE_SHUTDOWN = "failover-on-server-shutdown";
 
    private static final String CONNECTOR_LINK_ELEMENT = "connector-ref";
 
@@ -210,7 +208,7 @@
             {
                producerMaxRate = org.jboss.messaging.utils.XMLUtil.parseInt(child);
             }
-            else if (BIG_MESSAGE_ELEMENT.equals(child.getNodeName()))
+            else if (MIN_LARGE_MESSAGE_SIZE.equals(child.getNodeName()))
             {
                minLargeMessageSize = org.jboss.messaging.utils.XMLUtil.parseInt(child);
             }
@@ -250,10 +248,6 @@
             {
                preAcknowledge = org.jboss.messaging.utils.XMLUtil.parseBoolean(child);;
             }
-            else if (RETRY_ON_FAILURE_ELEMENT.equals(child.getNodeName()))
-            {
-               preAcknowledge = org.jboss.messaging.utils.XMLUtil.parseBoolean(child);;
-            }
             else if (RETRY_INTERVAL.equals(child.getNodeName()))
             {
                retryInterval = org.jboss.messaging.utils.XMLUtil.parseInt(child);;
@@ -276,6 +270,14 @@
                
                jndiBindings.add(jndiName);
             }
+            else if (CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME_ELEMENT.equals(child.getNodeName()))
+            {
+               connectionLoadBalancingPolicyClassName = child.getTextContent().trim();
+            }
+            else if (DISCOVERY_INITIAL_WAIT_ELEMENT.equals(child.getNodeName()))
+            {
+               discoveryInitialWait = org.jboss.messaging.utils.XMLUtil.parseInt(child);
+            }
             else if (CONNECTOR_LINK_ELEMENT.equals(child.getNodeName()))
             {
                String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
@@ -321,15 +323,7 @@
 
                   return;
                }
-            }
-            else if (CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME_ELEMENT.equals(child.getNodeName()))
-            {
-               connectionLoadBalancingPolicyClassName = child.getTextContent().trim();
-            }
-            else if (DISCOVERY_INITIAL_WAIT_ELEMENT.equals(child.getNodeName()))
-            {
-               discoveryInitialWait = org.jboss.messaging.utils.XMLUtil.parseInt(child);
-            }
+            }            
          }
 
          String name = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();

Modified: trunk/src/schemas/jbm-jms.xsd
===================================================================
--- trunk/src/schemas/jbm-jms.xsd	2009-04-14 11:54:47 UTC (rev 6418)
+++ trunk/src/schemas/jbm-jms.xsd	2009-04-14 14:14:59 UTC (rev 6419)
@@ -35,34 +35,37 @@
             <xsd:element name="entry" type="entryType"
    				maxOccurs="unbounded" minOccurs="1">
    			</xsd:element>
-   			<xsd:element name="ping-period" type="period"
+   			<xsd:element name="ping-period" type="xsd:unsignedLong"
    				maxOccurs="1" minOccurs="0">
    			</xsd:element>
-            <xsd:element name="call-timeout" type="period"
+   			<xsd:element name="connection-ttl" type="xsd:unsignedLong"
+   				maxOccurs="1" minOccurs="0">
+   			</xsd:element>
+   			 <xsd:element name="call-timeout" type="xsd:unsignedLong"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
-            <xsd:element name="client-id" type="xsd:string"
+            <xsd:element name="consumer-window-size" type="xsd:positiveInteger"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
-            <xsd:element name="dups-ok-batch-size" type="xsd:unsignedLong"
+            <xsd:element name="consumer-max-rate" type="xsd:positiveInteger"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
-            <xsd:element name="transaction-batch-size" type="xsd:unsignedLong"
-                maxOccurs="1" minOccurs="0">
-            </xsd:element>
             <xsd:element name="producer-window-size" type="xsd:positiveInteger"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
-            <xsd:element name="producer-max-rate" type="xsd:int"
+            <xsd:element name="producer-max-rate" type="xsd:positiveInteger"
                 maxOccurs="1" minOccurs="0">
-            </xsd:element>
-            <xsd:element name="big-message-size" type="xsd:positiveInteger"
+            </xsd:element>            
+   			<xsd:element name="min-large-message-size" type="xsd:unsignedLong"
+   				maxOccurs="1" minOccurs="0">
+   			</xsd:element>   			          
+            <xsd:element name="client-id" type="xsd:string"
                 maxOccurs="1" minOccurs="0">
-            </xsd:element>
-            <xsd:element name="consumer-window-size" type="xsd:positiveInteger"
+            </xsd:element>            
+            <xsd:element name="dups-ok-batch-size" type="xsd:positiveInteger"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
-            <xsd:element name="consumer-max-rate" type="xsd:int"
+            <xsd:element name="transaction-batch-size" type="xsd:positiveInteger"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
             <xsd:element name="block-on-acknowledge" type="xsd:boolean"
@@ -77,9 +80,30 @@
             <xsd:element name="auto-group-id" type="xsd:boolean"
                 maxOccurs="1" minOccurs="0">
             </xsd:element>
-   			<xsd:element name="pre-acknowledge" type="xsd:boolean"
+            <xsd:element name="max-connections" type="xsd:positiveInteger"
+                maxOccurs="1" minOccurs="0">
+            </xsd:element>
+            <xsd:element name="pre-acknowledge" type="xsd:boolean"
    				maxOccurs="1" minOccurs="0">
    			</xsd:element>
+            <xsd:element name="retry-interval" type="xsd:unsignedLong"
+   				maxOccurs="1" minOccurs="0">
+   			</xsd:element>
+   			<xsd:element name="retry-interval-multiplier" type="xsd:float"
+   				maxOccurs="1" minOccurs="0">
+   			</xsd:element>            
+            <xsd:element name="connect-attempts" type="xsd:positiveInteger"
+                maxOccurs="1" minOccurs="0">
+            </xsd:element>
+            <xsd:element name="failover-on-server-shutdown" type="xsd:boolean"
+                maxOccurs="1" minOccurs="0">
+            </xsd:element>
+            <xsd:element name="load-balancing-policy-class-name" type="xsd:string"
+                maxOccurs="1" minOccurs="0">
+            </xsd:element> 
+            <xsd:element name="discovery-initial-wait" type="xsd:unsignedLong"
+   				maxOccurs="1" minOccurs="0">
+   			</xsd:element>
    		</xsd:sequence>
    		<xsd:attribute name="name" type="xsd:string"></xsd:attribute>
    	</xsd:complexType>
@@ -101,8 +125,6 @@
     </xsd:complexType>
 
     <xsd:element name="queue" type="destinationType"></xsd:element>
-
-
     
     <xsd:complexType name="destinationType">
     	<xsd:sequence>
@@ -113,8 +135,4 @@
 
     <xsd:element name="topic" type="destinationType"></xsd:element>
     
-    <xsd:simpleType name="period">
-        <xsd:restriction base="xsd:unsignedLong"></xsd:restriction>
-    </xsd:simpleType>
-    
 </xsd:schema>




More information about the jboss-cvs-commits mailing list