[jboss-svn-commits] JBL Code SVN: r26923 - in labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA: product/etc/test/resources and 144 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jun 11 06:12:54 EDT 2009


Author: kevin.conner at jboss.com
Date: 2009-06-11 06:12:52 -0400 (Thu, 11 Jun 2009)
New Revision: 26923

Added:
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionFailureException.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/ActivationMapper.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBossActivationMapper.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/WMQActivationMapper.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/JndiUtil.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MaxSessionsPerConnectionUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockInitialContextFactory.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockJndiContextHandler.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptorUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_01.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_02.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_03.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_04.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/old_context.ser
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/util/JndiUtilUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/LogAgentEventListener.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451.wsdl
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451_SoapUIClientServiceMBeanUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/LineItem.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/Order.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/ProcessOrderRequest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_01.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_02.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle10g.properties
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle9i.properties
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml
Removed:
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/smooks-config.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle.properties
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle/
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml
Modified:
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/AdministrationGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ProgrammersGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/SOASoftwareIntegration.odt
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ServicesGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/test/resources/jbossesb-unittest-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/esb.juddi.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/tomcat/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAspect.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/addressing/eprs/DefaultInVMReplyToEpr.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptor.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/ModulePropertyManager.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/smooks-ws-security.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_648_UnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/jbossesb-properties-01.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/DeserializedValuesMessageUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetterUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractorUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/testutils/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/aggregator/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_rules_service/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_stateful/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_service/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/custom_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/deadletter/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/dynamic_router/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/ejbprocessor/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/exceptions_faults/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/groovy_gateway/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_notifier/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_sql_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_topic_notifier/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/huge-split-enrich-transform-route/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/readme.txt
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/src/org/jboss/soa/esb/samples/quickstart/jmsrouter/test/SendJMSMessage.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_secured/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagefilter/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagestore/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/monitoring_action/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/native_client/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice_inonly/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/recipient_list/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scheduled_services/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_chain/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_groovy/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_cert/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/simple_cbr/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/smooks_file_splitter_router/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_aop/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_helloworld/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_jpetstore/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/static_router/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO2/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_simple/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_stream/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/two_servers/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer1/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer2/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/wiretap/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/base-project-build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/main/resources/jbossesb-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/test/resources/jbossesb-unittest-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/resources/jbpm-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/resources/smooks.esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/test/java/org/jboss/soa/esb/smooks/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/MANAGEMENT-README.txt
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/esbwizard/template/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/jbossesb-unittest-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/resources/server/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java
Log:
Merge 4.4.0.GA_CP3_CR1 into SOA branch

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/AdministrationGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/SOASoftwareIntegration.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ServicesGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/test/resources/jbossesb-unittest-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/test/resources/jbossesb-unittest-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/test/resources/jbossesb-unittest-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -55,7 +55,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/esb.juddi.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/esb.juddi.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/esb.juddi.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -62,7 +62,7 @@
   <!-- jUDDI database creation -->
   <entry key="juddi.isCreateDatabase">true</entry>
   <!--   <entry key="juddi.tablePrefix">JUDDI_</entry> -->
-  <entry key="juddi.databaseExistsSql">select * from ${prefix}BUSINESS_ENTITY</entry>
+  <entry key="juddi.databaseExistsSql">select count(*) from ${prefix}BUSINESS_ENTITY</entry>
   <entry key="juddi.sqlFiles">juddi-sql/hsqldb/create_database.sql,juddi-sql/hsqldb/import.sql</entry>
 
   <!-- jUDDI UUIDGen implementation to use -->

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -98,11 +98,16 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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="jca">
+        <property name="org.jboss.soa.esb.jca.activation.mapper.jms-ra.rar" value="org.jboss.soa.esb.listeners.jca.JBossActivationMapper"/>
+        <property name="org.jboss.soa.esb.jca.activation.mapper.wmq.jmsra.rar" value="org.jboss.soa.esb.listeners.jca.WMQActivationMapper"/>
+    </properties>
+
     <properties name="dbstore">
     	
     	<!--  connection manager type -->

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/tomcat/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/tomcat/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/tomcat/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -58,7 +58,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAspect.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAspect.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAspect.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -21,6 +21,9 @@
  */
 package org.jboss.internal.soa.esb.services.registry.aspect;
 
+import java.util.Vector;
+
+import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
 import org.jboss.aop.joinpoint.MethodInvocation;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -29,6 +32,8 @@
 /**
  * Aspect used to support CDATA sections from within jUDDI.
  * 
+ * Also intercepts calls for services when constructing the organizational information.
+ * 
  * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
  */
 public class JUDDIAspect
@@ -54,4 +59,10 @@
         
         return sb.toString().trim();
     }
+    
+    public Object fetchServiceByBusinessKey(final MethodCalledByMethodInvocation invocation)
+        throws Throwable
+    {
+        return new Vector<Object>() ;
+    }
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -22,9 +22,11 @@
 package org.jboss.internal.soa.esb.services.registry.aspect;
 
 import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.infomodel.Organization;
 import javax.xml.registry.infomodel.Service;
 
 import org.apache.ws.scout.registry.BusinessQueryManagerImpl;
+import org.apache.ws.scout.registry.infomodel.OrganizationImpl;
 import org.apache.ws.scout.registry.infomodel.ServiceImpl;
 import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
 
@@ -32,6 +34,9 @@
  * Aspect used to prevent scout from loading the complete service
  * graph for the registry just to return a binding.
  * 
+ * Updated to intercept calls for the organizational information when
+ * querying a specific service.
+ * 
  * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
  */
 public class ScoutAspect
@@ -51,6 +56,13 @@
             service.setKey(lcm.createKey(id));
             return service ;
         }
+        else if (LifeCycleManager.ORGANIZATION.equals(objectType))
+        {
+            final LifeCycleManager lcm = bqmImpl.getRegistryService().getBusinessLifeCycleManager() ;
+            final Organization organization = new OrganizationImpl(lcm) ;
+            organization.setKey(lcm.createKey(id)) ;
+            return organization ;
+        }
         else
         {
             return invocation.invokeNext() ;

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -11,8 +11,16 @@
       <advice name="getRegistryObject" aspect="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect"/>
    </bind>
 
+   <bind pointcut="withincode(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getServiceFromBusinessService(..)) AND call(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getRegistryObject(..))">
+      <advice name="getRegistryObject" aspect="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect"/>
+   </bind>
+
    <bind pointcut="execution(* org.apache.juddi.util.xml.XMLUtils->getText(..))">
       <advice name="getText" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAspect"/>
    </bind>
+
+   <bind pointcut="withincode(* org.apache.juddi.datastore.jdbc.JDBCDataStore->fetchBusiness(..)) AND call(* org.apache.juddi.datastore.jdbc.JDBCDataStore->fetchServiceByBusinessKey(..))">
+      <advice name="fetchServiceByBusinessKey" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAspect"/>
+   </bind>
 </aop>
 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -192,9 +192,13 @@
             <aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
         </aopc>
         <aopc compilerclasspathref="aop-classpath">
-            <classpath path="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
+            <classpath>
+              <pathelement path="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
+              <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="commons-logging*.jar"/>
+            </classpath>
             <src path="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
             <include name="org/apache/juddi/util/xml/XMLUtils.class"/>
+            <include name="org/apache/juddi/datastore/jdbc/JDBCDataStore.class"/>
             <aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
             <aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
         </aopc>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/addressing/eprs/DefaultInVMReplyToEpr.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/addressing/eprs/DefaultInVMReplyToEpr.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/addressing/eprs/DefaultInVMReplyToEpr.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -19,7 +19,6 @@
 
 package org.jboss.internal.soa.esb.addressing.eprs;
 
-import org.jboss.internal.soa.esb.couriers.InVMCourier;
 import org.jboss.soa.esb.addressing.EPR;
 import org.jboss.soa.esb.addressing.eprs.InVMEpr;
 import org.jboss.soa.esb.couriers.CourierFactory;
@@ -29,32 +28,25 @@
 
 public class DefaultInVMReplyToEpr extends InVMEpr {
 
-    private static ThreadLocal<InVMEpr> invmReplyToEPRTL = new ThreadLocal<InVMEpr>();
+    private static volatile long counter = 0;
 
     public DefaultInVMReplyToEpr(InVMEpr epr) {
-        super(getThreadEPR());
+        super(createEprAndCourier());
     }
 
-    private static EPR getThreadEPR() {
-        // We assign an InVMEpr/Courier to each thread
+    private static EPR createEprAndCourier() {
+        try {
+            InVMEpr epr;
 
-        InVMEpr threadEPR = invmReplyToEPRTL.get();
-
-        if(threadEPR == null) {
-            try {
-                threadEPR = new InVMEpr(URI.create("invm://thread-" + Thread.currentThread().getId()));
-                invmReplyToEPRTL.set(threadEPR);
-                CourierFactory.getInstance().addInVMCourier(threadEPR);
-            } catch (URISyntaxException e) {
-                throw new RuntimeException("Unexpected Exception creating replyTo InVMEpr.", e);
+            synchronized (DefaultInVMReplyToEpr.class) {
+                counter++;
+                epr = new InVMEpr(URI.create("invm://thread-" + Thread.currentThread().getId() + "-" + counter));
             }
-        }
+            CourierFactory.getInstance().addInVMCourier(epr);
 
-        // Rest the courier in case there are stale messages there
-        // waiting to be picked up...
-        InVMCourier threadCourier = CourierFactory.getInstance().getInVMCourier(threadEPR);
-        threadCourier.reset();
-
-        return threadEPR;
+            return epr;
+        } catch (URISyntaxException e) {
+            throw new RuntimeException("Unexpected Exception creating replyTo InVMEpr.", e);
+        }
     }
 }
\ No newline at end of file

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -282,9 +282,6 @@
                 if (!messageQueue.isEmpty()) {
                     messageObj = messageQueue.remove();
                 }
-
-                // Notify 1 waiting delivery thread of the pickup...
-                messageQueue.notify();
             }
 
             if(messageObj instanceof byte[]) {
@@ -336,6 +333,11 @@
 
     public void setActive(boolean active) {
         isActive = active;
+        
+        if(!active && !messageQueue.isEmpty()) {
+        	logger.error("Deactivated non-empty InVM Queue.  Undelivered messages will be lost.");
+        	messageQueue.clear();
+        }
     }
 
     public void clean() {

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -41,6 +41,7 @@
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.couriers.helpers.JmsComposer;
 import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionFailureException;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsSession;
@@ -176,6 +177,26 @@
      *                          if problems were encountered
      */
     public boolean deliver(org.jboss.soa.esb.message.Message message) throws CourierException {
+        try {
+            return internalDeliver(message) ;
+        } catch (final JmsConnectionFailureException jcfe) {
+            // fall through
+        } catch (final IllegalStateException ise) {
+            // fall through
+        }
+        
+        cleanup() ;
+        
+        try {
+            return internalDeliver(message) ;
+        } catch (final JmsConnectionFailureException jcfe) {
+            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", jcfe);
+        } catch (final IllegalStateException ise) {
+            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", ise);
+        }
+    }
+    
+    private boolean internalDeliver(org.jboss.soa.esb.message.Message message) throws CourierException, JmsConnectionFailureException, IllegalStateException {
         ObjectMessage msg;
 
         if (null == message) {
@@ -206,11 +227,15 @@
         // Set the JMS message from the ESB message...
         try {
             setJMSProperties(message, msg);
+        } catch (final JmsConnectionFailureException jcfe) {
+            throw jcfe ;
+        } catch (final IllegalStateException ise) {
+            throw ise ;
         } catch (JMSException e) {
             throw new CourierMarshalUnmarshalException("Failed to set JMS Message properties from ESB Message properties.", e);
         }
 
-        return deliver(msg);
+        return internalDeliver(msg);
     }
 
     /**
@@ -222,6 +247,26 @@
      *                          if problems were encountered
      */
     public boolean deliver(javax.jms.Message message) throws CourierException {
+        try {
+            return internalDeliver(message) ;
+        } catch (final JmsConnectionFailureException jcfe) {
+            // fall through
+        } catch (final IllegalStateException ise) {
+            // fall through
+        }
+        
+        cleanup() ;
+        
+        try {
+            return internalDeliver(message) ;
+        } catch (final JmsConnectionFailureException jcfe) {
+            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", jcfe);
+        } catch (final IllegalStateException ise) {
+            throw new CourierTransportException("Caught exception during delivery and could not reconnect! ", ise);
+        }
+    }
+    
+    private boolean internalDeliver(javax.jms.Message message) throws CourierException, JmsConnectionFailureException, IllegalStateException {
         if (_isReceiver) {
             throw new CourierException("This is a read-only Courier");
         }
@@ -257,6 +302,12 @@
                     
                     return true;
                 }
+                catch (final JmsConnectionFailureException jcfe) {
+                    throw jcfe ;
+                }
+                catch (final IllegalStateException ise) {
+                    throw ise ;
+                }
                 catch (JMSException e) {
                     if (!jmsConnectRetry(e))
                         throw new CourierTransportException("Caught exception during delivery and could not reconnect! ",e);
@@ -325,7 +376,7 @@
         return true;
     } // ________________________________
 
-    private void createMessageProducer() throws CourierException, NamingContextException {
+    private void createMessageProducer() throws CourierException, NamingContextException, JmsConnectionFailureException, IllegalStateException {
         synchronized(this) {
             if (_messageProducer == null) {
                 try {
@@ -367,6 +418,12 @@
                         }
                     }
                 }
+                catch (final JmsConnectionFailureException jcfe) {
+                    throw jcfe ;
+                }
+                catch (final IllegalStateException ise) {
+                    throw ise ;
+                }
                 catch (JMSException ex) {
                     _logger.debug("Error from JMS system.", ex);
 
@@ -402,6 +459,26 @@
     }
 
     public javax.jms.Message pickupPayload(long millis) throws CourierException, CourierTimeoutException {
+        try {
+            return internalPickupPayload(millis) ;
+        } catch (final JmsConnectionFailureException jcfe) {
+            // fall through
+        } catch (final IllegalStateException ise) {
+            // fall through
+        }
+        
+        cleanup() ;
+        
+        try {
+            return internalPickupPayload(millis) ;
+        } catch (final JmsConnectionFailureException jcfe) {
+            throw new CourierTransportException("Caught exception during receive and could not reconnect! ", jcfe);
+        } catch (final IllegalStateException ise) {
+            throw new CourierTransportException("Caught exception during receive and could not reconnect! ", ise);
+        }
+    }
+    
+    private javax.jms.Message internalPickupPayload(long millis) throws CourierException, CourierTimeoutException, JmsConnectionFailureException, IllegalStateException {
         if (!_isReceiver)
             throw new CourierException("This is an outgoing-only Courier");
         if (millis < 1)
@@ -426,6 +503,12 @@
                 try {
                     jmsMessage = _messageConsumer.receive(millis);
                 }
+                catch (final JmsConnectionFailureException jcfe) {
+                    throw jcfe ;
+                }
+                catch (final IllegalStateException ise) {
+                    throw ise ;
+                }
                 catch (JMSException e) {
                     if (!jmsConnectRetry(e))
                         throw new CourierTransportException("Caught exception during receive and could not reconnect! ",e);
@@ -486,7 +569,7 @@
         esbPropertiesStrategy.setPropertiesFromJMSMessage(fromJMS, toESB);
     }
 
-    private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException, NamingContextException {
+    private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException, NamingContextException, JmsConnectionFailureException, IllegalStateException {
         Context oJndiCtx = null;
 
         synchronized(this) {
@@ -532,6 +615,12 @@
                         NamingContextPool.releaseNamingContext(oJndiCtx) ;
                     }
                 }
+                catch (final JmsConnectionFailureException jcfe) {
+                    throw jcfe ;
+                }
+                catch (final IllegalStateException ise) {
+                    throw ise ;
+                }
                 catch (JMSException ex) {
                     _logger.debug("Error from JMS system.", ex);
 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,5 +1,7 @@
 package org.jboss.internal.soa.esb.message.format.serialized;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
@@ -120,4 +122,20 @@
     {
         context = new HashMap<String, Serializable>() ;
     }
-}
\ No newline at end of file
+    
+    /**
+     * Deserialise the object, checking for old versions.
+     * @param ois The object input stream.
+     * @throws IOException For IO exceptions during object deserialisation.
+     * @throws ClassNotFoundException If dependent classes cannot be found.
+     */
+    private void readObject(final ObjectInputStream ois)
+        throws IOException, ClassNotFoundException
+    {
+        ois.defaultReadObject() ;
+        if (context == null)
+        {
+            context = new HashMap<String, Serializable>() ;
+        }
+    }
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -22,9 +22,13 @@
 import org.jboss.remoting.marshal.Marshaller;
 import org.jboss.remoting.marshal.http.HTTPMarshaller;
 import org.jboss.remoting.InvocationResponse;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.Map;
 
 /**
  * Extended version of the JBossRemoting HTTPMarshaller.
@@ -36,19 +40,50 @@
 public class HttpMarshaller extends HTTPMarshaller {
 
     public void write(Object object, OutputStream outputStream, int version) throws IOException {
-        if(object instanceof byte[]) {
-            outputStream.write((byte[])object);
-            outputStream.flush();
-        } else if(object instanceof InvocationResponse) {
+        if(object instanceof InvocationResponse) {
             Object result = ((InvocationResponse)object).getResult();
-            if(result instanceof String) {
-                super.write(result, outputStream, version);
-            } else if(result instanceof byte[]) {
-                outputStream.write((byte[])result);
+            InvocationRequest currentRequest = JBossRemotingGatewayListener.getCurrentRequest();
+            boolean isRemotingClient = false;
+            boolean isBinaryResponse = false;
+
+            if(result != null && currentRequest != null) {
+                Map requestMetadata = currentRequest.getRequestPayload();
+                Map responseMetadata = currentRequest.getReturnPayload();
+                Object userAgentObj = requestMetadata.get(HTTPMetadataConstants.REMOTING_USER_AGENT);
+
+                if(userAgentObj != null) {
+                    isRemotingClient = ((String)userAgentObj).startsWith("JBossRemoting");
+
+                    // In this case, assume non binary if the content type has not been set.
+                    // Will only kick in if the object is an InvocationResponse.
+                    if(JBossRemotingUtil.getContentType(responseMetadata) == null) {
+                        isBinaryResponse = true;
+                    } else {
+                        isBinaryResponse = JBossRemotingUtil.isBinaryPayload(responseMetadata);
+                    }
+                }
+            }
+            
+            if(isRemotingClient && !isBinaryResponse) {
+                // This block of code tries to work around a bug in JBoss Remoting, while at the same time
+                // providing backward compatibility for earlier versions of the ESB.  This code should not
+                // have been present.  See https://jira.jboss.org/jira/browse/JBESB-2611
+                if(result instanceof byte[]) {
+                    outputStream.write((byte[])result);
+                    outputStream.flush();
+                } else {
+                    super.write(result, outputStream, version);
+                }
+            } else {
+                super.write(object, outputStream, version);
+            }
+        } else {
+            if(object instanceof byte[]) {
+                outputStream.write((byte[])object);
                 outputStream.flush();
+            } else {
+                super.write(object, outputStream, version);
             }
-        } else {
-            super.write(object, outputStream, version);
         }
     }
 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -23,7 +23,6 @@
 import org.jboss.remoting.marshal.UnMarshaller;
 import org.jboss.remoting.marshal.serializable.SerializableUnMarshaller;
 import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-import org.jboss.remoting.transport.web.WebUtil;
 
 import java.io.*;
 import java.util.List;
@@ -56,7 +55,7 @@
      * @throws ClassNotFoundException
      */
     public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException {
-        if (isBinaryData(metadata)) {
+        if (JBossRemotingUtil.isBinaryPayload(metadata)) {
             try {
                 return super.read(inputStream, metadata, version);
             }
@@ -168,26 +167,4 @@
         }
         return isError;
     }
-
-    private boolean isBinaryData(Map metadata) throws IOException {
-        boolean isBinary = false;
-
-        if (metadata != null) {
-            // need to get the content type
-            Object value = metadata.get("Content-Type");
-            if (value == null) {
-                value = metadata.get("content-type");
-            }
-            if (value != null) {
-                if (value instanceof List) {
-                    List valueList = (List) value;
-                    if (valueList != null && valueList.size() > 0) {
-                        value = valueList.get(0);
-                    }
-                }
-                isBinary = WebUtil.isBinary((String) value);
-            }
-        }
-        return isBinary;
-    }
 }

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,81 @@
+/*
+ * 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.remoting;
+
+import org.jboss.remoting.transport.web.WebUtil;
+
+import java.util.Map;
+import java.util.List;
+import java.io.IOException;
+
+/**
+ * JBoss Remoting utility methods.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBossRemotingUtil {
+
+    /**
+     * Check the request/response metadata and determine whether or not the
+     * message payload is a binary payload type.
+     * 
+     * @param metadata Request/Response metadata.
+     * @return True of the Content-Type indicates a binary payload, otherwise false.
+     */
+    public static boolean isBinaryPayload(Map metadata) {
+        boolean isBinary = false;
+
+        if (metadata != null) {
+            String value = getContentType(metadata);
+
+            if (value != null) {
+                isBinary = WebUtil.isBinary(value);
+            }
+        }
+        
+        return isBinary;
+    }
+
+    /**
+     * Get the content type from the supplied metadata.
+     * @param metadata The request/response metadata.
+     * @return The content type if set, otherwise null.
+     */
+    public static String getContentType(Map metadata) {
+        Object value = metadata.get("Content-Type");
+
+        if (value == null) {
+            value = metadata.get("content-type");
+        }
+
+        if (value != null) {
+            if (value instanceof List) {
+                List valueList = (List) value;
+                if (valueList != null && valueList.size() > 0) {
+                    value = valueList.get(0);
+                }
+            }
+        }
+        
+        return (String) value;
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionFailureException.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionFailureException.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionFailureException.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionFailureException.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,59 @@
+/*
+ * 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 javax.jms.JMSException;
+
+/**
+ * This exception is thrown from a JMS session/producer/consumer method when the
+ * underlying exception appears to have been closed.  This will occur when the connection
+ * has not been closed through the standard JMS exception listener route.
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsConnectionFailureException extends JMSException
+{
+    /**
+     * The serial version UID of this exception
+     */
+    private static final long serialVersionUID = 4352490530798177236L;
+
+    /**
+     * Construct an jms connection failure exception with the specified message.
+     * @param message The exception message.
+     */
+    public JmsConnectionFailureException(final String message) 
+    {
+        super(message) ;
+    }
+
+    /**
+     * Construct an jms connection failure exception with the specified message and associated cause.
+     * @param message The exception message.
+     * @param cause The associated cause.
+     */
+    public JmsConnectionFailureException(String message, Throwable cause)
+    {
+        this(message) ;
+        initCause(cause) ;
+   }
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -22,11 +22,7 @@
 package org.jboss.internal.soa.esb.rosetta.pooling;
 
 import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import java.util.*;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CompletionService;
 import java.util.concurrent.ExecutionException;
@@ -58,9 +54,8 @@
 import com.arjuna.common.util.propertyservice.PropertyManager;
 
 /**
- * Interface that needs to be implemented to provide pool of connections.
- * @see DefaultConnectionPoolImpl
- * Default implementation of Connection Pool
+ * JmsConnectionPool.
+ *
  * @author kstam
  * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
  * Date: March 10, 2007
@@ -83,36 +78,31 @@
 	private static final CompletionService<JmsSession> COMPLETION_SERVICE = new ExecutorCompletionService<JmsSession>(SESSION_EXECUTOR) ;
 	
     /** 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 session key */
-    private Map<Integer,ArrayList<JmsSession>> freeSessionsMap = new HashMap<Integer,ArrayList<JmsSession>>();
-    
-    /** Number of session that are currently in use. Indexed by session key mode */
-    private Map<Integer,ArrayList<JmsSession>> inUseSessionsMap = new HashMap<Integer,ArrayList<JmsSession>>();
-    
-    /** Reference to a Queue or Topic Connection, we only need one per pool */
-    protected Connection jmsConnection ;
-    
-    /** The Indentifier of the pool */
-    private Map<String, String> poolKey;
+    private int maxSessions = DEFAULT_POOL_SIZE;    //TODO Make this manageable
 
     /**
-     * Mapping from transactions to sessions.
+     * The max number of sessions per connection.  Defaults to "maxSessions".
      */
-    private Map<Object, JmsXASession> transactionsToSessions = new HashMap<Object, JmsXASession>() ;
+    private int maxSessionsPerConnection;
+
     /**
-     * Mapping from sessions to transactions.
+     * The max number of XA sessions per connection.  Defaults to "maxSessionsPerConnection".
      */
-    private Map<JmsXASession, Object> sessionsToTransactions = new HashMap<JmsXASession, Object>() ;
+    private int maxXASessionsPerConnection;
 
+    /** Time to sleep when trying to get a session. */
+    private int sleepTime = DEFAULT_SLEEP;
+
+    /** The Indentifier of the pool */
+    private Map<String, String> poolKey;
     /** Logger */
     private Logger logger = Logger.getLogger(this.getClass());
-    
+
     /**
+     * JMS Session Pools.
+     */
+    private List<JmsSessionPool> sessionPools = new ArrayList<JmsSessionPool>();
+    /**
      * The flag representing XA aware connections.
      */
     private boolean isXAAware ;
@@ -120,96 +110,81 @@
      * Flag signifying that the pool has been terminated.
      */
     private boolean terminated ;
-    
     /**
      * The pool instance id.
      */
     private long id ;
-    
+
     /**
      * Contructor of the pool.
      * 
      */
-    public JmsConnectionPool(Map<String, String> poolKey) 
-    {
+    public JmsConnectionPool(Map<String, String> poolKey) throws ConnectionException {
     	this(poolKey, JmsConnectionPool.CONFIGURED_POOL_SIZE, JmsConnectionPool.CONFIGURED_SLEEP);
     }
     
-    public JmsConnectionPool(Map<String, String> poolKey, int poolSize, int sleepTime) 
-    {
+    public JmsConnectionPool(Map<String, String> poolKey, int poolSize, int sleepTime) throws ConnectionException {
         this.poolKey = poolKey;
         
-        MAX_SESSIONS = poolSize;
-        SLEEP_TIME = sleepTime;
-        
-        freeSessionsMap.put(Session.AUTO_ACKNOWLEDGE, new ArrayList<JmsSession>() );
-        freeSessionsMap.put(Session.CLIENT_ACKNOWLEDGE, new ArrayList<JmsSession>() );
-        freeSessionsMap.put(Session.DUPS_OK_ACKNOWLEDGE, new ArrayList<JmsSession>() );
-        
-        inUseSessionsMap.put(Session.AUTO_ACKNOWLEDGE, new ArrayList<JmsSession>() );
-        inUseSessionsMap.put(Session.CLIENT_ACKNOWLEDGE, new ArrayList<JmsSession>() );
-        inUseSessionsMap.put(Session.DUPS_OK_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+        maxSessions = poolSize;
+        this.sleepTime = sleepTime;
+
+        maxSessionsPerConnection = getIntPoolConfig(poolKey, JMSEpr.MAX_SESSIONS_PER_CONNECTION, maxSessions);
+        if(maxSessionsPerConnection < 1) {
+            throw new ConnectionException("Invalid '" + JMSEpr.MAX_SESSIONS_PER_CONNECTION + "' configuration value '" + maxSessionsPerConnection + "'.  Must be greater than 0.");
+        }
+        maxXASessionsPerConnection = getIntPoolConfig(poolKey, JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION, maxSessionsPerConnection);
+        if(maxXASessionsPerConnection < 1) {
+            throw new ConnectionException("Invalid '" + JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION + "' configuration value '" + maxXASessionsPerConnection + "'.  Must be greater than 0.");
+        } else if(maxXASessionsPerConnection > maxSessionsPerConnection) {
+            throw new ConnectionException("Invalid '" + JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION + "' configuration value '" + maxXASessionsPerConnection + "'.  Cannot be greater than the configured value for '" + JMSEpr.MAX_SESSIONS_PER_CONNECTION + "', which is " + maxSessionsPerConnection + ".");
+        }
     }
-   
-    /**
-     * This is where we create the sessions. 
-     * 
-     * @param poolKey
-     * @param transacted
-     * @throws JMSException
-     */
-    private  synchronized void addAnotherSession(Map<String, String> poolKey, final boolean transacted, final int acknowledgeMode)
-        throws JMSException
-    {
-        final Future<JmsSession> future = COMPLETION_SERVICE.submit(new Callable<JmsSession>() {
-            public JmsSession call()
-                throws JMSException
-            {
-                final JmsSession session ;
-                if (transacted) {
-                    session = new JmsXASession(JmsConnectionPool.this, ((XAConnection)jmsConnection).createXASession(), id);
-                } else {
-                    session = new JmsSession(jmsConnection.createSession(transacted, acknowledgeMode), id);
-                }
-                return session ;
+
+    private int getIntPoolConfig(Map<String, String> poolKey, String configKey, int defaultVal) throws ConnectionException {
+        String configValueString = poolKey.get(configKey);
+        int configValue = defaultVal;
+
+        if(configValueString != null) {
+            try {
+                configValue = Integer.parseInt(configValueString.trim());
+            } catch(NumberFormatException e) {
+                throw new ConnectionException("Invalid '" + configKey + "' configuration value '" +  configValueString.trim() + "'.  Must be a valid Integer.");
             }
-        }) ;
-        
-        //Create a new Session
-        ArrayList<JmsSession> freeSessions = freeSessionsMap.get(acknowledgeMode);
-        // For now we only support JTA transacted sessions
-        try
-        {
-            freeSessions.add(future.get());
         }
-        catch (final InterruptedException ie) {} // ignore
-        catch (final ExecutionException ee)
-        {
-            final Throwable th = ee.getCause() ;
-            if (th instanceof JMSException)
-            {
-                throw (JMSException)th ;
-            }
-            if (th instanceof Error)
-            {
-                throw (Error)th ;
-            }
-            if (th instanceof RuntimeException)
-            {
-                throw (RuntimeException)th ;
-            }
-        }
-        logger.debug("Number of Sessions in the pool with acknowledgeMode: " + acknowledgeMode + " is now " + getSessionsInPool(acknowledgeMode));
+
+        return configValue;
     }
 
+    protected int getMaxSessions() {
+        return maxSessions;
+    }
+
+    protected int getMaxSessionsPerConnection() {
+        return maxSessionsPerConnection;
+    }
+
+    public int getMaxXASessionsPerConnection() {
+        return maxXASessionsPerConnection;
+    }
+
+    protected List<JmsSessionPool> getSessionPools() {
+        return sessionPools;
+    }
+
     /**
      *  This method can be called whenever a connection is needed from the pool.
-     *  
+     *
      * @return Connection to be used
      * @throws ConnectionException
      */
     public synchronized JmsSession getSession(final int acknowledgeMode) throws NamingException, JMSException, ConnectionException
     {
+        if (terminated)
+        {
+            throw new ConnectionException("Connection pool has been terminated") ;
+        }
+
         try
         {
             return internalGetSession(acknowledgeMode) ;
@@ -221,35 +196,40 @@
              * We check for IllegalStateException as this appears to be the indicator
              * exception used by JBoss Messaging when the connection has disappeared.
              */
-            Throwable cause = jmse ;
-            while(cause.getCause() != null)
+            if (messagingConnectionFailure(jmse))
             {
-                cause = cause.getCause() ;
-            }
-            if (cause instanceof IllegalStateException)
-            {
-                removeSessionPool() ;
                 return internalGetSession(acknowledgeMode) ;
             }
             throw jmse ;
         }
     }
-    
+
     private synchronized JmsSession internalGetSession(final int acknowledgeMode)
         throws NamingException, JMSException, ConnectionException
     {
-        try {
-            initConnection() ;
-        } catch (final NamingContextException nce) {
+        if(sessionPools.isEmpty()) {
+            // Create the first pool entry...
+            addSessionPool();
+        }
+
+        final Object factoryConnection ;
+        try
+        {
+            factoryConnection = getFactoryConnection() ;
+        }
+        catch (final NamingContextException nce)
+        {
             throw new ConnectionException("Unexpected exception accessing Naming Context", nce) ;
         }
+        isXAAware = (factoryConnection instanceof XAConnectionFactory) ;
+        
         final boolean transacted ;
         try {
             transacted = (isXAAware && TransactionStrategy.getTransactionStrategy(true).isActive()) ;
         } catch (final TransactionStrategyException tse) {
             throw new ConnectionException("Failed to determine current transaction context", tse) ;
         }
-        
+
         if (transacted)
         {
             final JmsXASession currentSession = getXASession() ;
@@ -258,44 +238,98 @@
                 return currentSession ;
             }
         }
+
         final int mode = (transacted ? Session.SESSION_TRANSACTED : acknowledgeMode) ;
-        
-        final long end = System.currentTimeMillis() + (SLEEP_TIME * 1000) ;
+        final long end = System.currentTimeMillis() + (sleepTime * 1000) ;
         boolean emitExpiry = logger.isDebugEnabled() ;
-        for(;;) {
-            ArrayList<JmsSession> freeSessions = freeSessionsMap.get(mode );
-            ArrayList<JmsSession> inUseSessions = inUseSessionsMap.get(mode);
-            if (freeSessions.size() > 0)
+
+        while(true) {
+            // Cycle through all the existing session pools and try getting a
+            // free session.  Will JmsSessionPool.getSession will add a session
+            // to a pool that is not "full"...
+            for (JmsSessionPool sessionPool : sessionPools) {
+                try {
+                    JmsSession session = sessionPool.getSession(mode, transacted);
+    
+                    if(session != null) {
+                        return session;
+                    }   
+                } catch (final JMSException jmse) {
+                    if (messagingConnectionFailure(jmse)) {
+                        sessionPool.cleanSessionPool() ;
+                    }
+                    throw jmse ;
+                }
+            }
+
+            // OK... all the existing session pools are full and have no free sessions.  If we can add
+            // another session pool, add it and then start this loop again...
+            if(getSessionsInPool() < maxSessions) {
+                addSessionPool();
+                continue;
+            }
+
+            // We've reached our max permitted number of connections and the sessions
+            // associated with these connections are all in use. Drop into the
+            // delay below and wait for a session to be freed...
+            if (emitExpiry)
             {
-                final JmsSession session = freeSessions.remove(freeSessions.size()-1);
-                inUseSessions.add(session);
-                return session ;
-            } else if (inUseSessions.size()<MAX_SESSIONS) {
-                addAnotherSession(poolKey, transacted, mode);
-                continue ;
-            } else {
-                if (emitExpiry)
+                logger.debug("The connection pool was exhausted, waiting for a session to be released.") ;
+                emitExpiry = false ;
+            }
+
+            // Wait and loop again...
+            final long now = System.currentTimeMillis() ;
+            final long delay = (end - now) ;
+            if (delay <= 0)
+            {
+                throw new ConnectionException("Could not obtain a JMS connection from the pool after "+ sleepTime +"s.");
+            }
+            else
+            {
+                try
                 {
-                    logger.debug("The connection pool was exhausted, waiting for a session to be released.") ;
-                    emitExpiry = false ;
+                    wait(delay) ;
                 }
-                final long now = System.currentTimeMillis() ;
-                final long delay = (end - now) ;
-                if (delay <= 0)
-                {
-                    throw new ConnectionException("Could not obtain a JMS connection from the pool after "+SLEEP_TIME+"s.");
-                }
-                else
-                {
-                    try
-                    {
-                        wait(delay) ;
-                    }
-                    catch (final InterruptedException ie) {} // ignore
-                }
+                catch (final InterruptedException ie) {} // ignore
             }
         }
     }
+    
+    private Object getFactoryConnection()
+        throws NamingContextException, NamingException
+    {
+        String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
+        Object factoryConnection=null;
+
+        Properties jndiEnvironment = JmsConnectionPoolContainer.getJndiEnvironment(poolKey);
+        Context jndiContext = NamingContextPool.getNamingContext(jndiEnvironment);
+        try
+        {
+            factoryConnection = jndiContext.lookup(connectionFactoryString);
+        }
+        catch (NamingException ne)
+        {
+            logger.info("Received NamingException, refreshing context.");
+            jndiContext = NamingContextPool.replaceNamingContext(jndiContext, JmsConnectionPoolContainer.getJndiEnvironment(poolKey));
+            factoryConnection = jndiContext.lookup(connectionFactoryString);
+        }
+        finally
+        {
+            NamingContextPool.releaseNamingContext(jndiContext) ;
+        }
+        return factoryConnection ;
+    }
+
+    private JmsSessionPool addSessionPool() throws NamingException, JMSException, ConnectionException {
+        final JmsSessionPool sessionPool = new JmsSessionPool();
+
+        // And add it to the pool...
+        sessionPools.add(sessionPool);
+
+        return sessionPool;
+    }
+
     /**
      *  This method can be called whenever a Session is needed from the pool.
      * @return
@@ -337,36 +371,11 @@
      */
     synchronized void handleCloseSession(final JmsSession session)
     {
-        if (session.isSuspect())
-        {
-            logger.debug("Session is suspect, dropping") ;
-            handleReleaseSession(session) ;
+        JmsSessionPool sessionPool = findOwnerPool(session);
+
+        if(sessionPool != null) {
+            sessionPool.handleCloseSession(session);
         }
-        else
-        {
-            if (session.getId() != id)
-            {
-                logger.debug("Session is from a previous incarnation, dropping") ;
-            }
-            else
-            {
-                final int mode ;
-                try {
-                    mode = session.getAcknowledgeMode() ;
-                } catch (final JMSException jmse) {
-                    logger.warn("JMSException while calling getAcknowledgeMode") ;
-                    logger.debug("JMSException while calling getAcknowledgeMode", jmse) ;
-                    return ;
-                }
-                
-                final ArrayList<JmsSession> sessions = (freeSessionsMap == null ? null : freeSessionsMap.get(mode));
-                if (sessions != null) {
-                    sessions.add(session) ;
-                }
-            }
-            session.releaseResources() ;
-            releaseInUseSession(session) ;
-        }
     }
     
     /**
@@ -385,24 +394,58 @@
     }
     
     /**
+     * Handle exceptions that occur in the session or its child objects.
+     * @param jmsSession The jmsSession associated with the call.
+     * @param jmse The JMSException to check.
+     * @throws JMSException if the exception is to be overridden.
+     */
+    void handleException(final JmsSession jmsSession, final JMSException jmse)
+        throws JMSException
+    {
+        if (messagingConnectionFailure(jmse))
+        {
+            final JmsSessionPool sessionPool = findOwnerPool(jmsSession);
+
+            if(sessionPool != null) {
+                sessionPool.cleanSessionPool() ;
+            }
+            throw new JmsConnectionFailureException("The underlying exception appears to have failed", jmse) ;
+        }
+    }
+    
+    /**
+     * Check the exception to see whether it indicates a connection failure in JBM
+     * @param jmse The current JMS Exception
+     * @return true if it suggests a failure, false otherwise.
+     */
+    private boolean messagingConnectionFailure(final JMSException jmse)
+    {
+        /*
+         * JBoss Messaging can drop the connection from the server side
+         * without calling back on the exception listener.  We check for
+         * IllegalStateException as this appears to be the indicator
+         * exception used by JBoss Messaging when the connection has disappeared.
+         */
+        Throwable cause = jmse ;
+        while(cause.getCause() != null)
+        {
+            cause = cause.getCause() ;
+        }
+        return (cause instanceof IllegalStateException) ;
+    }
+    
+    /**
      * Release a session from the in use mapping.
      * @param session The session to release.
      */
     private void releaseInUseSession(final JmsSession session)
     {
-        final int mode ;
-        try {
-            mode = session.getAcknowledgeMode() ;
-        } catch (final JMSException jmse) {
-            logger.warn("JMSException while calling getAcknowledgeMode") ;
-            logger.debug("JMSException while calling getAcknowledgeMode", jmse) ;
-            return ;
+        JmsSessionPool sessionPool = findOwnerPool(session);
+
+        if(sessionPool != null) {
+            sessionPool.releaseInUseSession(session);
         }
-        
-        final ArrayList<JmsSession> sessions = (inUseSessionsMap == null ? null : inUseSessionsMap.get(mode));
-        if (sessions != null) {
-            sessions.remove(session) ;
-        }
+
         notifyAll() ;
     }
     
@@ -430,60 +473,21 @@
     }
 
     /**
-     * This method is called when the pool needs to cleaned. It closes all open sessions
-     * and the connection.
-     */
-    private void cleanSessionPool()
-    {
-        final Connection connection ;
-        synchronized(this)
-       {
-            if (terminated)
-            {
-                return ;
-            }
-            id++ ;
-            for (List<JmsSession> list : freeSessionsMap.values())
-            {
-                list.clear() ;
-            }
-            for (List<JmsSession> list : inUseSessionsMap.values())
-            {
-                list.clear() ;
-            }
-            transactionsToSessions.clear() ;
-            sessionsToTransactions.clear() ;
-            
-            logger.debug("Cleared the session pool now closing the connection to the factory.");
-            connection = jmsConnection ;
-            jmsConnection = null ;
-        }
-        if (connection!=null) {
-            try {
-                connection.close();
-            } catch (final Exception ex) {} // ignore
-        }
-    }
-    
-    /**
      * This method is called when the pool needs to destroyed. It closes all open sessions
      * and the connection and removes it from the container's poolMap.
      */
     public synchronized void removeSessionPool()
     {
-        freeSessionsMap = null ;
-        inUseSessionsMap = null ;
-        transactionsToSessions = null ;
-        sessionsToTransactions = null ;
-        
-        logger.debug("Emptied the session pool now closing the connection to the factory.");
-        if (jmsConnection!=null) {
+        for(JmsSessionPool sessionPool : sessionPools) {
             try {
-                jmsConnection.close();
-            } catch (final Exception ex) {} // ignore
-            jmsConnection=null;
-            terminated = true ;
+                sessionPool.removeSessionPool();
+            } catch(Exception e) {
+                logger.error("Exception while removing JmsSessionPool.", e);
+            }
         }
+
+        sessionPools.clear();
+        terminated = true ;
         JmsConnectionPoolContainer.removePool(poolKey);
     }
     /**
@@ -514,9 +518,13 @@
      * @return int	the number of in use sessions
      */
     public synchronized int getFreeSessionsInPool(final int acknowledgeMode) {
-        final ArrayList<JmsSession> freeSessionMap = (freeSessionsMap == null ? null : freeSessionsMap.get(acknowledgeMode)) ;
-        final int numFreeSessions = (freeSessionMap == null ? 0 : freeSessionMap.size()) ;
-        return numFreeSessions;
+        int count = 0;
+
+        for(JmsSessionPool sessionPool : sessionPools) {
+            count += sessionPool.getFreeSessionsInPool(acknowledgeMode);
+        }
+
+        return count;
     }
     
     /**
@@ -526,69 +534,13 @@
      * @return int	the number of in use sessions
      */
     public synchronized int getInUseSessionsInPool(final int acknowledgeMode) {
-        final ArrayList<JmsSession> inUseSessionMap = (inUseSessionsMap == null ? null : inUseSessionsMap.get(acknowledgeMode)) ;
-        final int numInUseSessions = (inUseSessionMap == null ? 0 : inUseSessionMap.size()) ;
-        return numInUseSessions;
-    }
-    
-    /**
-     * Initialise the connection.
-     * @throws ConnectionException If the pool has already been terminated.
-     * @throws NamingContextException for errors obtaining a naming context
-     * @throws NamingException for errors accessing a naming context
-     * @throws JMSException for errors creating the connection
-     */
-    private synchronized void initConnection()
-        throws ConnectionException, NamingContextException, NamingException, JMSException
-    {
-        if (terminated)
-        {
-            throw new ConnectionException("Connection pool has been terminated") ;
+        int count = 0;
+
+        for(JmsSessionPool sessionPool : sessionPools) {
+            count += sessionPool.getInUseSessionsInPool(acknowledgeMode);
         }
-        
-        if (jmsConnection==null) {
-            JmsConnectionPoolContainer.addToPool(poolKey, this);
-            logger.debug("Creating a JMS Connection for poolKey : " + poolKey);
-            Properties jndiEnvironment = JmsConnectionPoolContainer.getJndiEnvironment(poolKey);
-            Context jndiContext = NamingContextPool.getNamingContext(jndiEnvironment);
-            try {
-                String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
-                Object factoryConnection=null;
 
-                try
-                {
-                    factoryConnection = jndiContext.lookup(connectionFactoryString);
-                } catch (NamingException ne) {
-                    logger.info("Received NamingException, refreshing context.");
-                    jndiContext = NamingContextPool.replaceNamingContext(jndiContext, 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 (factoryConnection instanceof XAConnectionFactory) {
-                    final XAConnectionFactory factory = (XAConnectionFactory)factoryConnection ;
-                    jmsConnection = useJMSSecurity ? factory.createXAConnection(username,password): factory.createXAConnection();
-                    isXAAware = true ;
-                    freeSessionsMap.put(Session.SESSION_TRANSACTED, new ArrayList<JmsSession>() );
-                    inUseSessionsMap.put(Session.SESSION_TRANSACTED, new ArrayList<JmsSession>() );
-                } else if (factoryConnection instanceof ConnectionFactory) {
-                    final ConnectionFactory factory = (ConnectionFactory)factoryConnection ;
-                    jmsConnection = useJMSSecurity ? factory.createConnection(username,password): factory.createConnection();
-                }
-                
-                jmsConnection.setExceptionListener(new ExceptionListener() {
-                    public void onException(JMSException arg0)
-                    {
-                        cleanSessionPool() ;
-                    }
-                }) ;
-                jmsConnection.start();
-            } finally {
-                NamingContextPool.releaseNamingContext(jndiContext) ;
-            }
-        }
+        return count;
     }
     
     /**
@@ -615,7 +567,15 @@
         throws ConnectionException
     {
         final Object tx = getTransaction() ;
-        return transactionsToSessions.get(tx) ;
+
+        for(JmsSessionPool sessionPool : sessionPools) {
+            JmsXASession session = sessionPool.transactionsToSessions.get(tx);
+            if(session != null) {
+                return session;
+            }
+        }
+
+        return null;
     }
     
     /**
@@ -626,25 +586,36 @@
     synchronized void associateTransaction(final JmsXASession session)
         throws ConnectionException
     {
-        final Object tx = getTransaction() ;
-        if (tx == null)
-        {
-            throw new ConnectionException("No active transaction") ;
+        JmsSessionPool sessionPool = findOwnerPool(session);
+
+        if(sessionPool != null) {
+            sessionPool.associateTransaction(session);
         }
-        transactionsToSessions.put(tx, session) ;
-        sessionsToTransactions.put(session, tx) ;
     }
-    
+
     /**
      * Disassociate the JMS XA Session from a transaction.
      * @param session The XA session.
      */
     synchronized void disassociateTransaction(final JmsXASession session)
     {
-        final Object tx = sessionsToTransactions.remove(session) ;
-        transactionsToSessions.remove(tx) ;
+        JmsSessionPool sessionPool = findOwnerPool(session);
+
+        if(sessionPool != null) {
+            sessionPool.disassociateTransaction(session);
+        }
     }
-    
+
+    synchronized JmsSessionPool findOwnerPool(final JmsSession session) {
+        for(JmsSessionPool sessionPool : sessionPools) {
+            if(sessionPool.isOwnerPool(session)) {
+                return sessionPool;
+            }
+        }
+
+        return null;
+    }
+
     static
     {
     	PropertyManager prop = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE);
@@ -676,9 +647,402 @@
     		}
     	}
     }
-    
+
+    class JmsSessionPool {
+
+        /** Reference to a Queue or Topic Connection, we only need one per pool */
+        protected Connection jmsConnection ;
+
+        /** Number of free sessions in the pool that can be given out. Indexed by session key */
+        private Map<Integer,ArrayList<JmsSession>> freeSessionsMap = new HashMap<Integer,ArrayList<JmsSession>>();
+
+        /** Number of session that are currently in use. Indexed by session key mode */
+        private Map<Integer,ArrayList<JmsSession>> inUseSessionsMap = new HashMap<Integer,ArrayList<JmsSession>>();
+
+        /**
+         * Mapping from transactions to sessions.
+         */
+        private Map<Object, JmsXASession> transactionsToSessions = new HashMap<Object, JmsXASession>() ;
+
+        /**
+         * Mapping from sessions to transactions.
+         */
+        private Map<JmsXASession, Object> sessionsToTransactions = new HashMap<JmsXASession, Object>() ;
+
+        private JmsSessionPool() {
+            freeSessionsMap.put(Session.AUTO_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+            freeSessionsMap.put(Session.CLIENT_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+            freeSessionsMap.put(Session.DUPS_OK_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+
+            inUseSessionsMap.put(Session.AUTO_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+            inUseSessionsMap.put(Session.CLIENT_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+            inUseSessionsMap.put(Session.DUPS_OK_ACKNOWLEDGE, new ArrayList<JmsSession>() );
+        }
+
+        private boolean isOwnerPool(JmsSession session) {
+            if (isInList(session, freeSessionsMap.values())) {
+                return true;
+            } else if (isInList(session, inUseSessionsMap.values())) {
+                return true;
+            }
+
+            return false;
+        }
+
+        private boolean isInList(JmsSession session, Collection<ArrayList<JmsSession>> sessionLists) {
+            for(ArrayList<JmsSession> sessionList : sessionLists) {
+                if(sessionList.contains(session)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public synchronized void removeSessionPool() {
+            freeSessionsMap = null ;
+            inUseSessionsMap = null ;
+            transactionsToSessions = null ;
+            sessionsToTransactions = null ;
+
+            logger.debug("Emptied the session pool now closing the connection to the factory.");
+            if (jmsConnection!=null) {
+                try {
+                    jmsConnection.close();
+                } catch (final Exception ex) {} // ignore
+                jmsConnection=null;
+            }
+        }
+
+        public synchronized JmsSession getSession(int acknowledgeMode, boolean transacted) throws ConnectionException, NamingException, JMSException {
+
+            initConnection() ;
+            
+            ArrayList<JmsSession> freeSessions = freeSessionsMap.get(acknowledgeMode );
+            ArrayList<JmsSession> inUseSessions = inUseSessionsMap.get(acknowledgeMode);
+
+            if (freeSessions.size() > 0)
+            {
+                final JmsSession session = freeSessions.remove(freeSessions.size()-1);
+                inUseSessions.add(session);
+                return session ;
+            } else if (getSessionsInPool() < maxSessionsPerConnection) {
+                JmsSession session = null;
+                
+                if(transacted) {
+                    if(getXASessionsInPool() < maxXASessionsPerConnection) {
+                        session = addAnotherSession(poolKey, transacted, acknowledgeMode);
+                    }
+                } else {
+                    session = addAnotherSession(poolKey, transacted, acknowledgeMode);
+                }
+
+                if(session != null) {
+                    inUseSessions.add(session);
+                    return session ;
+                }
+            }
+
+            return null;
+        }
+
+        private synchronized void initConnection()
+            throws ConnectionException, NamingException, JMSException
+        {
+            if (terminated)
+            {
+                throw new ConnectionException("Connection pool has been terminated") ;
+            }
+
+            if (jmsConnection == null)
+            {
+                try {
+                    logger.debug("Creating a JMS Connection for poolKey : " + poolKey);
+                    final Object factoryConnection = getFactoryConnection() ;
+                    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 (isXAAware)
+                    {
+                        final XAConnectionFactory factory = (XAConnectionFactory)factoryConnection ;
+                        jmsConnection = useJMSSecurity ? factory.createXAConnection(username,password): factory.createXAConnection();
+                        freeSessionsMap.put(Session.SESSION_TRANSACTED, new ArrayList<JmsSession>() );
+                        inUseSessionsMap.put(Session.SESSION_TRANSACTED, new ArrayList<JmsSession>() );
+                    }
+                    else if (factoryConnection instanceof ConnectionFactory)
+                    {
+                        final ConnectionFactory factory = (ConnectionFactory)factoryConnection ;
+                        jmsConnection = useJMSSecurity ? factory.createConnection(username,password): factory.createConnection();
+                    }
+        
+                    jmsConnection.setExceptionListener(new ExceptionListener() {
+                        public void onException(JMSException arg0)
+                        {
+                            // This will result in all connections (and their sessions) on this pool
+                            // being closed...
+                            cleanSessionPool() ;
+                        }
+                    }) ;
+                    jmsConnection.start();
+                } catch (final NamingContextException nce) {
+                    throw new ConnectionException("Unexpected exception accessing Naming Context", nce) ;
+                }
+            }
+        }
+
+        /**
+         * This is where we create the sessions.
+         *
+         * @param poolKey
+         * @param transacted
+         * @throws JMSException
+         */
+        private  synchronized JmsSession addAnotherSession(Map<String, String> poolKey, final boolean transacted, final int acknowledgeMode)
+            throws JMSException
+        {
+            // Sessions need to be created in this way because of an issue with JBM.
+            // See https://jira.jboss.org/jira/browse/JBESB-1799
+            final long currentID = id ;
+            final Connection currentConnection = jmsConnection ;
+            final Future<JmsSession> future = COMPLETION_SERVICE.submit(new Callable<JmsSession>() {
+                public JmsSession call()
+                    throws JMSException
+                {
+                    final JmsSession session ;
+
+                    if (transacted) {
+                        session = new JmsXASession(JmsConnectionPool.this, ((XAConnection)currentConnection).createXASession(), currentID);
+                    } else {
+                        session = new JmsSession(JmsConnectionPool.this, currentConnection.createSession(transacted, acknowledgeMode), currentID);
+                    }
+
+                    return session ;
+                }
+            }) ;
+
+            //Create a new Session
+            ArrayList<JmsSession> freeSessions = freeSessionsMap.get(acknowledgeMode);
+            // For now we only support JTA transacted sessions
+            try
+            {
+                JmsSession session = future.get();
+                logger.debug("Number of Sessions in the pool with acknowledgeMode: " + acknowledgeMode + " is now " + getSessionsInPool(acknowledgeMode));
+                return session;
+            }
+            catch (final InterruptedException ie) {} // ignore
+            catch (final ExecutionException ee)
+            {
+                final Throwable th = ee.getCause() ;
+                if (th instanceof JMSException)
+                {
+                    throw (JMSException)th ;
+                }
+                if (th instanceof Error)
+                {
+                    throw (Error)th ;
+                }
+                if (th instanceof RuntimeException)
+                {
+                    throw (RuntimeException)th ;
+                }
+            }
+
+            return null;
+        }
+
+        public void cleanSessionPool() {
+            final Connection connection ;
+            synchronized(this)
+           {
+                if (terminated)
+                {
+                    return ;
+                }
+                id++ ;
+                for (List<JmsSession> list : freeSessionsMap.values())
+                {
+                    list.clear() ;
+                }
+                for (List<JmsSession> list : inUseSessionsMap.values())
+                {
+                    list.clear() ;
+                }
+                transactionsToSessions.clear() ;
+                sessionsToTransactions.clear() ;
+
+                logger.debug("Cleared the session pool now closing the connection to the factory.");
+                connection = jmsConnection ;
+                jmsConnection = null ;
+            }
+            if (connection!=null) {
+                try {
+                    connection.close();
+                } catch (final Exception ex) {} // ignore
+            }
+        }
+
+        /**
+         * Returns the total number of sessions in the pool.
+         * @return The total number of sessions in the pool.
+         */
+        private synchronized int getSessionsInPool() {
+            // Get a count of all sessions (of any type) in the pool...
+            return getSessionsInPool(JmsSession.class);
+        }
+
+        /**
+         * Returns the total number of XA sessions in the pool.
+         * @return The total number of XA sessions in the pool.
+         */
+        private synchronized int getXASessionsInPool() {
+            // Get a count of XA sessions in the pool...
+            return getSessionsInPool(JmsXASession.class);
+        }
+
+        /**
+         * Returns the total number of XA sessions in the pool.
+         * @return The total number of XA sessions in the pool.
+         */
+        private synchronized int getSessionsInPool(Class<? extends JmsSession> jmsSessionType) {
+            int total = 0;
+
+            total += getSessionsInMap(freeSessionsMap, jmsSessionType);
+            total += getSessionsInMap(inUseSessionsMap, jmsSessionType);
+
+            return total;
+        }
+
+        private synchronized int getSessionsInMap(Map<Integer, ArrayList<JmsSession>> sessionsMap, Class<? extends JmsSession> jmsSessionType) {
+            Collection<ArrayList<JmsSession>> sessionLists = sessionsMap.values();
+            int total = 0;
+
+            for(ArrayList<JmsSession> sessionList : sessionLists) {
+                for(JmsSession session : sessionList) {
+                    if(jmsSessionType.isAssignableFrom(session.getClass())) {
+                        total++;
+                    }
+                }
+            }
+
+            return total;
+        }
+
+        /**
+         * Returns the total nr of sessions for the specifed acknowledge mode
+         *
+         * @param acknowledgeMode the acknowledge mode of sessions
+         * @return
+         */
+        public synchronized int getSessionsInPool(final int acknowledgeMode) {
+            return getFreeSessionsInPool(acknowledgeMode) + getInUseSessionsInPool(acknowledgeMode) ;
+        }
+
+        /**
+         * Get the number of free sessions created with the specified acknowledge mode
+         * @param acknowledgeMode the acknowledge mode of sessions
+         * @return int	the number of in use sessions
+         */
+        public synchronized int getFreeSessionsInPool(final int acknowledgeMode) {
+            final ArrayList<JmsSession> freeSessionMap = (freeSessionsMap == null ? null : freeSessionsMap.get(acknowledgeMode)) ;
+            final int numFreeSessions = (freeSessionMap == null ? 0 : freeSessionMap.size()) ;
+            return numFreeSessions;
+        }
+
+        /**
+         * Get the number of sessions that are in use and that were
+         * created with the specified acknowledge mode
+         * @param acknowledgeMode the acknowledge mode of sessions
+         * @return int	the number of in use sessions
+         */
+        public synchronized int getInUseSessionsInPool(final int acknowledgeMode) {
+            final ArrayList<JmsSession> inUseSessionMap = (inUseSessionsMap == null ? null : inUseSessionsMap.get(acknowledgeMode)) ;
+            final int numInUseSessions = (inUseSessionMap == null ? 0 : inUseSessionMap.size()) ;
+            return numInUseSessions;
+        }
+
+        /**
+         * Associate the JMS XA Session with the current transaction.
+         * @param session The XA session.
+         * @throws ConnectionException if there is no transaction active.
+         */
+        synchronized void associateTransaction(final JmsXASession session)
+            throws ConnectionException
+        {
+            final Object tx = getTransaction() ;
+            if (tx == null)
+            {
+                throw new ConnectionException("No active transaction") ;
+            }
+            transactionsToSessions.put(tx, session) ;
+            sessionsToTransactions.put(session, tx) ;
+        }
+
+        /**
+         * Disassociate the JMS XA Session from a transaction.
+         * @param session The XA session.
+         */
+        synchronized void disassociateTransaction(final JmsXASession session)
+        {
+            final Object tx = sessionsToTransactions.remove(session) ;
+            transactionsToSessions.remove(tx) ;
+        }
+
+        public void releaseInUseSession(JmsSession session) {
+            final int mode ;
+            try {
+                mode = session.getAcknowledgeMode() ;
+            } catch (final JMSException jmse) {
+                logger.warn("JMSException while calling getAcknowledgeMode") ;
+                logger.debug("JMSException while calling getAcknowledgeMode", jmse) ;
+                return ;
+            }
+
+            final ArrayList<JmsSession> sessions = (inUseSessionsMap == null ? null : inUseSessionsMap.get(mode));
+            if (sessions != null) {
+                sessions.remove(session) ;
+            }
+        }
+
+        public void handleCloseSession(JmsSession session) {
+            if (session.isSuspect())
+            {
+                logger.debug("Session is suspect, dropping") ;
+                handleReleaseSession(session) ;
+            }
+            else
+            {
+                if (session.getId() != id)
+                {
+                    logger.debug("Session is from a previous incarnation, dropping") ;
+                }
+                else
+                {
+                    final int mode ;
+                    try {
+                        mode = session.getAcknowledgeMode() ;
+                    } catch (final JMSException jmse) {
+                        logger.warn("JMSException while calling getAcknowledgeMode") ;
+                        logger.debug("JMSException while calling getAcknowledgeMode", jmse) ;
+                        return ;
+                    }
+
+                    final ArrayList<JmsSession> sessions = (freeSessionsMap == null ? null : freeSessionsMap.get(mode));
+                    if (sessions != null) {
+                        sessions.add(session) ;
+                    }
+                }
+                session.releaseResources() ;
+                releaseInUseSession(session) ;
+            }
+        }
+    }
+
     /**
      * Thread factory returning daemon threads.
+     * <p/>
+     * Required as part of the fix for https://jira.jboss.org/jira/browse/JBESB-1799
+     *
      * @author kevin
      */
     private static final class DaemonThreadFactory implements ThreadFactory
@@ -687,7 +1051,7 @@
          * The default executor factory.
          */
         private final ThreadFactory defaultFactory = Executors.defaultThreadFactory() ;
-        
+
         /**
          * Return a new daemon thread.
          * @param runnable The runnable associated with the thread.

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -32,6 +32,7 @@
 import org.jboss.soa.esb.lifecycle.LifecycleResource;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceFactory;
+import org.jboss.soa.esb.util.JndiUtil;
 import org.apache.log4j.Logger;
 
 /**
@@ -160,7 +161,7 @@
      */
     static Properties getJndiEnvironment(Map<String,String> poolKey) {
         Properties environment = new Properties();
-        final String[] jndiPrefixes = JMSEpr.getJndiPrefixes(environment.getProperty(JMSEpr.JNDI_PREFIXES)) ;
+        final String[] jndiPrefixes = JndiUtil.getJndiPrefixes(poolKey.get(JMSEpr.JNDI_PREFIXES)) ;
         for (String key: poolKey.keySet()) {
             for(String jndiPrefix: jndiPrefixes) {
                 if (key.startsWith(jndiPrefix)) {

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -22,6 +22,10 @@
 package org.jboss.internal.soa.esb.rosetta.pooling;
 
 import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
 import java.util.HashSet;
 
 import javax.jms.BytesMessage;
@@ -49,6 +53,10 @@
 public class JmsSession implements Session
 {
     /**
+     * The connection pool.
+     */
+    private final JmsConnectionPool pool ;
+    /**
      * The session delegate.
      */
     private final Session session ;
@@ -80,16 +88,18 @@
     
     /**
      * Create the session wrapper.
+     * @param pool The pool associated with this session.
      * @param session The session delegate.
      * @param id The pool instance id.
      * @param isJTA True if this tales part in a JTA transaction
      * @throws JMSException
      */
-    JmsSession(final Session session, final long id)
+    JmsSession(final JmsConnectionPool pool, final Session session, final long id)
         throws JMSException
     {
+        this.pool = pool ;
         this.id = id ;
-        this.session = session ;
+        this.session = (Session)getExceptionHandler(pool, Session.class, session) ;
         acknowledgeMode = session.getAcknowledgeMode() ;
         // Workaround for JBESB-1873
         if ("org.jboss.jms.client.JBossSession".equals(session.getClass().getName()))
@@ -290,7 +300,7 @@
         }
         final QueueBrowser result = getQueueBrowser(queueBrowser) ;
         queueBrowserSet.add(result) ;
-        return result ;
+        return (QueueBrowser)getExceptionHandler(pool, QueueBrowser.class, result) ;
     }
 
     private synchronized MessageConsumer trackMessageConsumer(MessageConsumer messageConsumer)
@@ -303,7 +313,7 @@
         }
         final MessageConsumer result = getMessageConsumer(messageConsumer) ;
         messageConsumerSet.add(result) ;
-        return result ;
+        return (MessageConsumer)getExceptionHandler(pool, MessageConsumer.class, result) ;
     }
 
     private synchronized TopicSubscriber trackTopicSubscriber(TopicSubscriber topicSubscriber)
@@ -316,7 +326,7 @@
         }
         final TopicSubscriber result = getTopicSubscriber(topicSubscriber) ;
         messageConsumerSet.add(result) ;
-        return result ;
+        return (TopicSubscriber)getExceptionHandler(pool, TopicSubscriber.class, result) ;
     }
 
     private synchronized MessageProducer trackMessageProducer(MessageProducer messageProducer)
@@ -329,7 +339,7 @@
         }
         final MessageProducer result = getMessageProducer(messageProducer) ;
         messageProducerSet.add(result) ;
-        return result ;
+        return (MessageProducer)getExceptionHandler(pool, MessageProducer.class, result) ;
     }
 
     synchronized void releaseResources()
@@ -340,7 +350,7 @@
             {
                 try {
                     queueBrowser.close() ;
-                } catch (final JMSException jmse) {} // ignore
+                } catch (final Exception jmse) {} // ignore
             }
             queueBrowserSet = null ;
         }
@@ -350,7 +360,7 @@
             {
                 try {
                     messageConsumer.close() ;
-                } catch (final JMSException jmse) {} // ignore
+                } catch (final Exception jmse) {} // ignore
             }
             messageConsumerSet = null ;
         }
@@ -360,7 +370,7 @@
             {
                 try {
                     messageProducer.close() ;
-                } catch (final JMSException jmse) {} // ignore
+                } catch (final Exception jmse) {} // ignore
             }
             messageProducerSet = null ;
         }
@@ -410,4 +420,62 @@
     {
         return suspect ;
     }
+
+    /**
+     * Wrap the object in an exception handler.
+     * @param pool The pool associated with this session.
+     * @param instanceClass The interface type of the instance.
+     * @param instance The instance
+     * @return 
+     */
+    protected Object getExceptionHandler(final JmsConnectionPool pool,
+            final Class<?> instanceClass, final Object instance)
+    {
+        final InvocationHandler handler = new ExceptionHandler(pool, instance) ;
+        return Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {instanceClass}, handler);
+    }
+    
+    /**
+     * Handler responsible for intercepting JMS exceptions and checking for unreported closure.
+     * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+     */
+    private final class ExceptionHandler implements InvocationHandler
+    {
+        /**
+         * The connection pool.
+         */
+        private final JmsConnectionPool pool ;
+        /**
+         * The target instance.
+         */
+        private final Object target ;
+        
+        /**
+         * Construct the handler using the specified target.
+         * @param pool The associated connection pool.
+         * @param target The target instance.
+         */
+        public ExceptionHandler(final JmsConnectionPool pool, final Object target)
+        {
+            this.pool = pool ;
+            this.target = target ;
+        }
+        
+        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+        {
+            try
+            {
+                return method.invoke(target, args);
+            }
+            catch (final InvocationTargetException ite)
+            {
+                final Throwable th = ite.getCause() ;
+                if (th instanceof JMSException)
+                {
+                    pool.handleException(JmsSession.this, (JMSException)th) ;
+                }
+                throw th ;
+            }
+        }
+    }
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -79,9 +79,9 @@
     JmsXASession(final JmsConnectionPool pool, final XASession session, final long id)
         throws JMSException
     {
-        super(session, id) ;
+        super(pool, session, id) ;
         this.pool = pool ;
-        this.session = session ;
+        this.session = (XASession)getExceptionHandler(pool, XASession.class, session) ;
     }
     
     @Override

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptor.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptor.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -19,9 +19,13 @@
  */
 package org.jboss.internal.soa.esb.services.registry;
 
-import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Arrays;
+import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.log4j.Logger;
@@ -67,12 +71,24 @@
      */
     private final LRUMap serviceInfoMap = new LRUMap(MAX_CACHE_SIZE) ;
 
+    /**
+     * Find all Services assigned to the Red Hat/JBossESB organization.
+     * @return Collection of Strings containing the service names.
+     * @throws RegistryException
+     */
     public List<String> findAllServices() throws RegistryException
     {
         // Do not cache, go direct to the registry
         return getRegistry().findAllServices() ;
     }
 
+    /**
+     * Find all services that belong to the supplied category. 
+     * 
+     * @param serviceCategoryName - name of the category to which the service belongs.
+     * @return Collection of Strings containing the service names
+     * @throws RegistryException
+     */
     public List<String> findServices(final String category)
             throws RegistryException
     {
@@ -80,127 +96,280 @@
         return getRegistry().findServices(category) ;
     }
 
+    /**
+     * Returns the first EPR in the list that belong to a specific category and service combination.
+     * 
+     * @param serviceCategoryName - name of the category to which the service belongs.
+     * @param serviceName         - name of the service to which the EPS belongs.
+     * @return EPR.
+     * @throws RegistryException
+     */
     public EPR findEPR(final String category, final String name)
             throws RegistryException, ServiceNotFoundException
     {
-        final List<EPR> eprs = findEPRs(category, name) ;
-        return eprs.get(0) ;
+        final Service service = new Service(category, name) ;
+        final ConcurrentMap<EPR, EPR> eprs = getEPRs(service) ;
+        final Iterator<EPR> eprIter = eprs.keySet().iterator() ;
+        if (eprIter.hasNext())
+        {
+            return eprIter.next() ;
+        }
+        else
+        {
+            return null;
+        }
     }
 
+    /**
+     * Finds all the EPRs that belong to a specific category and service combination.
+     * 
+     * @param serviceCategoryName - name of the category to which the service belongs.
+     * @param serviceName         - name of the service to which the EPS belongs.
+     * @return Collection of EPRs.
+     * @throws RegistryException
+     */
     public List<EPR> findEPRs(final String category, final String name)
             throws RegistryException, ServiceNotFoundException
     {
         final Service service = new Service(category, name) ;
-        return Collections.unmodifiableList(getEPRs(service)) ;
+        final ConcurrentMap<EPR, EPR> eprs = getEPRs(service) ;
+        return Arrays.asList(eprs.keySet().toArray(new EPR[0])) ;
     }
 
+    /**
+     * Registers an EPR under the specified category and service. If the specified service does
+     * not exist, it will be created at the same time.
+     * 
+     * @param serviceCategoryName - name of the category to which the service belongs.
+     * @param serviceName         - name of the service to which the EPS belongs.
+     * @param serviceDescription  - human readable description of the service, 
+     *                             only used when it the service does not yet exist.
+     * @param epr                 - the EndPointReference (EPR) that needs to be registered.
+     * @param eprDescription      - human readable description of the EPR
+     * @throws RegistryException
+     */
     public void registerEPR(final String category, final String name,
             final String serviceDescription, final EPR epr, final String eprDescription)
             throws RegistryException
     {
         final Service service = new Service(category, name) ;
-        synchronized(this)
+        final ServiceInfo serviceInfo = getServiceInfo(service) ;
+        if (serviceInfo != null)
         {
+            serviceInfo.acquireWriteLock() ;
+        }
+        try
+        {
             getRegistry().registerEPR(category, name, serviceDescription, epr, eprDescription) ;
-            final List<EPR> eprs = getCurrentEPRs(service) ;
-            if (eprs != null)
+            if (serviceInfo != null)
             {
-                eprs.add(epr) ;
+                final ConcurrentMap<EPR, EPR> eprs = serviceInfo.getEPRs() ;
+                if (eprs != null)
+                {
+                    eprs.put(epr, epr) ;
+                }
             }
         }
+        finally
+        {
+            if (serviceInfo != null)
+            {
+                serviceInfo.releaseWriteLock() ;
+            }
+        }
     }
 
+    /**
+     * Removes an EPR from the Registry. 
+     * @param serviceCategoryName - name of the category to which the service belongs.
+     * @param serviceName         - name of the service to which the EPS belongs.
+     * @param epr                 - the EndPointReference (EPR) that needs to be unregistered.
+     * @throws RegistryException
+     */
     public void unRegisterEPR(final String category, final String name,
             final EPR epr) throws RegistryException, ServiceNotFoundException
     {
         final Service service = new Service(category, name) ;
-        synchronized(this)
+        final ServiceInfo serviceInfo = getServiceInfo(service) ;
+        if (serviceInfo != null)
         {
-            final List<EPR> eprs = getCurrentEPRs(service) ;
-            if ((eprs != null) && eprs.remove(epr) && (eprs.size() == 0))
+            serviceInfo.acquireWriteLock() ;
+        }
+        try
+        {
+            getRegistry().unRegisterEPR(category, name, epr) ;
+            if (serviceInfo != null)
             {
-                serviceInfoMap.remove(service) ;
-                if (LOGGER.isInfoEnabled())
+                final ConcurrentMap<EPR, EPR> eprs = serviceInfo.getEPRs() ;
+                if (eprs != null)
                 {
-                    LOGGER.debug("Cache removing service " + service) ;
+                    eprs.remove(epr) ;
                 }
             }
-            getRegistry().unRegisterEPR(category, name, epr) ;
         }
+        finally
+        {
+            if (serviceInfo != null)
+            {
+                serviceInfo.releaseWriteLock() ;
+            }
+        }
     }
 
+    /**
+     * Removes a service from the Registry along with all the ServiceBindings underneath it.
+     *
+     * @param category           - name of the service category, for example 'transformation'.
+     * @param serviceName        - name of the service, for example 'smooks'.
+     * @throws RegistryException
+     */
     public void unRegisterService(final String category, final String name)
             throws RegistryException, ServiceNotFoundException
     {
         final Service service = new Service(category, name) ;
-        synchronized(this)
+        final ServiceInfo serviceInfo = getServiceInfo(service) ;
+        if (serviceInfo != null)
         {
-            serviceInfoMap.remove(service) ;
-            if (LOGGER.isInfoEnabled())
+            serviceInfo.acquireWriteLock() ;
+        }
+        try
+        {
+            getRegistry().unRegisterService(category, name) ;
+            removeServiceInfo(service) ;
+            if (LOGGER.isDebugEnabled())
             {
                 LOGGER.debug("Cache removing service " + service) ;
             }
-            getRegistry().unRegisterService(category, name) ;
         }
+        finally
+        {
+            if (serviceInfo != null)
+            {
+                serviceInfo.releaseWriteLock() ;
+            }
+        }
     }
 
-    private synchronized List<EPR> getEPRs(final Service service)
-        throws RegistryException, ServiceNotFoundException
+    /**
+     * Get the service information if it is still valid.
+     * @param service The service information.
+     * @return The service information or null
+     */
+    private synchronized ServiceInfo getServiceInfo(final Service service)
     {
-        final List<EPR> eprs = getCurrentEPRs(service) ;
-        if (eprs != null)
+        final ServiceInfo serviceInfo = (ServiceInfo)serviceInfoMap.get(service) ;
+        if (serviceInfo != null)
         {
-            return eprs ;
+            if (serviceInfo.isValid())
+            {
+                return serviceInfo ;
+            }
+            removeServiceInfo(service) ;
         }
+        return null ;
+    }
+
+    /**
+     * Create new service information or return current information if present. 
+     * @param service The service information.
+     * @return The service information
+     */
+    private synchronized ServiceInfo createServiceInfo(final Service service)
+    {
+        final ServiceInfo serviceInfo = new ServiceInfo() ;
+        final ServiceInfo origServiceInfo = (ServiceInfo)serviceInfoMap.put(service, serviceInfo) ;
+        if ((origServiceInfo != null)  && origServiceInfo.isValid())
+        {
+            serviceInfoMap.put(service, origServiceInfo) ;
+            return origServiceInfo ;
+        }
         else
         {
-            final List<EPR> currentEPRs = getRegistry().findEPRs(service.getCategory(), service.getName()) ;
-            final List<EPR> copyEPRs = new ArrayList<EPR>(currentEPRs) ;
-            final ServiceInfo serviceInfo = new ServiceInfo(copyEPRs) ;
-            serviceInfoMap.put(service, serviceInfo) ;
-            if (LOGGER.isInfoEnabled())
-            {
-                LOGGER.debug("Cache reloaded for service " + service) ;
-            }
-            return copyEPRs ;
+            return serviceInfo ;
         }
     }
-    
-    private synchronized List<EPR> getCurrentEPRs(final Service service)
+
+    /**
+     * Remove the service information from map.
+     * @param service The service information
+     */
+    private synchronized void removeServiceInfo(final Service service)
     {
-        final ServiceInfo serviceInfo = (ServiceInfo)serviceInfoMap.get(service) ;
+        serviceInfoMap.remove(service) ;
+    }
+
+    /**
+     * Get the EPRs assocaited with the service, updating the cache if necessary
+     * @param service The service to query.
+     * @return The map of EPRs.
+     * @throws RegistryException For errors accessing the registry delegate.
+     * @throws ServiceNotFoundException If the service is not in the registry.
+     */
+    private ConcurrentMap<EPR, EPR> getEPRs(final Service service)
+        throws RegistryException, ServiceNotFoundException
+    {
+        final ServiceInfo serviceInfo = getServiceInfo(service) ;
         if (serviceInfo != null)
         {
-            final boolean infoEnabled = LOGGER.isInfoEnabled() ;
-            if (serviceInfo.isValid())
+            serviceInfo.acquireReadLock() ;
+            try
             {
-                if (infoEnabled)
+                final ConcurrentMap<EPR, EPR> eprs = serviceInfo.getEPRs() ;
+                if (eprs != null)
                 {
-                    LOGGER.debug("Cache hit for service " + service) ;
+                    return eprs ;
                 }
-                return serviceInfo.getEPRs() ;
             }
+            finally
+            {
+                serviceInfo.releaseReadLock() ;
+            }
+        }
+        final ServiceInfo newServiceInfo = createServiceInfo(service) ;
+        newServiceInfo.acquireWriteLock() ;
+        try
+        {
+            final ConcurrentMap<EPR, EPR> eprs = newServiceInfo.getEPRs() ;
+            if (eprs != null)
+            {
+                return eprs ;
+            }
             else
             {
-                if (infoEnabled)
+                final List<EPR> currentEPRs = getRegistry().findEPRs(service.getCategory(), service.getName()) ;
+                final ConcurrentMap<EPR, EPR> newEPRs = new ConcurrentHashMap<EPR, EPR>() ;
+                for(EPR epr: currentEPRs)
                 {
-                    LOGGER.debug("Cache expiry for service " + service) ;
+                    newEPRs.put(epr, epr) ;
                 }
-                serviceInfoMap.remove(service) ;
+                newServiceInfo.setEPRs(newEPRs) ;
+                if (LOGGER.isDebugEnabled())
+                {
+                    LOGGER.debug("Cache reloaded for service " + service) ;
+                }
+                return newEPRs ;
             }
         }
-        return null ;
+        finally
+        {
+            newServiceInfo.releaseWriteLock() ;
+        }
     }
     
+    /**
+     * Class representing the service information
+     * @author kevin
+     */
     private static class ServiceInfo
     {
         private final long expiryTime ;
         
-        private List<EPR> eprs ;
+        private ConcurrentMap<EPR, EPR> eprs ;
         
-        private ServiceInfo(final List<EPR> eprs)
+        private ReadWriteLock lock = new ReentrantReadWriteLock() ;
+        
+        private ServiceInfo()
         {
-            this.eprs = eprs ;
             if (VALIDITY_PERIOD > 0)
             {
                 expiryTime = System.currentTimeMillis() + VALIDITY_PERIOD ;
@@ -216,10 +385,35 @@
             return System.currentTimeMillis() < expiryTime ;
         }
         
-        List<EPR> getEPRs()
+        ConcurrentMap<EPR, EPR> getEPRs()
         {
             return eprs ;
         }
+        
+        void setEPRs(final ConcurrentMap<EPR, EPR> eprs)
+        {
+            this.eprs = eprs ;
+        }
+        
+        void acquireWriteLock()
+        {
+            lock.writeLock().lock() ;
+        }
+        
+        void releaseWriteLock()
+        {
+            lock.writeLock().unlock() ;
+        }
+        
+        void acquireReadLock()
+        {
+            lock.readLock().lock() ;
+        }
+        
+        void releaseReadLock()
+        {
+            lock.readLock().unlock() ;
+        }
     }
 
     static

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -70,7 +70,7 @@
 {
 	private static Logger logger = Logger.getLogger(JAXRRegistryImpl.class);
     private JAXRConnectionFactory jaxrConnectionFactory;
-	private static Organization jbossESBOrganization;
+	private Organization jbossESBOrganization;
 	public static final String JBOSS_ESB_CATEGORY = "org.jboss.soa.esb.:category";
 	
     public JAXRRegistryImpl() throws ConfigurationException {
@@ -98,7 +98,7 @@
 			ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, JBOSS_ESB_CATEGORY);
             Classification classification = blm.createClassification(cScheme, "category", category);
 			service.addClassification(classification);
-			organization.addService(service);
+			service.setProvidingOrganization(organization);
 			saveRegistryObject(service, jaxrConnectionFactory);
 		} finally {
 			jaxrConnectionFactory.closeConnection(connection);
@@ -230,9 +230,9 @@
 	{
 		List<String> serviceNames = new ArrayList<String>();
 		try {
-			Collection services = getJBossESBOrganization().getServices();
-			for (Iterator i=services.iterator();i.hasNext();) {
-				String serviceName = ((Service)i.next()).getName().getValue();
+			Collection<Service> services = findServices();
+			for (Service service: services) {
+				String serviceName = service.getName().getValue();
 				serviceNames.add(serviceName);
 			}
 		} catch (JAXRException je) {
@@ -517,6 +517,31 @@
 	}
 
     /**
+     * Finds all services for the organization.
+     */
+    @SuppressWarnings("unchecked")
+    protected Collection<Service> findServices() throws JAXRException
+    {
+        Collection<Service> services = new ArrayList<Service>();
+        Connection connection = jaxrConnectionFactory.getConnection();
+        try {
+            // Get registry service and business query manager
+            RegistryService rs = connection.getRegistryService();
+            BusinessQueryManager bqm = rs.getBusinessQueryManager();
+            //Find based upon qualifier type and values
+            logger.log(Level.DEBUG, "Going to query the registry for services");
+            BulkResponse response = bqm.findServices(getJBossESBOrganization().getKey(),
+                null, null, null, null);
+            if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
+                services = (Collection<Service>) response.getCollection();
+            }
+            return services;
+        } finally {
+            jaxrConnectionFactory.closeConnection(connection);
+        }
+    }
+
+    /**
 	 * Create a jbossesb organization under which we will register all our services.
 	 *
 	 * @return
@@ -648,14 +673,18 @@
 
     /**
 	 * finds the JBossESB Organizationa and creates one if it is not there.
+	 * Note, there are no services associated with this information.
+	 * 
 	 * @return JBossESB Organization
 	 * @throws JAXRException
 	 */
-	private Organization getJBossESBOrganization() throws JAXRException
+	private synchronized Organization getJBossESBOrganization() throws JAXRException
 	{
-		jbossESBOrganization = findOrganization("Red Hat/JBossESB", jaxrConnectionFactory);
 		if (jbossESBOrganization==null) {
-			jbossESBOrganization = createJBossESBOrganization(jaxrConnectionFactory);
+			jbossESBOrganization = findOrganization("Red Hat/JBossESB", jaxrConnectionFactory);
+			if (jbossESBOrganization==null) {
+				jbossESBOrganization = createJBossESBOrganization(jaxrConnectionFactory);
+			}
 		}
 		return jbossESBOrganization;
 	}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -168,7 +168,7 @@
                 }
                 catch (final URISyntaxException urise)
                 {
-                        _logger.warn(urise) ;
+                    throw new RemoteFileSystemException(urise);
                 }
                 m_sPassphrase = p_oP.getPassphrase() ;
 
@@ -200,6 +200,7 @@
                 
                 if (bConnect) 
                 {
+                        _logger.debug("Connecting to SFTP server") ;
                         try
                         {
                                 if (m_iPort > 0)
@@ -359,6 +360,11 @@
          */
         public void deleteRemoteFile(String p_sFile) throws RemoteFileSystemException 
         {
+                if (_logger.isDebugEnabled())
+                {
+                        _logger.debug("deleteRemoteFile(" + p_sFile + "), remote dir " + getRemoteDir()) ;
+                }
+                
                 try
                 {
                         m_oSftpChannel.cd(getRemoteDir()) ;
@@ -379,9 +385,14 @@
          */
         public void remoteDelete(File p_oFile) throws RemoteFileSystemException 
         {
+                final String remoteFile = FtpUtils.fileToFtpString(p_oFile) ;
+                if (_logger.isDebugEnabled())
+                {
+                        _logger.debug("remoteDelete(" + remoteFile + ")") ;
+                }
                 try
                 {
-                        m_oSftpChannel.rm(FtpUtils.fileToFtpString(p_oFile));
+                        m_oSftpChannel.rm(remoteFile);
                 }
                 catch (SftpException ex)
                 {
@@ -398,40 +409,52 @@
          */
         public String[] getFileListFromRemoteDir(String p_sSuffix) throws RemoteFileSystemException 
         {
+                if (_logger.isDebugEnabled())
+                {
+                        _logger.debug("getFileListFromRemoteDir(" + p_sSuffix + "), remote dir " + getRemoteDir()) ;
+                }
                 try
                 {
                         m_oSftpChannel.cd(getRemoteDir()) ;
-                        String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
-                        List<String> lFileList = new ArrayList<String>();
-                        Vector vFileList = m_oSftpChannel.ls(sSuffix);
-                        
-                        if (vFileList != null) 
-                        {
-                                for (int i = 0; i < vFileList.size(); i++) 
-                                {
-                                        Object obj = vFileList.elementAt(i);
-                                        
-                                        if (obj instanceof LsEntry) 
-                                        {
-                                                SftpATTRS oSftAttr = ((LsEntry) obj).getAttrs();
-                                                if (!oSftAttr.isDir()) 
-                                                {
-                                                        lFileList.add(((LsEntry) obj).getFilename());
-                                                }
-                                        }
-                                }
-                        }
-                        
-                        return (String[]) lFileList.toArray(new String[lFileList.size()]);
                 }
                 catch (SftpException ex)
                 {
+                        throw new RemoteFileSystemException(ex);
+                }
+                String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
+                final Vector vFileList ;
+                try
+                {
+                        vFileList = m_oSftpChannel.ls(sSuffix);
+                }
+                catch (SftpException ex)
+                {
                         if (ex.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
                         {
                             return null ;
                         }
                         throw new RemoteFileSystemException(ex);
                 }
+                
+                List<String> lFileList = new ArrayList<String>();
+                if (vFileList != null) 
+                {
+                        for (int i = 0; i < vFileList.size(); i++) 
+                        {
+                                Object obj = vFileList.elementAt(i);
+                                
+                                if (obj instanceof LsEntry) 
+                                {
+                                        SftpATTRS oSftAttr = ((LsEntry) obj).getAttrs();
+                                        if (!oSftAttr.isDir()) 
+                                        {
+                                                lFileList.add(((LsEntry) obj).getFilename());
+                                        }
+                                }
+                        }
+                }
+                
+                return (String[]) lFileList.toArray(new String[lFileList.size()]);
         }
 
         /*
@@ -459,6 +482,10 @@
         public void renameInRemoteDir(String p_sFrom, String p_sTo)
             throws RemoteFileSystemException 
         {
+                if (_logger.isDebugEnabled())
+                {
+                        _logger.debug("renameInRemoteDir(" + p_sFrom + ", " + p_sTo + "), remote dir " + getRemoteDir()) ;
+                }
                 try 
                 {
                         m_oSftpChannel.cd(getRemoteDir()) ;
@@ -482,11 +509,16 @@
          */
         public void remoteRename(File p_oFrom, File p_oTo) throws RemoteFileSystemException 
         {
+                final String from = FtpUtils.fileToFtpString(p_oFrom) ;
+                final String to = FtpUtils.fileToFtpString(p_oTo) ;
+                if (_logger.isDebugEnabled())
+                {
+                        _logger.debug("remoteRename(" + from + ", " + to + "), remote dir " + getRemoteDir()) ;
+                }
                 try 
                 {
                         m_oSftpChannel.cd(getRemoteDir()) ;
-                        m_oSftpChannel.rename(FtpUtils.fileToFtpString(p_oFrom), FtpUtils
-                                        .fileToFtpString(p_oTo));
+                        m_oSftpChannel.rename(from, to);
                 } 
                 catch (SftpException se) 
                 {
@@ -507,6 +539,10 @@
          */
         public void uploadFile(File p_oFile, String p_sRemoteName) throws RemoteFileSystemException 
         {
+            if (_logger.isDebugEnabled())
+            {
+                    _logger.debug("uploadFile(" + p_oFile + ", " + p_sRemoteName + "), remote dir " + getRemoteDir()) ;
+            }
             try
             {
                     m_oSftpChannel.cd(getRemoteDir()) ;
@@ -555,6 +591,10 @@
          */
         public void downloadFile(String p_sFile, String p_sFinalName) throws IOException, RemoteFileSystemException 
         {
+            if (_logger.isDebugEnabled())
+            {
+                    _logger.debug("downloadFile(" + p_sFile + ", " + p_sFinalName + "), remote dir " + getRemoteDir()) ;
+            }
             try
             {
                 final File to = new File(p_sFinalName) ;
@@ -612,6 +652,7 @@
          */
         public void quit() 
         {
+                _logger.debug("quitting") ;
                 m_oSftpChannel.disconnect() ;
                 session.disconnect() ;
         }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -33,6 +33,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
@@ -59,10 +60,6 @@
      * The XML output factory.
      */
     private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance() ;
-    /**
-     * The schema factory.
-     */
-    private static final SchemaFactory SCHEMA_FACTORY = SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" );
 
     /**
      * Get the XML stream reader.
@@ -172,10 +169,29 @@
         throws SAXException
     {
         final InputStream resourceIS = ClassUtil.getResourceAsStream(resource, XMLHelper.class) ;
-        return SCHEMA_FACTORY.newSchema(new StreamSource(resourceIS)) ;
+        return newSchemaFactory().newSchema(new StreamSource(resourceIS)) ;
     }
     
     /**
+     * Get the schema for the specified resources.
+     * @param resources The schema resources to parse.
+     * @return The resource schema for validation. 
+     * @throws SAXException For errors during parsing.
+     */
+    public static Schema getSchema(final String[] resources)
+        throws SAXException
+    {
+        final int numResources = (resources == null ? 0 : resources.length) ;
+        final Source[] sources = new Source[numResources] ;
+        for(int count = 0 ; count < numResources ; count++)
+        {
+            final InputStream resourceIS = ClassUtil.getResourceAsStream(resources[count], XMLHelper.class) ;
+            sources[count] = new StreamSource(resourceIS) ;
+        }
+        return newSchemaFactory().newSchema(sources) ;
+    }
+    
+    /**
      * Validate the specified xml against the schema.
      * @param schema The resource schema for validation.
      * @param xml The XML to validate.
@@ -190,11 +206,16 @@
             return true ;
         }
         catch (final IOException ioe) {} // fall through
-        catch (final SAXException saxe) {} // fall through
+        catch (final SAXException saxe)  {} // fall through
         
         return false ;
     }
 
+    private static SchemaFactory newSchemaFactory()
+    {
+        return SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" );
+    }
+
     /**
      * Create the XML input factory.
      * @return The XML input factory.

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -55,45 +55,77 @@
 import org.jboss.soa.esb.notification.jms.DefaultJMSPropertiesSetter;
 import org.jboss.soa.esb.notification.jms.JMSPropertiesSetter;
 import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.soa.esb.util.JndiUtil;
 import org.jboss.soa.esb.util.Util;
 
 /**
  * JMS Routing Action Processor.
  * <p/>
  * Sample Action Configuration:
- * <pre>
- * &lt;action class="org.jboss.soa.esb.actions.routing.JMSRouter"&gt;
- *     &lt;property name="jndiName" value="queue/A"/&gt;
- * &lt;/action&gt;
+ * <pre>{@code
+ * <action class="org.jboss.soa.esb.actions.routing.JMSRouter">
+ *     <property name="jndiName" value="queue/A"/>
+ * </action>
  *
  * Option properties:
- *     &lt;property name="unwrap" value="false"/&gt;
- *     &lt;property name="jndi-context-factory" value="org.jnp.interfaces.NamingContextFactory"/&gt;
- *     &lt;property name="jndi-URL" value="127.0.0.1:1099"/&gt;
- *     &lt;property name="jndi-pkg-prefix" value="org.jboss.naming:org.jnp.interfaces"/&gt;
- *     &lt;property name="connection-factory" value="ConnectionFactory"/&gt;
- *     &lt;property name="persistent" value="true"/&gt;
- *     &lt;property name="priority" value="javax.jms.Message.DEFAULT_PRIORITY"/&gt;
- *     &lt;property name="time-to-live" value="javax.jms.Message.DEFAULT_TIME_TO_LIVE"/&gt;
- *     &lt;property name="security-principal" value="username"/&gt;
- *     &lt;property name="security-credential" value="pasword"/&gt;
- *     &lt;property name="property-strategy" value="&lt;property setter class name&gt;" /&gt;
- *     &lt;property name="message-prop-<i>&gt;prop-name&lt;</i>="<i>&gt; value="prop-value&lt;</i>" /&gt;
- * </pre>
+ *     <property name="unwrap" value="false"/>
+ *     <property name="jndi-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
+ *     <property name="jndi-URL" value="127.0.0.1:1099"/>
+ *     <property name="jndi-pkg-prefix" value="org.jboss.naming:org.jnp.interfaces"/>
+ *     <property name="connection-factory" value="ConnectionFactory"/>
+ *     <property name="persistent" value="true"/>
+ *     <property name="priority" value="javax.jms.Message.DEFAULT_PRIORITY"/>
+ *     <property name="time-to-live" value="javax.jms.Message.DEFAULT_TIME_TO_LIVE"/>
+ *     <property name="security-principal" value="username"/>
+ *     <property name="security-credential" value="pasword"/>
+ *     <property name="property-strategy" value="&lt;property setter class name&gt;" />
+ *     <property name="message-prop-<i><prop-name></i>="<i>> value="prop-value"<</i>" />
+ *     <property name="jndi-prefixes" value="org.xyz."<</i>" />
+ * }</pre>
  * Description of configuration attribues:
  * <ul>
- * <li><i>unwrap</i>:true will extract the message payload from the Message object before sending. false (default) will send the serialized Message object.
- * <li><i>jndi-context-factory</i>: the JNDI context factory to use. Default is "org.jnp.interfaces.NamingContextFactory"
- * <li><i>jndi-URL</i>: the JNDI URL to use. Default is "127.0.0.1:1099"
- * <li><i>jndi-pkg-prefix</i>: the JNDI naming package prefixes to use. Default is "org.jboss.naming:org.jnp.interfaces".
- * <li><i>connection-factory</i>: the name of the ConnectionFactory to use. Default is "ConnectionFactory".
- * <li><i>persistent</i>: the JMS DeliveryMode. 'true' or 'false'. Default is "true".
- * <li><i>priority</i>: the JMS Priority to be used. Default is "javax.jms.Message.DEFAULT_PRIORITY"
- * <li><i>time-to-live</i>: the JMS Time-To-Live to be used. Default is "javax.jms.Message.DEFAULT_TIME_TO_LIVE"
- * <li><i>security-principal</i>: security principal use when creating the JMS connection.
- * <li><i>security-credential</i>: the security credentials to use when creating the JMS connection. 
- * <li><i>property-strategy</i>: the implementation of the JMSPropertiesSetter interface, if overriding the default. 
- * <li><i>message-prop</i>: properties to be set on the message are prefixed with "message-prop-".
+ * <li><i>unwrap</i>:
+ * 'true' will extract the message payload from the Message object before sending. false (default) will send the serialized Message object.</li>
+ * 
+ * <li><i>jndi-context-factory</i>: 
+ * The JNDI context factory to use. Default is "org.jnp.interfaces.NamingContextFactory"</li>
+ * 
+ * <li><i>jndi-URL</i>: 
+ * The JNDI URL to use. Default is "127.0.0.1:1099"</li>
+ * 
+ * <li><i>jndi-pkg-prefix</i>: 
+ * The JNDI naming package prefixes to use. Default is "org.jboss.naming:org.jnp.interfaces".</li>
+ * 
+ * <li><i>connection-factory</i>: 
+ * The name of the ConnectionFactory to use. Default is "ConnectionFactory".</li>
+ * 
+ * <li><i>persistent</i>: 
+ * The JMS DeliveryMode. 'true' or 'false'. Default is "true".</li>
+ * 
+ * <li><i>priority</i>: 
+ * The JMS Priority to be used. Default is "javax.jms.Message.DEFAULT_PRIORITY"</li>
+ * 
+ * <li><i>time-to-live</i>: 
+ * The JMS Time-To-Live to be used. Default is "javax.jms.Message.DEFAULT_TIME_TO_LIVE"</li>
+ * 
+ * <li><i>security-principal</i>: 
+ * Security principal use when creating the JMS connection.</li>
+ * 
+ * <li><i>security-credential</i>: 
+ * The security credentials to use when creating the JMS connection. </li>
+ * 
+ * <li><i>property-strategy</i>: 
+ * The implementation of the JMSPropertiesSetter interface, if overriding the default. </li>
+ * 
+ * <li><i>message-prop</i>: 
+ * Properties to be set on the message are prefixed with "message-prop-".</li>
+ * 
+ * <li><i>jndi-prefixes</i>: 
+ * A comma separated string of prefixes. Properties that have these prefixes will be added to the JNDI environment.</li>
+ * 
+ * <li><i>org.xyz.propertyName</i>: 
+ * A jndi environment property that will be added to the jndi environment if the prefix 'org.xyz' was specified in the jndi-prefixes list.</li>
+ * 
  * </ul>
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -177,6 +209,7 @@
      * The JMS reply to destination.
      */
     private String jmsReplyToName ;
+    private Properties environment;
 
     
     /**
@@ -232,7 +265,11 @@
         else if ( securityCredential != null && securityPrincipal == null ) 
             throw new ConfigurationException("'" + SECURITY_CREDITIAL + "' must be accompanied by a '" + SECURITY_PRINCIPAL + "'");
         
-        final Properties environment = getEnvironment() ;
+        // Extract and environment properties given as properties in the config.
+        environment = JndiUtil.parseEnvironmentProperties(propertiesTree);
+        environment.setProperty(Context.PROVIDER_URL, jndiUrl);
+        environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndiContextFactory);
+        environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
         try {
             pool = ( securityPrincipal != null )  ? 
                     JmsConnectionPoolContainer.getPool(environment, connectionFactory, securityPrincipal, securityCredential) :
@@ -469,12 +506,8 @@
 		}
     }
     
-    private Properties getEnvironment()
+    Properties getEnvironment()
     {
-        final Properties environment = new Properties();
-        environment.setProperty(Context.PROVIDER_URL, jndiUrl);
-        environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndiContextFactory);
-        environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
         return environment ;
     }
     

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -43,6 +43,7 @@
 import org.jboss.soa.esb.addressing.XMLUtil;
 import org.jboss.soa.esb.addressing.PortReference.Extension;
 import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.util.JndiUtil;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
@@ -75,9 +76,13 @@
 	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 MAX_SESSIONS_PER_CONNECTION = JndiUtil.ESB_JNDI_PARAMETER_PREFIX + "jms.max.sessions.per.connection";
+    
+    public static final String MAX_XA_SESSIONS_PER_CONNECTION = JndiUtil.ESB_JNDI_PARAMETER_PREFIX + "jms.max.xa.sessions.per.connection";
+
+    public static final String JNDI_PKG_PREFIX_TAG = "jndi-pkg-prefix";
+
 	public static final String JNDI_URL_TAG = "jndi-URL";
 
 	public static final String JNDI_CONTEXT_FACTORY_TAG = "jndi-context-factory";
@@ -236,7 +241,7 @@
 		}
 		
 		if (jndiPrefixesValue != null) {
-			final String[] jndiPrefixes = getJndiPrefixes(jndiPrefixesValue) ;
+			final String[] jndiPrefixes = JndiUtil.getJndiPrefixes(jndiPrefixesValue) ;
 			for(Map.Entry<String, String> entry: extensions.entrySet()) {
 				for(String jndiPrefix: jndiPrefixes) {
 					final String tag = entry.getKey() ;
@@ -544,6 +549,7 @@
                 addr.setAddress(getJmsAddress(uri, name));
 
 				addr.addExtension(DESTINATION_TYPE_TAG, destinationType);
+				addr.addExtension(DESTINATION_NAME_TAG, destinationName);
 				
 				addr.addExtension(SPECIFICATION_VERSION_TAG, protocol);
 
@@ -602,6 +608,11 @@
 
 	public final String getDestinationName()
 	{
+            final String name = getAddr().getExtensionValue(DESTINATION_NAME_TAG);
+            if (name != null)
+            {
+                return name ;
+            }
             try
             {
 		URI uri = new URI(getAddr().getAddress());
@@ -639,16 +650,17 @@
         {
             properties.put(JNDI_PREFIXES, jndiPrefixesValue) ;
         }
-        final String[] jndiPrefixes = getJndiPrefixes(jndiPrefixesValue) ;
+        final String[] jndiPrefixes = JndiUtil.getJndiPrefixes(jndiPrefixesValue) ;
         
         Iterator<Extension> iter = getAddr().getExtensions();
         while (iter.hasNext()) {
             Extension extension = iter.next();
-            
+            String tag = extension.getTag();
+
             for(String jndiPrefix: jndiPrefixes)
             {
-                if (extension.getTag().startsWith(jndiPrefix) && extension.getValue()!=null) {
-                    properties.put(extension.getTag(), extension.getValue());
+                if (tag.startsWith(jndiPrefix) && extension.getValue()!=null) {
+                    properties.put(tag, extension.getValue());
                     break ;
                 }
             }
@@ -668,24 +680,11 @@
      * Get the list of JNDI extension prefixes.
      * @param jndiPrefixesValue The JNDI prefix list or null if default.
      * @return The list of JNDI extension prefixes.
+     * @deprecated Use {@link JndiUtil#getJndiPrefixes(String)}.
      */
     public static String[] getJndiPrefixes(final String jndiPrefixesValue)
     {
-        final Set<String> jndiPrefixesSet = new TreeSet<String>();
-        jndiPrefixesSet.add("java.naming.") ;
-        if (jndiPrefixesValue != null)
-        {
-            final String[] values = jndiPrefixesValue.split(",") ;
-            for(String value: values)
-            {
-                final String trim = value.trim() ;
-                if (trim.length() > 0)
-                {
-                	jndiPrefixesSet.add(trim) ;
-                }
-            }
-        }
-        return jndiPrefixesSet.toArray(new String[jndiPrefixesSet.size()]) ;
+        return JndiUtil.getJndiPrefixes(jndiPrefixesValue);
     }
 
 	/**
@@ -762,16 +761,8 @@
 	private String getJmsAddress(final String uri, final String name)
 	{
 		try {
-			final URI uriVal = new URI(uri) ;
-			final String host = uriVal.getHost() ;
-			if (host != null) {
-				final int port = uriVal.getPort() ;
-				if (port > 0) {
-					return JMS_PROTOCOL + PROTOCOL_SEPARATOR + host + ":" + port + "/" + name;
-				} else {
-					return JMS_PROTOCOL + PROTOCOL_SEPARATOR + host + "/" + name;
-				}
-			}
+			final URI result = new URI(JMS_PROTOCOL, uri, name) ;
+			return result.toString() ;
 		} catch (final URISyntaxException urise) {}
 		return JMS_PROTOCOL + PROTOCOL_SEPARATOR + uri + "/" + name;
 	}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -34,6 +34,7 @@
 import org.jboss.soa.esb.addressing.EPR;
 import org.jboss.soa.esb.addressing.MalformedEPRException;
 import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.eprs.InVMEpr;
 import org.jboss.soa.esb.addressing.util.DefaultReplyTo;
 import org.jboss.soa.esb.common.Configuration;
 import org.jboss.soa.esb.common.Environment;
@@ -535,7 +536,9 @@
             try {
                 courier = getCourier(targetEPR);
             } catch (CourierException e) {
-                logger.debug("Courier lookup failed for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", e);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Courier lookup failed for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", e);
+                }
             } catch (MalformedEPRException e) {
             	// probably an ESB-unaware EPR in the registry!!
 
@@ -562,7 +565,9 @@
                         replyToEPR = (currentReplyToEpr == null ? getReplyToAddress(targetEPR) : currentReplyToEpr) ;
 
                         if (replyToEPR == null) {
-                            logger.debug("Not using epr [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. No reply-to address available for synchronous response.");
+                            if (logger.isDebugEnabled()) {
+                                logger.debug("Not using epr [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. No reply-to address available for synchronous response.");
+                            }
                             return null;
                         }
                         call.setReplyTo(replyToEPR);
@@ -587,7 +592,9 @@
                 } catch (final CourierServiceBindException e) {
                     // meant to be masked by the SI fail-over
 
-                    logger.debug("Caught service lookup exception for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Caught service lookup exception for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. ", e);
+                    }
 
                     // could be stale EPR, so move on to next entry in registry.
                 } catch (final CourierMarshalUnmarshalException e) {
@@ -597,7 +604,9 @@
                 } catch (final CourierTransportException e) {
                     // meant to be masked by the SI fail-over
 
-                    logger.debug("Courier indicated transport related error "+e+" during send/receive with EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Courier indicated transport related error "+e+" during send/receive with EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. ", e);
+                    }
                 } catch (CourierException e) {
                     // probable config error. Log it and move on to next EPR/service entry.
 
@@ -614,12 +623,24 @@
 
                     throw new MessageDeliverException("Caught unexpected throwable during send. Bailing-out!", t);
                 } finally {
-                    CourierUtil.cleanCourier(courier);
+                    EPR replyToEpr = null;
+                    
+                    try {
+                        CourierUtil.cleanCourier(courier);
+                        // put back the old To since we will have changed it.
 
-                    // put back the old To since we will have changed it.
-
-                    call.setTo(currentToEpr) ;
-                    call.setReplyTo(currentReplyToEpr) ;
+                        replyToEpr = call.getReplyTo();
+                        call.setTo(currentToEpr);
+                        call.setReplyTo(currentReplyToEpr);
+                    } finally {
+                        // Need to do "special" cleanup for InVM replyTo couriers.  Of course, this may
+                        // not be most "pure" to the courier architecture, but we can't use Courier.cleanup because it
+                        // is getting called multiple times between async delivery and pickup, which totally breaks
+                        // InVM delivery because it zaps the in-mem queue.
+                        if (replyToEpr instanceof InVMEpr) {
+                            CourierFactory.getInstance().removeInVMCourier((InVMEpr) replyToEpr);
+                        }
+                    }
                 }
             }
 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -265,4 +265,11 @@
          * The JBoss JNDI URL package prefix.
          */
         public static final String JBOSS_URL_PKG_PREFIX = ""; //"org.jboss.naming:org.jnp.interfaces"
+
+        /**
+         * Configuration options for JCA ActivationMappers
+         *
+         * org.jboss.soa.esb.jca.activation.mapper.<adapterName>
+         */
+        public static final String JCA_ACTIVATION_MAPPER = "org.jboss.soa.esb.jca.activation.mapper" ;
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/ModulePropertyManager.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/ModulePropertyManager.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/ModulePropertyManager.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -103,6 +103,8 @@
 	public static final String FILTER_MODULE = "filters";
 	
 	public static final String SECURITY_MODULE = "security";
+	
+	public static final String JCA_MODULE = "jca" ;
 
 	/**
 	 * Get the property manager responsible for the module component in the

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -140,7 +140,7 @@
      * The null transaction strategy.
      * @author kevin
      */
-    private static class NullTransactionStrategy extends TransactionStrategy
+    public static class NullTransactionStrategy extends TransactionStrategy
     {
         /**
          * Begin a transaction on the current thread.

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -187,7 +187,7 @@
          * Register the courier as part of the current set.
          * @param courier The current courier.
          */
-        private static synchronized void registerCourier(final TwoWayCourier courier)
+        private static void registerCourier(final TwoWayCourier courier)
             throws CourierException
         {
             final Exception ex ;
@@ -199,25 +199,37 @@
             {
                 ex = null ;
             }
+            final Map<TwoWayCourier, Exception> map ;
             try
             {
-                lifecycleCouriers.getLifecycleResource().put(courier, ex) ;
+                map = lifecycleCouriers.getLifecycleResource() ;
             }
             catch (final LifecycleResourceException lre)
             {
                 throw new CourierException("Unexpected lifecycle resource exception while registering courier", lre) ;
             }
+            
+            synchronized(map)
+            {
+                map.put(courier, ex) ;
+            }
         }
         
         /**
          * Deregister the courier from the current set.
          * @param courier The current courier.
          */
-        public static synchronized void deregisterCourier(final TwoWayCourier courier)
+        public static void deregisterCourier(final TwoWayCourier courier)
         {
+            final Map<TwoWayCourier, Exception> map ;
             try
             {
-                lifecycleCouriers.getLifecycleResource().remove(courier) ;
+                map = lifecycleCouriers.getLifecycleResource() ;
+                
+                synchronized(map)
+                {
+                    map.remove(courier) ;
+                }
             }
             catch (final LifecycleResourceException lre)
             {

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -49,6 +49,7 @@
 
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -675,6 +676,21 @@
         return oStrm.toString();
     } // __________________________________
 
+    public void mapTo(Map map, String attribute) {
+        mapTo(map, attribute, attribute);
+    }
+
+    public void mapTo(Map map, String from, String to) {
+        AssertArgument.isNotNull(map, "properties");
+        AssertArgument.isNotNull(from, "from");
+        AssertArgument.isNotNull(to, "to");
+
+        String value = getAttribute(from);
+        if(value != null) {
+            map.put(to, value);
+        }
+    }
+
     /**
      * @return boolean - indicating if 'this' element has ONLY text children (and consequently no ConfigTree children)
      */

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -159,4 +159,7 @@
     public static final String SCHEDULE_SIMPLE_EXEC = "scheduleSimpleExec" ;
     public static final String SCHEDULE_CRON_EXPRESSION = "scheduleCronExpression" ;
     public static final String SCHEDULE_PROPERTIES = "ScheduleProperties" ;
+    
+    /** JCA properties */
+    public static final String JCA_ACTIVATION_MAPPER = "jcaActivationMapper";
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -42,6 +42,7 @@
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.services.registry.RegistryException;
 import org.jboss.soa.esb.util.Util;
+import org.jboss.soa.esb.util.JndiUtil;
 
 public class ListenerUtil
 {
@@ -145,7 +146,7 @@
             if (jndiPrefixesValue != null) {
                 environment.put(JMSEpr.JNDI_PREFIXES, jndiPrefixesValue) ;
             }
-            final String[] jndiPrefixes = JMSEpr.getJndiPrefixes(jndiPrefixesValue) ;
+            final String[] jndiPrefixes = JndiUtil.getJndiPrefixes(jndiPrefixesValue) ;
             for (String attributeName : names) {
                 for(String jndiPrefix: jndiPrefixes) {
                     if (attributeName.startsWith(jndiPrefix)) {
@@ -165,8 +166,11 @@
 			String jndiPkgPrefix = tree.getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG);
             if (jndiPkgPrefix==null ) jndiPkgPrefix = Configuration.getJndiServerPkgPrefix() ;
             environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
-            
-			String jmsFactoryClass = getAttrAndWarn(tree,
+
+            tree.mapTo(environment, JMSEpr.MAX_SESSIONS_PER_CONNECTION);
+            tree.mapTo(environment, JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION);
+
+            String jmsFactoryClass = getAttrAndWarn(tree,
 					JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
 
 			String selector = tree.getAttribute(JMSEpr.MESSAGE_SELECTOR_TAG);

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -437,7 +437,7 @@
                     // Make sure each Service config has a message aware listener...
                     // http://jira.jboss.com/jira/browse/JBESB-648
                     if(!exposesInVMListener(service) && !isGateway && !listenerAdded) {
-                        throw new ConfigurationException("Service configuration for Service '" + service.getCategory() + ":" + service.getName() + "' doesn't define a Message-Aware Listener (i.e. is-gateway='false').");
+                        throw new ConfigurationException("Service '" + service.getCategory() + ":" + service.getName() + "' does not define a Message-Aware (is-gateway='false') nor InVm Listener.");
                     }
                 }
 			}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -21,16 +21,16 @@
 
 package org.jboss.soa.esb.listeners.config.mappers;
 
-import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
-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.common.ModulePropertyManager;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
@@ -44,14 +44,17 @@
 import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument.Property;
 import org.jboss.soa.esb.listeners.gateway.JmsGatewayListener;
 import org.jboss.soa.esb.listeners.gateway.PackageJmsMessageContents;
+import org.jboss.soa.esb.listeners.jca.ActivationMapper;
 import org.jboss.soa.esb.listeners.jca.JcaConstants;
 import org.jboss.soa.esb.listeners.jca.JcaGatewayListener;
 import org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter;
 import org.jboss.soa.esb.listeners.jca.JcaJMSMessageAwareComposer;
 import org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener;
+import org.jboss.soa.esb.util.ClassUtil;
 import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
 
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
 /**
  * Performs the mapping of a &lt;jms-listener&gt; XSD based configuration to the "ConfigTree"
  * style configuration, adding the "ConfigTree" listener config to the "root" node.
@@ -59,6 +62,8 @@
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class JmsListenerMapper {
+	// The default JMS JCA adapter.
+	private static final String DEFAULT_JMS_ADAPTER = "jms-ra.rar" ;
 	
 	@SuppressWarnings("unused")
 	private static Logger log = Logger.getLogger( JmsListenerMapper.class );
@@ -100,7 +105,7 @@
 		final Class<?> gatewayClass ;
 		if (provider instanceof JmsJcaProvider) {
 		    final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
-                    mapJmsJcaAttributes(listener, listenerNode, jmsJcaProvider, messageFilter) ;
+                    mapJmsJcaAttributes(listener, listenerNode, bus, jmsJcaProvider, messageFilter) ;
 		    gatewayClass = JcaGatewayListener.class ;
 		} else {
 		    gatewayClass = JmsGatewayListener.class ;
@@ -159,20 +164,12 @@
 		toElement.setAttribute(JMSEpr.TRANSACTED_TAG, Boolean.toString( messageFilter.getTransacted()));
 	}
     
-    /*
-     * @throws ConfigurationException is one of the following activation-config
-     * properties are overridden:
-     * 	- destination
-     * 	- destinationType
-     * 	- messageSelector
-     * 	- maxSession
-     */
     private static void mapJmsJcaAttributes(final JmsListener listener,
-        final Element listenerNode, final JmsJcaProvider jmsJcaProvider,
+        final Element listenerNode, final JmsBus bus, final JmsJcaProvider jmsJcaProvider,
         final JmsMessageFilter messageFilter)
         throws ConfigurationException {
         setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ADAPTER,
-            jmsJcaProvider.getAdapter(), "jms-ra.rar") ;
+            jmsJcaProvider.getAdapter(), DEFAULT_JMS_ADAPTER) ;
         setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ENDPOINT_CLASS,
             jmsJcaProvider.getEndpointClass(), JcaJMSInflowMessageProcessorAdapter.class.getName()) ;
         setAttribute(listenerNode, JcaConstants.ATTRIBUTE_MESSAGING_TYPE,
@@ -207,36 +204,35 @@
                 JcaJMSMessageAwareComposer.class.getName()) ;
         }
         
-        final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
-         addPropertyElement(activationConfigElement, "destination", messageFilter.getDestName()) ;
-        if (jmsJcaProvider.isSetProviderAdapterJNDI())
-        {
-            addPropertyElement(activationConfigElement, "providerAdapterJNDI", jmsJcaProvider.getProviderAdapterJNDI()) ;
-        }
+        final ActivationMapper activationMapper = getActivationMapper(listener, bus, jmsJcaProvider) ;
+        final Map<String, String> activationConfigValues = new HashMap<String, String>() ;
+        activationMapper.setDestination(activationConfigValues, messageFilter.getDestName()) ;
+        activationMapper.setProviderAdapterJNDI(activationConfigValues, jmsJcaProvider.getProviderAdapterJNDI()) ;
         final int destType = messageFilter.getDestType().intValue() ;
         if (destType == DestType.INT_QUEUE)
         {
-            addPropertyElement(activationConfigElement, "destinationType", Queue.class.getName()) ;
+            activationMapper.setDestinationType(activationConfigValues, true) ;
         }
         else if (destType == DestType.INT_TOPIC)
         {
-            addPropertyElement(activationConfigElement, "destinationType", Topic.class.getName()) ;
+            activationMapper.setDestinationType(activationConfigValues, false) ;
         }
         else
         {
             throw new ConfigurationException("Unknown destination type: " + messageFilter.getDestType()) ;
         }
         
-        if (messageFilter.getSelector() != null)
+        activationMapper.setMessageSelector(activationConfigValues, messageFilter.getSelector()) ;
+        final Integer maxThreads = (listener.isSetMaxThreads() ? new Integer(listener.getMaxThreads()) : null) ;
+        activationMapper.setMaxThreads(activationConfigValues, maxThreads) ;
+        
+        final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+        for(Map.Entry<String, String> entry: activationConfigValues.entrySet())
         {
-            addPropertyElement(activationConfigElement, "messageSelector", messageFilter.getSelector()) ;
+            addPropertyElement(activationConfigElement, entry.getKey(), entry.getValue()) ;
         }
-        if (listener.getMaxThreads() > 0)
-        {
-            addPropertyElement(activationConfigElement, "maxSession", Integer.toString(listener.getMaxThreads())) ;
-        }
         
-		final List<String> defaultPropertyNames = getDefaultActivationConfigNames( activationConfigElement );
+		final Set<String> defaultPropertyNames = activationConfigValues.keySet() ;
 		log.debug("Default activation-config properties :" + defaultPropertyNames );
         
 		/*
@@ -256,16 +252,6 @@
     		}
         }
     }
-    
-    private static List<String> getDefaultActivationConfigNames(final Element activationConfigElement )
-    {
-		NodeList defaultActivationProperties = activationConfigElement.getElementsByTagName( "property" );
-		final List<String> defaultPropertyNames = new ArrayList<String>(5);
-		for (int i = defaultActivationProperties.getLength() ; i-->0 ; )
-			defaultPropertyNames.add(defaultActivationProperties.item( i ).getAttributes().getNamedItem( "name" ).getNodeValue() );
-		
-		return defaultPropertyNames;
-    }
 
     private static void setAttribute(final Element listenerNode,
         final String name, final String value)
@@ -297,4 +283,85 @@
         propertyElement.setAttribute("name", name) ;
         propertyElement.setAttribute("value", value) ;
     }
+
+    private static ActivationMapper getActivationMapper(final JmsListener listener,
+        final JmsBus bus, final JmsJcaProvider jmsJcaProvider)
+        throws ConfigurationException
+    {
+        final String activationMapper = getActivationMapperClass(listener, bus, jmsJcaProvider); ;
+        if (activationMapper == null)
+        {
+            throw new ConfigurationException("Could not locate ActivationMapper for adapter " + jmsJcaProvider.getAdapter()) ;
+        }
+        final Class activationMapperClass ;
+        try
+        {
+            activationMapperClass = ClassUtil.forName(activationMapper.trim(), JmsListenerMapper.class) ;
+        }
+        catch (final ClassNotFoundException cnfe)
+        {
+            throw new ConfigurationException("Could not locate activation mapper class " + activationMapper, cnfe) ;
+        }
+        
+        if (!ActivationMapper.class.isAssignableFrom(activationMapperClass))
+        {
+            throw new ConfigurationException("Activation mapper class " + activationMapper + " does not implement ActivationMapper interface") ;
+        }
+        try
+        {
+            return (ActivationMapper)(activationMapperClass.newInstance()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new ConfigurationException("Failed to instantiate activation mapper class " + activationMapper, th) ;
+        }
+    }
+    
+    private static String getActivationMapperClass(final JmsListener listener,
+        final JmsBus bus, final JmsJcaProvider jmsJcaProvider)
+        throws ConfigurationException
+    {
+        final String listenerActivationMapper = findProperty(listener.getPropertyList(), ListenerTagNames.JCA_ACTIVATION_MAPPER) ;
+        if (listenerActivationMapper != null)
+        {
+            return listenerActivationMapper ;
+        }
+        
+        final String busActivationMapper = findProperty(bus.getPropertyList(), ListenerTagNames.JCA_ACTIVATION_MAPPER) ;
+        if (busActivationMapper != null)
+        {
+            return busActivationMapper ;
+        }
+        
+        final String providerActivationMapper = findProperty(jmsJcaProvider.getPropertyList(), ListenerTagNames.JCA_ACTIVATION_MAPPER) ;
+        if (providerActivationMapper != null)
+        {
+            return providerActivationMapper ;
+        }
+        
+        final String adapter = (jmsJcaProvider.getAdapter() == null ? DEFAULT_JMS_ADAPTER : jmsJcaProvider.getAdapter()) ;
+        
+        final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE);
+        final String activationMapper = propertyManager.getProperty("org.jboss.soa.esb.jca.activation.mapper." + adapter) ;
+        if (activationMapper == null)
+        {
+            throw new ConfigurationException("Could not locate activation mapper for adapter " + adapter) ;
+        }
+        return activationMapper ;
+    }
+    
+    private static String findProperty(final List<Property> properties, final String name)
+    {
+        if ((properties != null) && (name != null))
+        {
+            for(Property property: properties)
+            {
+                if (name.equals(property.getName()))
+                {
+                    return property.getValue() ;
+                }
+            }
+        }
+        return null ;
+    }
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -32,6 +32,7 @@
 import org.jboss.remoting.marshal.http.HTTPMarshaller;
 import org.jboss.remoting.security.SSLSocketBuilder;
 import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.ActionUtils;
 import org.jboss.soa.esb.addressing.EPR;
@@ -58,12 +59,12 @@
 import org.jboss.soa.esb.util.ClassUtil;
 
 import javax.management.MBeanServer;
+import javax.security.auth.login.LoginException;
 
 import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
+import java.io.StringWriter;
+import java.io.PrintWriter;
+import java.net.*;
 import java.util.*;
 
 /**
@@ -110,6 +111,10 @@
      * Server port config attribute name.
      */
     public static final String JBR_SERVER_PORT = JBR_PREFIX + ServerInvoker.SERVER_BIND_PORT_KEY;
+    /**
+     * JBoss Remoting request for the current thread.
+     */
+    private static ThreadLocal<InvocationRequest> currentRequest = new ThreadLocal<InvocationRequest>();
 
     /**
      * Class Logger instance.
@@ -186,6 +191,10 @@
         }
     }
 
+    public static InvocationRequest getCurrentRequest() {
+        return currentRequest.get();
+    }
+
     /**
      * Is this listener instance initialised.
      *
@@ -340,6 +349,10 @@
      * @throws Throwable Message processing failure.
      */
     public Object invoke(InvocationRequest invocationRequest) throws Throwable {
+        // Set the request object on the thread so as to make it available
+        // to the HttpMarshaller...
+        currentRequest.set(invocationRequest);
+
         try {
             if (synchronous) {
                 Object response = messageDeliveryAdapter.deliverSync(invocationRequest, 20000); // TODO Fix magic number
@@ -352,10 +365,25 @@
                 messageDeliveryAdapter.deliverAsync(invocationRequest);
             }
         } catch (Throwable t) {
-            logger.error("JBoss Remoting Gateway failed to " + (synchronous ? "synchronously" : "asynchronously") + " deliver message to target service [" +
+            logger.debug("JBoss Remoting Gateway failed to " + (synchronous ? "synchronously" : "asynchronously") + " deliver message to target service [" +
                     messageDeliveryAdapter.getDeliveryAdapter().getServiceCategory() + ":" +
                     messageDeliveryAdapter.getDeliveryAdapter().getServiceName() + "].", t);
 
+            if (synchronous) {
+                String protocol = getJbrServerLocatorURI().getScheme();
+                boolean isHttp = (protocol.equals("http") || protocol.equals("https"));
+
+                if(isHttp) {
+                    Map responseMap = invocationRequest.getReturnPayload();
+                    StringWriter stringWriter = new StringWriter();
+
+                    mapHTTPErrorDetails(responseMap, t);
+                    t.printStackTrace(new PrintWriter(stringWriter));
+
+                    return stringWriter.toString();
+                }
+            }
+            
             throw t;
         }
 
@@ -366,6 +394,18 @@
         }
     }
 
+    private void mapHTTPErrorDetails(Map responseMap, Throwable t) {
+        Throwable cause = t.getCause();
+
+        if(cause instanceof SecurityServiceException && cause.getCause() instanceof LoginException) {
+            responseMap.put(HTTPMetadataConstants.RESPONSE_CODE, HttpURLConnection.HTTP_UNAUTHORIZED);
+            responseMap.put(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, "Invalid Login Credentials.");
+        } else {
+            responseMap.put(HTTPMetadataConstants.RESPONSE_CODE, HttpURLConnection.HTTP_INTERNAL_ERROR);
+            responseMap.put(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, "Failed to service request.");
+        }
+    }
+
     public void setMBeanServer(MBeanServer mBeanServer) {
     }
 
@@ -487,6 +527,10 @@
     public static class JBossRemotingMessageComposer<T extends InvocationRequest> extends AbstractMessageComposer<T> {
 
         private MessagePayloadProxy payloadProxy;
+		 
+        private JbrHttpSecurityInfoExtractor jbrHttpSecurityExtractor = new JbrHttpSecurityInfoExtractor();
+        
+        private WSSecurityInfoExtractor wsSecurityExtractor = new WSSecurityInfoExtractor();
 
         @Override
         public void setConfiguration(ConfigTree config) {
@@ -516,11 +560,11 @@
 
             if (properties != null) {
                 //	Extract any jbr http security information that may exist
-                AuthenticationRequest authRequest = new JbrHttpSecurityInfoExtractor().extractSecurityInfo(properties);
+                AuthenticationRequest authRequest = jbrHttpSecurityExtractor.extractSecurityInfo(properties);
 
                 // Extract any ws security information that may exist
                 if ( authRequest == null ) {
-                	authRequest = new WSSecurityInfoExtractor().extractSecurityInfo((String) invocationRequest.getParameter());
+                	authRequest = wsSecurityExtractor.extractSecurityInfo((String) invocationRequest.getParameter());
                 }
 
                 if ( authRequest != null ) {

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -63,6 +63,7 @@
 import org.jboss.soa.esb.services.registry.RegistryException;
 import org.jboss.soa.esb.services.registry.ServiceNotFoundException;
 import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.soa.esb.util.JndiUtil;
 
 public class JmsGatewayListener extends AbstractThreadedManagedLifecycle {
     /**
@@ -346,24 +347,18 @@
 
         Properties environment = new Properties();
 
-        String sJndiURL = _config.getAttribute(JMSEpr.JNDI_URL_TAG);
-        String sJndiContextFactory = _config
-                .getAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG);
-        String sJndiPkgPrefix = _config
-                .getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG);
-        if (sJndiURL != null)
-            environment.setProperty(Context.PROVIDER_URL, sJndiURL);
-        if (sJndiContextFactory != null)
-            environment.setProperty(Context.INITIAL_CONTEXT_FACTORY,
-                    sJndiContextFactory);
-        if (sJndiPkgPrefix != null)
-            environment.setProperty(Context.URL_PKG_PREFIXES, sJndiPkgPrefix);
+        _config.mapTo(environment, JMSEpr.JNDI_URL_TAG, Context.PROVIDER_URL);
+        _config.mapTo(environment, JMSEpr.JNDI_CONTEXT_FACTORY_TAG, Context.INITIAL_CONTEXT_FACTORY);
+        _config.mapTo(environment, JMSEpr.JNDI_PKG_PREFIX_TAG, Context.URL_PKG_PREFIXES);
+        _config.mapTo(environment, JMSEpr.MAX_SESSIONS_PER_CONNECTION);
+        _config.mapTo(environment, JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION);
+
         Set<String> names = _config.getAttributeNames();
         final String jndiPrefixesValue = _config.getAttribute(JMSEpr.JNDI_PREFIXES) ;
         if (jndiPrefixesValue != null) {
             environment.setProperty(JMSEpr.JNDI_PREFIXES, jndiPrefixesValue) ;
         }
-        final String[] jndiPrefixes = JMSEpr.getJndiPrefixes(jndiPrefixesValue) ;
+        final String[] jndiPrefixes = JndiUtil.getJndiPrefixes(jndiPrefixesValue) ;
         for (String name : names) {
             for(String jndiPrefix: jndiPrefixes) {
                 if (name.startsWith(jndiPrefix)) {

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/ActivationMapper.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/src/org/jboss/soa/esb/listeners/jca/ActivationMapper.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/ActivationMapper.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/ActivationMapper.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,80 @@
+/*
+* 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.soa.esb.listeners.jca;
+
+import java.util.Map;
+
+import org.jboss.soa.esb.ConfigurationException;
+
+
+/**
+ * Mapper interface for configuring standard ESB properties.
+ *
+ * @author <a href="kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public interface ActivationMapper
+{
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param name The destination name.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setDestination(final Map<String, String> activationConfig, final String name)
+        throws ConfigurationException ;
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param providerAdapterJNDI The provider adapter JNDI value or null is not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+        throws ConfigurationException ;
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param queue True if specifying a JMS Queue, false is specifying a JMS Topic.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+        throws ConfigurationException ;
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param messageSelector The message selector or null if not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+        throws ConfigurationException ;
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param maxThreads The maximum thread value or null if not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+        throws ConfigurationException ;
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBossActivationMapper.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBossActivationMapper.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBossActivationMapper.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBossActivationMapper.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,107 @@
+/*
+* 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.soa.esb.listeners.jca;
+
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import org.jboss.soa.esb.ConfigurationException;
+
+
+/**
+ * Default activation mapper implementation for JBoss.
+ *
+ * @author <a href="kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class JBossActivationMapper implements ActivationMapper
+{
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param name The destination name.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setDestination(final Map<String, String> activationConfig, final String name)
+        throws ConfigurationException
+    {
+        activationConfig.put("destination", name) ;
+    }
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param providerAdapterJNDI The provider adapter JNDI value or null is not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+        throws ConfigurationException
+    {
+        if (providerAdapterJNDI != null)
+        {
+            activationConfig.put("providerAdapterJNDI", providerAdapterJNDI) ;
+        }
+    }
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param queue True if specifying a JMS Queue, false is specifying a JMS Topic.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+        throws ConfigurationException
+    {
+        activationConfig.put("destinationType", queue ? Queue.class.getName() :Topic.class.getName()) ;
+    }
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param messageSelector The message selector or null if not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+        throws ConfigurationException
+    {
+        if (messageSelector != null)
+        {
+            activationConfig.put("messageSelector", messageSelector) ;
+        }
+    }
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param maxThreads The maximum thread value or null if not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+        throws ConfigurationException
+    {
+        if (maxThreads != null)
+        {
+            activationConfig.put("maxSession", maxThreads.toString()) ;
+        }
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/WMQActivationMapper.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/src/org/jboss/soa/esb/listeners/jca/WMQActivationMapper.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/WMQActivationMapper.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/jca/WMQActivationMapper.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,104 @@
+/*
+* 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.soa.esb.listeners.jca;
+
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import org.jboss.soa.esb.ConfigurationException;
+
+
+/**
+ * Activation mapper implementation for IBM MQ (aka WMQ).
+ *
+ * @author <a href="kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class WMQActivationMapper implements ActivationMapper
+{
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param name The destination name.
+     * @throws org.jboss.soa.esb.ConfigurationException For invalid configuration.
+     */
+    public void setDestination(final Map<String, String> activationConfig, final String name)
+        throws ConfigurationException
+    {
+        activationConfig.put("destination", name) ;
+    }
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param providerAdapterJNDI The provider adapter JNDI value or null is not specified.
+     * @throws org.jboss.soa.esb.ConfigurationException For invalid configuration.
+     */
+    public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+        throws ConfigurationException
+    {
+        if (providerAdapterJNDI != null)
+        {
+            activationConfig.put("providerAdapterJNDI", providerAdapterJNDI) ;
+        }
+    }
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param queue True if specifying a JMS Queue, false is specifying a JMS Topic.
+     * @throws org.jboss.soa.esb.ConfigurationException For invalid configuration.
+     */
+    public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+        throws ConfigurationException
+    {
+        activationConfig.put("destinationType", queue ? Queue.class.getName() :Topic.class.getName()) ;
+    }
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param messageSelector The message selector or null if not specified.
+     * @throws org.jboss.soa.esb.ConfigurationException For invalid configuration.
+     */
+    public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+        throws ConfigurationException
+    {
+        if (messageSelector != null)
+        {
+            activationConfig.put("messageSelector", messageSelector) ;
+        }
+    }
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param maxThreads The maximum thread value or null if not specified.
+     * @throws org.jboss.soa.esb.ConfigurationException For invalid configuration.
+     */
+    public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+        throws ConfigurationException
+    {
+        // Not applicable to WMQ!!
+    }
+}
\ No newline at end of file

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -40,6 +40,7 @@
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
 import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.util.JndiUtil;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.common.Environment;
 import org.jboss.soa.esb.helpers.ConfigTree;
@@ -411,7 +412,7 @@
                 String prefix = configTrees[i].getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG);
                 if (prefix!=null) environment.setProperty(Context.URL_PKG_PREFIXES, prefix);
                 List<KeyValuePair> properties=configTrees[i].childPropertyList();
-                final String[] jndiPrefixes = JMSEpr.getJndiPrefixes(KeyValuePair.getValue(JMSEpr.JNDI_PREFIXES, properties)) ;
+                final String[] jndiPrefixes = JndiUtil.getJndiPrefixes(KeyValuePair.getValue(JMSEpr.JNDI_PREFIXES, properties)) ;
                 for (KeyValuePair property : properties) {
                     for(String jndiPrefix: jndiPrefixes) {
                         if (property.getKey().startsWith(jndiPrefix)) {

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -23,11 +23,8 @@
 
 import java.net.URI;
 
-import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.Message;
-import javax.naming.Context;
-import javax.naming.NamingException;
 
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.message.Properties;
@@ -128,6 +125,10 @@
 	 * The following expression in a message selector would evaluate to false,
 	 * because a string cannot be used in an arithmetic expression:
 	 *     "NumberOfOrders > 1"
+     * <p/>
+     * Note that this method does not allow the setting of JMS Header properties, that is
+     * properites that start with 'JMSX', nor does it allow JMS Vendor specific properties, those
+     * that start with 'JMS_' to be set.
 	 * 
 	 * @param fromESBMessage	ESB Message object instance from which properties will be retrevied
 	 * @param toJMSMessage		JMS Message object instance upon which the properties will be set
@@ -142,13 +143,18 @@
 			if ( !Strings.isValidJavaIdentifier( key ))
 				continue;
 			
-                        if (key.startsWith("JMSX"))
-                        {
-                            if (!JMSX_GROUP_ID.equals(key) && !JMSX_GROUP_SEQ.equals(key))
-                            {
-                                continue ;
-                            }
-                        }
+            if (key.startsWith("JMSX"))
+            {
+                if (!JMSX_GROUP_ID.equals(key) && !JMSX_GROUP_SEQ.equals(key))
+                {
+                    continue ;
+                }
+            }
+            else if (key.startsWith("JMS_"))
+            {
+                continue ;
+            }
+            
 			Object value = properties.getProperty( key );
 			log.debug( "Setting outgoing JMSProperty, key : " + key + ", value : " + value );
 			if ( value instanceof String  ) 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/smooks-ws-security.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/smooks-ws-security.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/smooks-ws-security.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,5 +1,9 @@
 <?xml version="1.0"?>
 <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
+    
+    <resource-config selector="global-parameters">
+        <param name="stream.filter.type">SAX</param>
+    </resource-config>
 
     <resource-config selector="Envelope/Header/Security/UsernameToken">
         <resource>org.milyn.javabean.BeanPopulator</resource>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/JndiUtil.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/src/org/jboss/soa/esb/util/JndiUtil.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/JndiUtil.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/JndiUtil.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.util;
+
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Utilities class for managing JNDI related tasks.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class JndiUtil
+{
+
+    /**
+     * General Namespace prefix for ESB related properties.  If the property name
+     * is prefixed with this string it will be automatically added as one of the
+     * JNDI prefixes.
+     */
+    public static final String ESB_JNDI_PARAMETER_PREFIX = "org.jboss.esb.";
+
+    private JndiUtil()
+    {
+    }
+    
+    public static Set<String> getJndiPrefixesSet(final String jndiPrefixesValue)
+    {
+        final Set<String> jndiPrefixesSet = new TreeSet<String>();
+
+        // Add default prefixes.
+        jndiPrefixesSet.add("java.naming.") ;
+        jndiPrefixesSet.add(ESB_JNDI_PARAMETER_PREFIX) ;
+
+        if (jndiPrefixesValue != null)
+        {
+            final String[] values = jndiPrefixesValue.split(",") ;
+            for (String value: values)
+            {
+                final String trim = value.trim() ;
+                if (trim.length() > 0)
+                {
+                    jndiPrefixesSet.add(trim) ;
+                }
+            }
+        }
+        
+        return jndiPrefixesSet;
+    }
+    
+    /**
+     * Get the list of JNDI extension prefixes.
+     * 
+     * @param jndiPrefixesValue The JNDI prefix list or null if default.
+     * @return The list of JNDI extension prefixes.
+     */
+    public static String[] getJndiPrefixes(final String jndiPrefixesValue)
+    {
+        final Set<String> jndiPrefixesSet = getJndiPrefixesSet(jndiPrefixesValue);
+        return jndiPrefixesSet.toArray(new String[jndiPrefixesSet.size()]) ;
+    }
+    
+    /**
+     * Parses the passed-in {@link ConfigTree} and extracts all properties that 
+     * have been prefixed 
+     * 
+     * @param config
+     * @return
+     */
+    public static Properties parseEnvironmentProperties(final ConfigTree config)
+    {
+        final Properties env = new Properties();
+        
+        // Comma separated list of prefixes. Will always include at least 'java.naming.'
+        final String[] jndiPrefixes = getJndiPrefixes(getPropertyValue(config, JMSEpr.JNDI_PREFIXES));
+        
+        Set<String> attributeNames= config.getAttributeNames();
+        for (final String name : attributeNames) 
+        {
+            for(String jndiPrefix: jndiPrefixes) 
+            {
+                if (name.startsWith(jndiPrefix))
+                {
+                    env.setProperty(name, config.getAttribute(name));
+                    break;
+                }
+            }
+        }
+        
+        return env;
+    }
+    
+    public static String getPropertyValue(final ConfigTree config, final String propertyName)
+    {
+        return config.getAttribute(propertyName);
+    }
+    
+    
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -78,6 +78,28 @@
 		assertEquals( password, poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG ) );
 	}
 	
+	@Test
+	public void jndiPrefixes()
+	{
+		final String alternativePrefix = "alternative.naming." ;
+
+		final Properties env = new Properties() ;
+		env.put("java.naming.first", "first") ;
+		env.put("java.naming.second", "second") ;
+		env.put("java.naming.third", "third") ;
+		env.put(alternativePrefix + "first", "alternative first") ;
+		env.put(alternativePrefix + "second", "alternative second") ;
+		env.put(alternativePrefix + "third", "alternative third") ;
+		final Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey(env, connectionFactory) ;
+		final Properties jndiEnv = JmsConnectionPoolContainer.getJndiEnvironment(poolKey) ;
+		assertEquals("Normal JNDI entries", 3, jndiEnv.size()) ;
+
+		env.put(JMSEpr.JNDI_PREFIXES, alternativePrefix) ;
+		final Map<String, String> alternativePoolKey = JmsConnectionPoolContainer.createPoolKey(env, connectionFactory) ;
+		final Properties alternativeJndiEnv = JmsConnectionPoolContainer.getJndiEnvironment(alternativePoolKey) ;
+		assertEquals("Alternative JNDI entries", 6, alternativeJndiEnv.size()) ;
+	}
+	
 	public static junit.framework.Test suite()
 	{
 		return new JUnit4TestAdapter( JmsConnectionPoolContainerUnitTest.class );

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolUnitTest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,664 @@
+/*
+* 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 java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.jms.TopicSubscriber;
+import javax.jms.XAConnection;
+import javax.jms.XAConnectionFactory;
+import javax.jms.XASession;
+import javax.naming.Context;
+import javax.transaction.Synchronization;
+import javax.transaction.xa.XAResource;
+
+import junit.framework.Assert;
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.soa.esb.common.TransactionStrategy.NullTransactionStrategy;
+import org.jboss.soa.esb.helpers.NamingContextPool;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockejb.jms.MockQueue;
+import org.mockejb.jms.MockTopic;
+import org.mockejb.jndi.MockContextFactory;
+
+/**
+ * Unit tests for handling JBM specific error conditions in JmsConnectionPool
+ * 
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsConnectionPoolUnitTest
+{
+    private static final String CONNECTION_FACTORY = "ConnectionFactory" ;
+    private static final String QUEUE_NAME = "testQueue" ;
+    private static final String TOPIC_NAME = "testTopic" ;
+    
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        MockContextFactory.setAsInitial();
+        
+        final Context ctx = NamingContextPool.getNamingContext(null);
+        try
+        {
+            ctx.rebind(CONNECTION_FACTORY, new MockXAConnectionFactory());
+        }
+        finally
+        {
+            NamingContextPool.releaseNamingContext(ctx) ;
+        }
+        System.setProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY, System.getProperty(Context.INITIAL_CONTEXT_FACTORY)) ;
+    }
+    
+    @After
+    public void tearDown()
+        throws Exception
+    {
+        MockContextFactory.revertSetAsInitial();
+    }
+    
+    @Test
+    public void testSessionRepeatableAcquire()
+        throws Exception
+    {
+        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+        final JmsSession session = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
+        pool.closeSession(session) ;
+        
+        final JmsSession session2 = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session2.getClass()) ;
+        Assert.assertSame("Same session returned", session, session2) ;
+    }
+    
+    @Test
+    public void testSessionRetry()
+        throws Exception
+    {
+        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+        MockConnectionInvocationHandler.throwFault = true ;
+        final JmsSession session ;
+        try
+        {
+            session = pool.getSession() ;
+            Assert.assertFalse("fault should have been thrown", MockConnectionInvocationHandler.throwFault) ;
+        }
+        finally
+        {
+            MockConnectionInvocationHandler.throwFault = false ;
+        }
+        
+        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
+        pool.closeSession(session) ;
+    }
+    
+    @Test
+    public void testSessionQueueBrowserRetry()
+        throws Exception
+    {
+        final Queue queue = new MockQueue(QUEUE_NAME) ;
+        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+        final JmsSession session = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
+        
+        final QueueBrowser queueBrowser = session.createBrowser(queue) ;
+        queueBrowser.close() ;
+        
+        MockSessionInvocationHandler.throwFault = true ;
+        try
+        {
+            session.createBrowser(queue) ;
+            Assert.fail("Expected JmsConnectionFailureException") ;
+        }
+        catch (final JmsConnectionFailureException jmse) {} // expected
+        finally
+        {
+            MockSessionInvocationHandler.throwFault = false ;
+        }
+        
+        pool.closeSession(session) ;
+        
+        final JmsSession session2 = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session2.getClass()) ;
+        Assert.assertNotSame("Session class", session, session2) ;
+    }
+    
+    @Test
+    public void testSessionMessageConsumerRetry()
+        throws Exception
+    {
+        final Queue queue = new MockQueue(QUEUE_NAME) ;
+        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+        final JmsSession session = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
+        
+        final MessageConsumer messageConsumer = session.createConsumer(queue) ;
+        messageConsumer.close() ;
+        
+        MockSessionInvocationHandler.throwFault = true ;
+        try
+        {
+            session.createConsumer(queue) ;
+            Assert.fail("Expected JmsConnectionFailureException") ;
+        }
+        catch (final JmsConnectionFailureException jmse) {} // expected
+        finally
+        {
+            MockSessionInvocationHandler.throwFault = false ;
+        }
+        
+        pool.closeSession(session) ;
+        
+        final JmsSession session2 = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session2.getClass()) ;
+        Assert.assertNotSame("Session class", session, session2) ;
+    }
+    
+    @Test
+    public void testSessionTopicSubscriberRetry()
+        throws Exception
+    {
+        final Topic topic = new MockTopic(TOPIC_NAME) ;
+        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+        final JmsSession session = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
+        
+        final TopicSubscriber topicSubscriber = session.createDurableSubscriber(topic, "testSessionTopicSubscriberRetry") ;
+        topicSubscriber.close() ;
+        
+        MockSessionInvocationHandler.throwFault = true ;
+        try
+        {
+            session.createDurableSubscriber(topic, "testSessionTopicSubscriberRetry") ;
+            Assert.fail("Expected JmsConnectionFailureException") ;
+        }
+        catch (final JmsConnectionFailureException jmse) {} // expected
+        finally
+        {
+            MockSessionInvocationHandler.throwFault = false ;
+        }
+        
+        pool.closeSession(session) ;
+        
+        final JmsSession session2 = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session2.getClass()) ;
+        Assert.assertNotSame("Session class", session, session2) ;
+    }
+    
+    @Test
+    public void testSessionMessageProducerRetry()
+        throws Exception
+    {
+        final Queue queue = new MockQueue(QUEUE_NAME) ;
+        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+        final JmsSession session = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
+        
+        final MessageProducer messageProducer = session.createProducer(queue) ;
+        messageProducer.close() ;
+        
+        MockSessionInvocationHandler.throwFault = true ;
+        try
+        {
+            session.createProducer(queue) ;
+            Assert.fail("Expected JmsConnectionFailureException") ;
+        }
+        catch (final JmsConnectionFailureException jmse) {} // expected
+        finally
+        {
+            MockSessionInvocationHandler.throwFault = false ;
+        }
+        
+        pool.closeSession(session) ;
+        
+        final JmsSession session2 = pool.getSession() ;
+        Assert.assertEquals("Session class", JmsSession.class, session2.getClass()) ;
+        Assert.assertNotSame("Session class", session, session2) ;
+    }
+    
+    @Test
+    public void testXASessionRetry()
+        throws Exception
+    {
+        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+        TransactionStrategy.setTransactionStrategy(new MockActiveTransactionStrategy()) ;
+        try
+        {
+            final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+            MockConnectionInvocationHandler.throwFault = true ;
+            final JmsSession session ;
+            try
+            {
+                session = pool.getSession() ;
+                Assert.assertFalse("fault should have been thrown", MockConnectionInvocationHandler.throwFault) ;
+            }
+            finally
+            {
+                MockConnectionInvocationHandler.throwFault = false ;
+            }
+            
+            Assert.assertEquals("Session class", JmsXASession.class, session.getClass()) ;
+            pool.closeSession(session) ;
+        }
+        finally
+        {
+            TransactionStrategy.setTransactionStrategy(transactionStrategy) ;
+        }
+    }
+    
+    @Test
+    public void testXASessionQueueBrowserRetry()
+        throws Exception
+    {
+        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+        TransactionStrategy.setTransactionStrategy(new MockActiveTransactionStrategy()) ;
+        try
+        {
+            final Queue queue = new MockQueue(QUEUE_NAME) ;
+            final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+            final JmsSession session = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session.getClass()) ;
+            
+            final QueueBrowser queueBrowser = session.createBrowser(queue) ;
+            queueBrowser.close() ;
+            
+            MockSessionInvocationHandler.throwFault = true ;
+            try
+            {
+                session.createBrowser(queue) ;
+                Assert.fail("Expected JmsConnectionFailureException") ;
+            }
+            catch (final JmsConnectionFailureException jmse) {} // expected
+            finally
+            {
+                MockSessionInvocationHandler.throwFault = false ;
+            }
+            
+            pool.closeSession(session) ;
+            
+            final JmsSession session2 = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session2.getClass()) ;
+            Assert.assertNotSame("Session class", session, session2) ;
+        }
+        finally
+        {
+            TransactionStrategy.setTransactionStrategy(transactionStrategy) ;
+        }
+    }
+    
+    @Test
+    public void testXASessionMessageConsumerRetry()
+        throws Exception
+    {
+        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+        TransactionStrategy.setTransactionStrategy(new MockActiveTransactionStrategy()) ;
+        try
+        {
+            final Queue queue = new MockQueue(QUEUE_NAME) ;
+            final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+            final JmsSession session = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session.getClass()) ;
+            
+            final MessageConsumer messageConsumer = session.createConsumer(queue) ;
+            messageConsumer.close() ;
+            
+            MockSessionInvocationHandler.throwFault = true ;
+            try
+            {
+                session.createConsumer(queue) ;
+                Assert.fail("Expected JmsConnectionFailureException") ;
+            }
+            catch (final JmsConnectionFailureException jmse) {} // expected
+            finally
+            {
+                MockSessionInvocationHandler.throwFault = false ;
+            }
+            
+            pool.closeSession(session) ;
+            
+            final JmsSession session2 = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session2.getClass()) ;
+            Assert.assertNotSame("Session class", session, session2) ;
+        }
+        finally
+        {
+            TransactionStrategy.setTransactionStrategy(transactionStrategy) ;
+        }
+    }
+    
+    @Test
+    public void testXASessionTopicSubscriberRetry()
+        throws Exception
+    {
+        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+        TransactionStrategy.setTransactionStrategy(new MockActiveTransactionStrategy()) ;
+        try
+        {
+            final Topic topic = new MockTopic(TOPIC_NAME) ;
+            final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+            final JmsSession session = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session.getClass()) ;
+            
+            final TopicSubscriber topicSubscriber = session.createDurableSubscriber(topic, "testSessionTopicSubscriberRetry") ;
+            topicSubscriber.close() ;
+            
+            MockSessionInvocationHandler.throwFault = true ;
+            try
+            {
+                session.createDurableSubscriber(topic, "testSessionTopicSubscriberRetry") ;
+                Assert.fail("Expected JmsConnectionFailureException") ;
+            }
+            catch (final JmsConnectionFailureException jmse) {} // expected
+            finally
+            {
+                MockSessionInvocationHandler.throwFault = false ;
+            }
+            
+            pool.closeSession(session) ;
+            
+            final JmsSession session2 = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session2.getClass()) ;
+            Assert.assertNotSame("Session class", session, session2) ;
+        }
+        finally
+        {
+            TransactionStrategy.setTransactionStrategy(transactionStrategy) ;
+        }
+    }
+    
+    @Test
+    public void testXASessionMessageProducerRetry()
+        throws Exception
+    {
+        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+        TransactionStrategy.setTransactionStrategy(new MockActiveTransactionStrategy()) ;
+        try
+        {
+            final Queue queue = new MockQueue(QUEUE_NAME) ;
+            final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
+            final JmsSession session = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session.getClass()) ;
+            
+            final MessageProducer messageProducer = session.createProducer(queue) ;
+            messageProducer.close() ;
+            
+            MockSessionInvocationHandler.throwFault = true ;
+            try
+            {
+                session.createProducer(queue) ;
+                Assert.fail("Expected JmsConnectionFailureException") ;
+            }
+            catch (final JmsConnectionFailureException jmse) {} // expected
+            finally
+            {
+                MockSessionInvocationHandler.throwFault = false ;
+            }
+            
+            pool.closeSession(session) ;
+            
+            final JmsSession session2 = pool.getSession() ;
+            Assert.assertEquals("Session class", JmsXASession.class, session2.getClass()) ;
+            Assert.assertNotSame("Session class", session, session2) ;
+        }
+        finally
+        {
+            TransactionStrategy.setTransactionStrategy(transactionStrategy) ;
+        }
+    }
+    
+    private Map<String, String> getPoolEnv()
+    {
+        final Map<String, String> env = new HashMap<String, String>() ;
+        env.put(JMSEpr.CONNECTION_FACTORY_TAG, CONNECTION_FACTORY);
+        return env ;
+    }
+    
+    static class MockXAConnectionFactory implements XAConnectionFactory, ConnectionFactory
+    {
+        public XAConnection createXAConnection()
+            throws JMSException
+        {
+            return (XAConnection)Proxy.newProxyInstance(MockXAConnectionFactory.class.getClassLoader(), new Class[] {XAConnection.class},
+                    new MockConnectionInvocationHandler()) ;
+        }
+
+        public XAConnection createXAConnection(final String user, final String password)
+            throws JMSException
+        {
+            return createXAConnection() ;
+        }
+
+        public Connection createConnection()
+            throws JMSException
+        {
+            return (Connection)Proxy.newProxyInstance(MockXAConnectionFactory.class.getClassLoader(), new Class[] {Connection.class},
+                    new MockConnectionInvocationHandler()) ;
+        }
+
+        public Connection createConnection(final String user, final String password)
+            throws JMSException
+        {
+            return createConnection() ;
+        }
+    }
+    
+    static final class MockConnectionInvocationHandler implements InvocationHandler
+    {
+        private ExceptionListener exceptionListener ;
+        static boolean throwFault ;
+            
+        MockConnectionInvocationHandler()
+        {
+        }
+            
+        public Object invoke(final Object proxy, final Method method, final Object[] args)
+            throws Throwable
+        {
+            final String methodName = method.getName() ;
+            if ("setExceptionListener".equals(methodName))
+            {
+                exceptionListener = (ExceptionListener)args[0] ;
+                return null ;
+            }
+            else if ("getExceptionListener".equals(methodName))
+            {
+                return exceptionListener ;
+            }
+            else if ("createSession".equals(methodName))
+            {
+                checkFault() ;
+                final Integer acknowledgeMode = (Integer)args[1] ;
+                return Proxy.newProxyInstance(MockConnectionInvocationHandler.class.getClassLoader(), new Class[] {Session.class},
+                        new MockSessionInvocationHandler(acknowledgeMode)) ;
+            }
+            else if ("createXASession".equals(methodName))
+            {
+                checkFault() ;
+                return Proxy.newProxyInstance(MockConnectionInvocationHandler.class.getClassLoader(), new Class[] {XASession.class},
+                        new MockSessionInvocationHandler(Session.SESSION_TRANSACTED)) ;
+            }
+            else
+            {
+                System.out.println("Connection method " + method.getName() + " called") ;
+                return null ;
+            }
+        }
+        
+        void fireExceptionListener(final JMSException exception)
+        {
+            if (exceptionListener != null)
+            {
+                exceptionListener.onException(exception) ;
+            }
+        }
+        
+        private void checkFault()
+            throws JMSException
+        {
+            if (throwFault)
+            {
+                final JMSException exception = new JMSException("Test exception") ;
+                exception.initCause(new IllegalStateException("JMS IllegalStateException")) ;
+                // clear it down to allow retry
+                throwFault = false ;
+                throw exception ;
+            }
+        }
+    }
+    
+    static final class MockSessionInvocationHandler implements InvocationHandler
+    {
+        private final Integer acknowledgeMode ;
+        static boolean throwFault ;
+            
+        MockSessionInvocationHandler(final Integer acknowledgeMode)
+        {
+            this.acknowledgeMode = acknowledgeMode ;
+        }
+            
+        public Object invoke(final Object proxy, final Method method, final Object[] args)
+            throws Throwable
+        {
+            final String methodName = method.getName() ;
+            if ("getAcknowledgeMode".equals(methodName))
+            {
+                return acknowledgeMode ;
+            }
+            else if ("createBrowser".equals(methodName))
+            {
+                checkFault() ;
+                return Proxy.newProxyInstance(MockSessionInvocationHandler.class.getClassLoader(), new Class[] {QueueBrowser.class},
+                        new MockNullInvocationHandler()) ;
+            }
+            else if ("createConsumer".equals(methodName))
+            {
+                checkFault() ;
+                return Proxy.newProxyInstance(MockSessionInvocationHandler.class.getClassLoader(), new Class[] {MessageConsumer.class},
+                        new MockNullInvocationHandler()) ;
+            }
+            else if ("createDurableSubscriber".equals(methodName))
+            {
+                checkFault() ;
+                return Proxy.newProxyInstance(MockSessionInvocationHandler.class.getClassLoader(), new Class[] {TopicSubscriber.class},
+                        new MockNullInvocationHandler()) ;
+            }
+            else if ("createProducer".equals(methodName))
+            {
+                checkFault() ;
+                return Proxy.newProxyInstance(MockSessionInvocationHandler.class.getClassLoader(), new Class[] {MessageProducer.class},
+                        new MockNullInvocationHandler()) ;
+            }
+            else
+            {
+                System.out.println("Session method " + method.getName() + " called") ;
+                return null ;
+            }
+        }
+        
+        private void checkFault()
+            throws JMSException
+        {
+            if (throwFault)
+            {
+                final JMSException exception = new JMSException("Test exception") ;
+                exception.initCause(new IllegalStateException("JMS IllegalStateException")) ;
+                throw exception ;
+            }
+        }
+    }
+    
+    static final class MockNullInvocationHandler implements InvocationHandler
+    {
+        public Object invoke(final Object proxy, final Method method, final Object[] args)
+            throws Throwable
+        {
+            final String methodName = method.getName() ;
+            if ("hashCode".equals(methodName))
+            {
+                return System.identityHashCode(proxy) ;
+            }
+            else if ("equals".equals(methodName))
+            {
+                return proxy == args[0] ;
+            }
+            else
+            {
+                return null ;
+            }
+        }
+    }
+    
+    private static final class MockActiveTransactionStrategy extends NullTransactionStrategy
+    {
+        @Override
+        public boolean isActive()
+            throws TransactionStrategyException
+        {
+            return true ;
+        }
+        
+        @Override
+        public void registerSynchronization(final Synchronization sync)
+                throws TransactionStrategyException
+        {
+        }
+        
+        @Override
+        public void enlistResource(final XAResource resource)
+                throws TransactionStrategyException
+        {
+        }
+        
+        @Override
+        public Object getTransaction()
+            throws TransactionStrategyException
+        {
+            return this ;
+        }
+    }
+    
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter(JmsConnectionPoolUnitTest.class);
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MaxSessionsPerConnectionUnitTest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MaxSessionsPerConnectionUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MaxSessionsPerConnectionUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MaxSessionsPerConnectionUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,213 @@
+/*
+ * 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 junit.framework.TestCase;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.Session;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.internal.soa.esb.rosetta.pooling.jms.MockJMSXAConnectionFactory;
+import org.jboss.internal.soa.esb.rosetta.pooling.jms.MockJMSConnectionFactory;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MaxSessionsPerConnectionUnitTest extends TestCase {
+
+    private Map<String, String> jndiEnv = new HashMap<String, String>();
+
+    public MaxSessionsPerConnectionUnitTest() {
+        jndiEnv.put(Context.INITIAL_CONTEXT_FACTORY, MockInitialContextFactory.class.getName());
+        jndiEnv.put(JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
+    }
+
+    protected void tearDown() throws Exception {
+        TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
+    }
+
+    public void test_nonXA() throws NamingException, JMSException, ConnectionException {
+        int MAX_SESSIONS_PER_CONN = 2;
+
+        jndiEnv.put(JMSEpr.MAX_SESSIONS_PER_CONNECTION, Integer.toString(MAX_SESSIONS_PER_CONN));
+
+        MockJndiContextHandler.objects.put("ConnectionFactory", new MockJMSConnectionFactory(MAX_SESSIONS_PER_CONN));
+        JmsConnectionPool connPool = new JmsConnectionPool(jndiEnv);
+        List<JmsConnectionPool.JmsSessionPool> sessPools = connPool.getSessionPools();
+
+        assertEquals(20, connPool.getMaxSessions());
+        assertEquals(MAX_SESSIONS_PER_CONN, connPool.getMaxSessionsPerConnection());
+        assertEquals(0, sessPools.size());
+
+        try {
+            JmsSession session1 = connPool.getSession();
+
+            // Just get 1 session.  Make sure it's returned to the
+            // pool on closing...
+            assertEquals(1, sessPools.size());
+            assertEquals(0, sessPools.get(0).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(1, sessPools.get(0).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            connPool.handleCloseSession(session1);
+            assertEquals(1, sessPools.get(0).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(0, sessPools.get(0).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+
+            JmsSession session2 = connPool.getSession();
+
+            // Now try another session.  Should be same session instance as last time.
+            // Make sure it's returned to the pool on closing...
+            assertTrue(session1 == session2);
+            assertEquals(1, sessPools.size());
+            assertEquals(0, sessPools.get(0).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(1, sessPools.get(0).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            connPool.handleCloseSession(session2);
+            assertEquals(1, sessPools.get(0).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(0, sessPools.get(0).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+
+            // Now try 3 sessions.  Should cause another pool to be created.
+            // Make sure it's returned to the pool on closing...
+            session1 = connPool.getSession();
+            session2 = connPool.getSession();
+            JmsSession session3 = connPool.getSession();
+
+            assertEquals(2, sessPools.size());
+            assertEquals(0, sessPools.get(0).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(2, sessPools.get(0).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(0, sessPools.get(1).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(1, sessPools.get(1).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            connPool.handleCloseSession(session1);
+            connPool.handleCloseSession(session2);
+            connPool.handleCloseSession(session3);
+            assertEquals(2, sessPools.get(0).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(0, sessPools.get(0).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(1, sessPools.get(1).getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(0, sessPools.get(1).getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+
+            List<JmsSession> sessions = getSessions(connPool, 20);
+            assertEquals(10, sessPools.size());
+            assertAllInUse(sessPools);
+            closeAll(sessions, connPool);
+            assertAllFree(sessPools);
+        } finally {
+            connPool.removeSessionPool();
+        }
+    }
+
+    public void test_XA() throws NamingException, JMSException, ConnectionException, TransactionStrategyException {
+        int MAX_SESSIONS_PER_CONN = 3;
+
+        jndiEnv.put(JMSEpr.MAX_SESSIONS_PER_CONNECTION, Integer.toString(MAX_SESSIONS_PER_CONN));
+        jndiEnv.put(JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION, "1");
+
+        MockJndiContextHandler.objects.put("ConnectionFactory", new MockJMSXAConnectionFactory(MAX_SESSIONS_PER_CONN));
+        JmsConnectionPool connPool = new JmsConnectionPool(jndiEnv);
+        List<JmsConnectionPool.JmsSessionPool> sessPools = connPool.getSessionPools();
+
+        assertEquals(20, connPool.getMaxSessions());
+        assertEquals(MAX_SESSIONS_PER_CONN, connPool.getMaxSessionsPerConnection());
+        assertEquals(1, connPool.getMaxXASessionsPerConnection());
+        assertEquals(0, sessPools.size());
+
+        // There's a limit of 1 XA Session per connection.
+        // So as sessions get added, a new Connection will be added for each XA Session.  Non XA Sessions
+        // will get filled into connections up to the maxSesionsPerConnection, which is 3 for this test.
+
+        MockTransactionStrategy.isActive = true;
+        try {
+            TransactionStrategy.setTransactionStrategy(new MockTransactionStrategy());
+
+            connPool.getSession();
+            assertEquals(1, sessPools.size());
+
+            connPool.getSession();
+            assertEquals(2, sessPools.size());
+
+            connPool.getSession();
+            assertEquals(3, sessPools.size());
+
+            TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
+            connPool.getSession();
+            connPool.getSession();
+            connPool.getSession();
+            connPool.getSession();
+            connPool.getSession();
+            connPool.getSession();
+            assertEquals(3, sessPools.size());
+
+            connPool.getSession();
+            assertEquals(4, sessPools.size());
+
+            TransactionStrategy.setTransactionStrategy(new MockTransactionStrategy());
+
+            connPool.getSession();
+            assertEquals(4, sessPools.size());
+
+            connPool.getSession();
+            assertEquals(5, sessPools.size());
+
+            TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
+
+            connPool.getSession();
+            connPool.getSession();
+            connPool.getSession();
+            assertEquals(5, sessPools.size());
+        } finally {
+            connPool.removeSessionPool();
+        }
+    }
+
+    private void closeAll(List<JmsSession> sessions, JmsConnectionPool connPool) {
+        for(JmsSession session : sessions) {
+            connPool.handleCloseSession(session);
+        }
+    }
+
+    private void assertAllInUse(List<JmsConnectionPool.JmsSessionPool> sessPools) {
+        for(JmsConnectionPool.JmsSessionPool sessPool : sessPools) {
+            assertEquals(0, sessPool.getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(2, sessPool.getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+        }
+    }
+
+    private void assertAllFree(List<JmsConnectionPool.JmsSessionPool> sessPools) {
+        for(JmsConnectionPool.JmsSessionPool sessPool : sessPools) {
+            assertEquals(2, sessPool.getFreeSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+            assertEquals(0, sessPool.getInUseSessionsInPool(Session.AUTO_ACKNOWLEDGE));
+        }
+    }
+
+    private List<JmsSession> getSessions(JmsConnectionPool connPool, int numSessions) throws NamingException, JMSException, ConnectionException {
+        List<JmsSession> sessions = new ArrayList<JmsSession>();
+        for(int i = 0; i < numSessions; i++) {
+            sessions.add(connPool.getSession());
+        }
+        return sessions;
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockInitialContextFactory.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockInitialContextFactory.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockInitialContextFactory.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockInitialContextFactory.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,37 @@
+/*
+ * 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 javax.naming.spi.InitialContextFactory;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.util.Hashtable;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MockInitialContextFactory implements InitialContextFactory {
+    
+    public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException {
+        return MockJndiContextHandler.getInstance();
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockJndiContextHandler.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockJndiContextHandler.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockJndiContextHandler.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockJndiContextHandler.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,60 @@
+/*
+ * 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 javax.naming.Context;
+import javax.naming.NameNotFoundException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MockJndiContextHandler implements InvocationHandler {
+
+    public static Map<String, Object> objects = new HashMap<String, Object>();
+
+    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+
+        if(method.getName().equals("lookup")) {
+            String name = (String) args[0];
+            Object object = objects.get(name);
+
+            if(object == null) {
+                throw new NameNotFoundException("Obect '" + name + "' not found.");
+            }
+
+            return object;            
+        }
+
+        return null;
+    }
+
+    public static Context getInstance() {
+        return (Context) Proxy.newProxyInstance(Context.class.getClassLoader(),
+                new Class[]{Context.class},
+                new MockJndiContextHandler());
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,73 @@
+/*
+ * 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 org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+
+import javax.transaction.Synchronization;
+import javax.transaction.xa.XAResource;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MockTransactionStrategy extends TransactionStrategy {
+
+    public static Object transactionObject;
+    public static boolean isActive;
+
+    public void begin() throws TransactionStrategyException {
+
+    }
+
+    public void terminate() throws TransactionStrategyException {
+
+    }
+
+    public void rollbackOnly() throws TransactionStrategyException {
+
+    }
+
+    public Object getTransaction() throws TransactionStrategyException {
+        return transactionObject;
+    }
+
+    public Object suspend() throws TransactionStrategyException {
+        return transactionObject;
+    }
+
+    public boolean isActive() throws TransactionStrategyException {
+        return isActive;
+    }
+
+    public void resume(Object tx) throws TransactionStrategyException {
+
+    }
+
+    public void registerSynchronization(Synchronization sync) throws TransactionStrategyException {
+
+    }
+
+    public void enlistResource(XAResource resource) throws TransactionStrategyException {
+
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,107 +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.jms;
-
-import org.jboss.internal.soa.esb.rosetta.pooling.MockJndiContextHandler;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class MockJMSConnectionFactory implements ConnectionFactory {
-
-    private int maxSessionsPerConnection;
-
-    public MockJMSConnectionFactory(int maxSessionsPerConnection) {
-        this.maxSessionsPerConnection = maxSessionsPerConnection;
-    }
-
-    public Connection createConnection() throws JMSException {
-        return createConnectionHandler();
-    }
-
-    public Connection createConnection(String s, String s1) throws JMSException {
-        return createConnectionHandler();
-    }
-
-    private Connection createConnectionHandler() {
-        return (Connection) Proxy.newProxyInstance(Connection.class.getClassLoader(),
-                new Class[]{Connection.class},
-                new MockJMSConnectionHandler(maxSessionsPerConnection));
-    }
-
-    private class MockJMSConnectionHandler implements InvocationHandler {
-
-        private int maxSessionsPerConnection;
-        private List<Session> sessions = new ArrayList<Session>();
-
-        public MockJMSConnectionHandler(int maxSessionsPerConnection) {
-            this.maxSessionsPerConnection = maxSessionsPerConnection;
-        }
-
-        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-
-            if(method.getName().equals("createSession")) {
-                System.out.println("Creating JMS Session");
-
-                if(maxSessionsPerConnection > 0 && sessions.size() == maxSessionsPerConnection) {
-                    throw new JMSException("Unable to create JMS Session on Connection.  Maximum of " + maxSessionsPerConnection + " Sessions/Connection.");
-                }
-
-                Session session = (Session) Proxy.newProxyInstance(Session.class.getClassLoader(),
-                        new Class[]{Session.class},
-                        new MockJMSSessionHandler());
-
-                sessions.add(session);
-
-                return session;
-            }
-
-            System.out.println("MockJMSConnectionHandler: Call to " + method.getName());
-
-            return null;
-        }
-    }
-
-    private class MockJMSSessionHandler implements InvocationHandler {
-
-        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-
-            if(method.getName().equals("getAcknowledgeMode")) {
-                return Session.AUTO_ACKNOWLEDGE;
-            }
-
-            System.out.println("MockJMSSessionHandler: Call to " + method.getName());
-
-            return null;
-        }
-    }
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSConnectionFactory.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,107 @@
+/*
+ * 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.jms;
+
+import org.jboss.internal.soa.esb.rosetta.pooling.MockJndiContextHandler;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.jms.Session;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MockJMSConnectionFactory implements ConnectionFactory {
+
+    private int maxSessionsPerConnection;
+
+    public MockJMSConnectionFactory(int maxSessionsPerConnection) {
+        this.maxSessionsPerConnection = maxSessionsPerConnection;
+    }
+
+    public Connection createConnection() throws JMSException {
+        return createConnectionHandler();
+    }
+
+    public Connection createConnection(String s, String s1) throws JMSException {
+        return createConnectionHandler();
+    }
+
+    private Connection createConnectionHandler() {
+        return (Connection) Proxy.newProxyInstance(Connection.class.getClassLoader(),
+                new Class[]{Connection.class},
+                new MockJMSConnectionHandler(maxSessionsPerConnection));
+    }
+
+    private class MockJMSConnectionHandler implements InvocationHandler {
+
+        private int maxSessionsPerConnection;
+        private List<Session> sessions = new ArrayList<Session>();
+
+        public MockJMSConnectionHandler(int maxSessionsPerConnection) {
+            this.maxSessionsPerConnection = maxSessionsPerConnection;
+        }
+
+        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+
+            if(method.getName().equals("createSession")) {
+                System.out.println("Creating JMS Session");
+
+                if(maxSessionsPerConnection > 0 && sessions.size() == maxSessionsPerConnection) {
+                    throw new JMSException("Unable to create JMS Session on Connection.  Maximum of " + maxSessionsPerConnection + " Sessions/Connection.");
+                }
+
+                Session session = (Session) Proxy.newProxyInstance(Session.class.getClassLoader(),
+                        new Class[]{Session.class},
+                        new MockJMSSessionHandler());
+
+                sessions.add(session);
+
+                return session;
+            }
+
+            System.out.println("MockJMSConnectionHandler: Call to " + method.getName());
+
+            return null;
+        }
+    }
+
+    private class MockJMSSessionHandler implements InvocationHandler {
+
+        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+
+            if(method.getName().equals("getAcknowledgeMode")) {
+                return Session.AUTO_ACKNOWLEDGE;
+            }
+
+            System.out.println("MockJMSSessionHandler: Call to " + method.getName());
+
+            return null;
+        }
+    }
+}

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,110 +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.jms;
-
-import org.jboss.internal.soa.esb.rosetta.pooling.MockJndiContextHandler;
-
-import javax.jms.*;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class MockJMSXAConnectionFactory implements XAConnectionFactory {
-
-    private int maxSessionsPerConnection;
-
-    public MockJMSXAConnectionFactory(int maxSessionsPerConnection) {
-        this.maxSessionsPerConnection = maxSessionsPerConnection;
-    }
-
-    public XAConnection createXAConnection() throws JMSException {
-        return createConnectionHandler();
-    }
-
-    public XAConnection createXAConnection(String s, String s1) throws JMSException {
-        return createConnectionHandler();
-    }
-
-    private XAConnection createConnectionHandler() {
-        return (XAConnection) Proxy.newProxyInstance(XAConnection.class.getClassLoader(),
-                new Class[]{XAConnection.class},
-                new MockJMSConnectionHandler(maxSessionsPerConnection));
-    }
-
-    private class MockJMSConnectionHandler implements InvocationHandler {
-
-        private int maxSessionsPerConnection;
-        private List<Session> sessions = new ArrayList<Session>();
-
-        public MockJMSConnectionHandler(int maxSessionsPerConnection) {
-            this.maxSessionsPerConnection = maxSessionsPerConnection;
-        }
-
-        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-
-            if(method.getName().equals("createSession")) {
-                return createSession(Session.class);
-            } else if(method.getName().equals("createXASession")) {
-                return createSession(XASession.class);
-            }
-
-            System.out.println("MockJMSConnectionHandler: Call to " + method.getName());
-
-            return null;
-        }
-
-        private Object createSession(Class<? extends Session> sessionType) throws JMSException {
-            System.out.println("Creating JMS Session");
-
-            if(maxSessionsPerConnection > 0 && sessions.size() == maxSessionsPerConnection) {
-                throw new JMSException("Unable to create JMS Session on Connection.  Maximum of " + maxSessionsPerConnection + " Sessions/Connection.");
-            }
-
-            Session session = (Session) Proxy.newProxyInstance(Session.class.getClassLoader(),
-                    new Class[]{sessionType},
-                    new MockJMSSessionHandler());
-
-            sessions.add(session);
-
-            return session;
-        }
-    }
-
-    private class MockJMSSessionHandler implements InvocationHandler {
-
-        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-
-            if(method.getName().equals("getAcknowledgeMode")) {
-                return Session.SESSION_TRANSACTED;
-            }
-
-            System.out.println("MockJMSSessionHandler: Call to " + method.getName());
-
-            return null;
-        }
-    }
-}
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/jms/MockJMSXAConnectionFactory.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,110 @@
+/*
+ * 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.jms;
+
+import org.jboss.internal.soa.esb.rosetta.pooling.MockJndiContextHandler;
+
+import javax.jms.*;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MockJMSXAConnectionFactory implements XAConnectionFactory {
+
+    private int maxSessionsPerConnection;
+
+    public MockJMSXAConnectionFactory(int maxSessionsPerConnection) {
+        this.maxSessionsPerConnection = maxSessionsPerConnection;
+    }
+
+    public XAConnection createXAConnection() throws JMSException {
+        return createConnectionHandler();
+    }
+
+    public XAConnection createXAConnection(String s, String s1) throws JMSException {
+        return createConnectionHandler();
+    }
+
+    private XAConnection createConnectionHandler() {
+        return (XAConnection) Proxy.newProxyInstance(XAConnection.class.getClassLoader(),
+                new Class[]{XAConnection.class},
+                new MockJMSConnectionHandler(maxSessionsPerConnection));
+    }
+
+    private class MockJMSConnectionHandler implements InvocationHandler {
+
+        private int maxSessionsPerConnection;
+        private List<Session> sessions = new ArrayList<Session>();
+
+        public MockJMSConnectionHandler(int maxSessionsPerConnection) {
+            this.maxSessionsPerConnection = maxSessionsPerConnection;
+        }
+
+        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+
+            if(method.getName().equals("createSession")) {
+                return createSession(Session.class);
+            } else if(method.getName().equals("createXASession")) {
+                return createSession(XASession.class);
+            }
+
+            System.out.println("MockJMSConnectionHandler: Call to " + method.getName());
+
+            return null;
+        }
+
+        private Object createSession(Class<? extends Session> sessionType) throws JMSException {
+            System.out.println("Creating JMS Session");
+
+            if(maxSessionsPerConnection > 0 && sessions.size() == maxSessionsPerConnection) {
+                throw new JMSException("Unable to create JMS Session on Connection.  Maximum of " + maxSessionsPerConnection + " Sessions/Connection.");
+            }
+
+            Session session = (Session) Proxy.newProxyInstance(Session.class.getClassLoader(),
+                    new Class[]{sessionType},
+                    new MockJMSSessionHandler());
+
+            sessions.add(session);
+
+            return session;
+        }
+    }
+
+    private class MockJMSSessionHandler implements InvocationHandler {
+
+        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+
+            if(method.getName().equals("getAcknowledgeMode")) {
+                return Session.SESSION_TRANSACTED;
+            }
+
+            System.out.println("MockJMSSessionHandler: Call to " + method.getName());
+
+            return null;
+        }
+    }
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptorUnitTest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptorUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptorUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/CachingRegistryInterceptorUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,416 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.services.registry;
+
+import java.util.List;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryInterceptor;
+import org.jboss.soa.esb.services.registry.ServiceNotFoundException;
+
+import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Unit tests for the caching registry interceptor
+ * 
+ * @author <a href="mailto:Kevin.Conner at jboss.com">Kevin Conner</a>
+ */
+public class CachingRegistryInterceptorUnitTest extends TestCase
+{
+    /**
+     * Tests of caching, intended to run within the current cache validity period
+     */
+    public void testCaching()
+        throws Exception
+    {
+        final String category = "category" ;
+        final String name = "name" ;
+        final EPR epr1 = new EPR() ;
+        final EPR epr2 = new EPR() ;
+        
+        final CachingRegistryInterceptor interceptor = new CachingRegistryInterceptor() ;
+        final CacheRegistryStatsInterceptor stats = new CacheRegistryStatsInterceptor() ;
+        final MockRegistry registry = new MockRegistry() ;
+        stats.setRegistry(registry) ;
+        interceptor.setRegistry(stats) ;
+
+        registry.registerEPR(category, name, "Description", epr1, "EPR description") ;
+        
+        // findAllServices passes through to registry
+        assertEquals("findAllServices count", 0, stats.getFindAllServicesCount()) ;
+        interceptor.findAllServices() ;
+        assertEquals("findAllServices count", 1, stats.getFindAllServicesCount()) ;
+        interceptor.findAllServices() ;
+        assertEquals("findAllServices count", 2, stats.getFindAllServicesCount()) ;
+
+        // findServices passes through to registry
+        assertEquals("findServices count", 0, stats.getFindServicesCount()) ;
+        interceptor.findServices(category) ;
+        assertEquals("findServices count", 1, stats.getFindServicesCount()) ;
+        interceptor.findServices(category) ;
+        assertEquals("findServices count", 2, stats.getFindServicesCount()) ;
+
+        // findEPR/findEPRs go to registry on first call, then cache.
+        assertEquals("findEPRs count", 0, stats.getFindEPRsCount()) ;
+        interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        interceptor.findEPR(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertEquals("findEPR count", 0, stats.getFindEPRCount()) ;
+
+        // registerEPR goes to registry and adds to cache
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertEquals("registerEPR count", 0, stats.getRegisterEPRCount()) ;
+        final List<EPR> registerOrigEPRs = interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertNotNull("Original EPRs", registerOrigEPRs) ;
+        assertEquals("Original EPR count", 1, registerOrigEPRs.size()) ;
+        interceptor.registerEPR(category, name, "Description", epr2, "EPR description") ;
+        assertEquals("registerEPR count", 1, stats.getRegisterEPRCount()) ;
+        final List<EPR> registerNewEPRs = interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertNotNull("New EPRs", registerNewEPRs) ;
+        assertEquals("New EPR count", 2, registerNewEPRs.size()) ;
+
+        // unRegister goes to registry and removes from cache
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertEquals("unRegisterEPR count", 0, stats.getUnRegisterEPRCount()) ;
+        final List<EPR> unRegisterOrigEPRs = interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertNotNull("Original EPRs", unRegisterOrigEPRs) ;
+        assertEquals("Original EPR count", 2, unRegisterOrigEPRs.size()) ;
+        interceptor.unRegisterEPR(category, name, epr2) ;
+        assertEquals("unRegisterEPR count", 1, stats.getUnRegisterEPRCount()) ;
+        final List<EPR> unRegisterNewEPRs = interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertNotNull("New EPRs", unRegisterNewEPRs) ;
+        assertEquals("New EPR count", 1, unRegisterNewEPRs.size()) ;
+        interceptor.unRegisterEPR(category, name, epr1) ;
+        assertEquals("unRegisterEPR count", 2, stats.getUnRegisterEPRCount()) ;
+        final List<EPR> finalEPRs = interceptor.findEPRs(category, name) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+        assertNotNull("Final EPRs", finalEPRs) ;
+        assertEquals("Final EPR count", 0, finalEPRs.size()) ;
+        final EPR finalEPR = interceptor.findEPR(category, name) ;
+        assertNull("Final EPR", finalEPR) ;
+        assertEquals("findEPR count", 0, stats.getFindEPRCount()) ;
+        assertEquals("findEPRs count", 1, stats.getFindEPRsCount()) ;
+
+        // Need to fix MockRegistry as it does not correctly handle
+        // service information.  We cannot use unRegisterService unless
+        // there is an EPR present so we re-register the first one.
+        // Also findEPR and findEPRs should throw ServiceNotFoundException
+        // after unRegister but MockRegistry does not support it.
+        registry.registerEPR(category, name, "Description", epr1, "EPR description") ;
+        assertEquals("unRegisterService count", 0, stats.getUnRegisterServiceCount()) ;
+        interceptor.unRegisterService(category, name) ;
+        assertEquals("unRegisterService count", 1, stats.getUnRegisterServiceCount()) ;
+    }
+
+    /**
+     * Test concurrent access to next interceptor in chain.
+     * @throws Exception
+     */
+    public void testConcurrency()
+        throws Exception
+    {
+        final int numServices = 5 ;
+        final String category = "category" ;
+        final String name = "name" ;
+        
+        final CachingRegistryInterceptor interceptor = new CachingRegistryInterceptor() ;
+        final CacheRegistryConcurrencyInterceptor concurrency = new CacheRegistryConcurrencyInterceptor(new CyclicBarrier(numServices)) ;
+        final MockRegistry registry = new MockRegistry() ;
+        concurrency.setRegistry(registry) ;
+        interceptor.setRegistry(concurrency) ;
+        
+        final String[] names = new String[numServices] ;
+        for (int count = 0 ; count < numServices ; count++)
+        {
+            names[count] = name + count ;
+            registry.registerEPR(category, names[count], "description", new EPR(), "EPR description") ;
+        }
+        final int numThreads = numServices*2 ;
+        
+        final CyclicBarrier barrier = new CyclicBarrier(numThreads) ;
+        final ConcurrencyTest[] tests = new ConcurrencyTest[numThreads] ;
+        for(int count = 0 ; count < numThreads ; count++)
+        {
+            tests[count] = new ConcurrencyTest(barrier, interceptor, category, names[count%numServices]) ;
+            tests[count].start() ;
+        }
+        
+        for(int count = 0 ; count < numThreads ; count++)
+        {
+            tests[count].join();
+        }
+        
+        for(int count = 0 ; count < numThreads ; count++)
+        {
+            assertNull("Throwable occurred", tests[count].getThrowable()) ;
+        }
+        
+        assertEquals("Registry findEPRs invocation", numServices, concurrency.getFindEPRsCount()) ;
+        assertFalse("Barrier timeout", concurrency.isTimeout()) ;
+    }
+
+    private static final class CacheRegistryStatsInterceptor implements RegistryInterceptor
+    {
+        private Registry registry ;
+        final AtomicInteger findAllServicesCount = new AtomicInteger() ;
+        final AtomicInteger findEPRCount = new AtomicInteger() ;
+        final AtomicInteger findEPRsCount = new AtomicInteger() ;
+        final AtomicInteger findServicesCount = new AtomicInteger() ;
+        final AtomicInteger registerEPRCount = new AtomicInteger() ;
+        final AtomicInteger unRegisterEPRCount = new AtomicInteger() ;
+        final AtomicInteger unRegisterServiceCount = new AtomicInteger() ;
+        
+        public List<String> findAllServices()
+            throws RegistryException
+        {
+            findAllServicesCount.incrementAndGet() ;
+            return registry.findAllServices() ;
+        }
+
+        public int getFindAllServicesCount()
+        {
+            return findAllServicesCount.get() ;
+        }
+
+        public EPR findEPR(final String serviceCategoryName, final String serviceName)
+            throws RegistryException, ServiceNotFoundException
+        {
+            findEPRCount.incrementAndGet() ;
+            return registry.findEPR(serviceCategoryName, serviceName) ;
+        }
+
+        public int getFindEPRCount()
+        {
+            return findEPRCount.get() ;
+        }
+
+        public List<EPR> findEPRs(final String serviceCategoryName, final String serviceName)
+            throws RegistryException, ServiceNotFoundException
+        {
+            findEPRsCount.incrementAndGet() ;
+            return registry.findEPRs(serviceCategoryName, serviceName) ;
+        }
+
+        public int getFindEPRsCount()
+        {
+            return findEPRsCount.get() ;
+        }
+
+        public List<String> findServices(final String serviceCategoryName)
+            throws RegistryException
+        {
+            findServicesCount.incrementAndGet() ;
+            return registry.findServices(serviceCategoryName) ;
+        }
+
+        public int getFindServicesCount()
+        {
+            return findServicesCount.get();
+        }
+
+        public void registerEPR(final String serviceCategoryName, final String serviceName,
+            final String serviceDescription, final EPR epr, final String eprDescription)
+            throws RegistryException
+        {
+            registerEPRCount.incrementAndGet() ;
+            registry.registerEPR(serviceCategoryName, serviceName, serviceDescription, epr, eprDescription) ;
+        }
+
+        public int getRegisterEPRCount()
+        {
+            return registerEPRCount.get();
+        }
+
+        public void unRegisterEPR(final String serviceCategoryName,
+            final String serviceName, final EPR epr)
+            throws RegistryException, ServiceNotFoundException
+        {
+            unRegisterEPRCount.incrementAndGet() ;
+            registry.unRegisterEPR(serviceCategoryName, serviceName, epr) ;
+        }
+
+        public int getUnRegisterEPRCount()
+        {
+            return unRegisterEPRCount.get();
+        }
+
+        public void unRegisterService(final String category, final String serviceName)
+            throws RegistryException, ServiceNotFoundException
+        {
+            unRegisterServiceCount.incrementAndGet() ;
+            registry.unRegisterService(category, serviceName) ;
+        }
+
+        public int getUnRegisterServiceCount()
+        {
+            return unRegisterServiceCount.get();
+        }
+
+        public void setRegistry(final Registry registry)
+        {
+            this.registry = registry ;
+        }
+    }
+
+    private static final class ConcurrencyTest extends Thread
+    {
+        private final CyclicBarrier barrier ;
+        private final Registry registry ;
+        private final String category ;
+        private final String name ;
+        
+        private Throwable throwable ;
+
+        ConcurrencyTest(final CyclicBarrier barrier, final Registry registry, 
+            final String category, final String name)
+        {
+            this.barrier = barrier ;
+            this.registry = registry ;
+            this.category = category ;
+            this.name = name ;
+        }
+
+        public void run()
+        {
+            try
+            {
+                barrier.await() ;
+                registry.findEPRs(category, name) ;
+            }
+            catch (final Throwable th)
+            {
+                throwable = th ;
+            }
+        }
+
+        Throwable getThrowable()
+        {
+            return throwable ;
+        }
+    }
+
+    private static final class CacheRegistryConcurrencyInterceptor implements RegistryInterceptor
+    {
+        private final CyclicBarrier barrier ;
+
+        private volatile boolean timeout ;
+        private Registry registry ;
+        private final AtomicInteger findEPRsCount = new AtomicInteger() ;
+
+        public CacheRegistryConcurrencyInterceptor(final CyclicBarrier barrier)
+        {
+            this.barrier = barrier ;
+        }
+
+        public List<String> findAllServices()
+            throws RegistryException
+        {
+            return registry.findAllServices() ;
+        }
+
+        public EPR findEPR(final String serviceCategoryName, final String serviceName)
+            throws RegistryException, ServiceNotFoundException
+        {
+            return registry.findEPR(serviceCategoryName, serviceName) ;
+        }
+
+        public List<EPR> findEPRs(final String serviceCategoryName, final String serviceName)
+            throws RegistryException, ServiceNotFoundException
+        {
+            findEPRsCount.incrementAndGet() ;
+            if (!timeout)
+            {
+                try
+                {
+                    barrier.await(10, TimeUnit.SECONDS) ;
+                }
+                catch (final TimeoutException te)
+                {
+                    timeout = true ;
+                }
+                catch (final InterruptedException ie)
+                {
+                    throw new RegistryException("Interrupted", ie) ;
+                }
+                catch (final BrokenBarrierException bbe)
+                {
+                    throw new RegistryException("Broken barrier", bbe) ;
+                }
+            }
+            return registry.findEPRs(serviceCategoryName, serviceName) ;
+        }
+
+        public int getFindEPRsCount()
+        {
+            return findEPRsCount.get() ;
+        }
+
+        public boolean isTimeout()
+        {
+            return timeout ;
+        }
+
+        public List<String> findServices(final String serviceCategoryName)
+            throws RegistryException
+        {
+            return registry.findServices(serviceCategoryName) ;
+        }
+
+        public void registerEPR(final String serviceCategoryName, final String serviceName,
+            final String serviceDescription, final EPR epr, final String eprDescription)
+            throws RegistryException
+        {
+            registry.registerEPR(serviceCategoryName, serviceName, serviceDescription, epr, eprDescription) ;
+        }
+
+        public void unRegisterEPR(final String serviceCategoryName,
+            final String serviceName, final EPR epr)
+            throws RegistryException, ServiceNotFoundException
+        {
+            registry.unRegisterEPR(serviceCategoryName, serviceName, epr) ;
+        }
+
+        public void unRegisterService(final String category, final String serviceName)
+            throws RegistryException, ServiceNotFoundException
+        {
+            registry.unRegisterService(category, serviceName) ;
+        }
+
+        public void setRegistry(final Registry registry)
+        {
+            this.registry = registry ;
+        }
+    }
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -71,7 +71,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -30,10 +30,9 @@
 import java.io.Serializable;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.util.Properties;
 
-import javax.jms.Destination;
 import javax.jms.JMSException;
-import javax.jms.Queue;
 import javax.jms.TextMessage;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -260,6 +259,28 @@
 		assertEquals("Property setter value", PROPERTY_SETTER_TEST_NAME, router.getJmsMessage().getStringProperty(PROPERTY_SETTER_TEST_NAME)) ;
 	}
 	
+	@Test
+    public void parseEnvironmentProperties() throws ConfigurationException, NamingException, JMSException
+    {
+        final String envPrefix = "test.prefix.";
+        final String propertyName = envPrefix + "test.propertyName";
+        final String propertyValue = "propertyValue";
+        final ConfigTree config = createConfigTree();
+        
+        // Add the jndi prefixes property.
+        config.setAttribute(JMSEpr.JNDI_PREFIXES, envPrefix);
+        
+        // Add the additional env property
+        config.setAttribute(propertyName, propertyValue);
+        
+        JMSRouter router = new JMSRouter(config);
+        Properties env = router.getEnvironment();
+        
+        assertEquals(4, env.size());
+        assertTrue(env.containsKey(propertyName));
+        assertEquals(propertyValue, env.get(propertyName));
+    }
+	
 	@Before
 	public void setup() throws URISyntaxException
 	{

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -204,20 +204,20 @@
 			// should default address to system property
 			final JMSEpr firstEpr = new JMSEpr(ONE_ONE_PROTOCOL, expectedDestinationType,
 				queueName, "connection", null, null, true, null, null, null, true) ;
-			assertEquals("System JNDI_SERVER_URL", "jms://" + defaultProvider + "/" + queueName, firstEpr.getAddr().getAddress()) ;
+			assertEquals("System JNDI_SERVER_URL", "jms:" + JNDI_PREFIX + defaultProvider + "#" + queueName, firstEpr.getAddr().getAddress()) ;
 			
 			// should use Provider URL extension
 			final Properties environment = new Properties() ;
 			environment.setProperty(Context.PROVIDER_URL, JNDI_PREFIX + extensionProvider) ;
 			final JMSEpr secondEpr = new JMSEpr(ONE_ONE_PROTOCOL, expectedDestinationType,
 				queueName, "connection", environment, null, true, null, null, null, true) ;
-			assertEquals("Extension Context.PROVIDER_URL", "jms://" + extensionProvider + "/" + queueName, secondEpr.getAddr().getAddress()) ;
+			assertEquals("Extension Context.PROVIDER_URL", "jms:" + JNDI_PREFIX + extensionProvider + "#" + queueName, secondEpr.getAddr().getAddress()) ;
 			
 			// should use jndi-URL property
 			environment.setProperty(JNDI_URL_TAG, JNDI_PREFIX + propertyJndi) ;
 			final JMSEpr thirdEpr = new JMSEpr(ONE_ONE_PROTOCOL, expectedDestinationType,
 				queueName, "connection", environment, null, true, null, null, null, true) ;
-			assertEquals("Extension Context.PROVIDER_URL", "jms://" + propertyJndi + "/" + queueName, thirdEpr.getAddr().getAddress()) ;
+			assertEquals("Extension Context.PROVIDER_URL", "jms:" + JNDI_PREFIX + propertyJndi + "#" + queueName, thirdEpr.getAddr().getAddress()) ;
 		}
 		finally
 		{
@@ -314,7 +314,66 @@
 		assertEquals("First extension", testExtension1Value, eprProperties.get(testExtension1)) ;
 		assertEquals("Second extension", testExtension2Value, eprProperties.get(testExtension2)) ;
 	}
+
+    @Test
+    public void test_max_sessions_per_connection() throws CourierException, URISyntaxException
+    {
+        Properties env = new Properties();
+
+        // Set the Max Sessions configs as on the epr env.  The should get translated into EPR
+        // extensions, which should in turn be populated onto the JNDI Env generated from the EPR.
+        env.setProperty(JMSEpr.MAX_SESSIONS_PER_CONNECTION, "3");
+        env.setProperty(JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION, "1");
+
+        JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
+                expectedConnectionFactory,
+                env, expectedSelector, NON_PERSISTENT);
+
+        Properties jndiEnv = jmsEpr.getJndiEnvironment();
+        assertEquals("3", jndiEnv.getProperty(JMSEpr.MAX_SESSIONS_PER_CONNECTION));
+        assertEquals("1", jndiEnv.getProperty(JMSEpr.MAX_XA_SESSIONS_PER_CONNECTION));
+    }
+
+	@Test
+	public void testDefaultURIConfig()
+		throws URISyntaxException
+	{
+		testEPRConfig(JMSEpr.QUEUE_TYPE, "queue/destinationName",
+			"ConnectionFactory", "jnp://localhost:1099", 
+			"org.jnp.interfaces.NamingContextFactory",
+			"org.jboss.naming:org.jnp.interfaces") ;
+	}
 	
+	@Test
+	public void testNonStandardURIConfig()
+		throws URISyntaxException
+	{
+		testEPRConfig(JMSEpr.QUEUE_TYPE, "abc/def/ghi",
+			"ConnectionFactory", "scheme://host:port/config#123456?abc=def",
+			"MyNonStandardContextFactory", "MyPkgInterfaces") ;
+	}
+	
+	private void testEPRConfig(final String destinationType, final String destinationName,
+			final String connectionFactory, final String jndiURL, final String contextFactory,
+			final String pkgPrefix)
+		throws URISyntaxException
+	{
+		final Properties env = new Properties() ;
+		env.put(Context.PROVIDER_URL, jndiURL) ;
+		env.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory) ;
+		env.put(Context.URL_PKG_PREFIXES, pkgPrefix) ;
+		
+		final JMSEpr jmsEpr = new JMSEpr(destinationType, destinationName, connectionFactory, env, null) ;
+		assertEquals("destinationType", destinationType, jmsEpr.getDestinationType()) ;
+		assertEquals("destinationName", destinationName, jmsEpr.getDestinationName()) ;
+		assertEquals("connectionFactory", connectionFactory, jmsEpr.getConnectionFactory()) ;
+		
+		final Properties jmsEprEnv = jmsEpr.getJndiEnvironment() ;
+		assertEquals(Context.PROVIDER_URL, jndiURL, jmsEprEnv.getProperty(Context.PROVIDER_URL)) ;
+		assertEquals(Context.INITIAL_CONTEXT_FACTORY, contextFactory, jmsEprEnv.getProperty(Context.INITIAL_CONTEXT_FACTORY)) ;
+		assertEquals(Context.URL_PKG_PREFIXES, pkgPrefix, jmsEprEnv.getProperty(Context.URL_PKG_PREFIXES)) ;
+	}
+	
 	private void assertDefaults(final String destination, final String connectionFactory, final String destinationType)
 	{
 		assertEquals( expectedDestination, destination );

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -202,7 +202,7 @@
             new ESBConfigUtil(getClass().getResourceAsStream("in-listener-config-02.xml"));
             fail("Expected ConfigurationException");
         } catch (ConfigurationException e) {
-            assertEquals("Service configuration for Service 'ServiceCat:ServiceName' doesn't define a Message-Aware Listener (i.e. is-gateway='false').", e.getMessage());
+            assertEquals("Service 'ServiceCat:ServiceName' does not define a Message-Aware (is-gateway='false') nor InVm Listener.", e.getMessage());
         }
     }
 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_648_UnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_648_UnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_648_UnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -38,7 +38,7 @@
             generator.generate();
             fail("Failed to throw ConfigurationException.");
         } catch(ConfigurationException e) {
-            assertEquals("Service configuration for Service 'C:3' doesn't define a Message-Aware Listener (i.e. is-gateway='false').", e.getMessage());
+            assertEquals("Service 'C:3' does not define a Message-Aware (is-gateway='false') nor InVm Listener.", e.getMessage());
         }
     }
 }

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,359 @@
+/*
+ * 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.soa.esb.listeners.config.mappers;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.Generator;
+import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.jca.ActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JcaConstants;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+/**
+ * Tests the JCA activation mapping of the JmsListenerMapper
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsListenerMapperJCAActivationTest
+{
+    private static final String TEST_DESTINATION = "TestDestination" ;
+    private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
+    private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
+    private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
+    private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
+
+    private static final String TEST_QUEUE = "TestQueue" ;
+    private static final String TEST_TOPIC = "TestTopic" ;
+    private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
+    private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
+    private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
+    
+    @BeforeClass
+    public static void setUp () throws Exception
+    {
+        final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
+        propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
+        propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
+    }
+
+    @Test
+    public void testDefaultAllValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put("destination", "DestName") ;
+        expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
+        expected.put("destinationType", Queue.class.getName()) ;
+        expected.put("messageSelector", "selector") ;
+        expected.put("maxSession", "100") ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testDefaultMandatoryValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put("destination", "DestName") ;
+        expected.put("destinationType", Topic.class.getName()) ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testAdapterAllValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+        expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+        expected.put(TEST_MAX_THREADS, "100") ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testAdapterMandatoryValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+        expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+        expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testListenerPropertyAllValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+        expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+        expected.put(TEST_MAX_THREADS, "100") ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testListenerPropertyMandatoryValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+        expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+        expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testBusPropertyAllValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+        expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+        expected.put(TEST_MAX_THREADS, "100") ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testBusPropertyMandatoryValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+        expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+        expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testProviderPropertyAllValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+        expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+        expected.put(TEST_MAX_THREADS, "100") ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    @Test
+    public void testProviderPropertyMandatoryValues()
+        throws Exception
+    {
+        final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
+        
+        final Map<String, String> expected = new HashMap<String, String>() ;
+        expected.put(TEST_DESTINATION, "DestName") ;
+        expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+        expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+        expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+        expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+        
+        verifyConfiguration(expected, activationConfig) ;
+    }
+
+    private Map<String, String> generateConfig(final String config)
+        throws Exception
+    {
+        final InputStream is = getClass().getResourceAsStream(config) ;
+        assertNotNull("Configuration " + config, is) ;
+        final XMLBeansModel model = Generator.parseConfig(is) ;
+        
+        final List<Listener> awareListeners = model.getESBAwareListeners() ;
+        assertEquals("Listener count", 1, awareListeners.size()) ;
+        
+        final Listener listener = awareListeners.get(0) ;
+        assertTrue("JmsListener", listener instanceof JmsListener) ;
+        
+        final Document doc = YADOMUtil.createDocument() ;
+        final Element root = doc.createElement("root") ;
+        final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
+        assertNotNull("Listener Element", listenerElement) ;
+        
+        final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+        final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
+        assertEquals("Activation node count", 1, numActivationNodes) ;
+        
+        final Element activationConfig = (Element)activationNodes.item(0) ;
+        final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
+        
+        final Map<String, String> properties = new HashMap<String, String>() ;
+        final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
+        for(int count = 0 ; count < numProperties ; count++)
+        {
+            final Node node = propertyNodes.item(count) ;
+            if (node instanceof Element)
+            {
+                final Element element = (Element)node ;
+                final String name = element.getAttribute("name") ;
+                final String value = element.getAttribute("value") ;
+                properties.put(name, value) ;
+            }
+        }
+        return properties ;
+    }
+
+    private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
+    {
+        assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
+        
+        for(Map.Entry<String, String> entry: expected.entrySet())
+        {
+            final String name = entry.getKey() ;
+            assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
+        }
+    }
+    
+    public static class TestActivationMapper implements ActivationMapper
+    {
+        public void setDestination(final Map<String, String> activationConfig, final String name)
+            throws ConfigurationException
+        {
+            activationConfig.put(TEST_DESTINATION, name) ;
+        }
+        
+        public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+            throws ConfigurationException
+        {
+            if (providerAdapterJNDI != null)
+            {
+                activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
+            }
+            else
+            {
+                activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+            }
+        }
+        
+        public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+            throws ConfigurationException
+        {
+            if (queue)
+            {
+                activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+            }
+            else
+            {
+                activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+            }
+        }
+        
+        public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+            throws ConfigurationException
+        {
+            if (messageSelector != null)
+            {
+                activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
+            }
+            else
+            {
+                activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+            }
+        }
+
+        public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+            throws ConfigurationException
+        {
+            if (maxThreads != null)
+            {
+                activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
+            }
+            else
+            {
+                activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+            }
+        }
+    }
+    
+    public static junit.framework.Test suite ()
+    {
+        return new JUnit4TestAdapter(JmsListenerMapperJCAActivationTest.class);
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_01.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_01.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_01.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,24 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="jms-ra.rar"
+        providerAdapterJNDI="ProviderAdapterJNDI"> <!--  providerAdapterJNDI -->
+      <jms-bus busid="bus">
+        <!--  destinationType, destination and selector -->
+        <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <!--  maxThreads -->
+        <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_02.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_02.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_02.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_02.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,22 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory">
+      <jms-bus busid="bus">
+        <!--  destinationType and destination-->
+        <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <jms-listener name="listener" busidref="bus"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_03.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_03.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_03.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_03.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,24 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar"
+        providerAdapterJNDI="ProviderAdapterJNDI"> <!--  providerAdapterJNDI -->
+      <jms-bus busid="bus">
+        <!--  destinationType, destination and selector -->
+        <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <!--  maxThreads -->
+        <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_04.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_04.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_04.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_04.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,22 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar">
+      <jms-bus busid="bus">
+        <!--  destinationType and destination-->
+        <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <jms-listener name="listener" busidref="bus"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,26 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory"
+        providerAdapterJNDI="ProviderAdapterJNDI"> <!--  providerAdapterJNDI -->
+      <jms-bus busid="bus">
+        <!--  destinationType, destination and selector -->
+        <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <!--  maxThreads -->
+        <jms-listener name="listener" busidref="bus" maxThreads="100">
+          <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+        </jms-listener>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,24 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory">
+      <jms-bus busid="bus">
+        <!--  destinationType and destination-->
+        <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <jms-listener name="listener" busidref="bus">
+          <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+        </jms-listener>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,25 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory"
+        providerAdapterJNDI="ProviderAdapterJNDI"> <!--  providerAdapterJNDI -->
+      <jms-bus busid="bus">
+        <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+        <!--  destinationType, destination and selector -->
+        <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <!--  maxThreads -->
+        <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,23 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory">
+      <jms-bus busid="bus">
+        <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+        <!--  destinationType and destination-->
+        <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <jms-listener name="listener" busidref="bus"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,25 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory"
+        providerAdapterJNDI="ProviderAdapterJNDI"> <!--  providerAdapterJNDI -->
+      <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+      <jms-bus busid="bus">
+        <!--  destinationType, destination and selector -->
+        <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <!--  maxThreads -->
+        <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,23 @@
+<?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-jca-provider name="provider" connection-factory="ConnectionFactory">
+      <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+      <jms-bus busid="bus">
+        <!--  destinationType and destination-->
+        <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="category" name="name" description="description">
+      <listeners>
+        <jms-listener name="listener" busidref="bus"/>
+        <actions mep="OneWay">
+          <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+        </actions>
+      </listeners>
+    </service>
+  </services>
+</jbossesb>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/jbossesb-properties-01.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/jbossesb-properties-01.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/jbossesb-properties-01.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -77,7 +77,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/DeserializedValuesMessageUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/DeserializedValuesMessageUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/DeserializedValuesMessageUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -26,12 +26,14 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.ObjectInputStream;
+import java.util.Set;
 
 import junit.framework.TestCase;
 
 import org.jboss.internal.soa.esb.message.format.DeferredDeserialisationException;
 import org.jboss.soa.esb.message.Attachment;
 import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Context;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.message.Properties;
 import org.jboss.soa.esb.util.Util;
@@ -66,6 +68,13 @@
         validateOldProperties(properties) ;
     }
     
+    public void testOldSerializedContextDeserialisation()
+        throws Exception
+    {
+        final Context context = (Context)deserialise("old_context.ser") ;
+        validateOldContext(context) ;
+    }
+    
     public void testOldSerializedMessageDeserialisation()
         throws Exception
     {
@@ -147,6 +156,14 @@
         assertEquals("Property value", "Property value", propertyValue) ;
     }
     
+    private void validateOldContext(final Context context)
+    {
+        assertNotNull("context", context) ;
+        final Set<String> keys = context.getContextKeys() ;
+        assertNotNull("context key set", keys) ;
+        assertEquals("context key count", 0, keys.size()) ;
+    }
+    
     private void validateNewAttachment(final Attachment attachment)
     {
         assertEquals("unnamed count", 1, attachment.getUnnamedCount()) ;

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/old_context.ser (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/old_context.ser)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetterUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetterUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetterUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -42,7 +42,6 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockejb.jms.MockQueue;
 import org.mockejb.jms.TextMessageImpl;
 import org.mockejb.jndi.MockContextFactory;
 
@@ -212,6 +211,16 @@
 		assertEquals ( expectedMessageID, toJMSMessage.getJMSCorrelationID() );
 	}
 	
+	@Test
+	public void setJMSProperties_JMSVendorProperty() throws JMSException, URISyntaxException
+    {
+        final String propertyKey = "JMS_SomeVendorName";
+        fromESBMessage.getProperties().setProperty( propertyKey, "bogus" );
+        
+        strategy.setJMSProperties( fromESBMessage, toJMSMessage );
+        assertNull(toJMSMessage.getStringProperty(propertyKey) );
+    }
+	
 	@Before
 	public void before() throws JMSException, NamingException
 	{

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractorUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractorUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -36,6 +36,7 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
 import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.Before;
 import org.junit.Test;
 import org.xml.sax.SAXException;
 
@@ -49,10 +50,11 @@
  */
 public class WSSecurityInfoExtractorUnitTest
 {
-	@Test
+	private WSSecurityInfoExtractor extractor;
+
+    @Test
 	public void extractUserPassSecurityInfo() throws SAXException, IOException, ParserConfigurationException, ConfigurationException
 	{
-		WSSecurityInfoExtractor extractor = new WSSecurityInfoExtractor("smooks-config.xml");
 		String soap = createUserPassSoapString();
 		AuthenticationRequest authRequest = extractor.extractSecurityInfo(soap);
 		assertNotNull(authRequest);
@@ -62,7 +64,6 @@
 	@Test
 	public void extractKeySecurityInfo() throws SAXException, IOException, ParserConfigurationException, ConfigurationException
 	{
-		WSSecurityInfoExtractor extractor = new WSSecurityInfoExtractor("smooks-config.xml");
 		String soap = createKeySoapString("soap-keys-example.xml");
 		AuthenticationRequest authRequest = extractor.extractSecurityInfo(soap);
 		assertNotNull(authRequest);
@@ -74,7 +75,6 @@
 	@Test
 	public void extractKeySecurityInfo2() throws SAXException, IOException, ParserConfigurationException, ConfigurationException
 	{
-		WSSecurityInfoExtractor extractor = new WSSecurityInfoExtractor("smooks-config.xml");
 		String soap = createKeySoapString("soap-keys-example2.xml");
 		AuthenticationRequest authRequest = extractor.extractSecurityInfo(soap);
 		assertNotNull(authRequest);
@@ -86,7 +86,6 @@
 	@Test
 	public void extractKeySecurityInfoUsingStringInput() throws SAXException, IOException, ParserConfigurationException, ConfigurationException
 	{
-		WSSecurityInfoExtractor extractor = new WSSecurityInfoExtractor("smooks-config.xml");
 		String soap = "some payload";
 		AuthenticationRequest authRequest = extractor.extractSecurityInfo(soap);
 		assertNull(authRequest);
@@ -95,7 +94,6 @@
 	@Test
 	public void extractKeySecurityInfoUsingNullInput() throws SAXException, IOException, ParserConfigurationException, ConfigurationException
 	{
-		WSSecurityInfoExtractor extractor = new WSSecurityInfoExtractor("smooks-config.xml");
 		String soap = null;
 		AuthenticationRequest authRequest = extractor.extractSecurityInfo(soap);
 		assertNull(authRequest);
@@ -116,6 +114,12 @@
 		InputStream inputStream = ClassUtil.getResourceAsStream(fileName, getClass() );
 		return new String(StreamUtils.readStream(inputStream));
 	}
+	
+	@Before
+	public void createInstance()
+	{
+		extractor = new WSSecurityInfoExtractor();
+	}
 
 	public static junit.framework.Test suite()
 	{

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/smooks-config.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/smooks-config.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/smooks-config.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
-    <resource-config selector="Envelope/Header/Security/UsernameToken">
-        <resource>org.milyn.javabean.BeanPopulator</resource>
-        <param name="beanId">userNameToken</param>
-        <param name="beanClass">org.jboss.soa.esb.services.security.auth.ws.UsernameToken</param>
-        <param name="bindings">
-            <binding property="userName" selector="Username" default="" />
-            <binding property="password" selector="Password" />
-        </param>
-    </resource-config>
-    
-    <resource-config selector="Envelope/Header/Security/BinarySecurityToken">
-        <resource>org.milyn.javabean.BeanPopulator</resource>
-        <param name="beanId">binarySecurityToken</param>
-        <param name="beanClass">org.jboss.soa.esb.services.security.auth.ws.BinarySecurityToken</param>
-        <param name="bindings">
-            <binding property="encodingType" selector="BinarySecurityToken @EncodingType" />
-            <binding property="valueType" selector="BinarySecurityToken @ValueType" />
-            <binding property="key" selector="BinarySecurityToken" />
-        </param>
-    </resource-config>
-
-</smooks-resource-list>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -76,7 +76,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/testutils/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/testutils/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/testutils/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/util/JndiUtilUnitTest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/rosetta/tests/src/org/jboss/soa/esb/util/JndiUtilUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/util/JndiUtilUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/util/JndiUtilUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.util;
+
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+import java.util.Set;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.junit.Test;
+import junit.framework.TestCase;
+
+/**
+ * Unit test for {@link JndiUtil}.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class JndiUtilUnitTest extends TestCase
+{
+    public void test_getJndiPrefixesSet()
+    {
+        Set<String> set = JndiUtil.getJndiPrefixesSet("test.vendorName");
+        assertEquals(3, set.size());
+        assertTrue(set.contains("test.vendorName"));
+        assertTrue(set.contains("java.naming."));
+    }
+    
+    public void test_getPropertyValue()
+    {
+        final ConfigTree config = new ConfigTree("config") ;
+        config.setAttribute(JMSEpr.JNDI_PREFIXES, "test");
+        String value = JndiUtil.getPropertyValue(config, JMSEpr.JNDI_PREFIXES);
+        assertEquals("test", value);
+    }
+    
+    public void test_parseEnvironmentProperties()
+    {
+        final String envPrefix1 = "test.prefix.";
+        final String envPrefix2 = "test.prefix2.";
+        final String envPrefix = envPrefix1 + "," + envPrefix2;
+        final String propertyName = envPrefix1 + "vendor.propertyName";
+        final String propertyName2 = envPrefix2 + "propertyName2";
+        final String propertyName3 = "java.naming.object";
+        final String propertyValue = "propertyValue";
+        final String propertyValue2 = "propertyValue2";
+        final String propertyValue3 = "someValue";
+        
+        final ConfigTree config = new ConfigTree("config") ;
+        config.setAttribute(JMSEpr.JNDI_PREFIXES, envPrefix);
+        config.setAttribute(propertyName, propertyValue);
+        config.setAttribute(propertyName2, propertyValue2);
+        config.setAttribute("java.naming.object", "someValue");
+        
+        final Properties env = JndiUtil.parseEnvironmentProperties(config);
+        
+        assertEquals(3, env.size());
+        assertTrue(env.containsKey(propertyName));
+        assertTrue(env.containsKey(propertyName2));
+        assertTrue(env.containsKey(propertyName3));
+        assertEquals(propertyValue, env.get(propertyName));
+        assertEquals(propertyValue2, env.get(propertyName2));
+        assertEquals(propertyValue3, env.get(propertyName3));
+    }
+
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/aggregator/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/aggregator/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/aggregator/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -24,6 +24,8 @@
     </copy>
   </target>
 
+  <target name="quickstart-specific-checks" depends="assert-jbpm-secured"/>
+
   <target name="quickstart-specific-assemblies">
     <copy overwrite="true" file="${project.process.dir}/processdefinition.xml" todir="${classes}" />
     <copy todir="${classes}">

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration1/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -12,6 +12,8 @@
   
   <property name="project.process.dir" value="processDefinition"/>
 	
+  <target name="quickstart-specific-checks" depends="assert-jbpm-secured"/>
+
   <target name="quickstart-specific-assemblies">   
     <copy overwrite="true" file="${project.process.dir}/processdefinition.xml" todir="${classes}/${project.process.dir}" />
     <copy todir="${classes}">

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration2/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -15,6 +15,8 @@
 
   <property name="project.process.dir" value="processDefinition"/>
 	
+  <target name="quickstart-specific-checks" depends="assert-jbpm-secured"/>
+
   <target name="quickstart-specific-assemblies">   
     <copy overwrite="true" file="${project.process.dir}/processdefinition.xml" todir="${classes}/${project.process.dir}" />
     <copy todir="${classes}">

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -14,6 +14,8 @@
   
   <property name="project.process.dir" value="processDefinition"/>
 	
+  <target name="quickstart-specific-checks" depends="assert-jbpm-secured"/>
+
   <target name="quickstart-specific-assemblies">   
     <copy overwrite="true" file="${project.process.dir}/processdefinition.xml" todir="${classes}/${project.process.dir}" />
     <copy todir="${classes}">
@@ -34,7 +36,7 @@
 	<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
 		<classpath refid="exec-classpath"/>
 	</taskdef>
-	<deployToServer>
+	<deployToServer username="${jbpm.console.username}" password="${jbpm.console.password}" serverDeployer="${org.jboss.esb.jbpm.console.upload.url}">
 		<fileset dir="${basedir}/processDefinition" includes="*"/>
 	</deployToServer>
   </target>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/bpm_orchestration4/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_rules_service/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_rules_service/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_rules_service/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_stateful/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_stateful/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_stateful/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_service/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_service/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_service/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -267,40 +267,8 @@
 <!-- compile-classpath, exec-classpath                                    -->
 <!-- ==================================================================== -->
 
-	<target name="dependencies" depends="classpath-dependencies, quickstart-specific-checks">
-	
-		<!-- jBPM Console properties -->
-		<condition property="jbpm.production.properties.set" value="true" else="false">
-            <and>
-                <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
-                <isset property="quickstart.jbpm.console.username"/>
-                <isset property="quickstart.jbpm.console.password"/>
-            </and>
-         </condition>
-        <fail message="Quickstart configuration error: ${line.separator}${line.separator} jBPM username and password must be set in ${pwd}/quickstarts.properties. ${line.separator} The jBPM web console is secured when running in production mode i.e when org.jboss.esb.server.config=production.">
-            <condition>
-                <and>
-                    <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
-                    <equals arg1="${jbpm.production.properties.set}" arg2="false"/>
-                </and>
-            </condition>
-        </fail>
+	<target name="dependencies" depends="classpath-dependencies, quickstart-specific-checks"/>
 
-        <condition property="org.jboss.esb.jbpm.console.upload.url" value="/jbpm-console/app/upload/" else="/jbpm-console/upload/">
-            <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
-        </condition>
-
-        <condition property="jbpm.console.username" value="${quickstart.jbpm.console.username}" else="">
-            <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
-        </condition>
-
-        <condition property="jbpm.console.password" value="${quickstart.jbpm.console.password}" else="">
-            <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
-        </condition>
-
-		<!-- End jBPM Console properties -->
-	</target>
-
 	<target name="classpath-dependencies" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
     	
 		<path id="compile-classpath">
@@ -569,10 +537,37 @@
         <fail unless="jgroups-available" message="Unfortunately this aspect requires jgroups in order to function correctly.  Please target a server instance which contains jgroups.jar"/>
     </target>
 
+    <target name="assert-jbpm-secured" depends="jbossesb-dependencies">
+        <condition property="jbpm.production.properties.set">
+            <or>
+                <not>
+                    <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+                </not>
+                <and>
+                    <isset property="quickstart.jbpm.console.username"/>
+                    <isset property="quickstart.jbpm.console.password"/>
+                </and>
+            </or>
+        </condition>
+        <fail unless="jbpm.production.properties.set" message="Quickstart configuration error: ${line.separator}${line.separator} jBPM username and password must be set in ${pwd}/quickstarts.properties. ${line.separator} The jBPM web console is secured when running in production mode i.e when org.jboss.esb.server.config=production."/>
+
+        <condition property="org.jboss.esb.jbpm.console.upload.url" value="/jbpm-console/app/upload/" else="/jbpm-console/upload/">
+            <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+        </condition>
+
+        <condition property="jbpm.console.username" value="${quickstart.jbpm.console.username}" else="">
+            <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+        </condition>
+
+        <condition property="jbpm.console.password" value="${quickstart.jbpm.console.password}" else="">
+            <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+        </condition>
+    </target>
+
     <!-- ==================================================================== -->
-<!-- This section defines properties/targets to be overridden by the      -->
-<!-- quickstart specific build.xml file.                                  -->
-<!-- ==================================================================== -->
+    <!-- This section defines properties/targets to be overridden by the      -->
+    <!-- quickstart specific build.xml file.                                  -->
+    <!-- ==================================================================== -->
 
     <property name="additional.deploys" value="" />
     <property name="deploy.exploded" value="false" />

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/custom_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/custom_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/custom_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/deadletter/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/deadletter/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/deadletter/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/dynamic_router/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/dynamic_router/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/dynamic_router/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/ejbprocessor/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/ejbprocessor/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/ejbprocessor/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -66,7 +66,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/exceptions_faults/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/exceptions_faults/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/exceptions_faults/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/groovy_gateway/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/groovy_gateway/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/groovy_gateway/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_notifier/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_notifier/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_file_notifier/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_sql_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_sql_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_sql_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_topic_notifier/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_topic_notifier/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_topic_notifier/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/huge-split-enrich-transform-route/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/huge-split-enrich-transform-route/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/huge-split-enrich-transform-route/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jboss-esb.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jboss-esb.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -4,6 +4,10 @@
     <providers>
           <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory">
                       
+              <!-- Control the number of session's per jms connection... -->
+              <!--<property name="org.jboss.esb.jms.max.sessions.per.connection" value="5"/>-->
+              <!--<property name="org.jboss.esb.jms.max.xa.sessions.per.connection" value="1"/>-->
+
               <jms-bus busid="quickstartGwChannel">
                   <jms-message-filter
                       dest-type="QUEUE"
@@ -27,8 +31,6 @@
         	description="JMS Secured quickstart sample">
             <listeners>
                 <jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" is-gateway="true" >
-					<!-- Comment out to exclude properties that are vendor specific. -->
-					<property name="excludeProperties" value="[JMS_].*"/>
 				</jms-listener>
                 <jms-listener name="jmssecured"
                               busidref="quickstartEsbChannel"/>
@@ -48,7 +50,20 @@
 						<property name="unwrap" value="true"/>
 						<property name="security-principal" value="guest"/>
 						<property name="security-credential" value="guest"/>
-				   </action>                
+
+						<!-- Example of adding Extension properties -->
+						<!-- comma separated list of prefixes -->
+						<property name="jndi-prefixes" value="org.xyz."/>
+						<property name="org.xyz.propertyName" value="propertyValue"/>
+
+						<!-- All properties with prefix 'java.naming' will be added -->
+						<property name="java.naming.someproperty" value="propertyValue"/>
+
+                        <!-- Control the number of session's per jms connection... -->
+                        <!--<property name="org.jboss.esb.jms.max.sessions.per.connection" value="5"/>-->
+                        <!--<property name="org.jboss.esb.jms.max.xa.sessions.per.connection" value="1"/>-->
+
+                   </action>
                     
             </actions>
         </service>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/readme.txt	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/readme.txt	2009-06-11 10:12:52 UTC (rev 26923)
@@ -2,8 +2,7 @@
 =========
   The purpose of the jms_router quickstart is to show how the JMSRouter 
   action can be configured.
-  This quickstart also shows how a JMSCorrelationID can be used with the ESB, and
-  how JMS properties can be excluded at the JMS gateway by setting the 'excludeProperties'.
+  This quickstart also shows how a JMSCorrelationID can be used with the ESB.
   
 Running this quickstart:
 ========================
@@ -39,18 +38,3 @@
   2. jboss-esb.xml
 	 Take a look at how the JMSRouter can be configured.
 
-  3. 'excludeProperties' property.
-	 This propery can be used to filter out unwanted properties that exist in 
-	 the JMS message arriving at the gateway. 
-
-	 Usually there is no problem simply letting properties flow through but some 
-	 JMS Provider do not excepts JMS vendor specific properties that are not there 
-	 own and will throw an exception. This property was added to avoid this. 
-
-	 As you can see in the configuration that we specifying a regular expression to filter
-	 out all properties that start with 'JMS_' but this regular expression could be 
-	 used to filter out other properties too.
-
-	 Try uncommenting the 'excludeProperties' property in jboss-esb.xml and you will see
-	 that this property is no longer passed through and will be null in "Window2"
-  	 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/src/org/jboss/soa/esb/samples/quickstart/jmsrouter/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/src/org/jboss/soa/esb/samples/quickstart/jmsrouter/test/SendJMSMessage.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_router/src/org/jboss/soa/esb/samples/quickstart/jmsrouter/test/SendJMSMessage.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -50,7 +50,7 @@
     private Destination replyToDestination;
     private String correlationId;
 
-	private String vendorSpecificPropertyName = "JMS_IBMQ_Property";
+	private String propertyKey = "MyProperty";
 
     public void setupConnection(String destination) throws JMSException, NamingException
     {
@@ -81,7 +81,7 @@
         ObjectMessage objectMsg = session.createObjectMessage(msg);
         objectMsg.setJMSCorrelationID( correlationId );
 		objectMsg.setJMSReplyTo( replyToDestination );
-		objectMsg.setStringProperty(vendorSpecificPropertyName, "Vendor specific property value");
+		objectMsg.setStringProperty(propertyKey, "My property value");
 
         producer.send(objectMsg);
     	System.out.println("Sent message with CorrelationID : " + correlationId );
@@ -107,7 +107,7 @@
     		System.out.println("\t[MessageType : TextMessage]");
     		System.out.println( "\t[Text : " +  ((TextMessage)jmsMsg).getText() + "]" );
 		}
-		System.out.println("\t[Property: "+ vendorSpecificPropertyName + " : " +  jmsMsg.getStringProperty(vendorSpecificPropertyName) + "]" );
+		System.out.println("\t[Property: "+ propertyKey + " : " +  jmsMsg.getStringProperty(propertyKey) + "]" );
 
         consumer.close();
     }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_secured/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_secured/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_secured/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagefilter/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagefilter/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagefilter/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagestore/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagestore/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/messagestore/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/monitoring_action/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/monitoring_action/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/monitoring_action/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/native_client/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/native_client/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/native_client/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice_inonly/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice_inonly/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice_inonly/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/recipient_list/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/recipient_list/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/recipient_list/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scheduled_services/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scheduled_services/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scheduled_services/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_chain/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_chain/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_chain/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_groovy/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_groovy/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/scripting_groovy/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -72,7 +72,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_cert/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_cert/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_cert/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -63,7 +63,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -16,6 +16,8 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>
 
+     <target name="quickstart-specific-checks" depends="assert-jbpm-secured"/>
+
      <target name="runtest" depends="compile" description="send esb Message to esb service">
         <echo>Send esb message to esb service and get response</echo>
         <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securityjbpm.test.SendEsbMessage" failonerror="true">

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_jbpm/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -72,7 +72,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/simple_cbr/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/simple_cbr/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/simple_cbr/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/smooks_file_splitter_router/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/smooks_file_splitter_router/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/smooks_file_splitter_router/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_aop/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_aop/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_aop/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_helloworld/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_helloworld/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_helloworld/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_jpetstore/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_jpetstore/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/spring_jpetstore/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/static_router/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/static_router/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/static_router/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO2/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO2/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2POJO2/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_simple/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_simple/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_simple/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_stream/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_stream/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_XML2XML_stream/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/two_servers/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/two_servers/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/two_servers/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer1/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer1/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer1/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer2/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer2/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer2/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -33,7 +33,6 @@
 import javax.jms.QueueSession;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import java.net.InetAddress;
 
 import org.jboss.soa.esb.actions.StoreMessageToFile;
 

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/wiretap/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/wiretap/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/wiretap/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/base-project-build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/base-project-build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/base-project-build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -12,6 +12,7 @@
      -->
 	<dirname property="services.dir" file="${ant.file.base-build}"/>
 	<property name="esb.root.dir" location="../.."/>
+	<property name="lib.excludes" value=""/>
 	<target name="clean">
 		<delete dir="build" />
 	</target>
@@ -59,23 +60,35 @@
 	  </condition>
     </target>
     
-	<target name="compile" depends="prepare">
+	<target name="compile" depends="base-compile, service-compile"/>
+
+	<target name="base-compile" depends="prepare">
 		<javac srcdir="src/main/java" destdir="build/classes" debug="on" >
 			<classpath refid="classpath" />
 		</javac>
 	</target>
+
+	<target name="service-compile"/>
 	
-	<target name="jar" depends="compile,check.for.files" unless="dir_empty">
+	<target name="jar" depends="base-jar, service-jar"/>
+
+	<target name="base-jar" depends="compile,check.for.files" unless="dir_empty">
 		<jar basedir="build/classes" destfile="build/jbossesb-${ant.project.name}.jar" includes="**/*.class"/>
 	</target>
 
-    <target name="esb" depends="jar">
+	<target name="service-jar"/>
+
+    <target name="esb" depends="base-esb,service-esb"/>
+
+    <target name="base-esb" depends="jar">
         <copy todir="build/${ant.project.name}.esb/" >
-        	<fileset dir="lib/ext" includes="*.jar"/>
+        	<fileset dir="lib/ext" includes="*.jar" excludes="${lib.excludes}"/>
         	<fileset dir="src/main/resources/" includes="**/*"/>
         	<fileset dir="build" includes="*.jar"/>
          </copy>
     </target>
+
+    <target name="service-esb"/>
 	
 	<target name="dist" depends="esb">
 		<!-- copying to jbossesb/lib -->

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/main/resources/jbossesb-service.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/main/resources/jbossesb-service.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/main/resources/jbossesb-service.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -4,10 +4,10 @@
    <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
        name="jboss.esb:service=MessageStoreDatabaseInitializer">
       <attribute name="Datasource">java:/JBossESBDS</attribute>
-      <attribute name="ExistsSql">select * from message</attribute>
+      <attribute name="ExistsSql">select count(*) from message</attribute>
       <attribute name="SqlFiles">
          message-store-sql/hsqldb/create_database.sql
       </attribute>
       <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
    </mbean>
-</server>
\ No newline at end of file
+</server>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/test/resources/jbossesb-unittest-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/test/resources/jbossesb-unittest-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbossesb/src/test/resources/jbossesb-unittest-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -56,7 +56,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/resources/jbpm-service.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/resources/jbpm-service.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/resources/jbpm-service.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -6,7 +6,7 @@
    <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
        name="jboss.esb:service=JBPMDatabaseInitializer">
       <attribute name="Datasource">java:/JbpmDS</attribute>
-      <attribute name="ExistsSql">select * from JBPM_ID_USER</attribute>
+      <attribute name="ExistsSql">select count(*) from JBPM_ID_USER</attribute>
       <attribute name="SqlFiles">
       jbpm-sql/jbpm.jpdl.hsqldb.sql
       </attribute>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -210,12 +210,12 @@
 	 */
 	public RuleBase loadRuleBaseFromRuleAgent(final String ruleAgentProperties) throws IOException, Exception 
 	{
-		return RuleAgent.newRuleAgent( "/" + ruleAgentProperties ).getRuleBase();
+		return RuleAgent.newRuleAgent( "/" + ruleAgentProperties, new LogAgentEventListener() ).getRuleBase();
 	}
 	
 	public RuleBase loadRuleBaseFromRuleAgent(final Properties ruleAgentProperties) throws IOException, Exception 
 	{
-		return RuleAgent.newRuleAgent( ruleAgentProperties ).getRuleBase();
+		return RuleAgent.newRuleAgent( ruleAgentProperties, new LogAgentEventListener() ).getRuleBase();
 	}
 	
 	/**
@@ -223,7 +223,7 @@
 	 */
 	public RuleAgent createRuleAgent(final String ruleAgentProperties) throws IOException, Exception 
 	{
-		return RuleAgent.newRuleAgent( "/" + ruleAgentProperties );
+		return RuleAgent.newRuleAgent( "/" + ruleAgentProperties, new LogAgentEventListener() );
 	}
 	
 	private String getFileContents( final String fileName ) throws RuleServiceException

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/LogAgentEventListener.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/LogAgentEventListener.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/LogAgentEventListener.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/LogAgentEventListener.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.services.rules;
+
+import org.apache.log4j.Logger;
+import org.drools.agent.AgentEventListener;
+
+/**
+ * Drools AgentEventListener that delegates to log4j.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class LogAgentEventListener implements AgentEventListener
+{
+    private Logger log = Logger.getLogger(LogAgentEventListener.class);
+    
+    private String agentName;
+
+    public void setAgentName(final String name)
+    {
+        agentName = name;
+    }
+
+    public void debug(final String message)
+    {
+        log.debug(getAgentName() + " " + message);
+    }
+
+    public void debug(final String message, final Object object)
+    {
+        log.debug(getAgentName() + " Message : " + message + ", object = " + object);
+    }
+
+    public void exception(final Exception e)
+    {
+        log.error(getAgentName() + " " + e.getMessage(), e);
+    }
+
+    public void info(final String message)
+    {
+        log.info(getAgentName() + " " + message);
+    }
+
+    public void info(final String message, final Object object)
+    {
+        log.info(getAgentName() + " Message : " + message + ", object = " + object);
+    }
+
+    public void warning(final String message)
+    {
+        log.warn(getAgentName() + " " + message);
+    }
+
+    public void warning(final String message, final Object object)
+    {
+        log.warn(getAgentName() + " Message : " + message + ", object = " + object);
+    }
+    
+    private String getAgentName()
+    {
+        return "AgentName = '" + agentName + "'";
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss/internal)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss/internal/soa)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss/internal/soa/esb)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,44 +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.smooks;
-
-import org.jboss.aop.joinpoint.Invocation;
-
-/**
- * Aspect used to disable smooks shutdown hooks.
- * 
- * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
- */
-public class ShutdownHookAspect
-{
-	public Object addShutdownHook(final Invocation invocation)
-		throws Throwable
-	{
-		return null ;
-	}
-	
-	public Object removeShutdownHook(final Invocation invocation)
-		throws Throwable
-	{
-		return null ;
-	}
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/java/org/jboss/internal/soa/esb/smooks/ShutdownHookAspect.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,44 @@
+/*
+ * 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.smooks;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * Aspect used to disable smooks shutdown hooks.
+ * 
+ * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
+ */
+public class ShutdownHookAspect
+{
+	public Object addShutdownHook(final Invocation invocation)
+		throws Throwable
+	{
+		return null ;
+	}
+	
+	public Object removeShutdownHook(final Invocation invocation)
+		throws Throwable
+	{
+		return null ;
+	}
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/resources)

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/resources/META-INF)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/resources/META-INF/jboss-aop.xml	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE aop PUBLIC
-   "-//JBoss//DTD JBOSS AOP 1.0//EN"
-   "http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
-
-<aop>
-   <aspect class="org.jboss.internal.soa.esb.smooks.ShutdownHookAspect" scope="PER_VM"/>
-   
-   <bind pointcut="execution(private void org.milyn.cdr.SmooksResourceConfigurationStore->addShutdownHook())">
-      <advice name="addShutdownHook" aspect="org.jboss.internal.soa.esb.smooks.ShutdownHookAspect"/>
-   </bind>
-   
-   <bind pointcut="execution(public void org.milyn.cdr.SmooksResourceConfigurationStore->removeShutdownHook())">
-      <advice name="removeShutdownHook" aspect="org.jboss.internal.soa.esb.smooks.ShutdownHookAspect"/>
-   </bind>
-</aop>
-

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/smooks/aop/resources/META-INF/jboss-aop.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/aop/resources/META-INF/jboss-aop.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE aop PUBLIC
+   "-//JBoss//DTD JBOSS AOP 1.0//EN"
+   "http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
+
+<aop>
+   <aspect class="org.jboss.internal.soa.esb.smooks.ShutdownHookAspect" scope="PER_VM"/>
+   
+   <bind pointcut="execution(private void org.milyn.cdr.SmooksResourceConfigurationStore->addShutdownHook())">
+      <advice name="addShutdownHook" aspect="org.jboss.internal.soa.esb.smooks.ShutdownHookAspect"/>
+   </bind>
+   
+   <bind pointcut="execution(public void org.milyn.cdr.SmooksResourceConfigurationStore->removeShutdownHook())">
+      <advice name="removeShutdownHook" aspect="org.jboss.internal.soa.esb.smooks.ShutdownHookAspect"/>
+   </bind>
+</aop>
+

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/build.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/build.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,9 +1,66 @@
 <project name="smooks" default="test" basedir=".">
 	
 	<property file="build.properties"/>
+
+	<property name="build.dir" location="build"/>
+	<property name="aop.dir" location="aop"/>
+	<property name="aop.src.dir" location="${aop.dir}/java"/>
+	<property name="aop.resources.dir" location="${aop.dir}/resources"/>
+
+	<property name="smooks.jar" value="milyn-smooks-core-1.0.1.jar"/>
+
+	<property name="aop.jar.version" value="1.0"/>
+	<property name="aop.jar.name" value="jboss-smooks-${aop.jar.version}.aop"/>
+	<property name="aop.jar" value="${build.dir}/${aop.jar.name}"/>
+	<property name="aop.classes.dir" location="${build.dir}/aop-classes"/>
+	<property name="aopc.classes.dir" location="${build.dir}/aopc-classes"/>
+
+	<property name="lib.excludes" value="${smooks.jar}"/>
+
 	<!-- Import the base Ant build script... -->
 	<import file="${services.base.build}"/>
 	
 	<target name="test" depends="base.test"/>
 
+	<target name="service-compile" depends="prepare">
+		<delete dir="${aop.classes.dir}" quiet="true"/>
+		<mkdir dir="${aop.classes.dir}"/>
+
+		<javac srcdir="${aop.src.dir}" destdir="${aop.classes.dir}"
+			debug="true" source="1.5" classpathref="classpath"/>
+	</target>
+
+	<target name="service-jar" depends="aop-jar, aopc-jar"/>
+
+	<target name="aop-jar" depends="compile">
+		<jar destfile="${aop.jar}">
+			<fileset dir="${aop.classes.dir}"/>
+			<fileset dir="${aop.resources.dir}"/>
+		</jar>
+	</target>
+
+	<target name="aopc-jar">
+		<taskdef name="aopc" classname="org.jboss.aop.ant.AopC"
+			classpathref="classpath"/>
+
+		<delete dir="${aopc.classes.dir}" quiet="true"/>
+		<mkdir dir="${aopc.classes.dir}"/>
+
+		<unzip dest="${aopc.classes.dir}" src="lib/ext/${smooks.jar}"/>
+
+		<aopc compilerclasspathref="classpath" verbose="true">
+			<classpath path="${aopc.classes.dir}"/>
+			<src path="${aopc.classes.dir}"/>
+			<include name="org/milyn/cdr/SmooksResourceConfigurationStore.class"/>
+
+			<aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
+			<aopclasspath path="${aop.classes.dir}"/>
+		</aopc>
+		<zip destfile="${build.dir}/${smooks.jar}"
+			basedir="${aopc.classes.dir}"/>
+	</target>
+
+	<target name="service-esb" depends="base-esb">
+		<copy file="${aop.jar}" todir="${build.dir}/${ant.project.name}.esb"/>
+	</target>
 </project>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -19,7 +19,6 @@
  */
 package org.jboss.soa.esb.actions.converters;
 
-import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.util.ClassUtil;
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.apache.log4j.Logger;
@@ -27,10 +26,6 @@
 import org.milyn.SmooksException;
 import org.xml.sax.SAXException;
 
-import javax.jms.*;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.InitialContext;
 import java.io.InputStream;
 import java.io.IOException;
 import java.util.Arrays;
@@ -45,26 +40,15 @@
 class SmooksInstanceManager {
 
     private static Logger logger = Logger.getLogger(SmooksInstanceManager.class);
-    private static String UPDATE_TOPIC_NAME = "update.notification.topic";
     private SmooksConfiguration config = new SmooksConfiguration();
-    private String configurationSourceName;
     private String configurationSourceURI;
     private Smooks smooksInstance;
-    private ConfigurationUpdateListener configUpdateListener;
 
     protected SmooksInstanceManager(String configurationSourceName, String configurationSourceURI) throws SmooksException {
         AssertArgument.isNotNullAndNotEmpty(configurationSourceURI, "configurationSourceURI");
-        if(configurationSourceName != null) {
-            this.configurationSourceName = configurationSourceName;
-        } else {
-            // Just set the name to be the URI...
-            logger.warn("No 'configurationSourceName' specified for Smooks Configuration '" + configurationSourceURI + "'.  Defaulting name to '" + configurationSourceURI + "'.");
-            this.configurationSourceName = configurationSourceURI;
-        }
         this.configurationSourceURI = configurationSourceURI;
 
         smooksInstance = createSmooksInstance();
-        configUpdateListener = new ConfigurationUpdateListener();
     }
 
     protected Smooks getSmooksInstance() {
@@ -72,7 +56,6 @@
     }
 
     protected void close() {
-        configUpdateListener.close();
     }
 
     private Smooks createSmooksInstance() throws SmooksException{
@@ -119,275 +102,4 @@
         }
     }
 
-    /**
-     * JMS Listener for receiving configuration update notifications.
-     * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
-     */
-    private class ConfigurationUpdateListener implements MessageListener {
-
-    	private TopicConnection conn = null;
-    	private TopicSession session = null;
-    	private Topic topic = null;
-
-        /**
-    	 * Private constructor.
-    	 * <p/>
-    	 * Connects the listener to the topic.
-    	 */
-    	private ConfigurationUpdateListener() {
-    		try {
-    			if(!connect()) {
-                    logger.warn("Failed to start Smooks Configuration Update listener.  Turn on debug logging for more info.");
-                }
-    		} catch(Throwable t) {
-				logger.error("Unexpected error while attempting to connect Transformation configuration Update Listener.  Update listener not enabled!", t);
-				close();
-				return;
-    		}
-    	}
-
-		/**
-    	 * Receive a notification message.
-    	 */
-		public void onMessage(javax.jms.Message message) {
-            String updatedSourceName = null;
-
-            try {
-                if(message instanceof TextMessage) {
-                    updatedSourceName = ((TextMessage)message).getText();
-                } else if(message instanceof ObjectMessage) {
-                    try {
-                        updatedSourceName = (String) ((ObjectMessage)message).getObject();
-                    } catch(Throwable t) {
-                        logger.error("Failed to read updateSourceName from JMS ObjectMessage.  Expecting a String object.  Error: " + t.getMessage());
-                    }
-                }
-            } catch (JMSException e) {
-                logger.warn("Error reading Smooks Update Notification configuration source name from JMS message.", e);
-                return;
-            }
-
-            if(updatedSourceName != null) {
-                if(updatedSourceName.equals(configurationSourceName)) {
-                    logger.info("Transformation configuration update notification received for configuration source '" + configurationSourceName + "'.  Resetting SmooksTransformer in order to force a configuration re-read.");
-                    smooksInstance = createSmooksInstance();
-                }
-            } else {
-                logger.info("Transformation configuration update notification received (global notification).  Resetting SmooksTransformer in order to force a configuration re-read.");
-                smooksInstance = createSmooksInstance();
-            }
-        }
-
-        private ConnectionFactory getJmsConnectionFactory() throws ConfigurationException {
-            ConnectionFactory factory = null;
-            Context context;
-            String connectionFactoryRuntime = config.getProperty(ConnectionFactory.class.getName(), "ConnectionFactory");
-
-            context = getNamingContext();
-            try {
-                factory = (ConnectionFactory) context.lookup(connectionFactoryRuntime);
-            } catch (NamingException e) {
-                throw new ConfigurationException("JNDI lookup of JMS Connection Factory [" + connectionFactoryRuntime + "] failed.", e);
-            } catch (ClassCastException e) {
-                throw new ConfigurationException("JNDI lookup of JMS Connection Factory failed.  Class [" + connectionFactoryRuntime + "] is not an instance of [" + ConnectionFactory.class.getName() + "].", e);
-            } finally {
-                if (context!=null) {
-                    try {
-                        context.close();
-                    } catch (NamingException ne) {
-                        logger.error("Failed to close Naming Context.", ne);
-                    }
-                }
-            }
-
-            return factory;
-        }
-
-        private Context getNamingContext() throws ConfigurationException {
-            Context context;
-
-            try {
-                context = new InitialContext(config);
-            } catch (NamingException e) {
-                throw new ConfigurationException("Failed to load InitialContext: " + config);
-            }
-            if(context == null) {
-                throw new ConfigurationException("Failed to Server JNDI context.  Check that '" + Context.PROVIDER_URL + "', '" + Context.INITIAL_CONTEXT_FACTORY + "', '" + Context.URL_PKG_PREFIXES + "' are correctly configured in " + SmooksConfiguration.SMOOKS_ESB_PROPERTIES + ".");
-            }
-            
-            return context;
-        }
-
-        /**
-		 * Connect to the configured topic.
-		 */
-    	private boolean connect() {
-            String notificationTopicName = config.getProperty(UPDATE_TOPIC_NAME, "topic/org.jboss.soa.esb.transformation.Update");
-    		TopicConnectionFactory connectionFactory = null;
-
-			logger.debug("Attempting to connect Transformation Configuration Update Listener to update notification topic '" + notificationTopicName + "'.");
-
-    		// Get the Topic ConnectionFactory...
-    		try {
-				connectionFactory = (TopicConnectionFactory) getJmsConnectionFactory();
-			} catch (ConfigurationException e) {
-				logger.debug("Lookup of the JMS ConnectionFactory failed for the Transformation configuration Update Listener. Update listener not enabled!", e);
-				return false;
-			} catch (ClassCastException e) {
-				logger.debug("Invalid JMS ConnectionFactory config for the Transformation configuration Update Listener.  ConnectionFactory doesn't implement " + TopicConnectionFactory.class.getName() + ". Update listener not enabled!", e);
-				return false;
-			}
-
-			// Create the topic connection...
-			try {
-				conn = connectionFactory.createTopicConnection();
-			} catch (JMSException e) {
-				logger.debug("Failed to open JMS TopicConnection for the Transformation configuration Update Listener. Update listener not enabled!", e);
-				return false;
-			}
-
-			// Lookup the topic...
-			try {
-				Context context = getNamingContext();
-
-                topic = (Topic) context.lookup(notificationTopicName);
-                context.close();
-			} catch (ConfigurationException e) {
-				logger.debug("Topic lookup failed for the Transformation configuration Update Listener.  Topic name '" + notificationTopicName + "'.  \n\t\tThis JMS Topic may not be deployed, or this ESB instance may not be looking at the correct JMS provider (check properties '" + UPDATE_TOPIC_NAME + "' and '" + Context.PROVIDER_URL + "' in '" + SmooksConfiguration.SMOOKS_ESB_PROPERTIES + "').  \n\t\tUpdate listener not enabled!", e);
-				close();
-				return false;
-			} catch (NamingException e) {
-				logger.debug("Topic lookup failed for the Transformation configuration Update Listener.  Topic name '" + notificationTopicName + "'.  \n\tThis JMS Topic may not be deployed, or this ESB instance may not be looking at the correct JMS provider (check properties '" + UPDATE_TOPIC_NAME + "' and '" + Context.PROVIDER_URL + "' in '" + SmooksConfiguration.SMOOKS_ESB_PROPERTIES + "').  \n\tUpdate listener not enabled!");
-				close();
-				return false;
-			}
-
-			// Create the TopicSession...
-			try {
-				session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
-			} catch (JMSException e) {
-				logger.debug("TopicSession creation failed for the Transformation configuration Update Listener.  Update listener not enabled!", e);
-				close();
-				return false;
-			}
-
-			// Start the connection...
-			try {
-				conn.start();
-			} catch (JMSException e) {
-				logger.debug("Failed to start JMS TopicConnection for the Transformation configuration Update Listener.  Update listener not enabled!", e);
-				close();
-				return false;
-			}
-
-			// Bind "this" listener to the topic...
-			try {
-				TopicSubscriber topicSubscriber = session.createSubscriber(topic);
-				topicSubscriber.setMessageListener(this);
-			} catch (JMSException e) {
-				logger.debug("Failed to start JMS TopicConnection for the Transformation configuration Update Listener.  Update listener not enabled!", e);
-				close();
-				return false;
-			}
-
-			// Listen for exceptions on the connection...
-			try {
-				conn.setExceptionListener(new ExceptionListener());
-			} catch (JMSException e) {
-				logger.debug("Failed to attach an ExceptionListener for the Transformation configuration Update Listener.  Update listener not enabled!", e);
-				close();
-				return false;
-			}
-
-            logger.info("Successfully connected update notification listener to nofification topic '" + notificationTopicName + "' for Smooks configuration source '" + configurationSourceName + "' (" + configurationSourceURI + ").");
-
-			return true;
-    	}
-
-    	@Override
-		protected void finalize() throws Throwable {
-    		close();
-			super.finalize();
-		}
-
-		/**
-    	 * Close out the listener and all it's resources.
-    	 */
-		private void close() {
-			try {
-				if(conn != null) {
-					conn.stop();
-                    logger.debug("Closing JMS Connection for update notification listener for Smooks configuration source '" + configurationSourceName + "'.");
-				}
-			} catch (Throwable e) {
-				logger.error("Failed to stop Update Listener JMS connection.", e);
-				conn = null;
-			}
-			try {
-				if(session != null) {
-					session.close();
-                    logger.debug("Closing JMS Session for update notification listener for Smooks configuration source '" + configurationSourceName + "'.");
-				}
-			} catch (Throwable e) {
-				logger.error("Failed to close Update Listener JMS session.", e);
-			} finally {
-				session = null;
-			}
-			try {
-				if(conn != null) {
-					conn.close();
-                    logger.debug("Closing JMS Topic for update notification listener for Smooks configuration source '" + configurationSourceName + "'.");
-				}
-			} catch (Throwable e) {
-				logger.error("Failed to close Update Listener JMS connection.", e);
-			} finally {
-				conn = null;
-			}
-			topic = null;
-            logger.debug("Update notification listener for Smooks configuration source '" + configurationSourceName + "' is now stopped!");
-		}
-
-		/**
-		 * Exception Listener.
-		 * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
-		 */
-		private class ExceptionListener implements javax.jms.ExceptionListener {
-
-			/**
-			 * We want this listener to handle only one exception.
-			 * It will close all existing resources and create a new instance
-			 * once it successfully reconnects.
-			 */
-			private boolean hasHandledOneException = false;
-
-			/* (non-Javadoc)
-			 * @see javax.jms.ExceptionListener#onException(javax.jms.JMSException)
-			 */
-			public void onException(JMSException e) {
-				synchronized (ExceptionListener.class) {
-					if(!hasHandledOneException) {
-                        if(!logger.isDebugEnabled()) {
-                            logger.warn("JMS Exception on Transformation Configuration Update Listener: " + e.getMessage());
-                        } else {
-                            logger.debug("JMS Exception on Transformation Configuration Update Listener.", e);
-                        }
-                        close();
-						while(!connect()) {
-							try {
-								Thread.sleep(5000);
-							} catch (InterruptedException e1) {
-                                if(!logger.isDebugEnabled()) {
-	    							logger.warn("Interrupted during reconnect attempt.  Aborting reconnect!  Will need restart to reconnect: " + e.getMessage());
-                                } else {
-                                    logger.debug("Interrupted during reconnect attempt.  Aborting reconnect!  Will need restart to reconnect.", e);
-                                }
-                            }
-						}
-						hasHandledOneException = true;
-					}
-				}
-			}
-		}
-    }
-
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/resources/smooks.esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/resources/smooks.esb.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/main/resources/smooks.esb.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -36,5 +36,4 @@
     Provider defaults to JBoss MQ.
   -->
   <entry key="javax.jms.ConnectionFactory">ConnectionFactory</entry>
-  <entry key="update.notification.topic">topic/org.jboss.soa.esb.transformation.Update</entry>
 </properties>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/test/java/org/jboss/soa/esb/smooks/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/test/java/org/jboss/soa/esb/smooks/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/src/test/java/org/jboss/soa/esb/smooks/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,7 +61,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -526,10 +526,7 @@
                 } else if(collectionSize == 1) {
                     // It's a collection, but no need to clone coz we
                     // already have an entry for it...
-                    if(clonePoint == element) {
-                        // If the element itself is the clone point, add the OGNL expression attribute...
-                        element.setAttributeNS(OGNLUtils.JBOSSESB_SOAP_NS, OGNLUtils.JBOSSESB_SOAP_NS_PREFIX + OGNLUtils.OGNL_ATTRIB, ognl + "[0]");
-                    }
+                    clonePoint.setAttributeNS(OGNLUtils.JBOSSESB_SOAP_NS, OGNLUtils.JBOSSESB_SOAP_NS_PREFIX + OGNLUtils.OGNL_ATTRIB, ognl + "[0]");
                 } else {
                     // It's a collection and we need to do some cloning
                     if(clonePoint != null) {

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451.wsdl (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451.wsdl)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451.wsdl	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451.wsdl	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,71 @@
+<definitions name='OrderProcessorWSService' targetNamespace='http://webservice_consumer2/orderProcessor'
+             xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+             xmlns:tns='http://webservice_consumer2/orderProcessor' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+    <types>
+        <xs:schema targetNamespace='http://webservice_consumer2/orderProcessor' version='1.0'
+                   xmlns:tns='http://webservice_consumer2/orderProcessor' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+            <xs:complexType name='order'>
+                <xs:sequence>
+                    <xs:element minOccurs='0' name='id' type='xs:long'/>
+                    <xs:element maxOccurs='unbounded' minOccurs='0' name='lineItems' nillable='true'
+                                type='tns:lineItem'/>
+                    <xs:element minOccurs='0' name='shipTo' type='xs:string'/>
+                </xs:sequence>
+
+            </xs:complexType>
+            <xs:complexType name='lineItem'>
+                <xs:sequence>
+                    <xs:element minOccurs='0' name='id' type='xs:long'/>
+                    <xs:element minOccurs='0' name='name' type='xs:string'/>
+                    <xs:element minOccurs='0' name='price' type='xs:float'/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name='orderStatus'>
+
+                <xs:sequence>
+                    <xs:element minOccurs='0' name='comment' type='xs:string'/>
+                    <xs:element minOccurs='0' name='id' type='xs:long'/>
+                    <xs:element name='returnCode' type='xs:int'/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType final='#all' name='orderArray'>
+                <xs:sequence>
+                    <xs:element maxOccurs='unbounded' minOccurs='0' name='item' nillable='true' type='tns:order'/>
+
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
+    </types>
+    <message name='OrderProcessor_processOrder'>
+        <part name='order' type='tns:orderArray'></part>
+    </message>
+    <message name='OrderProcessor_processOrderResponse'>
+        <part name='return' type='tns:orderStatus'></part>
+
+    </message>
+    <portType name='OrderProcessor'>
+        <operation name='processOrder' parameterOrder='order'>
+            <input message='tns:OrderProcessor_processOrder'></input>
+            <output message='tns:OrderProcessor_processOrderResponse'></output>
+        </operation>
+    </portType>
+    <binding name='OrderProcessorBinding' type='tns:OrderProcessor'>
+        <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+
+        <operation name='processOrder'>
+            <soap:operation soapAction=''/>
+            <input>
+                <soap:body namespace='http://webservice_consumer2/orderProcessor' use='literal'/>
+            </input>
+            <output>
+                <soap:body namespace='http://webservice_consumer2/orderProcessor' use='literal'/>
+            </output>
+        </operation>
+
+    </binding>
+    <service name='OrderProcessorWSService'>
+        <port binding='tns:OrderProcessorBinding' name='OrderProcessorPort'>
+            <soap:address location='http://127.0.0.1:8080/Quickstart_webservice_consumer2/OrderProcessorWS'/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451_SoapUIClientServiceMBeanUnitTest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451_SoapUIClientServiceMBeanUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451_SoapUIClientServiceMBeanUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_2451_SoapUIClientServiceMBeanUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,184 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.soa.esb.services.soapui;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+import java.util.*;
+
+import javax.xml.transform.stream.StreamResult;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.http.HttpClientFactory;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+public class JBESB_2451_SoapUIClientServiceMBeanUnitTest extends TestCase {
+
+    private static final String WSDL_LOCATAION = "src/test/java/org/jboss/soa/esb/services/soapui";
+    private Properties properties;
+
+    protected void setUp() throws Exception {
+        properties = new Properties();
+    }
+
+    public void test_single() throws IOException, SAXException, ConfigurationException {
+        HashMap requestMap = new HashMap();
+        Order[] orders = new Order[1];
+
+        Order order = new Order();
+        order.setId((long)1);
+        order.setShipTo("Hokkaido");
+
+        LineItem lineItem1 = new LineItem();
+        lineItem1.setId((long)1);
+        lineItem1.setName("aname");
+        lineItem1.setPrice((float)10.00);
+
+        LineItem lineItem2 = new LineItem();
+        lineItem2.setId((long)2);
+        lineItem2.setName("aname2");
+        lineItem2.setPrice((float)20.00);
+
+        ArrayList lineItems = new ArrayList();
+        lineItems.add(lineItem1);
+        lineItems.add(lineItem2);
+
+        order.setLineItems(lineItems);
+
+        orders[0] = order;
+
+        ProcessOrderRequest requestObject = new ProcessOrderRequest();
+        requestObject.setOrder(orders);
+        requestMap.put("processOrder", requestObject);
+
+        test(requestMap, "expected_JBESB_2451_01.xml");
+    }
+
+    public void test_multiple() throws IOException, SAXException, ConfigurationException {
+        HashMap requestMap = new HashMap();
+        Order[] orders = new Order[2];
+
+        Order order = new Order();
+        order.setId((long)1);
+        order.setShipTo("Hokkaido");
+
+        LineItem lineItem1 = new LineItem();
+        lineItem1.setId((long)1);
+        lineItem1.setName("aname");
+        lineItem1.setPrice((float)10.00);
+
+        LineItem lineItem2 = new LineItem();
+        lineItem2.setId((long)2);
+        lineItem2.setName("aname2");
+        lineItem2.setPrice((float)20.00);
+
+        ArrayList lineItems = new ArrayList();
+        lineItems.add(lineItem1);
+        lineItems.add(lineItem2);
+
+        order.setLineItems(lineItems);
+
+        Order order2 = new Order();
+        order2.setId((long)2);
+        order2.setShipTo("Okinawa");
+
+        LineItem lineItem3 = new LineItem();
+        lineItem3.setId((long)3);
+        lineItem3.setName("aname3");
+        lineItem3.setPrice((float)30.00);
+
+        LineItem lineItem4 = new LineItem();
+        lineItem4.setId((long)4);
+        lineItem4.setName("aname4");
+        lineItem4.setPrice((float)40.00);
+
+        ArrayList lineItems2 = new ArrayList();
+        lineItems2.add(lineItem3);
+        lineItems2.add(lineItem4);
+
+        order2.setLineItems(lineItems2);
+
+        orders[0] = order;
+        orders[1] = order2;
+
+        ProcessOrderRequest requestObject = new ProcessOrderRequest();
+        requestObject.setOrder(orders);
+        requestMap.put("processOrder", requestObject);
+
+        test(requestMap, "expected_JBESB_2451_02.xml");
+    }
+
+    public void test(Map params, String expected) throws IOException, SAXException, ConfigurationException {
+    	File wsdlFile = new File(WSDL_LOCATAION + "/JBESB_2451.wsdl");
+        SoapUIClientService mbean = new SoapUIClientService();
+
+        properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+
+        params.put("dumpSOAP", true);
+
+        String message = mbean.buildRequest(wsdlFile.toURI().toString(), "processOrder", params, properties, null, null);
+        assertTrue("Generated SOAP message not as expected. See " + expected + ".  Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream(expected), new ByteArrayInputStream(message.getBytes())));
+    }
+
+    // Lifted from milyn commons
+    public static boolean compareCharStreams(InputStream s1, InputStream s2) {
+        try {
+            final String xml1 = trimLines(s1).toString() ;
+            final String xml2 = trimLines(s2).toString() ;
+
+            final Document doc1 = YADOMUtil.parse(xml1) ;
+            final Document doc2 = YADOMUtil.parse(xml2) ;
+
+            final StringWriter writer1 = new StringWriter() ;
+            final StringWriter writer2 = new StringWriter() ;
+            YADOMUtil.serialize(doc1, new StreamResult(writer1)) ;
+            YADOMUtil.serialize(doc2, new StreamResult(writer2)) ;
+            return (writer1.toString().equals(writer2.toString())) ;
+        } catch (IOException e) {
+            // fail the comparison
+        } catch (SAXException e) {
+            // fail the comparison
+        } catch (ConfigurationException e) {
+            // fail the comparison
+        }
+
+        return false;
+    }
+    public static StringBuffer trimLines(InputStream charStream) throws IOException {
+        StringBuffer stringBuf = new StringBuffer();
+        BufferedReader reader = new BufferedReader(new InputStreamReader(charStream));
+        String line;
+
+        while((line = reader.readLine()) != null) {
+            stringBuf.append(line.trim());
+        }
+
+        return stringBuf;
+    }
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/LineItem.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/LineItem.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/LineItem.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/LineItem.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,47 @@
+package org.jboss.soa.esb.services.soapui;
+
+import java.io.Serializable;
+
+public class LineItem implements Serializable {
+
+   /**
+    *
+    */
+   private static final long serialVersionUID = 0L;
+   private Long id;
+   private Float price;
+   private String name;
+
+   public Long getId()
+   {
+      return id;
+   }
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+
+   public Float getPrice()
+   {
+      return price;
+   }
+   public void setPrice(Float price)
+   {
+      this.price = price;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String toString()
+   {
+      return "Line Item ID= " + this.id + "\nPrice=" + this.price + "\nShip To=" + this.name;
+   }
+
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/Order.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/Order.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/Order.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/Order.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,79 @@
+package org.jboss.soa.esb.services.soapui;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+/**
+ * Order is the serialized object that this example is based around. It contains
+ * a product name, the quantity of that product ordered, and the price per unit
+ * of the product. It is serializable so that it can be bundled up in a message,
+ * and the JSPs
+ *
+ * @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
+ * @since Version 4.2
+ */
+public class Order implements Serializable {
+	private static final long serialVersionUID = -4620754343715487457L;
+	private Long id;
+	private ArrayList<LineItem> lineItems;
+	private String shipTo;
+
+	public ArrayList<LineItem> getLineItems() {
+		return lineItems;
+	}
+
+	public void setLineItems(ArrayList<LineItem> lineItems) {
+		this.lineItems = lineItems;
+	}
+
+	public float getTotalPrice() {
+		float totalPrice = 0;
+		{
+			if (lineItems != null) {
+				for (LineItem item : lineItems) {
+					if (item.getPrice() != null)
+						totalPrice += item.getPrice();
+				}
+			}
+		}
+		return totalPrice;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getShipTo() {
+		return shipTo;
+	}
+
+	public void setShipTo(String shipTo) {
+		this.shipTo = shipTo;
+	}
+
+	public String toString() {
+		StringBuffer stringBuffer = new StringBuffer();
+
+		stringBuffer.append("Order ID= " + this.id + "\nTotal Price="
+				+ getTotalPrice() + "\nShip to=" + this.shipTo
+				+ "\nLine Items:\n");
+		if (lineItems != null) {
+			for (LineItem lineItem : lineItems) {
+				stringBuffer.append("\t ID: " + lineItem.getId() + "\n");
+				stringBuffer.append("\t Name: " + lineItem.getName() + "\n");
+				stringBuffer.append("\t Price: " + lineItem.getPrice() + "\n");
+			}
+		}
+		else
+		{
+			stringBuffer.append("\t There are no Line Items!\n");
+		}
+
+		return stringBuffer.toString();
+	}
+
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/ProcessOrderRequest.java (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/ProcessOrderRequest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/ProcessOrderRequest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/ProcessOrderRequest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,38 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.soa.esb.services.soapui;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ProcessOrderRequest implements Serializable {
+
+    private Order[] order;
+
+    public Order[] getOrder() {
+        return order;
+    }
+
+    public void setOrder(Order[] order) {
+        this.order = order;
+    }
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_01.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_01.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_01.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,32 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ord="http://webservice_consumer2/orderProcessor">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <ord:processOrder>
+         <order>
+            <!--Zero or more repetitions: - cloned-->
+            <item>
+               <!--Optional:-->
+               <id>1</id>
+               <!--Zero or more repetitions: - cloned-->
+               <lineItems>
+                  <!--Optional:-->
+                  <id>1</id>
+                  <!--Optional:-->
+                  <name>aname</name>
+                  <!--Optional:-->
+                  <price>10.0</price>
+               </lineItems><lineItems>
+                  <!--Optional:-->
+                  <id>2</id>
+                  <!--Optional:-->
+                  <name>aname2</name>
+                  <!--Optional:-->
+                  <price>20.0</price>
+               </lineItems>
+               <!--Optional:-->
+               <shipTo>Hokkaido</shipTo>
+            </item>
+         </order>
+      </ord:processOrder>
+   </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_02.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_02.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_02.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_2451_02.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,53 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ord="http://webservice_consumer2/orderProcessor">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <ord:processOrder>
+         <order>
+            <!--Zero or more repetitions: - cloned-->
+            <item>
+               <!--Optional:-->
+               <id>1</id>
+               <!--Zero or more repetitions: - cloned-->
+               <lineItems>
+                  <!--Optional:-->
+                  <id>1</id>
+                  <!--Optional:-->
+                  <name>aname</name>
+                  <!--Optional:-->
+                  <price>10.0</price>
+               </lineItems><lineItems>
+                  <!--Optional:-->
+                  <id>2</id>
+                  <!--Optional:-->
+                  <name>aname2</name>
+                  <!--Optional:-->
+                  <price>20.0</price>
+               </lineItems>
+               <!--Optional:-->
+               <shipTo>Hokkaido</shipTo>
+            </item><item>
+               <!--Optional:-->
+               <id>2</id>
+               <!--Zero or more repetitions: - cloned-->
+               <lineItems>
+                  <!--Optional:-->
+                  <id>3</id>
+                  <!--Optional:-->
+                  <name>aname3</name>
+                  <!--Optional:-->
+                  <price>30.0</price>
+               </lineItems><lineItems>
+                  <!--Optional:-->
+                  <id>4</id>
+                  <!--Optional:-->
+                  <name>aname4</name>
+                  <!--Optional:-->
+                  <price>40.0</price>
+               </lineItems>
+               <!--Optional:-->
+               <shipTo>Okinawa</shipTo>
+            </item>
+         </order>
+      </ord:processOrder>
+   </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/MANAGEMENT-README.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/MANAGEMENT-README.txt	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/MANAGEMENT-README.txt	2009-06-11 10:12:52 UTC (rev 26923)
@@ -16,9 +16,9 @@
 extended to use any other JDBC/hibernate-supported database.
 
 In the management-esb directory there is a db.properties file.    In order
-to change the database from hsqldb to mysql or oracle, edit this file and
-change the db property to "mysql", "oracle" or "postgreql". Also, change 
-the db.username and db.password to the username and password setup for 
+to change the database from hsqldb to mysql, oracle9i or oracle10g, edit this
+file and change the db property to "mysql", "oracle" or "postgreql". Also,
+change the db.username and db.password to the username and password setup for 
 the database.
 
 Next, change the management-esb/src/main/resources/<db>/management-ds.xml

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle.properties
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle.properties	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle.properties	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,4 +0,0 @@
-db.dialect=org.hibernate.dialect.OracleDialect
-connection.datasource=java:/ManagementDS
-db.datasource=ManagementDS
-database.depends=

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle10g.properties (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/oracle10g.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle10g.properties	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle10g.properties	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,4 @@
+db.dialect=org.hibernate.dialect.Oracle10gDialect
+connection.datasource=java:/ManagementDS
+db.datasource=ManagementDS
+database.depends=

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle9i.properties (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/oracle9i.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle9i.properties	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/oracle9i.properties	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,4 @@
+db.dialect=org.hibernate.dialect.Oracle9iDialect
+connection.datasource=java:/ManagementDS
+db.datasource=ManagementDS
+database.depends=

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/src/main/resources/oracle10g)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXPattern" table="JMXPATTERN">
-		<id name="id" column="id" type="long">
-			<generator class="sequence">
-				<param name="sequence">SEQ_JMX_PATTERN</param>
-			</generator>
-		</id>
-		<property name="classpattern" type="java.lang.String" column="classpattern"/>
-		<property name="keyvalue" type="java.lang.String" column="keyvalue"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXData" table="JMXDATA">
-		<id name="id" column="id" type="long">
-			<generator class="sequence">
-				<param name="sequence">SEQ_JMX_DATA</param>
-			</generator>
-		</id>	
-		<many-to-one name="attribute" column="STATID"/>
-		<property name="server" type="java.lang.String" column="SERVER"/>
-		<property name="statdate" type="java.util.Date" column="STATDATE"/>
-		<property name="bytevalue" type="java.lang.Long" column="bytevalue"/>
-		<property name="timevalue" type="java.lang.Float" column="timevalue"/>
-		<property name="countvalue" type="java.lang.Integer" column="countvalue"/>
-		<property name="textvalue" type="java.lang.String" column="textvalue"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperationResult" table="JMXOPERATIONRESULT">
-		<id name="id" column="id" type="java.lang.Long" unsaved-value="0">
-			<generator class="sequence">	
-				<param name="sequence">SEQ_JMX_OPERATION_RESULT</param>
-			</generator>
-		</id>	
-		<many-to-one name="operation" column="OPID"/>
-		<property name="servername" type="java.lang.String" column="SERVER"/>
-		<property name="statdate" type="timestamp" column="STATDATE"/>
-		<property name="result" type="java.lang.String" column="RESULT"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXAttribute" table="JMXATTRIBUTE">
-                <id name="id" column="statid" type="long">
-			<generator class="sequence">	
-				<param name="sequence">SEQ_JMX_ATTRIBUTE</param>
-			</generator>
-		</id>	
-		<property name="objectname" type="java.lang.String" column="objectname"/>
-		<property name="attribute" type="java.lang.String" column="attribute"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperation" table="JMXOPERATION">
-		<id name="id" column="opid" type="java.lang.Long" unsaved-value="0">
-			<generator class="sequence">	
-				<param name="sequence">SEQ_JMX_OPERATION</param>
-			</generator>
-		</id>	
-		<property name="objectname" type="java.lang.String" column="objectname"/>
-		<property name="operation" type="java.lang.String" column="operation"/>
-		<property name="description" type="java.lang.String" column="description"/>
-		<property name="returntype" type="java.lang.String" column="returntype"/>
-		<property name="servername" type="java.lang.String" column="servername"/>
-		<property name="activeflag" type="java.lang.Boolean" column="activeflag"/>
-	</class>
-</hibernate-mapping>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle10g/monitoring-mappings.hbm.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXPattern" table="JMXPATTERN">
+		<id name="id" column="id" type="long">
+			<generator class="sequence">
+				<param name="sequence">SEQ_JMX_PATTERN</param>
+			</generator>
+		</id>
+		<property name="classpattern" type="java.lang.String" column="classpattern"/>
+		<property name="keyvalue" type="java.lang.String" column="keyvalue"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXData" table="JMXDATA">
+		<id name="id" column="id" type="long">
+			<generator class="sequence">
+				<param name="sequence">SEQ_JMX_DATA</param>
+			</generator>
+		</id>	
+		<many-to-one name="attribute" column="STATID"/>
+		<property name="server" type="java.lang.String" column="SERVER"/>
+		<property name="statdate" type="java.util.Date" column="STATDATE"/>
+		<property name="bytevalue" type="java.lang.Long" column="bytevalue"/>
+		<property name="timevalue" type="java.lang.Float" column="timevalue"/>
+		<property name="countvalue" type="java.lang.Integer" column="countvalue"/>
+		<property name="textvalue" type="java.lang.String" column="textvalue"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperationResult" table="JMXOPERATIONRESULT">
+		<id name="id" column="id" type="java.lang.Long" unsaved-value="0">
+			<generator class="sequence">	
+				<param name="sequence">SEQ_JMX_OPERATION_RESULT</param>
+			</generator>
+		</id>	
+		<many-to-one name="operation" column="OPID"/>
+		<property name="servername" type="java.lang.String" column="SERVER"/>
+		<property name="statdate" type="timestamp" column="STATDATE"/>
+		<property name="result" type="java.lang.String" column="RESULT"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXAttribute" table="JMXATTRIBUTE">
+                <id name="id" column="statid" type="long">
+			<generator class="sequence">	
+				<param name="sequence">SEQ_JMX_ATTRIBUTE</param>
+			</generator>
+		</id>	
+		<property name="objectname" type="java.lang.String" column="objectname"/>
+		<property name="attribute" type="java.lang.String" column="attribute"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperation" table="JMXOPERATION">
+		<id name="id" column="opid" type="java.lang.Long" unsaved-value="0">
+			<generator class="sequence">	
+				<param name="sequence">SEQ_JMX_OPERATION</param>
+			</generator>
+		</id>	
+		<property name="objectname" type="java.lang.String" column="objectname"/>
+		<property name="operation" type="java.lang.String" column="operation"/>
+		<property name="description" type="java.lang.String" column="description"/>
+		<property name="returntype" type="java.lang.String" column="returntype"/>
+		<property name="servername" type="java.lang.String" column="servername"/>
+		<property name="activeflag" type="java.lang.Boolean" column="activeflag"/>
+	</class>
+</hibernate-mapping>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/src/main/resources/oracle9i)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXPattern" table="JMXPATTERN">
-		<id name="id" column="id" type="long">
-			<generator class="sequence">
-				<param name="sequence">SEQ_JMX_PATTERN</param>
-			</generator>
-		</id>
-		<property name="classpattern" type="java.lang.String" column="classpattern"/>
-		<property name="keyvalue" type="java.lang.String" column="keyvalue"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXData" table="JMXDATA">
-		<id name="id" column="id" type="long">
-			<generator class="sequence">
-				<param name="sequence">SEQ_JMX_DATA</param>
-			</generator>
-		</id>	
-		<many-to-one name="attribute" column="STATID"/>
-		<property name="server" type="java.lang.String" column="SERVER"/>
-		<property name="statdate" type="java.util.Date" column="STATDATE"/>
-		<property name="bytevalue" type="java.lang.Long" column="bytevalue"/>
-		<property name="timevalue" type="java.lang.Float" column="timevalue"/>
-		<property name="countvalue" type="java.lang.Integer" column="countvalue"/>
-		<property name="textvalue" type="java.lang.String" column="textvalue"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperationResult" table="JMXOPERATIONRESULT">
-		<id name="id" column="id" type="java.lang.Long" unsaved-value="0">
-			<generator class="sequence">	
-				<param name="sequence">SEQ_JMX_OPERATION_RESULT</param>
-			</generator>
-		</id>	
-		<many-to-one name="operation" column="OPID"/>
-		<property name="servername" type="java.lang.String" column="SERVER"/>
-		<property name="statdate" type="timestamp" column="STATDATE"/>
-		<property name="result" type="java.lang.String" column="RESULT"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXAttribute" table="JMXATTRIBUTE">
-                <id name="id" column="statid" type="long">
-			<generator class="sequence">	
-				<param name="sequence">SEQ_JMX_ATTRIBUTE</param>
-			</generator>
-		</id>	
-		<property name="objectname" type="java.lang.String" column="objectname"/>
-		<property name="attribute" type="java.lang.String" column="attribute"/>
-	</class>
-	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperation" table="JMXOPERATION">
-		<id name="id" column="opid" type="java.lang.Long" unsaved-value="0">
-			<generator class="sequence">	
-				<param name="sequence">SEQ_JMX_OPERATION</param>
-			</generator>
-		</id>	
-		<property name="objectname" type="java.lang.String" column="objectname"/>
-		<property name="operation" type="java.lang.String" column="operation"/>
-		<property name="description" type="java.lang.String" column="description"/>
-		<property name="returntype" type="java.lang.String" column="returntype"/>
-		<property name="servername" type="java.lang.String" column="servername"/>
-		<property name="activeflag" type="java.lang.Boolean" column="activeflag"/>
-	</class>
-</hibernate-mapping>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/resources/oracle9i/monitoring-mappings.hbm.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXPattern" table="JMXPATTERN">
+		<id name="id" column="id" type="long">
+			<generator class="sequence">
+				<param name="sequence">SEQ_JMX_PATTERN</param>
+			</generator>
+		</id>
+		<property name="classpattern" type="java.lang.String" column="classpattern"/>
+		<property name="keyvalue" type="java.lang.String" column="keyvalue"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXData" table="JMXDATA">
+		<id name="id" column="id" type="long">
+			<generator class="sequence">
+				<param name="sequence">SEQ_JMX_DATA</param>
+			</generator>
+		</id>	
+		<many-to-one name="attribute" column="STATID"/>
+		<property name="server" type="java.lang.String" column="SERVER"/>
+		<property name="statdate" type="java.util.Date" column="STATDATE"/>
+		<property name="bytevalue" type="java.lang.Long" column="bytevalue"/>
+		<property name="timevalue" type="java.lang.Float" column="timevalue"/>
+		<property name="countvalue" type="java.lang.Integer" column="countvalue"/>
+		<property name="textvalue" type="java.lang.String" column="textvalue"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperationResult" table="JMXOPERATIONRESULT">
+		<id name="id" column="id" type="java.lang.Long" unsaved-value="0">
+			<generator class="sequence">	
+				<param name="sequence">SEQ_JMX_OPERATION_RESULT</param>
+			</generator>
+		</id>	
+		<many-to-one name="operation" column="OPID"/>
+		<property name="servername" type="java.lang.String" column="SERVER"/>
+		<property name="statdate" type="timestamp" column="STATDATE"/>
+		<property name="result" type="java.lang.String" column="RESULT"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXAttribute" table="JMXATTRIBUTE">
+                <id name="id" column="statid" type="long">
+			<generator class="sequence">	
+				<param name="sequence">SEQ_JMX_ATTRIBUTE</param>
+			</generator>
+		</id>	
+		<property name="objectname" type="java.lang.String" column="objectname"/>
+		<property name="attribute" type="java.lang.String" column="attribute"/>
+	</class>
+	<class name="org.jboss.soa.esb.monitoring.pojo.JMXOperation" table="JMXOPERATION">
+		<id name="id" column="opid" type="java.lang.Long" unsaved-value="0">
+			<generator class="sequence">	
+				<param name="sequence">SEQ_JMX_OPERATION</param>
+			</generator>
+		</id>	
+		<property name="objectname" type="java.lang.String" column="objectname"/>
+		<property name="operation" type="java.lang.String" column="operation"/>
+		<property name="description" type="java.lang.String" column="description"/>
+		<property name="returntype" type="java.lang.String" column="returntype"/>
+		<property name="servername" type="java.lang.String" column="servername"/>
+		<property name="activeflag" type="java.lang.Boolean" column="activeflag"/>
+	</class>
+</hibernate-mapping>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,52 +0,0 @@
-
-    create table JMXPATTERN (
-        id number(19,0),
-        classpattern varchar2(255 char),
-        keyvalue varchar2(255 char),
-        primary key (id)
-    );
-    
-    create table JMXATTRIBUTE (
-        statid number(19,0),
-        objectname varchar2(2000 char),
-        attribute varchar2(2000 char),
-        primary key (statid)
-    );
-
-    create table JMXDATA (
-        id number(19,0),
-        STATID number(19,0),
-        SERVER varchar2(255 char),
-        STATDATE timestamp,
-	bytevalue long,
-        timevalue float,
-        countvalue number(10,0),
-        textvalue varchar2(4000 char),
-        primary key (id)
-    );
-	
-    CREATE TABLE JMXOPERATION (
-	OPID number(19,0),
-	OBJECTNAME VARCHAR2(2000 char) NOT NULL,
-	OPERATION VARCHAR2(255 char) NOT NULL,
-	DESCRIPTION VARCHAR2(2000) NOT NULL,
-	RETURNTYPE VARCHAR2(255 char) NOT NULL,
-	SERVERNAME VARCHAR2(255 char) NOT NULL,
-	ACTIVEFLAG NUMBER(1) NOT NULL,
-	primary key (opid)
-    );
-	
-    CREATE TABLE JMXOPERATIONRESULT (
-	ID number(19,0),
-	OPID number(19,0),
-	SERVER VARCHAR(255),
-	STATDATE TIMESTAMP,
-	RESULT VARCHAR(255),
-	primary key(id)
-    );
-
-    CREATE SEQUENCE SEQ_JMX_ATTRIBUTE START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_DATA START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_PATTERN START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_OPERATION START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_OPERATION_RESULT START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/create_database.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,52 @@
+
+    create table JMXPATTERN (
+        id number(19,0),
+        classpattern varchar2(255 char),
+        keyvalue varchar2(255 char),
+        primary key (id)
+    );
+    
+    create table JMXATTRIBUTE (
+        statid number(19,0),
+        objectname varchar2(2000 char),
+        attribute varchar2(2000 char),
+        primary key (statid)
+    );
+
+    create table JMXDATA (
+        id number(19,0),
+        STATID number(19,0),
+        SERVER varchar2(255 char),
+        STATDATE timestamp,
+	bytevalue long,
+        timevalue float,
+        countvalue number(10,0),
+        textvalue varchar2(4000 char),
+        primary key (id)
+    );
+	
+    CREATE TABLE JMXOPERATION (
+	OPID number(19,0),
+	OBJECTNAME VARCHAR2(2000 char) NOT NULL,
+	OPERATION VARCHAR2(255 char) NOT NULL,
+	DESCRIPTION VARCHAR2(2000) NOT NULL,
+	RETURNTYPE VARCHAR2(255 char) NOT NULL,
+	SERVERNAME VARCHAR2(255 char) NOT NULL,
+	ACTIVEFLAG NUMBER(1) NOT NULL,
+	primary key (opid)
+    );
+	
+    CREATE TABLE JMXOPERATIONRESULT (
+	ID number(19,0),
+	OPID number(19,0),
+	SERVER VARCHAR(255),
+	STATDATE TIMESTAMP,
+	RESULT VARCHAR(255),
+	primary key(id)
+    );
+
+    CREATE SEQUENCE SEQ_JMX_ATTRIBUTE START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_DATA START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_PATTERN START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_OPERATION START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_OPERATION_RESULT START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,9 +0,0 @@
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (1, 'jboss.esb:*', 'service=MessageCounter');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (2, 'jboss.esb:*', 'category=MessageCounter');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (3, 'jboss.esb:*', 'category=SmooksMessageCounter');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (4, 'jboss.esb:*', 'listener-name=');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (5, 'jboss.esb:*', 'gateway-name=');

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/insert_rows.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,9 @@
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (1, 'jboss.esb:*', 'service=MessageCounter');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (2, 'jboss.esb:*', 'category=MessageCounter');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (3, 'jboss.esb:*', 'category=SmooksMessageCounter');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (4, 'jboss.esb:*', 'listener-name=');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (5, 'jboss.esb:*', 'gateway-name=');

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- The Hypersonic embedded database JCA connection factory config -->
-
-<!-- $Id: hsqldb-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
-
-<datasources>
-   <local-tx-datasource>
-      <jndi-name>ManagementDS</jndi-name>
-
-      <connection-url>jdbc:oracle:thin:@192.168.146.129:1521:ORADV</connection-url>
-
-      <!-- The driver class -->
-      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
-
-      <!-- The login and password -->
-      <user-name>@db.username@</user-name>
-      <password>@db.password@</password>
-
-      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
-      <min-pool-size>5</min-pool-size>
-
-      <!-- The maximum connections in a pool/sub-pool -->
-      <max-pool-size>20</max-pool-size>
-      <connection-property name="autoReconnect">true</connection-property>
-   </local-tx-datasource>
-</datasources>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle10g/management-ds.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- $Id: hsqldb-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
+
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>ManagementDS</jndi-name>
+
+      <connection-url>jdbc:oracle:thin:@192.168.146.129:1521:ORADV</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>@db.username@</user-name>
+      <password>@db.password@</password>
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <connection-property name="autoReconnect">true</connection-property>
+   </local-tx-datasource>
+</datasources>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,52 +0,0 @@
-
-    create table JMXPATTERN (
-        id number(19,0),
-        classpattern varchar2(255 char),
-        keyvalue varchar2(255 char),
-        primary key (id)
-    );
-    
-    create table JMXATTRIBUTE (
-        statid number(19,0),
-        objectname varchar2(2000 char),
-        attribute varchar2(2000 char),
-        primary key (statid)
-    );
-
-    create table JMXDATA (
-        id number(19,0),
-        STATID number(19,0),
-        SERVER varchar2(255 char),
-        STATDATE timestamp,
-	bytevalue long,
-        timevalue float,
-        countvalue number(10,0),
-        textvalue varchar2(4000 char),
-        primary key (id)
-    );
-	
-    CREATE TABLE JMXOPERATION (
-	OPID number(19,0),
-	OBJECTNAME VARCHAR2(2000 char) NOT NULL,
-	OPERATION VARCHAR2(255 char) NOT NULL,
-	DESCRIPTION VARCHAR2(2000) NOT NULL,
-	RETURNTYPE VARCHAR2(255 char) NOT NULL,
-	SERVERNAME VARCHAR2(255 char) NOT NULL,
-	ACTIVEFLAG NUMBER(1) NOT NULL,
-	primary key (opid)
-    );
-	
-    CREATE TABLE JMXOPERATIONRESULT (
-	ID number(19,0),
-	OPID number(19,0),
-	SERVER VARCHAR(255),
-	STATDATE TIMESTAMP,
-	RESULT VARCHAR(255),
-	primary key(id)
-    );
-
-    CREATE SEQUENCE SEQ_JMX_ATTRIBUTE START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_DATA START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_PATTERN START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_OPERATION START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
-    CREATE SEQUENCE SEQ_JMX_OPERATION_RESULT START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/create_database.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,52 @@
+
+    create table JMXPATTERN (
+        id number(19,0),
+        classpattern varchar2(255 char),
+        keyvalue varchar2(255 char),
+        primary key (id)
+    );
+    
+    create table JMXATTRIBUTE (
+        statid number(19,0),
+        objectname varchar2(2000 char),
+        attribute varchar2(2000 char),
+        primary key (statid)
+    );
+
+    create table JMXDATA (
+        id number(19,0),
+        STATID number(19,0),
+        SERVER varchar2(255 char),
+        STATDATE timestamp,
+	bytevalue long,
+        timevalue float,
+        countvalue number(10,0),
+        textvalue varchar2(4000 char),
+        primary key (id)
+    );
+	
+    CREATE TABLE JMXOPERATION (
+	OPID number(19,0),
+	OBJECTNAME VARCHAR2(2000 char) NOT NULL,
+	OPERATION VARCHAR2(255 char) NOT NULL,
+	DESCRIPTION VARCHAR2(2000) NOT NULL,
+	RETURNTYPE VARCHAR2(255 char) NOT NULL,
+	SERVERNAME VARCHAR2(255 char) NOT NULL,
+	ACTIVEFLAG NUMBER(1) NOT NULL,
+	primary key (opid)
+    );
+	
+    CREATE TABLE JMXOPERATIONRESULT (
+	ID number(19,0),
+	OPID number(19,0),
+	SERVER VARCHAR(255),
+	STATDATE TIMESTAMP,
+	RESULT VARCHAR(255),
+	primary key(id)
+    );
+
+    CREATE SEQUENCE SEQ_JMX_ATTRIBUTE START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_DATA START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_PATTERN START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_OPERATION START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+    CREATE SEQUENCE SEQ_JMX_OPERATION_RESULT START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,9 +0,0 @@
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (1, 'jboss.esb:*', 'service=MessageCounter');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (2, 'jboss.esb:*', 'category=MessageCounter');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (3, 'jboss.esb:*', 'category=SmooksMessageCounter');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (4, 'jboss.esb:*', 'listener-name=');
-
-INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (5, 'jboss.esb:*', 'gateway-name=');

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/insert_rows.sql	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,9 @@
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (1, 'jboss.esb:*', 'service=MessageCounter');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (2, 'jboss.esb:*', 'category=MessageCounter');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (3, 'jboss.esb:*', 'category=SmooksMessageCounter');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (4, 'jboss.esb:*', 'listener-name=');
+
+INSERT INTO JMXPATTERN (ID, CLASSPATTERN, KEYVALUE) VALUES (5, 'jboss.esb:*', 'gateway-name=');

Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml	2009-06-11 06:15:03 UTC (rev 26919)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- The Hypersonic embedded database JCA connection factory config -->
-
-<!-- $Id: hsqldb-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
-
-<datasources>
-   <local-tx-datasource>
-      <jndi-name>ManagementDS</jndi-name>
-
-      <connection-url>jdbc:oracle:thin:@192.168.146.129:1521:ORADV</connection-url>
-
-      <!-- The driver class -->
-      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
-
-      <!-- The login and password -->
-      <user-name>@db.username@</user-name>
-      <password>@db.password@</password>
-
-      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
-      <min-pool-size>5</min-pool-size>
-
-      <!-- The maximum connections in a pool/sub-pool -->
-      <max-pool-size>20</max-pool-size>
-      <connection-property name="autoReconnect">true</connection-property>
-   </local-tx-datasource>
-</datasources>

Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml (from rev 26919, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR1/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management-esb/src/main/resources/oracle9i/management-ds.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- $Id: hsqldb-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
+
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>ManagementDS</jndi-name>
+
+      <connection-url>jdbc:oracle:thin:@192.168.146.129:1521:ORADV</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>@db.username@</user-name>
+      <password>@db.password@</password>
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <connection-property name="autoReconnect">true</connection-property>
+   </local-tx-datasource>
+</datasources>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/esbwizard/template/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/esbwizard/template/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/esbwizard/template/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -60,7 +60,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/jbossesb-unittest-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/jbossesb-unittest-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/jbossesb-unittest-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -51,7 +51,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/resources/server/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/resources/server/jbossesb-properties.xml	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/resources/server/jbossesb-properties.xml	2009-06-11 10:12:52 UTC (rev 26923)
@@ -66,7 +66,7 @@
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
+    	<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"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -22,13 +22,17 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.Collection;
+import java.util.List;
 
 import javax.xml.registry.BulkResponse;
 import javax.xml.registry.BusinessQueryManager;
 import javax.xml.registry.Connection;
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.JAXRResponse;
+import javax.xml.registry.LifeCycleManager;
 import javax.xml.registry.RegistryService;
+import javax.xml.registry.infomodel.InternationalString;
+import javax.xml.registry.infomodel.Organization;
 import javax.xml.registry.infomodel.Service;
 import javax.xml.registry.infomodel.ServiceBinding;
 
@@ -62,6 +66,12 @@
         return new TestScoutRegistryImpl().checkService() ;
     }
     
+    public String verifyScoutPerformanceIssue2()
+        throws JAXRException, ConfigurationException
+    {
+        return new TestScoutRegistryImpl().checkServiceFromBusinessService() ;
+    }
+    
     public String verifyJUDDICDataIssue()
         throws RegistryException, MarshalException, ServiceNotFoundException
     {
@@ -101,6 +111,30 @@
         return null ;
     }
     
+    public String verifyServiceRetrieval()
+        throws RegistryException
+    {
+        final Registry registry = RegistryFactory.getRegistry() ;
+        final List<String> services = registry.findAllServices() ;
+        if ((services == null) || (services.size() == 0))
+        {
+            return "No services returned from query" ;
+        }
+        return null ;
+    }
+    
+    public String verifyOrganizationalStructure()
+        throws RegistryException, JAXRException, ConfigurationException
+    {
+        final Organization jbossESBOrganization = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB", new JAXRConnectionFactory());
+        final Collection<Service> services = jbossESBOrganization.getServices() ;
+        if ((services != null) & (services.size() > 0))
+        {
+            return "Services returned in organization information" ;
+        }
+        return null ;
+    }
+    
     private String verifyHeuristic(final String value)
     {
         final char[] contents = value.toCharArray() ;
@@ -144,33 +178,95 @@
             
             final ScoutConnectionFactory scoutConnectionFactory = new ScoutConnectionFactory() ;
             final Connection connection = scoutConnectionFactory.getConnection();
-            final RegistryService rs = connection.getRegistryService();
-            final BusinessQueryManager bqm = rs.getBusinessQueryManager();
-            final BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),null,null,null);
-            if (bulkResponse.getStatus()!=JAXRResponse.STATUS_SUCCESS)
+            try
             {
-                return "findServiceBindings failed" ;
+                final RegistryService rs = connection.getRegistryService();
+                final BusinessQueryManager bqm = rs.getBusinessQueryManager();
+                final BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),null,null,null);
+                if (bulkResponse.getStatus()!=JAXRResponse.STATUS_SUCCESS)
+                {
+                    return "findServiceBindings failed" ;
+                }
+                final Collection<ServiceBinding> serviceBindings = (Collection<ServiceBinding>)bulkResponse.getCollection();
+                if ((serviceBindings == null) || (serviceBindings.size() == 0))
+                {
+                    return "could not find service bindings for DeadLetterService" ;
+                }
+                
+                for(ServiceBinding serviceBinding: serviceBindings)
+                {
+                    final Service bindingService = serviceBinding.getService() ;
+                    if (bindingService == null)
+                    {
+                        return "Could not find service associated with binding" ;
+                    }
+                    if (bindingService.getProvidingOrganization() != null)
+                    {
+                        return "FAILED: Organization is present in service binding" ;
+                    }
+                }
+                
+                return null ;
             }
-            final Collection<ServiceBinding> serviceBindings = (Collection<ServiceBinding>)bulkResponse.getCollection();
-            if ((serviceBindings == null) || (serviceBindings.size() == 0))
+            finally
             {
-                return "could not find service bindings for DeadLetterService" ;
+                scoutConnectionFactory.closeConnection(connection) ;
             }
+        }
+        
+        public String checkServiceFromBusinessService()
+            throws JAXRException, ConfigurationException
+        {
+            final String serviceKey ;
+            {
+                final Service service = findService("JBossESB-Internal", "DeadLetterService") ;
+                
+                if (service == null)
+                {
+                    return "Service not found" ;
+                }
+                serviceKey = service.getKey().getId() ;
+            }
             
-            for(ServiceBinding serviceBinding: serviceBindings)
+            final ScoutConnectionFactory scoutConnectionFactory = new ScoutConnectionFactory() ;
+            final Connection connection = scoutConnectionFactory.getConnection();
+            try
             {
-                final Service bindingService = serviceBinding.getService() ;
-                if (bindingService == null)
+                final RegistryService rs = connection.getRegistryService();
+                final BusinessQueryManager bqm = rs.getBusinessQueryManager();
+                final Service registryService = (Service)bqm.getRegistryObject(serviceKey, LifeCycleManager.SERVICE) ;
+                if (registryService == null)
                 {
-                    return "Could not find service associated with binding" ;
+                    return "Failed to obtain service as registry object" ;
                 }
-                if (bindingService.getProvidingOrganization() != null)
+                
+                final Organization organization = registryService.getProvidingOrganization() ;
+                if (organization == null)
                 {
-                    return "FAILED: Organization is present in service binding" ;
+                    return "No Organization returned with service" ;
                 }
+                
+                if (organization.getKey() == null)
+                {
+                    return "Organization key not populated" ;
+                }
+                
+                final InternationalString name = organization.getName();
+                if (name != null)
+                {
+                    final Collection localizedStrings = name.getLocalizedStrings();
+                    if ((localizedStrings != null) && (localizedStrings.size() > 0))
+                    {
+                        return "Organization returned from database rather than aspect" ;
+                    }
+                }
+                
+                return null ;
             }
-            
-            return null ;
+            finally
+            {
+                scoutConnectionFactory.closeConnection(connection) ;
+            }
         }
     }
     
@@ -185,5 +281,10 @@
         {
             return super.getConnection() ;
         }
+        
+        public void closeConnection(Connection connection)
+        {
+            super.closeConnection(connection) ;
+        }
     }
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -38,6 +38,15 @@
     public String verifyScoutPerformanceIssue()
         throws JAXRException, ConfigurationException ;
     
+    public String verifyScoutPerformanceIssue2()
+        throws JAXRException, ConfigurationException ;
+    
     public String verifyJUDDICDataIssue()
         throws RegistryException, MarshalException, ServiceNotFoundException ;
+
+    public String verifyServiceRetrieval()
+        throws RegistryException ;
+
+    public String verifyOrganizationalStructure()
+        throws RegistryException, JAXRException, ConfigurationException ;
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -61,6 +61,20 @@
     }
     
     /**
+     * Test for second scout performance issue.
+     * @throws Exception For any failures.
+     */
+    public void testScoutPerformanceIssue2()
+        throws Exception
+    {
+        final String result = (String)execute("verifyScoutPerformanceIssue2", null, null) ;
+        if (result != null)
+        {
+            fail(result) ;
+        }
+    }
+    
+    /**
      * Test for juddi CDATA issue..
      * @throws Exception For any failures.
      */
@@ -75,6 +89,34 @@
     }
     
     /**
+     * Test service retrieval.
+     * @throws Exception For any failures.
+     */
+    public void testServiceRetrievalIssue()
+        throws Exception
+    {
+        final String result = (String)execute("verifyServiceRetrieval", null, null) ;
+        if (result != null)
+        {
+            fail(result) ;
+        }
+    }
+    
+    /**
+     * Test for scout performance issue.
+     * @throws Exception For any failures.
+     */
+    public void testOrganizationalStructureIssue()
+        throws Exception
+    {
+        final String result = (String)execute("verifyOrganizationalStructure", null, null) ;
+        if (result != null)
+        {
+            fail(result) ;
+        }
+    }
+    
+    /**
      * Execute the specified method on the mbean.
      * @param method The method name.
      * @param values The parmeter values.

Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java	2009-06-11 09:44:25 UTC (rev 26922)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java	2009-06-11 10:12:52 UTC (rev 26923)
@@ -19,6 +19,10 @@
  */
 package org.jboss.soa.esb.server.jbpmReply;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
 import javax.management.ObjectName;
 
 import junit.framework.Test;
@@ -84,10 +88,12 @@
         {
             assertNotNull("Message: " + count, messages[count]) ;
         }
-        assertEquals("Reply notification", "EsbNotifier:reply", messages[0]) ;
-        assertEquals("Reply action", "EsbActionHandler:reply", messages[1]) ;
-        assertEquals("Fault notification", "EsbNotifier:fault", messages[2]) ;
-        assertEquals("Fault action", "EsbActionHandler:fault", messages[3]) ;
+        // No longer deterministic until we upgrade the base server
+        final Set<String> results = new HashSet<String>(Arrays.asList(messages)) ;
+        assertTrue("Reply notification", results.contains("EsbNotifier:reply")) ;
+        assertTrue("Reply action", results.contains("EsbActionHandler:reply")) ;
+        assertTrue("Fault notification", results.contains("EsbNotifier:fault")) ;
+        assertTrue("Fault action", results.contains("EsbActionHandler:fault")) ;
     }
     
     /**




More information about the jboss-svn-commits mailing list