[jboss-svn-commits] JBL Code SVN: r17432 - in labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product: etc/schemas/xml and 24 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Dec 29 05:46:06 EST 2007


Author: beve
Date: 2007-12-29 05:46:05 -0500 (Sat, 29 Dec 2007)
New Revision: 17432

Added:
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java
Removed:
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java
Modified:
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/docs/ProgrammersGuide.odt
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/standalone/jbossesb-server-base.zip
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
Log:
Work for JBESB-1404 "Support for JMS authentication". (Merge from main trunk).


Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2007-12-29 10:46:05 UTC (rev 17432)
@@ -608,6 +608,24 @@
 					</xsd:documentation>
 				</xsd:annotation>
 			</xsd:attribute>
+			<xsd:attribute 
+				name="jms-security-principal" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						JMS destination username. Will be used when creating a connection
+						to the destination.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute 
+				name="jms-security-credential" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						JMS destination password. Will be used when creating a connection
+						to the destination. Will be ignored if username is not specified.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
 		</xsd:complexType>
 	</xsd:element>
 	<xsd:element name="jms-bus" substitutionGroup="jesb:bus">

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/standalone/jbossesb-server-base.zip
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -152,9 +152,9 @@
 
                     try {
                         if (JMSEpr.QUEUE_TYPE.equals(sType)) {
-                            jmsSession = getConnectionPool().getQueueSession();
+                            jmsSession = getConnectionPool().getQueueSession(acknowledgeMode);
                         } else {
-                            jmsSession = getConnectionPool().getTopicSession();
+                            jmsSession = getConnectionPool().getTopicSession(acknowledgeMode);
                         }
                     } catch (NamingException e) {
                         throw new CourierException("Failed to get JMS Session from pool.", e);
@@ -366,11 +366,15 @@
                     String sFactoryClass;
                     String sType;
                     Properties properties;
+                    String username;
+                    String password;
 
                     try {
                         sFactoryClass = _epr.getConnectionFactory();
                         sType = _epr.getDestinationType();
                         properties = _epr.getJndiEnvironment();
+                        username = _epr.getJMSSecurityPrincipal();
+                        password = _epr.getJMSSecurityCredential();
                     } catch (URISyntaxException e) {
                         throw new ConnectionException("Unexpected exception while getting JMS connection pool.", e);
                     }
@@ -379,7 +383,7 @@
                         sFactoryClass = "ConnectionFactory";
                     }
 
-                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType);
+                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password);
                 }
             }
         }

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -66,20 +66,28 @@
 	
     /** Maximum number of Sessions that will be created in this pool */
     private int MAX_SESSIONS = DEFAULT_POOL_SIZE;    //TODO Make this manageable
+    
     /** Time to sleep when trying to get a session. */
     private int SLEEP_TIME = DEFAULT_SLEEP;
-    /** Number of free sessions in the pool that can be given out. Indexed by acknowledge mode */
+    
+    /** Number of free sessions in the pool that can be given out. Indexed by session key */
     private Map<Integer,ArrayList<Session>> freeSessionsMap = new HashMap<Integer,ArrayList<Session>>();
-    /** Number of session that are currently in use. Indexed by acknowledge mode */
+    
+    /** Number of session that are currently in use. Indexed by session key mode */
     private Map<Integer,ArrayList<Session>> inUseSessionsMap = new HashMap<Integer,ArrayList<Session>>();
+    
     /** Reference to a Queue or Topic Connection, we only need one per pool */
     private Connection jmsConnection = null;
+    
     /** The Indentifier of the pool */
     private Map<String, String> poolKey;
+    
     /** Logger */
     private Logger logger = Logger.getLogger(this.getClass());
+    
     /** Context, which is cached until we encounter a naming exception, or the pool is rebuild */
     private Context jndiContext;
+    
     /**
      * Contructor of the pool.
      * 
@@ -133,13 +141,19 @@
                 jndiContext = NamingContext.getFreshServerContext(JmsConnectionPoolContainer.getJndiEnvironment(poolKey));
                 factoryConnection = jndiContext.lookup(connectionFactoryString);
             }
+            final String username = poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
+            final String password = poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
+            boolean useJMSSecurity = (username != null && password != null);
+            logger.debug( "JMS Security principal [" + username + "] using JMS Security : " + useJMSSecurity );
+            
             if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
                 QueueConnectionFactory factory = (QueueConnectionFactory) factoryConnection;
-                jmsConnection = factory.createQueueConnection();
+                jmsConnection = useJMSSecurity ? factory.createQueueConnection(username,password): factory.createQueueConnection();
             } else {
                 TopicConnectionFactory factory = (TopicConnectionFactory) factoryConnection;
-                jmsConnection = factory.createTopicConnection();
+                jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
             }
+            
             jmsConnection.setExceptionListener(new ExceptionListener() {
                 public void onException(JMSException arg0)
                 {
@@ -179,7 +193,7 @@
         boolean emitExpiry = logger.isDebugEnabled() ;
         for(;;) {
         	
-        	ArrayList<Session> freeSessions = freeSessionsMap.get( acknowledgeMode );
+        	ArrayList<Session> freeSessions = freeSessionsMap.get(acknowledgeMode );
         	ArrayList<Session> inUseSessions = inUseSessionsMap.get(acknowledgeMode);
             if (freeSessions.size() > 0)
             {

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -67,19 +67,38 @@
     public static JmsConnectionPool getPool(JMSEpr jmsEpr) throws ConnectionException, URISyntaxException
     {
         return getPool(jmsEpr.getJndiEnvironment()
-                , jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType());
+                , jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType(), jmsEpr.getJMSSecurityPrincipal(), jmsEpr.getJMSSecurityCredential());
     }
     /**
      * Returns the pool given the identifiers for the JMS provider.
      * 
-     * @param enviroment Comment me.
-     * @return
+     * @param enviroment 			- JNDI evironment for which a JMSConnectionPool should be retreived
+     * @param connectionFactory		- connectionfactory for which a JMSConnectionPool should be retreived
+     * @param destinationType		- destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
+     * @return <code>JmsConnectionPool</code>
      * @throws ConnectionException
      */
     public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType)
         throws ConnectionException
     {
-        Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType);
+    	return getPool(enviroment, connectionFactory, destinationType, null, null);
+    }
+    /**
+     * Returns the pool given the identifiers for the JMS provider.
+     * 
+     * @param enviroment 			- JNDI evironment for which a JMSConnectionPool should be retreived
+     * @param connectionFactory		- connectionfactory for which a JMSConnectionPool should be retreived
+     * @param destinationType		- destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
+     * @param username				- username that should be used to create the JMS Connection
+     * @param password				- password that should be used to create the JMS Connection
+     * @return <code>JmsConnectionPool</code>
+     * @throws ConnectionException
+     */
+    public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
+    		final String username, final String password)
+        throws ConnectionException
+    {
+        Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password);
         final Map<Map<String, String>, JmsConnectionPool> poolMap = getMap() ;
         if (poolMap.containsKey(poolKey)) {
             return poolMap.get(poolKey);
@@ -99,12 +118,33 @@
      */
     public static Map<String, String> createPoolKey(Properties  environment, String connectionFactory, String destinationType) 
     {
+    	return createPoolKey( environment, connectionFactory, destinationType, null, null );
+    }
+    /**
+     * Creates a poolKey using the identifying parameters
+     * 
+     * @param environment - the JNDI environment parameters
+     * @param connectionFactory
+     * @param destinationType
+     * @param username		the JMS username to be used. Used with  {@link javax.jms.ConnectionFactory } createConnection
+     * @param password		the JMS password to be used. Used with  {@link javax.jms.ConnectionFactory } createConnection
+     * @return
+     */
+    public static Map<String, String> createPoolKey(Properties  environment, String connectionFactory, String destinationType,
+    		final String username, final String password) 
+    {
         Map<String,String> poolKey = new HashMap<String,String>();
         if (environment!=null) {
             for (Object key : environment.keySet()) {
                 poolKey.put(key.toString(), environment.getProperty(key.toString()));
             }
         }
+        
+        if ( username != null && (!username.equals("null")) && password != null && (!password.equals("null")) ) {
+            poolKey.put(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, username);
+            poolKey.put(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, password);
+        }
+        
         if (connectionFactory!=null)  poolKey.put(JMSEpr.CONNECTION_FACTORY_TAG, connectionFactory);
         if (destinationType!=null)    poolKey.put(JMSEpr.DESTINATION_TYPE_TAG, destinationType);
         return poolKey;

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -383,14 +383,13 @@
         
         private void close() {
             try {
+	            pool.closeSession(jmsSession);
                 if (jmsProducer!=null) {
                     jmsProducer.close();                    
                 }
             } catch (Exception e) {
                 logger.error("Unable to close JMS Queue Setup.", e);
-            } finally {
-                pool.closeSession(jmsSession);
-            }
+            } 
         }
     }
 

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -53,6 +53,7 @@
 public class JMSEpr extends EPR
 {
 
+	@SuppressWarnings("unused")
 	private Logger log = Logger.getLogger( JMSEpr.class );
 	
 	public static final String JMS_PROTOCOL = "jms";
@@ -70,7 +71,7 @@
 	public static final String DESTINATION_NAME_TAG = "destination-name";
 
 	public static final String CONNECTION_FACTORY_TAG = "connection-factory";
-
+	
 	public static final String JNDI_PKG_PREFIX_TAG = "jndi-pkg-prefix";
 
 	public static final String JNDI_URL_TAG = "jndi-URL";
@@ -87,9 +88,63 @@
 	
 	public static final String PERSISTENT_TAG = "persistent";
 	
+	/**
+	 * JMS Client acknowledgment mode configuration tag
+	 */
 	public static final String ACKNOWLEDGE_MODE_TAG = "acknowledge-mode";
 	
-	private static final String DEFAULT_ACKNOWLEDGE_MODE = "AUTO_ACKNOWLEDGE";
+	/**
+	 * JMS Destination username. This is the username in the call to 
+	 *  {@link javax.jms.ConnectionFactory#createConnection(String, String) } 
+	 */
+	public static final String JMS_SECURITY_PRINCIPAL_TAG = "jms-security-principal";
+	
+	/**
+	 * JMS Destination password. This is the password in the call to 
+	 *  {@link javax.jms.ConnectionFactory#createConnection(String, String) } 
+	 */
+	public static final String JMS_SECURITY_CREDENTIAL_TAG = "jms-security-credential";
+	
+	/**
+	 * Enum to type-safe JMS Client Acknowledgement mode string
+	 * mappings to JMS Session's integers.
+	 */
+	public enum AcknowledgeMode 
+	{ 
+		CLIENT_ACKNOWLEDGE(Session.CLIENT_ACKNOWLEDGE), 
+		AUTO_ACKNOWLEDGE(Session.AUTO_ACKNOWLEDGE), 
+		DUPS_OK_ACKNOWLEDGE(Session.DUPS_OK_ACKNOWLEDGE);
+		
+		private static Logger log = Logger.getLogger(AcknowledgeMode.class);
+		
+		private int jmsAckModeInt;
+	
+		AcknowledgeMode(final int jmsAckModeInt)
+		{
+			this.jmsAckModeInt = jmsAckModeInt;
+		}
+		
+		public int getAcknowledgeModeInt()
+		{
+			return jmsAckModeInt;
+		}
+		
+		static public AcknowledgeMode getAckMode(final String ackMode)
+		{
+			if(ackMode != null)
+				try 
+				{
+					return  AcknowledgeMode.valueOf(ackMode);
+				} 
+				catch (IllegalArgumentException e)
+				{
+					log.warn("' " + ackMode + "' is invalid : " + ".Will use default '" + AcknowledgeMode.AUTO_ACKNOWLEDGE);
+				}
+			return AcknowledgeMode.AUTO_ACKNOWLEDGE;
+		}
+	} 
+	
+	private static final String DEFAULT_ACKNOWLEDGE_MODE = AcknowledgeMode.AUTO_ACKNOWLEDGE.toString();
 
 	public JMSEpr(EPR epr)
 	{
@@ -139,8 +194,14 @@
     				} else if (tag.equals(ACKNOWLEDGE_MODE_TAG)) {
                     	String ackMode = nl.item(i).getTextContent();
                     	getAddr().addExtension(ACKNOWLEDGE_MODE_TAG, String.valueOf(ackMode));
+    				} else if (tag.equals(JMS_SECURITY_PRINCIPAL_TAG)) {
+                    	String username = nl.item(i).getTextContent();
+                    	getAddr().addExtension(JMS_SECURITY_PRINCIPAL_TAG, String.valueOf(username));
+    				} else if (tag.equals(JMS_SECURITY_CREDENTIAL_TAG)) {
+                    	String password = nl.item(i).getTextContent();
+                    	getAddr().addExtension(JMS_SECURITY_CREDENTIAL_TAG, String.valueOf(password));
                     } else if (tag.equals(DESTINATION_TYPE_TAG)) { 
-	                                 getAddr().addExtension(DESTINATION_TYPE_TAG, nl.item(i).getTextContent()); 
+                         getAddr().addExtension(DESTINATION_TYPE_TAG, nl.item(i).getTextContent()); 
 	                   } 
 				}
 			}
@@ -239,10 +300,64 @@
 	{
 		this(protocol,destinationType,destinationName,connection,environment,messageSelector,peristent,DEFAULT_ACKNOWLEDGE_MODE);
 	}
+	
+	/**
+	 * Create a new JMS EPR.
+	 * 
+	 * @param protocol
+	 *            the protocol version.
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param environment
+	 *            reference to the jndi properties
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 * @param peristent
+	 *            true if messages should be sent persistently
+	 * @param acknowledgeModeStr
+	 *            JMS client acknowledgement mode
+	 */
 	public JMSEpr(String protocol, String destinationType,
 			String destinationName, String connection, Properties environment,
 			String messageSelector, boolean peristent, String acknowledgeModeStr)
 	{
+		this( protocol, destinationType, destinationName, connection, environment,
+				messageSelector, peristent, acknowledgeModeStr, null, null );
+	}
+	
+	/**
+	 * Create a new JMS EPR.
+	 * 
+	 * @param protocol
+	 *            the protocol version.
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param environment
+	 *            reference to the jndi properties
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 * @param peristent
+	 *            true if messages should be sent persistently
+	 * @param acknowledgeModeStr
+	 *            JMS client acknowledgement mode
+	 * @param username
+	 *            JMS destination username
+	 * @param password
+	 *            JMS destination password
+	 */
+	public JMSEpr(String protocol, String destinationType,
+			String destinationName, String connection, Properties environment,
+			String messageSelector, boolean peristent, String acknowledgeModeStr,
+			String username, String password)
+	{
 		// how many of these do we really need? modify accordingly.
 
 		if ((protocol == null) || (destinationType == null)
@@ -297,9 +412,16 @@
                 
 				addr.addExtension(PERSISTENT_TAG, String.valueOf(peristent));
 				
-				addr.addExtension(ACKNOWLEDGE_MODE_TAG, String.valueOf(getAcknowledgeMode(acknowledgeModeStr)));
+				addr.addExtension(ACKNOWLEDGE_MODE_TAG, String.valueOf(AcknowledgeMode.getAckMode(acknowledgeModeStr)));
 				
 				setAddr(addr);
+				
+				if(username != null)
+					addr.addExtension(JMS_SECURITY_PRINCIPAL_TAG, username);
+				
+				if(password != null)
+					addr.addExtension(JMS_SECURITY_CREDENTIAL_TAG, password);
+					
 			}
 			else
 				throw new IllegalArgumentException("Invalid destination type! "+destinationType);
@@ -408,16 +530,44 @@
 		return Boolean.parseBoolean(getAddr().getExtensionValue(PERSISTENT_TAG));
 	}
 	
+	/**
+	 * 
+	 * @return <code>int</code> JMS Acknowledge mode, one of:
+	 * <lu>
+	 * 		<li>{@link Session#AUTO_ACKNOWLEDGE}</li>
+	 * 		<li>{@link Session#CLIENT_ACKNOWLEDGE}</li>
+	 * 		<li>{@link Session#DUPS_OK_ACKNOWLEDGE}</li>
+	 * </lu>
+	 */
 	public final int getAcknowledgeMode()
 	{
-        try {
-            return Integer.valueOf(getAddr().getExtensionValue(ACKNOWLEDGE_MODE_TAG));
-        } catch (NullPointerException e) {
-            return Session.AUTO_ACKNOWLEDGE;
-        } catch (NumberFormatException e) {
-            return Session.AUTO_ACKNOWLEDGE;
-        }
+        AcknowledgeMode ackMode = AcknowledgeMode.getAckMode(getAddr().getExtensionValue(ACKNOWLEDGE_MODE_TAG));
+        return ackMode.getAcknowledgeModeInt();
     }
+	
+	/**
+	 * The JMS Security principal which is indended to be used as the username
+	 * argument to:
+	 *  {@link javax.jms.ConnectionFactory}.createConnection(String username, String password) } 
+	 * @return
+	 */
+	public final String getJMSSecurityPrincipal()
+	{
+		final String username = getAddr().getExtensionValue(JMS_SECURITY_PRINCIPAL_TAG);
+		return username == null || username.equals("null") ? null : username;
+	}
+	
+	/**
+	 * The JMS Security credential which is indended to be used as the password
+	 * argument to:
+	 *  {@link javax.jms.ConnectionFactory}.createConnection(String username, String password) } 
+	 * @return
+	 */
+	public final String getJMSSecurityCredential()
+	{
+		final String password = getAddr().getExtensionValue(JMS_SECURITY_CREDENTIAL_TAG);
+		return password == null || password.equals("null") ? null : password;
+	}
 
 	public EPR copy ()
 	{
@@ -449,23 +599,4 @@
 			throw new ExceptionInInitializerError(ex.toString());
 		}
 	}
-	
-	private int getAcknowledgeMode(final String acknowledgeModeStr)
-	{
-		log.debug( "'" + ACKNOWLEDGE_MODE_TAG + "' is : " + acknowledgeModeStr);
-		int acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
-		if ( acknowledgeModeStr != null )
-		{
-			if ( acknowledgeModeStr.equalsIgnoreCase( "AUTO_ACKNOWLEDGE") )
-        		acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
-			else if ( acknowledgeModeStr.equalsIgnoreCase( "CLIENT_ACKNOWLEDGE") )
-        		acknowledgeMode = Session.CLIENT_ACKNOWLEDGE;
-			else if ( acknowledgeModeStr.equalsIgnoreCase( "DUPS_OK_ACKNOWLEDGE") )
-        		acknowledgeMode = Session.DUPS_OK_ACKNOWLEDGE;
-			else
-				log.warn( "' " + ACKNOWLEDGE_MODE_TAG + "' was invalid : " + acknowledgeModeStr + ". Will use default '" + DEFAULT_ACKNOWLEDGE_MODE);
-		}
-		return acknowledgeMode;
-	}
-	
 }
\ No newline at end of file

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -48,7 +48,6 @@
 
 public class ListenerUtil
 {
-
     private static Logger logger = Logger.getLogger(ListenerUtil.class);
 
     private ListenerUtil()
@@ -137,11 +136,15 @@
 						+ JMSEpr.MESSAGE_SELECTOR_TAG + " attribute"
 						+ " -  All messages in queue <" + name
 						+ "> will be picked up by listener");
-			boolean persistent = Boolean.valueOf(tree.getAttribute(JMSEpr.PERSISTENT_TAG));
-			String acknowledgeMode = tree.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG);
 
-			JMSEpr epr = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL,type, name, jmsFactoryClass, environment, selector, persistent,acknowledgeMode);
-
+			final String username = tree.getAttribute(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG);
+			final String password = tree.getAttribute(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG);
+			JMSEpr epr = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL,type, name, jmsFactoryClass, environment, 
+					selector, 
+					Boolean.valueOf(tree.getAttribute(JMSEpr.PERSISTENT_TAG)),
+					tree.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG),
+					username,
+					password);
 			return epr;
 		}
 		catch (Exception e)

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -24,6 +24,7 @@
 import javax.jms.Queue;
 import javax.jms.Topic;
 
+import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.dom.YADOMUtil;
@@ -52,6 +53,8 @@
  */
 public class JmsListenerMapper {
 	
+	@SuppressWarnings("unused")
+	private static Logger log = Logger.getLogger( JmsListenerMapper.class );
 
 	/**
 	 * Perform the mapping.
@@ -142,6 +145,8 @@
 		toElement.setAttribute(JMSEpr.JNDI_URL_TAG, provider.getJndiURL());
 		toElement.setAttribute(JMSEpr.PERSISTENT_TAG, Boolean.toString( messageFilter.getPersistent()));
 		toElement.setAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG, messageFilter.getAcknowledgeMode());
+		toElement.setAttribute(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, messageFilter.getJmsSecurityPrincipal());
+		toElement.setAttribute(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, messageFilter.getJmsSecurityCredential());
 	}
 
     private static void mapJmsJcaAttributes(final JmsListener listener,

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -365,13 +365,24 @@
         String destType = _config.getAttribute(JMSEpr.DESTINATION_TYPE_TAG);
         boolean persistent = Boolean.valueOf( _config.getAttribute(JMSEpr.PERSISTENT_TAG));
         String acknowledgeMode = _config.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG);
+        
+        final String username =  _config.getAttribute( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
+        final String password =  _config.getAttribute( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
+        if ( username != null && password != null )
+        {
+	        environment.put( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, username );
+	        environment.put( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, password );
+        }
+        
         _myEpr = (null == _serviceName) ? null : new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, destType,
-                jmsDestinationName, sFactClass, environment, _messageSelector, persistent, acknowledgeMode);
-
-        jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, sFactClass, destType);
-
+            jmsDestinationName, sFactClass, environment, _messageSelector, persistent, acknowledgeMode,
+            username, password);
+        jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, sFactClass, destType,username, password);
+        	
         try {
-            jmsSession = jmsConnectionPool.getSession(Session.AUTO_ACKNOWLEDGE);
+            jmsSession = _myEpr != null ? jmsConnectionPool.getSession(((JMSEpr)_myEpr).getAcknowledgeMode()):
+            	jmsConnectionPool.getSession(Session.AUTO_ACKNOWLEDGE);
+        		
         }
         catch (NamingException ne) {
             throw new ConfigurationException("Failed to obtain queue session from pool", ne);

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta (from rev 17424, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling (from rev 17424, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling)

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2006, 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.
- */
-package org.jboss.internal.soa.esb.rosetta.pooling;
-
-import static org.junit.Assert.*;
-import static org.jboss.soa.esb.addressing.eprs.JMSEpr.*;
-
-import java.util.Map;
-import java.util.Properties;
-
-import javax.naming.Context;
-
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.junit.Test;
-
-import junit.framework.JUnit4TestAdapter;
-
-/**
- * Unit Test for JmsConnectionPoolContainer
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class JmsConnectionPoolContainerUnitTest
-{
-	private String connectionFactory = "/ConnectionFactory";
-	
-	@Test
-	public void createPoolKey_null_environment()
-	{
-		final Properties env = null;
-		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE );
-		
-		assertEquals( connectionFactory, poolKey.get( CONNECTION_FACTORY_TAG ) );
-		assertEquals( QUEUE_TYPE, poolKey.get( DESTINATION_TYPE_TAG ) );
-	}
-	
-	@Test
-	public void createPoolKey_with_naming_security_properties()
-	{
-		final String username = "daniel";
-		final String password = "passwd";
-		final Properties env = new Properties();
-		env.put( Context.SECURITY_PRINCIPAL, username );
-		env.put( Context.SECURITY_CREDENTIALS, password );
-		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE);
-		assertEquals( username, poolKey.get( Context.SECURITY_PRINCIPAL ) );
-		assertEquals( password, poolKey.get( Context.SECURITY_CREDENTIALS ) );
-	}
-	
-	@Test
-	public void createPoolKey_with_jms_security_properties()
-	{
-		final String username = "daniel";
-		final String password = "passwd";
-		final Properties env = null;
-		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
-				username, password);
-		assertEquals( username, poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG ) );
-		assertEquals( password, poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG ) );
-	}
-	
-	
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( JmsConnectionPoolContainerUnitTest.class );
-	}
-
-}

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java (from rev 17424, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, 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.
+ */
+package org.jboss.internal.soa.esb.rosetta.pooling;
+
+import static org.junit.Assert.*;
+import static org.jboss.soa.esb.addressing.eprs.JMSEpr.*;
+
+import java.util.Map;
+import java.util.Properties;
+
+import javax.naming.Context;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.junit.Test;
+
+import junit.framework.JUnit4TestAdapter;
+
+/**
+ * Unit Test for JmsConnectionPoolContainer
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class JmsConnectionPoolContainerUnitTest
+{
+	private String connectionFactory = "/ConnectionFactory";
+	
+	@Test
+	public void createPoolKey_null_environment()
+	{
+		final Properties env = null;
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE );
+		
+		assertEquals( connectionFactory, poolKey.get( CONNECTION_FACTORY_TAG ) );
+		assertEquals( QUEUE_TYPE, poolKey.get( DESTINATION_TYPE_TAG ) );
+	}
+	
+	@Test
+	public void createPoolKey_with_naming_security_properties()
+	{
+		final String username = "daniel";
+		final String password = "passwd";
+		final Properties env = new Properties();
+		env.put( Context.SECURITY_PRINCIPAL, username );
+		env.put( Context.SECURITY_CREDENTIALS, password );
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE);
+		assertEquals( username, poolKey.get( Context.SECURITY_PRINCIPAL ) );
+		assertEquals( password, poolKey.get( Context.SECURITY_CREDENTIALS ) );
+	}
+	
+	@Test
+	public void createPoolKey_with_jms_security_properties()
+	{
+		final String username = "daniel";
+		final String password = "passwd";
+		final Properties env = null;
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
+				username, password);
+		assertEquals( username, poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG ) );
+		assertEquals( password, poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG ) );
+	}
+	
+	
+	public static junit.framework.Test suite()
+	{
+		return new JUnit4TestAdapter( JmsConnectionPoolContainerUnitTest.class );
+	}
+
+}

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -21,19 +21,24 @@
  */
 package org.jboss.soa.esb.addressing.eprs;
 
+import static org.jboss.soa.esb.addressing.eprs.JMSEpr.*;
 import static org.junit.Assert.assertEquals;
 import java.net.URISyntaxException;
+import java.util.Properties;
 
 import javax.jms.Session;
+import javax.naming.Context;
 
 import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr.AcknowledgeMode;
 import org.jboss.soa.esb.couriers.CourierException;
 import org.junit.Test;
 
 /**
+ * Unit Test class for  JMSEpr
  * 
  * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
  */
 public class JMSEprUnitTest
 {
@@ -41,7 +46,11 @@
 	private String expectedConnectionFactory = "ConnectionFactory";
 	private String expectedDestinationType = JMSEpr.QUEUE_TYPE;
 	private String expectedSelector = "JMSCorrelationID=1000";
+	private static final boolean NON_PERSISTENT = false;
+	private static final boolean PERSISTENT = true;
 	
+	private final Properties nullEnvironment = null;
+	
 	@Test
 	public void contstructor_queue() throws CourierException, URISyntaxException
 	{
@@ -53,7 +62,7 @@
 	public void contstructor_props_and_selector() throws CourierException, URISyntaxException
 	{
 		JMSEpr jmsEpr = new JMSEpr( expectedDestinationType, expectedDestination , expectedConnectionFactory,
-				null, expectedSelector);
+				nullEnvironment, expectedSelector);
 		
 		assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
 		assertEquals( expectedSelector, jmsEpr.getMessageSelector() );
@@ -62,24 +71,35 @@
 	@Test
 	public void contstructor_persistent() throws CourierException, URISyntaxException
 	{
-		final String expectedVersion = JMSEpr.ONE_ONE_PROTOCOL;
-		boolean persistent = false;
-		JMSEpr jmsEpr = new JMSEpr( expectedVersion, expectedDestinationType, expectedDestination , 
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
 				expectedConnectionFactory,
-				null, expectedSelector, persistent);
+				nullEnvironment, expectedSelector, PERSISTENT);
 		
 		assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
-		assertEquals( expectedVersion, jmsEpr.getVersion() );
+		assertEquals( ONE_ONE_PROTOCOL, jmsEpr.getVersion() );
 		assertEquals( expectedSelector, jmsEpr.getMessageSelector() );
-		assertEquals( persistent, jmsEpr.getPersistent() );
+		assertEquals( PERSISTENT, jmsEpr.getPersistent() );
 	}
 	
 	@Test
+	public void contstructor_non_persistent() throws CourierException, URISyntaxException
+	{
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, NON_PERSISTENT);
+		
+		assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
+		assertEquals( ONE_ONE_PROTOCOL, jmsEpr.getVersion() );
+		assertEquals( expectedSelector, jmsEpr.getMessageSelector() );
+		assertEquals( NON_PERSISTENT, jmsEpr.getPersistent() );
+	}
+	
+	@Test
 	public void contstructor_acknowledeMode_default() throws CourierException, URISyntaxException
 	{
-		JMSEpr jmsEpr = new JMSEpr( JMSEpr.ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
 				expectedConnectionFactory,
-				null, expectedSelector, false);
+				nullEnvironment, expectedSelector, NON_PERSISTENT);
 		
 		assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
 		assertEquals( "Default acknowledemode should be AUTO_ACKNOWLEDGE", Session.AUTO_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
@@ -88,9 +108,10 @@
 	@Test
 	public void contstructor_acknowledeMode_negative_ackmode_null() throws CourierException, URISyntaxException
 	{
-		JMSEpr jmsEpr = new JMSEpr( JMSEpr.ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+		final String acknowledgeModeStr = null;
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
 				expectedConnectionFactory,
-				null, expectedSelector, false, null);
+				nullEnvironment, expectedSelector, NON_PERSISTENT, acknowledgeModeStr);
 		
 		assertEquals( Session.AUTO_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
 	}
@@ -98,25 +119,95 @@
 	@Test
 	public void contstructor_acknowledeMode_negative() throws CourierException, URISyntaxException
 	{
-		JMSEpr jmsEpr = new JMSEpr( JMSEpr.ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
 				expectedConnectionFactory,
-				null, expectedSelector, false, "BogusAckMode");
+				nullEnvironment, expectedSelector, NON_PERSISTENT, "BogusAckMode");
 		assertEquals( Session.AUTO_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
 	}
 	
 	@Test
 	public void contstructor_acknowledeMode_client_ack() throws CourierException, URISyntaxException
 	{
-		final String clientAck = "CLIENT_ACKNOWLEDGE";
-		
-		JMSEpr jmsEpr = new JMSEpr( JMSEpr.ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
 				expectedConnectionFactory,
-				null, expectedSelector, false, clientAck);
+				nullEnvironment, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString());
 		
 		assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
 		assertEquals( Session.CLIENT_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
 	}
 	
+	@Test
+	public void contstructor_with_naming_security_properties() throws CourierException, URISyntaxException
+	{
+		final String principal = "name";
+		final String credential = "password";
+		
+		final Properties env = new Properties();
+		env.put( Context.SECURITY_PRINCIPAL, principal );
+		env.put( Context.SECURITY_CREDENTIALS, credential );
+		
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				env, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString());
+		
+		assertEquals( principal, jmsEpr.getJndiEnvironment().getProperty( Context.SECURITY_PRINCIPAL ));
+		assertEquals( credential, jmsEpr.getJndiEnvironment().getProperty( Context.SECURITY_CREDENTIALS ));
+	}
+	
+	@Test
+	public void contstructor_with_jms_destination_security_negative() throws CourierException, URISyntaxException
+	{
+		final String username = null;
+		final String password = null;
+		
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString(),
+				username,
+				password);
+		
+		assertEquals( null, jmsEpr.getJMSSecurityPrincipal() );
+		assertEquals( null, jmsEpr.getJMSSecurityCredential() );
+	}
+	
+	@Test
+	public void contstructor_with_jms_destination_security() throws CourierException, URISyntaxException
+	{
+		final String username = "daniel";
+		final String password = "password";
+		
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString(),
+				username,
+				password);
+		
+		assertEquals( username, jmsEpr.getJMSSecurityPrincipal() );
+		assertEquals( password, jmsEpr.getJMSSecurityCredential() );
+	}
+	
+	@Test
+	public void acknowledgeEnumTest()
+	{
+		AcknowledgeMode ackMode = AcknowledgeMode.getAckMode( null );
+		assertEquals( AcknowledgeMode.AUTO_ACKNOWLEDGE, ackMode );
+		assertEquals( Session.AUTO_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
+		
+		ackMode = AcknowledgeMode.getAckMode( "bajja" );
+		assertEquals( Session.AUTO_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
+		
+		ackMode = AcknowledgeMode.getAckMode( "-100" );
+		assertEquals( Session.AUTO_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
+		
+		ackMode = AcknowledgeMode.getAckMode( "CLIENT_ACKNOWLEDGE" );
+		assertEquals( AcknowledgeMode.CLIENT_ACKNOWLEDGE, ackMode );
+		assertEquals( Session.CLIENT_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
+		
+		ackMode = AcknowledgeMode.getAckMode( "DUPS_OK_ACKNOWLEDGE" );
+		assertEquals( AcknowledgeMode.DUPS_OK_ACKNOWLEDGE, ackMode );
+		assertEquals( Session.DUPS_OK_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
+	}
+	
 	private void assertDefaults(final String destination, final String connectionFactory, final String destinationType)
 	{
 		assertEquals( expectedDestination, destination );

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java	2007-12-29 10:42:17 UTC (rev 17431)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -55,7 +55,6 @@
 	}
     
     @Test
-    @Ignore
     public void testPoolAndConnectionCreation()  throws Exception
     {
         JmsConnectionPool jmsConnectionPool = null;
@@ -89,28 +88,28 @@
     }
     
     @Test
-    @Ignore
     public void testCreateSecondPool() throws Exception
     {
-        JmsConnectionPool jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
-        jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
+        JmsConnectionPool jmsConnectionPool1 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
+        jmsConnectionPool1 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
         //This should be the same pool
         assertEquals(1, JmsConnectionPoolContainer.getNumberOfPools());
     
-        jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.TOPIC_TYPE);
+        JmsConnectionPool jmsConnectionPool2 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.TOPIC_TYPE);
         //This should be a different pool, so now we should have 2.
         assertEquals(2, JmsConnectionPoolContainer.getNumberOfPools());
         
-        jmsConnectionPool = JmsConnectionPoolContainer.getPool(null, "ConnectionFactory", JMSEpr.TOPIC_TYPE);
+        JmsConnectionPool jmsConnectionPool3 = JmsConnectionPoolContainer.getPool(null, "ConnectionFactory", JMSEpr.TOPIC_TYPE);
         //This should be a different pool, so now we should have 3.
         assertEquals(3, JmsConnectionPoolContainer.getNumberOfPools());
         
         //Now lets cleanup after ourselves
-        jmsConnectionPool.removeSessionPool();
+        jmsConnectionPool3.removeSessionPool();
         assertEquals(2, JmsConnectionPoolContainer.getNumberOfPools());
         
-        //Let's clean the rest up with a removeAll.
-        LifecycleResourceManager.getSingleton().cleanupAllResources() ;
+        jmsConnectionPool1.removeSessionPool();
+        jmsConnectionPool2.removeSessionPool();
+        jmsConnectionPool3.removeSessionPool();
         assertEquals(0, JmsConnectionPoolContainer.getNumberOfPools()); 
     }
     

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured)

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/build.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,44 +0,0 @@
-<project name="Quickstart_JMS_Secured" default="run" basedir=".">
-	
-	<description> 
-		${ant.project.name}
-		${line.separator}
-	</description>
-	
-	<!-- Import the base Ant build script... -->
-	<import file="../conf/base-build.xml"/>
-
-    <target name="quickstart-specific-deploys" depends="messaging-config">
-		<antcall target="jbm-deploys"/>
-		<antcall target="jbmq-deploys"/>
-    </target>
-
-	<target name="jbm-deploys" if="messaging.present">
-        <echo message="Copy message-roles.properties and message-user-properties to conf/props dir" />
-        <echo message="This will require a server restart unless running the jbossesb-server!"/>
-		<property name="org.jboss.esb.server.server.props" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/conf/props"/>
-		<copy todir="${org.jboss.esb.server.server.props}">
-			<fileset dir="${basedir}" includes="messaging-roles.properties" />
-			<fileset dir="${basedir}" includes="messaging-users.properties" />
-		</copy>
-    </target>
-
-	<target name="jbmq-deploys" if="jbossmq.present">
-		<property name="org.jboss.esb.server.jbmq.dir" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy/jms"/>
-		<copy todir="${org.jboss.esb.server.jbmq.dir}" overwrite="true">
-			<fileset dir="${basedir}" includes="hsqldb-jdbc-state-service.xml" />
-		</copy>
-	</target>
-
-
-	
-	<target name="runtest" depends="compile" 
-		description="sends a JMS message to queue/quickstart_jms_secured_Request_gw">
-		<echo>Runs Test JMS Sender</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.jmssecured.test.SendJMSMessage" failonerror="true">
-			<arg value="Hello Secured JMS World"/>
-			<classpath refid="exec-classpath"/>
-		</java>
-	</target>  
-	
-</project>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/build.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/build.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,44 @@
+<project name="Quickstart_JMS_Secured" default="run" basedir=".">
+	
+	<description> 
+		${ant.project.name}
+		${line.separator}
+	</description>
+	
+	<!-- Import the base Ant build script... -->
+	<import file="../conf/base-build.xml"/>
+
+    <target name="quickstart-specific-deploys" depends="messaging-config">
+		<antcall target="jbm-deploys"/>
+		<antcall target="jbmq-deploys"/>
+    </target>
+
+	<target name="jbm-deploys" if="messaging.present">
+        <echo message="Copy message-roles.properties and message-user-properties to conf/props dir" />
+        <echo message="This will require a server restart unless running the jbossesb-server!"/>
+		<property name="org.jboss.esb.server.server.props" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/conf/props"/>
+		<copy todir="${org.jboss.esb.server.server.props}">
+			<fileset dir="${basedir}" includes="messaging-roles.properties" />
+			<fileset dir="${basedir}" includes="messaging-users.properties" />
+		</copy>
+    </target>
+
+	<target name="jbmq-deploys" if="jbossmq.present">
+		<property name="org.jboss.esb.server.jbmq.dir" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy/jms"/>
+		<copy todir="${org.jboss.esb.server.jbmq.dir}" overwrite="true">
+			<fileset dir="${basedir}" includes="hsqldb-jdbc-state-service.xml" />
+		</copy>
+	</target>
+
+
+	
+	<target name="runtest" depends="compile" 
+		description="sends a JMS message to queue/quickstart_jms_secured_Request_gw">
+		<echo>Runs Test JMS Sender</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.jmssecured.test.SendJMSMessage" failonerror="true">
+			<arg value="Hello Secured JMS World"/>
+			<classpath refid="exec-classpath"/>
+		</java>
+	</target>  
+	
+</project>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/deployment.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,4 +0,0 @@
-<jbossesb-deployment>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb</depends>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw</depends>
-</jbossesb-deployment>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/deployment.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/deployment.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb</depends>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw</depends>
+</jbossesb-deployment>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id: hsqldb-jdbc-state-service.xml 61572 2007-03-22 14:32:18Z adrian at jboss.org $ -->
-
-<server>
-
-  <!-- ==================================================================== -->
-  <!-- JBossMQ State Management using HSQLDB                                -->
-  <!-- See docs/examples/jms for other configurations                       -->
-  <!-- ==================================================================== -->
-   
-  <!-- A Statemanager that stores state in the database -->
-  <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager"
-	      name="jboss.mq:service=StateManager">
-    <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-    <attribute name="SqlProperties">
-      CREATE_TABLES_ON_STARTUP = TRUE
-      CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
-                                                 CLIENTID VARCHAR(128) NULL, PRIMARY KEY(USERID))
-      CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
-                                                 PRIMARY KEY(USERID, ROLEID))
-      CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
-                                                 SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
-                                                 SELECTOR VARCHAR(255) NULL, PRIMARY KEY(CLIENTID, SUBNAME))
-      GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-      LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-      GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
-      INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
-      UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
-      REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-      GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
-      GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
-      POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
-      POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
-      POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
-      POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
-      POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
-      POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
-      POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
-      POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
-      POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
-      POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
-      POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
-      POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
-      POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')
-      POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody')
-      POPULATE.TABLES.15 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('gatewayuser', 'gwpassword')
-      POPULATE.TABLES.16 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('gatewayrole','gatewayuser')
-      POPULATE.TABLES.17 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('esbuser', 'esbpassword')
-      POPULATE.TABLES.18 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('esbrole','esbuser')
-      POPULATE.TABLES.19 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('esbuser2', 'esbpassword')
-    </attribute>
-  </mbean>
-
-</server>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/hsqldb-jdbc-state-service.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: hsqldb-jdbc-state-service.xml 61572 2007-03-22 14:32:18Z adrian at jboss.org $ -->
+
+<server>
+
+  <!-- ==================================================================== -->
+  <!-- JBossMQ State Management using HSQLDB                                -->
+  <!-- See docs/examples/jms for other configurations                       -->
+  <!-- ==================================================================== -->
+   
+  <!-- A Statemanager that stores state in the database -->
+  <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager"
+	      name="jboss.mq:service=StateManager">
+    <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
+    <attribute name="SqlProperties">
+      CREATE_TABLES_ON_STARTUP = TRUE
+      CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
+                                                 CLIENTID VARCHAR(128) NULL, PRIMARY KEY(USERID))
+      CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
+                                                 PRIMARY KEY(USERID, ROLEID))
+      CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
+                                                 SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
+                                                 SELECTOR VARCHAR(255) NULL, PRIMARY KEY(CLIENTID, SUBNAME))
+      GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
+      LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
+      GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
+      INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
+      UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
+      REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
+      GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
+      GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
+      POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
+      POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
+      POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
+      POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
+      POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
+      POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
+      POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
+      POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
+      POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
+      POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
+      POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
+      POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
+      POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')
+      POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody')
+      POPULATE.TABLES.15 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('gatewayuser', 'gwpassword')
+      POPULATE.TABLES.16 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('gatewayrole','gatewayuser')
+      POPULATE.TABLES.17 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('esbuser', 'esbpassword')
+      POPULATE.TABLES.18 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('esbrole','esbuser')
+      POPULATE.TABLES.19 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('esbuser2', 'esbpassword')
+    </attribute>
+  </mbean>
+
+</server>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jbm-queue-service.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-	<attribute name="SecurityConfig">
-		<security>
-			<!-- gatewayrole role can post messages but not read -->
-			<role name="gatewayrole" write="true"/>
-
-			<!-- esb role can consume and post messages (redeliver) -->
-			<role name="esbrole" read="true" write="true"/>
-		</security>
-	</attribute>
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-	<attribute name="SecurityConfig">
-		<security>
-			<!-- esb role can consume and post messages (redeliver) -->
-			<role name="esbrole" read="true" write="true"/>
-		</security>
-	</attribute>
-	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-</server>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbm-queue-service.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+	<attribute name="SecurityConfig">
+		<security>
+			<!-- gatewayrole role can post messages but not read -->
+			<role name="gatewayrole" write="true"/>
+
+			<!-- esb role can consume and post messages (redeliver) -->
+			<role name="esbrole" read="true" write="true"/>
+		</security>
+	</attribute>
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+	<attribute name="SecurityConfig">
+		<security>
+			<!-- esb role can consume and post messages (redeliver) -->
+			<role name="esbrole" read="true" write="true"/>
+		</security>
+	</attribute>
+	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+</server>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw">
-    <attribute name="SecurityConf">
-		<security>
-			<!-- gatewayrole role can post messages but not read -->
-			<role name="gatewayrole" write="true"/>
-
-			<!-- esb role can consume and post messages (redeliver) -->
-			<role name="esbrole" read="true" write="true"/>
-		</security>
-	</attribute>
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-  </mbean>
-
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb">
-    <attribute name="SecurityConf">
-		<security>
-
-			<!-- esb role can consume and post messages (redeliver) -->
-			<role name="esbrole" read="true" write="true"/>
-		</security>
-	</attribute>
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-  </mbean>
-</server>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbmq-queue-service.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw">
+    <attribute name="SecurityConf">
+		<security>
+			<!-- gatewayrole role can post messages but not read -->
+			<role name="gatewayrole" write="true"/>
+
+			<!-- esb role can consume and post messages (redeliver) -->
+			<role name="esbrole" read="true" write="true"/>
+		</security>
+	</attribute>
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb">
+    <attribute name="SecurityConf">
+		<security>
+
+			<!-- esb role can consume and post messages (redeliver) -->
+			<role name="esbrole" read="true" write="true"/>
+		</security>
+	</attribute>
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+  </mbean>
+</server>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jboss-esb.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,55 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
-    <providers>
-          <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory"
-                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-                      
-              <jms-bus busid="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_jms_secured_Request_gw"
-					  jms-security-principal="esbuser" jms-security-credential="esbpassword"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_jms_secured_Request_esb"
-					  jms-security-principal="esbuser" jms-security-credential="esbpassword"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-      
-      <services>
-        <service 
-        	category="JMSSecuredESB" 
-        	name="SimpleListener" 
-        	description="JMS Secured quickstart sample">
-            <listeners>
-                <jms-listener name="JMS-Gateway"
-                    busidref="quickstartGwChannel"
-                    maxThreads="1"
-                    is-gateway="true"
-                />
-                <jms-listener name="jmssecured"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"/>
-            </listeners>
-            <actions mep="OneWay">
-            
-                    <action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
-                      <property name="message" value="JMS Secured Quickstart message"/>
-                      <property name="printfull" value="false"/>
-                    </action>
-                    
-                    <!-- The next action is for Continuous Integration testing -->
-                    <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jboss-esb.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jboss-esb.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,55 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+    <providers>
+          <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory"
+                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+                      
+              <jms-bus busid="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_jms_secured_Request_gw"
+					  jms-security-principal="esbuser" jms-security-credential="esbpassword"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_jms_secured_Request_esb"
+					  jms-security-principal="esbuser" jms-security-credential="esbpassword"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
+        <service 
+        	category="JMSSecuredESB" 
+        	name="SimpleListener" 
+        	description="JMS Secured quickstart sample">
+            <listeners>
+                <jms-listener name="JMS-Gateway"
+                    busidref="quickstartGwChannel"
+                    maxThreads="1"
+                    is-gateway="true"
+                />
+                <jms-listener name="jmssecured"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+            
+                    <action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
+                      <property name="message" value="JMS Secured Quickstart message"/>
+                      <property name="printfull" value="false"/>
+                    </action>
+                    
+                    <!-- The next action is for Continuous Integration testing -->
+                    <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jbossesb-properties.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  JBoss, Home of Professional Open Source
-  Copyright 2006, JBoss Inc., and others contributors as indicated 
-  by the @authors tag. All rights reserved. 
-  See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
-  This copyrighted material is made available to anyone wishing to use,
-  modify, copy, or redistribute it subject to the terms and conditions
-  of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  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,
-  v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
-  MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
-  These options are described in the JBossESB manual.
-  Defaults are provided here for convenience only.
- 
-  Please read through this file prior to using the system, and consider
-  updating the specified entries.
--->
-<esb
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
-    <properties name="core">
-		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
-		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">      
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
-    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
-    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
-    	<property name="org.jboss.soa.esb.registry.implementationClass" 
-    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" 
-    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" 
-    		value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" 
-    	  value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
-    		value="org.apache.ws.scout.transport.RMITransport"/>
-    </properties>
-    <properties name="transports" depends="core">
-    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
-    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
-    </properties>
-    <properties name="connection">
-    	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
-    	<property name="blocking-timeout-millis" value="5000"/>
-    	<property name="abandoned-connection-timeout" value="10000"/>
-    	<property name="abandoned-connection-time-interval" value="30000"/>
-    </properties>
-    <properties name="dbstore">
-		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
-		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
-		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
-		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
-		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
-		<!--table managed by pool to test for valid connections - created by pool automatically -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
-		<!-- # of milliseconds to timeout waiting for a connection from pool -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
-    </properties>
-</esb>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jbossesb-properties.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and others contributors as indicated 
+  by the @authors tag. All rights reserved. 
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors. 
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  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,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+  These options are described in the JBossESB manual.
+  Defaults are provided here for convenience only.
+ 
+  Please read through this file prior to using the system, and consider
+  updating the specified entries.
+-->
+<esb
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+    <properties name="core">
+		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+    </properties>
+    <properties name="registry">      
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
+    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
+    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+    	<property name="org.jboss.soa.esb.registry.implementationClass" 
+    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" 
+    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" 
+    		value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" 
+    	  value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
+    		value="org.apache.ws.scout.transport.RMITransport"/>
+    </properties>
+    <properties name="transports" depends="core">
+    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+    </properties>
+    <properties name="connection">
+    	<property name="min-pool-size" value="5"/>
+    	<property name="max-pool=size" value="10"/>
+    	<property name="blocking-timeout-millis" value="5000"/>
+    	<property name="abandoned-connection-timeout" value="10000"/>
+    	<property name="abandoned-connection-time-interval" value="30000"/>
+    </properties>
+    <properties name="dbstore">
+		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
+		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
+		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
+		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
+		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
+		<!--table managed by pool to test for valid connections - created by pool automatically -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
+		<!-- # of milliseconds to timeout waiting for a connection from pool -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
+                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+    </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
+</esb>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jndi.properties	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/jndi.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/jndi.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/juddi.properties	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,69 +0,0 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/juddi.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/juddi.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/log4j.xml	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-   <!-- ============================== -->
-   <!-- Append messages to the console -->
-   <!-- ============================== -->
-
-   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-      <param name="Threshold" value="INFO"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Message\n -->
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
-      </layout>
-   </appender>
-
-   <!-- ================================= -->
-   <!-- Preserve messages in a local file -->
-   <!-- ================================= -->
-
-   <!-- A size based file rolling appender -->
-   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
-     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-     <param name="File" value="./listener.log"/>
-     <param name="Append" value="false"/>
-     <param name="MaxFileSize" value="500KB"/>
-     <param name="MaxBackupIndex" value="1"/>
-
-     <layout class="org.apache.log4j.PatternLayout">
-       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
-     </layout>	    
-   </appender>
-
-   <!-- ================ -->
-   <!-- Limit categories -->
-   <!-- ================ -->
-
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="quickstart">
-      <priority value="DEBUG"/>
-   </category>
-   <!-- ======================= -->
-   <!-- Setup the Root category -->
-   <!-- ======================= -->
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-      <appender-ref ref="FILE"/>
-   </root>
-
-</log4j:configuration>

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/log4j.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/log4j.xml	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A size based file rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="./listener.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+     </layout>	    
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="DEBUG"/>
+   </category>
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/messaging-roles.properties	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,6 +0,0 @@
-#
-# user=role1,role2,...
-#
-guest=guest
-gatewayuser=gatewayrole
-esbuser=esbrole
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/messaging-roles.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-roles.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,6 @@
+#
+# user=role1,role2,...
+#
+guest=guest
+gatewayuser=gatewayrole
+esbuser=esbrole
\ No newline at end of file

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/messaging-users.properties	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,11 +0,0 @@
-#
-# user=password
-#
-guest=guest
-
-# gatewayuser: clients that publish to the gateway
-gatewayuser=gwpassword
-
-# esbuser:
-# internal ESB user
-esbuser=esbpassword

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/messaging-users.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/messaging-users.properties	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,11 @@
+#
+# user=password
+#
+guest=guest
+
+# gatewayuser: clients that publish to the gateway
+gatewayuser=gwpassword
+
+# esbuser:
+# internal ESB user
+esbuser=esbpassword

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/readme.txt	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,53 +0,0 @@
-Overview:
-=========
-  The purpose of the jms_secured quickstart is to show how JMS destinations 
-  can be configured with security properties. 
-  
-  This quickstart is exactly like the basic helloworld quickstart except that 
-  'jms-security-principal' and  'jms-security-credential' properties are 
-  specified for the jms-bus elements.
-  
-  NOTE: this quickstart copies message-roles.properties and message-users.properties
-  to ${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/conf/props,
-  and this will require a server restart to funktion correctly.
-
-Running this quickstart:
-========================
-  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
-  and a more detailed descripton of the different ways to run the quickstarts.
-
-To Run standalone mode:
-=======================
-  1. In a command terminal window in the quickstart folder type
-     'ant deploy-jms-dests'.
-  2. In a command terminal window in this folder ("Window1"), type 'ant run'.
-  3. Open another command terminal window in this folder ("Window2"), type
-     'ant runtest'.
-  4. Switch back to "Window1" to see the output from the ESB
-  5. When finished, interrupt the ESB using Ctrl-C and, in this folder
-     ("Window1"), type 'ant undeploy-jms-dests'.
-
-To Run '.esb' archive mode:
-===========================
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
-  2. Open another command terminal window in this folder ("Window2"), type
-     'ant runtest'.
-  3. Switch back to Application Server console to see the output from the ESB
-  4. In this folder ("Window1"), type 'ant undeploy'.
-
-What to look at in this Quickstart:
-===================================
-  1. src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage
-  	 Notice how the username(gatewayuser) and password for the destination 
-  	 queue/quickstart_jms_secured_Request_gw  is specified during the creation of 
-  	 the QueueConnection.
-  2. jbm-queue-service.xml (JBM) or jbmq-queue-service.xml
-  	 Notice how quickstart_jmssecured_Request_gw is defined with a SecurityConfig
-  	 attribute and specifies two roles. One is a gatewayrole, which is used by the
-  	 SendJMSMessage class to publish messages to the destination. The 'gatewayrole'
-  	 can only write to the destination and not read. 
-  3. jboss-esb.xml
-     The message-filter for the jms-bus now specifies 'jms-security-principal' and
-     'jms-security-credential'
-  	 
-

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/readme.txt)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/readme.txt	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,53 @@
+Overview:
+=========
+  The purpose of the jms_secured quickstart is to show how JMS destinations 
+  can be configured with security properties. 
+  
+  This quickstart is exactly like the basic helloworld quickstart except that 
+  'jms-security-principal' and  'jms-security-credential' properties are 
+  specified for the jms-bus elements.
+  
+  NOTE: this quickstart copies message-roles.properties and message-users.properties
+  to ${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/conf/props,
+  and this will require a server restart to funktion correctly.
+
+Running this quickstart:
+========================
+  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+  and a more detailed descripton of the different ways to run the quickstarts.
+
+To Run standalone mode:
+=======================
+  1. In a command terminal window in the quickstart folder type
+     'ant deploy-jms-dests'.
+  2. In a command terminal window in this folder ("Window1"), type 'ant run'.
+  3. Open another command terminal window in this folder ("Window2"), type
+     'ant runtest'.
+  4. Switch back to "Window1" to see the output from the ESB
+  5. When finished, interrupt the ESB using Ctrl-C and, in this folder
+     ("Window1"), type 'ant undeploy-jms-dests'.
+
+To Run '.esb' archive mode:
+===========================
+  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+  2. Open another command terminal window in this folder ("Window2"), type
+     'ant runtest'.
+  3. Switch back to Application Server console to see the output from the ESB
+  4. In this folder ("Window1"), type 'ant undeploy'.
+
+What to look at in this Quickstart:
+===================================
+  1. src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage
+  	 Notice how the username(gatewayuser) and password for the destination 
+  	 queue/quickstart_jms_secured_Request_gw  is specified during the creation of 
+  	 the QueueConnection.
+  2. jbm-queue-service.xml (JBM) or jbmq-queue-service.xml
+  	 Notice how quickstart_jmssecured_Request_gw is defined with a SecurityConfig
+  	 attribute and specifies two roles. One is a gatewayrole, which is used by the
+  	 SendJMSMessage class to publish messages to the destination. The 'gatewayrole'
+  	 can only write to the destination and not read. 
+  3. jboss-esb.xml
+     The message-filter for the jms-bus now specifies 'jms-security-principal' and
+     'jms-security-credential'
+  	 
+

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured)

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test)

Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java	2007-12-28 18:35:51 UTC (rev 17424)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.jmssecured.test;
-
-import java.util.Properties;
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-/**
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class SendJMSMessage 
-{
-    private QueueConnection connection;
-    private QueueSession session;
-    private Queue queue;
-    
-   	private String jmsSecurityPrincipal = "gatewayuser";
-    private String jmsSecurityCredential = "gwpassword";	
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-		InitialContext iniCtx = new InitialContext();
-
-    	QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
-    	
-    	connection = queueConnectionFactory.createQueueConnection(jmsSecurityPrincipal, jmsSecurityCredential);
-    	
-    	queue = (Queue) iniCtx.lookup("queue/quickstart_jms_secured_Request_gw");
-    	session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	connection.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        connection.stop();
-        session.close();
-        connection.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender sender = session.createSender(queue);        
-        ObjectMessage objectMsg = session.createObjectMessage(msg);
-        
-        sender.send(objectMsg);        
-        sender.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    }
-    
-}

Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java (from rev 17424, labs/jbossesb/trunk/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/jms_secured/src/org/jboss/soa/esb/samples/quickstart/jmssecured/test/SendJMSMessage.java	2007-12-29 10:46:05 UTC (rev 17432)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.jmssecured.test;
+
+import java.util.Properties;
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class SendJMSMessage 
+{
+    private QueueConnection connection;
+    private QueueSession session;
+    private Queue queue;
+    
+   	private String jmsSecurityPrincipal = "gatewayuser";
+    private String jmsSecurityCredential = "gwpassword";	
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+		InitialContext iniCtx = new InitialContext();
+
+    	QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+    	
+    	connection = queueConnectionFactory.createQueueConnection(jmsSecurityPrincipal, jmsSecurityCredential);
+    	
+    	queue = (Queue) iniCtx.lookup("queue/quickstart_jms_secured_Request_gw");
+    	session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	connection.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        connection.stop();
+        session.close();
+        connection.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender sender = session.createSender(queue);        
+        ObjectMessage objectMsg = session.createObjectMessage(msg);
+        
+        sender.send(objectMsg);        
+        sender.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    }
+    
+}




More information about the jboss-svn-commits mailing list