[jboss-svn-commits] JBL Code SVN: r19174 - in labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2: product/etc/schemas/xml and 74 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Mar 21 08:50:51 EDT 2008
Author: kevin.conner at jboss.com
Date: 2008-03-21 08:50:50 -0400 (Fri, 21 Mar 2008)
New Revision: 19174
Added:
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRConnectionFactory.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierMarshalUnmarshalException.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierServiceBindException.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierTransportException.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/config-03.1.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/util/FileUtilUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/lib/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/listener.log
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected-http-rewrite.wsdl
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessingSchema_JBESB-1329.xsd
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessing_JBESB-1329.wsdl
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_02_JBESB-1329.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/base-cp.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbm-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbmq-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/test-util.jar
Removed:
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/lib/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/listener.log
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/javassist.jar
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/jboss-aop-jdk50.jar
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/jboss-messaging-client.jar
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/trove.jar
Modified:
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/MessageActionGuide.odt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/ProgrammersGuide.odt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/ReleaseNotes.odt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/lib/ext/h2.jar
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/FileCourier.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/HibernateCourier.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/JmsComposer.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/HibernateInterceptor.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JcaMessageAwareListener.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/util/FileUtil.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyJMSUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/MockScheduledEventListener.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/resources/application.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/hsqldb/create.sql
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldtxsqlaction/MyAction.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/ExceptionFlowTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFiler.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/InvokerFiler.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/OperationsFiler.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/SimpleDeployUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/jca/JcaUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml
labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/test.properties
Log:
Updated to IR1 of CP2
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/MessageActionGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/ReleaseNotes.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd 2008-03-21 12:50:50 UTC (rev 19174)
@@ -804,7 +804,7 @@
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="input-suffix" type="xsd:string"
- use="required">
+ use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The file suffix used to filter files targeted
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/readme.txt 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/readme.txt 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,16 +1,34 @@
The build.xml script in this directory is responsible for deploying the ESB
ant it's dependencies into the appropriate environment.
-Deployment into JBoss AS 4.2.0.GA
+Deployment into JBoss AS 4.2.1.GA
=================================
- - Install JBoss AS 4.2.0.GA into an appropriate location.
+ - Install JBoss AS 4.2.1.GA into an appropriate location.
- Copy deployment.properties-example to deployment.properties and configure
the org.jboss.esb.server.home and org.jboss.esb.server.config properties
to reflect the location of the application server and the required profile.
- execute 'ant deploy'
-Webservice support in JBoss AS 4.2.0.GA
+Webservice support in JBoss AS 4.2.1.GA
=======================================
-Webservice support requires installing JBossWS 2.0.0GA into the application
-server. Please consult the "Configuring Webservice Integration" section of the
-JBossESB Adminsitration Guide (found in the docs folder).
\ No newline at end of file
+If you are running JBossESB on JBoss AS 4.2.1.GA, you will need to update the
+Application Server with JBossWS 2.0.1.SP2 (Native). To do this, download the
+"jbossws-native-2.0.1.SP2" distribution from http://labs.jboss.org/jbossws/downloads/.
+Unzip the distribution to a temporary folder.
+
+After unzipping the distribution:
+1. Update the "jboss42.home" property in the ant.properties file located in the root
+ of the JBossWS 2.0.1.SP2 (Native) distro with the location of your 4.2.1.GA Application
+ Server.
+2. Run "ant deploy-jboss42" from the root of the JBossWS 2.0.1.SP2 (Native) distro.
+
+JBossRemoting support in JBoss AS 4.2.1.GA
+==========================================
+If you are running JBossESB on JBoss AS 4.2.1.GA, you will need to update the
+Application Server with JBossRemoting 2.2.2.SP2. To do this, download the
+JBossRemoting 2.2.2.SP2 distribution from http://labs.jboss.org/jbossws/downloads/.
+
+Unzip the distribution and copy "lib/jboss-remoting.jar" into the following folders
+in your AS:
+1. lib
+2. server/<server>/lib
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/lib/ext/h2.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -125,8 +125,8 @@
final String value = (String)entry.getValue() ;
final String attributeURI = QNameHelper.getNormalisedValue(arjunaName.getURI()) ;
- final String atributePrefix = QNameHelper.getNormalisedValue(arjunaName.getPrefix()) ;
- final QName attributeName = new QName(uri, arjunaName.getLocalName(), prefix) ;
+ final String attributePrefix = QNameHelper.getNormalisedValue(arjunaName.getPrefix()) ;
+ final QName attributeName = new QName(attributeURI, arjunaName.getLocalName(), attributePrefix) ;
StreamHelper.writeAttribute(out, attributeName, value) ;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/FileCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/FileCourier.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/FileCourier.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -23,6 +23,7 @@
package org.jboss.internal.soa.esb.couriers;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
@@ -43,6 +44,9 @@
import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.common.ModulePropertyManager;
import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierTransportException;
+import org.jboss.soa.esb.couriers.CourierServiceBindException;
+import org.jboss.soa.esb.couriers.CourierMarshalUnmarshalException;
import org.jboss.soa.esb.couriers.CourierTimeoutException;
import org.jboss.soa.esb.couriers.CourierUtil;
import org.jboss.soa.esb.listeners.message.errors.Factory;
@@ -176,7 +180,7 @@
FileHandler handler = (null != _localFhandler) ? _localFhandler
: FileHandlerFactory.getInstance().getFileHandler(_epr);
if (null == handler)
- throw new CourierException(
+ throw new CourierServiceBindException(
"Can't find appropriate file handler for "
+ _url.toString());
@@ -210,16 +214,22 @@
return true;
}
- catch (IOException e)
+ catch (final CourierException e)
{
- throw new CourierException(e);
+ throw new CourierTransportException(e);
}
- catch (ParserConfigurationException e)
+ catch (final IOException e)
{
+ throw new CourierMarshalUnmarshalException(e);
+ }
+ catch (final ParserConfigurationException e) // it's no longer thrown so we can ignore it!
+ {
throw new CourierException(e);
}
}
+ tmpFile = null;
+
try
{
Method upload = handler.getClass().getMethod("uploadFile",
@@ -244,10 +254,15 @@
{ messageFile });
return true;
}
- catch (Exception e)
+ catch (final IOException ex)
{
- e.printStackTrace();
-
+ if (tmpFile == null)
+ throw new CourierMarshalUnmarshalException(ex);
+ else
+ throw new CourierTransportException(ex);
+ }
+ catch (final Exception e)
+ {
throw new CourierException(e);
}
finally
@@ -280,8 +295,10 @@
{
result = readOneMessage(handler, work);
}
- catch (Exception e)
+ catch (CourierException e)
{
+ _logger.debug("FileCourier.pickup caught exception during readOneMessage: "+e);
+
if (null == errorFile(input))
handler.deleteFile(work);
else
@@ -328,8 +345,20 @@
{
return CourierUtil.messageFromLocalFile(work);
}
- catch (Exception ex)
+ catch (final FileNotFoundException ex)
{
+ throw new CourierTransportException(ex);
+ }
+ catch (final IOException ex)
+ {
+ throw new CourierMarshalUnmarshalException(ex);
+ }
+ catch (final CourierException ex)
+ {
+ throw ex;
+ }
+ catch (final Exception ex)
+ {
throw new CourierException(ex);
}
}
@@ -344,9 +373,21 @@
{ work });
return CourierUtil.messageFromLocalFile(tmpFile);
}
+ catch (FileNotFoundException ex)
+ {
+ throw new CourierTransportException(ex);
+ }
+ catch (IOException ex)
+ {
+ throw new CourierTransportException(ex);
+ }
+ catch (final CourierException ex)
+ {
+ throw ex;
+ }
catch (Exception e)
{
- throw new CourierException(e);
+ throw new CourierTransportException(e);
}
finally
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/HibernateCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/HibernateCourier.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/HibernateCourier.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -28,6 +28,7 @@
import org.apache.log4j.Logger;
import org.hibernate.Query;
import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
import org.jboss.soa.esb.addressing.eprs.HibernateEpr;
import org.jboss.soa.esb.couriers.CourierException;
import org.jboss.soa.esb.couriers.CourierTimeoutException;
@@ -85,13 +86,18 @@
* @throws CourierException -
* if problems were encountered
*/
- public boolean deliver(Message message) throws CourierException {
+ public boolean deliver(Message message) throws CourierException, MalformedEPRException {
if (m_isReceiver)
throw new CourierException("This is a read-only Courier");
if (null == message)
return false;
+ /*
+ * This method doesn't really do anything about delivering
+ * the message. And pickup doesn't return a message either.
+ */
+
Call call = message.getHeader().getCall();
if (null==call)
message.getHeader().setCall(call=new Call());
@@ -99,7 +105,7 @@
if (null == call.getMessageID())
call.setMessageID(new URI(UUID.randomUUID().toString()));
} catch (URISyntaxException e) {
- throw new CourierException("Problems with message header ",e);
+ throw new MalformedEPRException("Problems with message header ",e);
}
return false;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -32,11 +32,8 @@
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
-import javax.jms.QueueSession;
import javax.jms.Session;
import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.xml.parsers.ParserConfigurationException;
@@ -46,14 +43,14 @@
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
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.xa.XaJmsConnectionPool;
-import org.jboss.internal.soa.esb.rosetta.pooling.xa.XaJmsConnectionPoolContainer;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsSession;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.MalformedEPRException;
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.soa.esb.couriers.CourierTransportException;
import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierServiceBindException;
+import org.jboss.soa.esb.couriers.CourierMarshalUnmarshalException;
import org.jboss.soa.esb.couriers.CourierTimeoutException;
import org.jboss.soa.esb.helpers.KeyValuePair;
import org.jboss.soa.esb.helpers.NamingContextException;
@@ -125,57 +122,46 @@
}
} // ________________________________
- private void closeSession() {
- synchronized(this) {
- if (jmsSession != null) {
- try {
- getConnectionPool().closeSession(jmsSession);
- } catch (ConnectionException e) {
- _logger.error("Unable to get Connection Poll for closing of JMS Session.", e);
- } finally {
- jmsSession = null;
- }
+ private synchronized void closeSession() {
+ if (jmsSession != null) {
+ try {
+ getConnectionPool().closeSession(jmsSession);
+ } catch (ConnectionException e) {
+ _logger.error("Unable to get Connection Pool for closing of JMS Session.", e);
+ } finally {
+ jmsSession = null;
}
}
}
+
+ private synchronized void releaseSession() {
+ if (jmsSession != null) {
+ try {
+ getConnectionPool().releaseSession(jmsSession);
+ } catch (ConnectionException e) {
+ _logger.error("Unable to get Connection Pool for releasing of JMS Session.", e);
+ } finally {
+ jmsSession = null;
+ }
+ }
+ }
public Session getJmsSession() throws CourierException {
return getJmsSession(Session.AUTO_ACKNOWLEDGE);
}
- public Session getJmsSession(final int acknowledgeMode) throws CourierException {
- reset();
-
+ public synchronized Session getJmsSession(final int acknowledgeMode) throws CourierException {
if(jmsSession == null) {
- synchronized(this) {
- checkTransaction();
-
- if(jmsSession == null) {
- String sType;
-
- try {
- sType = _epr.getDestinationType();
- } catch (URISyntaxException e) {
- throw new CourierException("EPR.getDestinationType failed.", e);
- }
-
- try {
- if (JMSEpr.QUEUE_TYPE.equals(sType)) {
- jmsSession = getConnectionPool().getQueueSession(acknowledgeMode);
- } else {
- jmsSession = getConnectionPool().getTopicSession(acknowledgeMode);
- }
- } catch (NamingException e) {
- throw new CourierException("Failed to get JMS Session from pool.", e);
- } catch (JMSException e) {
- throw new CourierException("Failed to get JMS Session from pool.", e);
- } catch (ConnectionException e) {
- throw new CourierException("Failed to get JMS Session from pool.", e);
- }
- }
+ try {
+ jmsSession = getConnectionPool().getSession(acknowledgeMode);
+ } catch (NamingException e) {
+ throw new CourierServiceBindException("Failed to get JMS Session from pool.", e);
+ } catch (JMSException e) {
+ throw new CourierServiceBindException("Failed to get JMS Session from pool.", e);
+ } catch (ConnectionException e) {
+ throw new CourierServiceBindException("Failed to get JMS Session from pool.", e);
}
}
-
return jmsSession;
}
@@ -194,11 +180,13 @@
return false;
}
- if (_messageProducer == null) {
- try {
- createMessageProducer();
- } catch (final NamingContextException nce) {
- throw new CourierException("Unexpected exception attempting to access naming context pool", nce) ;
+ synchronized(this) {
+ if (_messageProducer == null) {
+ try {
+ createMessageProducer();
+ } catch (final NamingContextException nce) {
+ throw new CourierServiceBindException("Unexpected exception attempting to access naming context pool", nce) ;
+ }
}
}
@@ -206,18 +194,18 @@
try {
msg = getJmsSession(_epr.getAcknowledgeMode()).createObjectMessage(Util.serialize(message));
} catch (JMSException e) {
- throw new CourierException("Failed to serialize ESB Message.", e);
+ throw new CourierMarshalUnmarshalException("Failed to serialize ESB Message.", e);
} catch (ParserConfigurationException e) {
- throw new CourierException("Failed to serialize ESB Message.", e);
+ throw new CourierMarshalUnmarshalException("Failed to serialize ESB Message.", e);
} catch (IOException e) {
- throw new CourierException("Failed to serialize ESB Message.", e);
+ throw new CourierMarshalUnmarshalException("Failed to serialize ESB Message.", e);
}
// Set the JMS message from the ESB message...
try {
setJMSProperties(message, msg);
} catch (JMSException e) {
- throw new CourierException("Failed to set JMS Message properties from ESB Message properties.", e);
+ throw new CourierMarshalUnmarshalException("Failed to set JMS Message properties from ESB Message properties.", e);
}
return deliver(msg);
@@ -239,66 +227,58 @@
if (null == message) {
return false;
}
-
- reset();
-
- if (_messageProducer == null) {
- try {
- createMessageProducer();
- } catch (final NamingContextException nce) {
- throw new CourierException("Unexpected exception attempting to access naming context pool", nce) ;
+ synchronized(this) {
+ if (_messageProducer == null) {
+ try {
+ createMessageProducer();
+ } catch (final NamingContextException nce) {
+ throw new CourierServiceBindException("Unexpected exception attempting to access naming context pool", nce) ;
+ }
}
}
- while (null != _messageProducer) {
- try {
- for (KeyValuePair kvp : _messageProperties) {
- String key = kvp.getKey();
- if(message.getStringProperty(key) == null) {
- message.setStringProperty(key, kvp.getValue());
+ synchronized(this) {
+ while (_messageProducer != null) {
+ try {
+ for (KeyValuePair kvp : _messageProperties) {
+ String key = kvp.getKey();
+ if(message.getStringProperty(key) == null) {
+ message.setStringProperty(key, kvp.getValue());
+ }
}
+
+ _messageProducer.send(message);
+
+ return true;
}
-
- checkTransaction();
-
- sendMessage(message);
- if ( jmsSession.getTransacted() && !transactional )
- jmsSession.commit();
-
- return true;
+ catch (JMSException e) {
+ if (!jmsConnectRetry(e))
+ throw new CourierTransportException("Caught exception during delivery and could not reconnect! ",e);
+ }
+ catch (Exception e) {
+ throw new CourierException(e);
+ }
}
- catch (JMSException e) {
- jmsConnectRetry(e);
- }
- catch (Exception e) {
- throw new CourierException(e);
- }
}
return false;
} // ________________________________
- /**
- * send/publish a javax.jms.ObjectMessage (that will contain the serialized
- * ESB Message)
- *
- * @param jmsMessage
- */
- private void sendMessage(javax.jms.Message jmsMessage) throws JMSException, URISyntaxException {
- String sType = _epr.getDestinationType();
- if (JMSEpr.TOPIC_TYPE.equals(sType)) {
- ((TopicPublisher) _messageProducer).publish(jmsMessage);
- } else {
- _messageProducer.send(jmsMessage);
- }
-
- } // ________________________________
-
- private void jmsConnectRetry(Exception exc) {
+ private boolean jmsConnectRetry(Exception exc) {
_logger.debug("JMS error. Attempting JMS reconnect.", exc);
synchronized(this) {
- cleanup();
+ try {
+ if (jmsSession.getTransacted()) {
+ jmsSession.rollback() ;
+ return false ;
+ } else {
+ cleanup() ;
+ }
+ } catch (final JMSException jmse) {
+ releaseSession() ;
+ return false ;
+ }
final int maxRetry = 5; // TODO Magic number here!!!
for (int i1 = 0; i1 < maxRetry; i1++) {
@@ -320,195 +300,104 @@
}
} else {
_logger.debug("Failed to reconnect to JMS", e);
+
+ return false;
}
}
}
}
+
+ return true;
} // ________________________________
private void createMessageProducer() throws CourierException, NamingContextException {
Context oJndiCtx = null;
-
- reset();
-
- checkTransaction();
- if (_messageProducer == null) {
- synchronized(this) {
- if (_messageProducer == null) {
- try {
- oJndiCtx = NamingContextPool.getNamingContext(_epr.getJndiEnvironment());
+ synchronized(this) {
+ if (_messageProducer == null) {
+ try {
+ oJndiCtx = NamingContextPool.getNamingContext(_epr.getJndiEnvironment());
- String sType = _epr.getDestinationType();
- if (JMSEpr.QUEUE_TYPE.equals(sType)) {
- QueueSession qSess = (QueueSession) getJmsSession(_epr.getAcknowledgeMode());
- javax.jms.Queue queue = null;
+ String sType = _epr.getDestinationType();
+ if (JMSEpr.QUEUE_TYPE.equals(sType)) {
+ Session qSess = getJmsSession(_epr.getAcknowledgeMode());
+ javax.jms.Queue queue = null;
+ try {
+ queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
+ .getDestinationName());
+ } catch (NamingException ne) {
try {
+ oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, _epr.getJndiEnvironment());
queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
.getDestinationName());
- } catch (NamingException ne) {
- try {
- oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, _epr.getJndiEnvironment());
- queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
- .getDestinationName());
- } catch (NamingException nex) {
- //ActiveMQ
- queue = qSess.createQueue(_epr.getDestinationName());
- }
+ } catch (NamingException nex) {
+ //ActiveMQ
+ queue = qSess.createQueue(_epr.getDestinationName());
}
- _messageProducer = qSess.createSender(queue);
- } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
- TopicSession tSess = (TopicSession) getJmsSession(_epr.getAcknowledgeMode());
- Topic topic = null;
- try {
- topic = (Topic) oJndiCtx.lookup(_epr
- .getDestinationName());
- }
- catch (NamingException ne) {
- topic = tSess.createTopic(_epr.getDestinationName());
- }
- _messageProducer = tSess.createPublisher(topic);
- } else {
- throw new CourierException("Unknown destination type");
}
- _messageProducer.setDeliveryMode(_epr.getPersistent()?DeliveryMode.PERSISTENT:DeliveryMode.NON_PERSISTENT);
- if ( _logger.isDebugEnabled() )
- _logger.debug("JMSCourier deliveryMode: " + _messageProducer.getDeliveryMode() + ", peristent:" + _epr.getPersistent());
+ _messageProducer = qSess.createProducer(queue);
+ } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
+ Session tSess = getJmsSession(_epr.getAcknowledgeMode());
+ Topic topic = null;
+ try {
+ topic = (Topic) oJndiCtx.lookup(_epr
+ .getDestinationName());
+ }
+ catch (NamingException ne) {
+ topic = tSess.createTopic(_epr.getDestinationName());
+ }
+ _messageProducer = tSess.createProducer(topic);
+ } else {
+ throw new CourierException("Unknown destination type");
}
- catch (JMSException ex) {
- _logger.debug("Error from JMS system.", ex);
+ _messageProducer.setDeliveryMode(_epr.getPersistent()?DeliveryMode.PERSISTENT:DeliveryMode.NON_PERSISTENT);
+ if ( _logger.isDebugEnabled() )
+ _logger.debug("JMSCourier deliveryMode: " + _messageProducer.getDeliveryMode() + ", peristent:" + _epr.getPersistent());
+ }
+ catch (JMSException ex) {
+ _logger.debug("Error from JMS system.", ex);
- throw new CourierException(ex);
+ throw new CourierException(ex);
+ }
+ catch (URISyntaxException ex) {
+ throw new CourierException(ex);
+ } finally {
+ if (oJndiCtx != null) {
+ NamingContextPool.releaseNamingContext(oJndiCtx) ;
}
- catch (URISyntaxException ex) {
- throw new CourierException(ex);
- } finally {
- if (oJndiCtx != null) {
- NamingContextPool.releaseNamingContext(oJndiCtx) ;
- }
- }
}
}
}
} // ________________________________
private JmsConnectionPool getConnectionPool() throws ConnectionException {
- reset();
-
- if (jmsConnectionPool == null) {
- synchronized(this) {
- try
- {
- checkTransaction();
- }
- catch (CourierException ex)
- {
- throw new ConnectionException(ex);
- }
-
- if(jmsConnectionPool == null) {
- String sFactoryClass;
- String sType;
- Properties properties;
- String username;
- String password;
- boolean transacted;
+ synchronized(this) {
+ if(jmsConnectionPool == null) {
+ String sFactoryClass;
+ Properties properties;
+ String username;
+ String password;
- try {
- sFactoryClass = _epr.getConnectionFactory();
- sType = _epr.getDestinationType();
- properties = _epr.getJndiEnvironment();
- username = _epr.getJMSSecurityPrincipal();
- password = _epr.getJMSSecurityCredential();
- transacted = _epr.getTransacted();
- } catch (URISyntaxException e) {
- throw new ConnectionException("Unexpected exception while getting JMS connection pool.", e);
- }
+ try {
+ sFactoryClass = _epr.getConnectionFactory();
+ properties = _epr.getJndiEnvironment();
+ username = _epr.getJMSSecurityPrincipal();
+ password = _epr.getJMSSecurityCredential();
+ } catch (URISyntaxException e) {
+ throw new ConnectionException("Unexpected exception while getting JMS connection pool.", e);
+ }
- if (Util.isNullString(sFactoryClass)) {
- sFactoryClass = "ConnectionFactory";
- }
-
- /*
- * Needs to be a one-shot instance if transactional.
- */
-
- Object tx = null;
-
- try
- {
- TransactionStrategy txS = TransactionStrategy.getTransactionStrategy(true);
-
- tx = txS.getTransaction();
- }
- catch (TransactionStrategyException ex)
- {
- _logger.warn("Problem getting transaction strategy: ", ex);
-
- throw new ConnectionException(ex);
- }
-
- if (tx == null)
- jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, transacted);
- else
- jmsConnectionPool = XaJmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, true, tx); // force transacted to be true!
+ if (Util.isNullString(sFactoryClass)) {
+ sFactoryClass = "ConnectionFactory";
}
+
+ jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, username, password);
}
- }
- return jmsConnectionPool;
+ return jmsConnectionPool;
+ }
}
-
- private void reset ()
- {
- /*
- * Are we in a global transaction?
- */
-
- if (jmsConnectionPool instanceof XaJmsConnectionPool)
- {
- /*
- * If the global transaction has terminated then this pool instance has been
- * closed and we need to get another one.
- */
-
- if (!((XaJmsConnectionPool) jmsConnectionPool).active())
- {
- jmsConnectionPool = null;
- _messageProducer = null;
- _messageConsumer = null;
- jmsSession = null;
- }
- }
- }
- private void checkTransaction () throws CourierException
- {
- try
- {
- TransactionStrategy txStrategy = TransactionStrategy.getTransactionStrategy(true);
- Object txHandle = txStrategy.getTransaction();
- boolean isActive = txStrategy.isActive();
-
- transactional = (txHandle != null);
-
- /*
- * Make sure the current transaction is still active! If we
- * have previously slept, then the timeout may be longer than that
- * associated with the transaction.
- */
-
- if (transactional && !isActive)
- {
- throw new CourierException("Associated transaction is no longer active!");
- }
- }
- catch (TransactionStrategyException ex)
- {
- throw new CourierException(ex);
- }
- }
-
public Message pickup(long millis) throws CourierException, CourierTimeoutException {
javax.jms.Message jmsMessage = pickupPayload(millis);
@@ -520,9 +409,10 @@
throw new CourierException("This is an outgoing-only Courier");
if (millis < 1)
throw new IllegalArgumentException("Timeout millis must be > 0");
- if (null == _messageConsumer) try {
- createMessageConsumer();
- }
+ synchronized(this) {
+ if (null == _messageConsumer) try {
+ createMessageConsumer();
+ }
catch (Exception e) {
try {
Thread.sleep(1000); // TODO magic number
@@ -531,21 +421,23 @@
}
throw new CourierException("Unable to create Message Consumer", e);
}
+ }
javax.jms.Message jmsMessage = null;
- while (null != _messageConsumer) {
- checkTransaction();
-
- try {
- jmsMessage = _messageConsumer.receive(millis);
- break;
+ synchronized(this) {
+ while (null != _messageConsumer) {
+ try {
+ jmsMessage = _messageConsumer.receive(millis);
+ break;
+ }
+ catch (JMSException e) {
+ if (!jmsConnectRetry(e))
+ throw new CourierTransportException("Caught exception during receive and could not reconnect! ",e);
+ }
+ catch (Exception e) {
+ throw new CourierTransportException(e);
+ }
}
- catch (JMSException e) {
- jmsConnectRetry(e);
- }
- catch (Exception e) {
- throw new CourierException(e);
- }
}
return jmsMessage;
} // ________________________________
@@ -594,61 +486,64 @@
private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException, NamingContextException {
Context oJndiCtx = null;
- reset();
-
- if (_messageConsumer == null) {
- synchronized(this) {
- if (_messageConsumer == null) {
- boolean success = false;
- try {
- Properties environment = _epr.getJndiEnvironment();
- oJndiCtx = NamingContextPool.getNamingContext(environment);
- try
- {
- String sType = _epr.getDestinationType();
- if (JMSEpr.QUEUE_TYPE.equals(sType)) {
- QueueSession qSess = (QueueSession) getJmsSession(_epr.getAcknowledgeMode());
- javax.jms.Queue queue = null;
+ synchronized(this) {
+ if (_messageConsumer == null) {
+ boolean success = false;
+ try {
+ Properties environment = _epr.getJndiEnvironment();
+ oJndiCtx = NamingContextPool.getNamingContext(environment);
+ try
+ {
+ String sType = _epr.getDestinationType();
+ if (JMSEpr.QUEUE_TYPE.equals(sType)) {
+ Session qSess = getJmsSession(_epr.getAcknowledgeMode());
+ javax.jms.Queue queue = null;
+ try {
+ queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
+ .getDestinationName());
+ } catch (NamingException ne) {
try {
+ oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
.getDestinationName());
- } catch (NamingException ne) {
- try {
- oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
- queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
- .getDestinationName());
- } catch (NamingException nex) {
- //ActiveMQ
- queue = qSess.createQueue(_epr.getDestinationName());
- }
+ } catch (NamingException nex) {
+ //ActiveMQ
+ queue = qSess.createQueue(_epr.getDestinationName());
}
- _messageConsumer = qSess.createReceiver(queue, _epr.getMessageSelector());
- } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
- TopicSession tSess = (TopicSession) getJmsSession(_epr.getAcknowledgeMode());
- Topic topic = tSess.createTopic(_epr.getDestinationName());
- _messageConsumer = tSess.createConsumer(topic, _epr
- .getMessageSelector());
- } else {
- throw new CourierException("Unknown destination type");
}
- success = true;
- } finally {
- NamingContextPool.releaseNamingContext(oJndiCtx) ;
+ _messageConsumer = qSess.createConsumer(queue, _epr.getMessageSelector());
+ } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
+ Session tSess = getJmsSession(_epr.getAcknowledgeMode());
+ Topic topic = null;
+ try {
+ topic = (Topic) oJndiCtx.lookup(_epr
+ .getDestinationName());
+ }
+ catch (NamingException ne) {
+ topic = tSess.createTopic(_epr.getDestinationName());
+ }
+ _messageConsumer = tSess.createConsumer(topic, _epr
+ .getMessageSelector());
+ } else {
+ throw new CourierException("Unknown destination type");
}
+ success = true;
+ } finally {
+ NamingContextPool.releaseNamingContext(oJndiCtx) ;
}
- catch (JMSException ex) {
- _logger.debug("Error from JMS system.", ex);
+ }
+ catch (JMSException ex) {
+ _logger.debug("Error from JMS system.", ex);
- throw new CourierException(ex);
+ throw new CourierException(ex);
+ }
+ catch (URISyntaxException ex) {
+ throw new MalformedEPRException(ex);
+ }
+ finally {
+ if (!success) {
+ closeSession();
}
- catch (URISyntaxException ex) {
- throw new MalformedEPRException(ex);
- }
- finally {
- if (!success) {
- closeSession();
- }
- }
}
}
}
@@ -664,17 +559,15 @@
protected String _messageSelector;
- protected volatile Session jmsSession;
+ protected JmsSession jmsSession;
- protected volatile MessageProducer _messageProducer;
+ protected MessageProducer _messageProducer;
- protected volatile MessageConsumer _messageConsumer;
+ protected MessageConsumer _messageConsumer;
protected List<KeyValuePair> _messageProperties;
- protected volatile JmsConnectionPool jmsConnectionPool;
-
- private boolean transactional = false;
+ protected JmsConnectionPool jmsConnectionPool;
/**
* Strategy for setting JMSProperties
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -22,6 +22,7 @@
package org.jboss.internal.soa.esb.couriers;
+import java.io.IOException;
import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
@@ -40,7 +41,10 @@
import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
import org.jboss.soa.esb.common.TransactionStrategy;
import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.soa.esb.couriers.CourierTransportException;
import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierServiceBindException;
+import org.jboss.soa.esb.couriers.CourierMarshalUnmarshalException;
import org.jboss.soa.esb.couriers.CourierTimeoutException;
import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
@@ -53,13 +57,6 @@
public class SqlTableCourier implements PickUpOnlyCourier, DeliverOnlyCourier
{
/**
- * disable default constructor
- */
- private SqlTableCourier()
- {
- }
-
- /**
* package protected constructor - Objects of Courier should only be
* instantiated by the Factory
*
@@ -149,7 +146,7 @@
try
{
- TransactionStrategy txStrategy = TransactionStrategy.getStrategy();
+ TransactionStrategy txStrategy = TransactionStrategy.getTransactionStrategy(true);
Object txHandle = ((txStrategy == null) ? null : txStrategy.getTransaction());
boolean isActive = ((txStrategy == null) ? false : txStrategy.isActive());
@@ -177,9 +174,9 @@
{
_conn = getConn();
}
- catch (Exception e)
+ catch (final Exception e)
{
- throw new CourierException(e);
+ throw new CourierServiceBindException(e);
}
}
@@ -217,11 +214,12 @@
}
_logger.debug("SQL exception during deliver", e);
- throw new CourierException(e);
+ throw new CourierTransportException(e);
}
catch (Exception e)
{
- jdbcConnectRetry(e);
+ if (!jdbcConnectRetry(e))
+ throw new CourierTransportException("Caught exception during delivery and could not reconnect! ",e);
}
}
return false;
@@ -237,7 +235,7 @@
{
try
{
- TransactionStrategy txStrategy = TransactionStrategy.getStrategy();
+ TransactionStrategy txStrategy = TransactionStrategy.getTransactionStrategy(true);
Object txHandle = ((txStrategy == null) ? null : txStrategy.getTransaction());
boolean isActive = ((txStrategy == null) ? false : txStrategy.isActive());
@@ -255,7 +253,9 @@
if (transactional && !isActive)
{
- throw new CourierException("Associated transaction is no longer active!");
+ _logger.error("SqlTableCourier - associated transaction is no longer active!");
+
+ throw new CourierException("Associated transaction is no longer active!");
}
}
catch (TransactionStrategyException ex)
@@ -291,8 +291,9 @@
}
catch (SQLException e)
{
- _logger.debug("SQL Exception during pickup", e);
- return null;
+ _logger.warn("SQL Exception during pickup", e);
+
+ throw new CourierTransportException(e);
}
finally
{
@@ -372,6 +373,10 @@
{
eBad = e;
}
+ catch (final IOException e)
+ {
+ throw new CourierMarshalUnmarshalException(e);
+ }
catch (Exception e)
{
throw new CourierException(e);
@@ -389,11 +394,14 @@
}
catch (SQLException e)
{
- throw new CourierException(e);
+ throw new CourierTransportException(e);
}
catch (Exception ex)
{
- jdbcConnectRetry(ex);
+ // bail-out now if we can't reconnect, rather than lose the error in the next sweep.
+
+ if (!jdbcConnectRetry(ex))
+ throw new CourierTransportException("Caught unexpected exception during SQL receive and could not reconnect!", ex);
}
finally
{
@@ -440,9 +448,9 @@
{
_conn = getConn();
}
- catch (Exception e)
+ catch (final Exception e)
{
- throw new CourierException(e);
+ throw new CourierServiceBindException(e);
}
}
while (_conn != null)
@@ -463,7 +471,7 @@
} // _______________________________
- private void jdbcConnectRetry(Exception exc)
+ private boolean jdbcConnectRetry(Exception exc)
{
_logger.debug("DB problem, will try to reconnect", exc);
@@ -485,10 +493,12 @@
}
catch (InterruptedException eInt)
{
- return;
+ return false;
}
}
}
+
+ return !(_conn == null);
} // ________________________________
private JdbcCleanConn getConn() throws SQLException, MalformedEPRException, NamingException
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/JmsComposer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/JmsComposer.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/JmsComposer.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -62,16 +62,15 @@
if (!(incomingMessage instanceof ObjectMessage))
{
- LOGGER.error("Unsupported JMS message type: " + incomingMessage.getClass().getName()) ;
+ LOGGER.error("Unsupported JMS message type: " + incomingMessage.getClass().getName()+" for incoming ESB-aware message.");
return null ;
}
try
{
- final ObjectMessage jmsMessage = (ObjectMessage)incomingMessage ;
-
+ final ObjectMessage jmsMessage = (ObjectMessage)incomingMessage ;
final Serializable obj = (Serializable)jmsMessage.getObject() ;
-
final Message composedMessage = Util.deserialize(obj) ;
+
propertiesSetter.setPropertiesFromJMSMessage(jmsMessage, composedMessage) ;
/*
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -28,15 +28,12 @@
import java.util.Properties;
import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
import javax.jms.Session;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicSession;
+import javax.jms.XAConnection;
+import javax.jms.XAConnectionFactory;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -74,21 +71,39 @@
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<Session>> freeSessionsMap = new HashMap<Integer,ArrayList<Session>>();
+ 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<Session>> inUseSessionsMap = new HashMap<Integer,ArrayList<Session>>();
+ 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 = null;
+ protected Connection jmsConnection ;
/** The Indentifier of the pool */
private Map<String, String> poolKey;
-
+
+ /**
+ * 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>() ;
+
/** Logger */
private Logger logger = Logger.getLogger(this.getClass());
/**
+ * The flag representing XA aware connections.
+ */
+ private boolean isXAAware ;
+ /**
+ * Flag signifying that the pool has been terminated.
+ */
+ private boolean terminated ;
+
+ /**
* Contructor of the pool.
*
*/
@@ -104,81 +119,35 @@
MAX_SESSIONS = poolSize;
SLEEP_TIME = sleepTime;
- freeSessionsMap.put(Session.AUTO_ACKNOWLEDGE, new ArrayList<Session>() );
- freeSessionsMap.put(Session.CLIENT_ACKNOWLEDGE, new ArrayList<Session>() );
- freeSessionsMap.put(Session.DUPS_OK_ACKNOWLEDGE, new ArrayList<Session>() );
+ 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<Session>() );
- inUseSessionsMap.put(Session.CLIENT_ACKNOWLEDGE, new ArrayList<Session>() );
- inUseSessionsMap.put(Session.DUPS_OK_ACKNOWLEDGE, new ArrayList<Session>() );
+ 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>() );
}
/**
* This is where we create the sessions.
*
* @param poolKey
- * @throws NamingException
+ * @param transacted
* @throws JMSException
- * @throws ConnectionException
*/
- private synchronized void addAnotherSession(Map<String, String> poolKey, final int acknowledgeMode)
- throws NamingException, JMSException, ConnectionException, NamingContextException
+ private synchronized void addAnotherSession(Map<String, String> poolKey, final boolean transacted, final int acknowledgeMode)
+ throws JMSException
{
- String destinationType = poolKey.get(JMSEpr.DESTINATION_TYPE_TAG);
-
- //Setup a connection if we don't have one
- 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(overrideName(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 (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
- QueueConnectionFactory factory = (QueueConnectionFactory) factoryConnection;
- jmsConnection = useJMSSecurity ? factory.createQueueConnection(username,password): factory.createQueueConnection();
- } else {
- TopicConnectionFactory factory = (TopicConnectionFactory) factoryConnection;
- jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
- }
-
- addExceptionListener();
-
- jmsConnection.start();
- } finally {
- NamingContextPool.releaseNamingContext(jndiContext) ;
- }
- }
- final boolean transacted = Boolean.valueOf(poolKey.get(JMSEpr.TRANSACTED_TAG));
-
//Create a new Session
- ArrayList<Session> freeSessions = freeSessionsMap.get( acknowledgeMode );
-
- if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
- QueueSession session = ((QueueConnection)jmsConnection).createQueueSession(transacted,acknowledgeMode);
-
- freeSessions.add(session);
- } else if (JMSEpr.TOPIC_TYPE.equals(destinationType)) {
- TopicSession session = ((TopicConnection) jmsConnection).createTopicSession(transacted,acknowledgeMode);
- freeSessions.add(session);
+ ArrayList<JmsSession> freeSessions = freeSessionsMap.get(acknowledgeMode);
+ // For now we only support JTA transacted sessions
+ final JmsSession session ;
+ if (transacted) {
+ session = new JmsXASession(this, ((XAConnection)jmsConnection).createXASession());
} else {
- throw new ConnectionException("Unknown destination type");
+ session = new JmsSession(jmsConnection.createSession(transacted, acknowledgeMode));
}
+ freeSessions.add(session);
logger.debug("Number of Sessions in the pool with acknowledgeMode: " + acknowledgeMode + " is now " + getSessionsInPool(acknowledgeMode));
}
@@ -188,14 +157,35 @@
* @return Connection to be used
* @throws ConnectionException
*/
- public synchronized Session getSession(final int acknowledgeMode) throws NamingException, JMSException, ConnectionException
+ public synchronized JmsSession getSession(final int acknowledgeMode) throws NamingException, JMSException, ConnectionException
{
+ try {
+ initConnection() ;
+ } catch (final NamingContextException nce) {
+ throw new ConnectionException("Unexpected exception accessing Naming Context", nce) ;
+ }
+ 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() ;
+ if (currentSession != null)
+ {
+ return currentSession ;
+ }
+ }
+ final int mode = (transacted ? Session.SESSION_TRANSACTED : acknowledgeMode) ;
+
final long end = System.currentTimeMillis() + (SLEEP_TIME * 1000) ;
boolean emitExpiry = logger.isDebugEnabled() ;
for(;;) {
-
- ArrayList<Session> freeSessions = freeSessionsMap.get(acknowledgeMode );
- ArrayList<Session> inUseSessions = inUseSessionsMap.get(acknowledgeMode);
+ ArrayList<JmsSession> freeSessions = freeSessionsMap.get(mode );
+ ArrayList<JmsSession> inUseSessions = inUseSessionsMap.get(mode);
if (freeSessions.size() > 0)
{
if (logger.isDebugEnabled()) {
@@ -203,16 +193,11 @@
+ ", maxsize=" + MAX_SESSIONS
+ ", number of pools=" + JmsConnectionPoolContainer.getNumberOfPools());
}
- final Session session = freeSessions.remove(freeSessions.size()-1);
+ final JmsSession session = freeSessions.remove(freeSessions.size()-1);
inUseSessions.add(session);
return session ;
} else if (inUseSessions.size()<MAX_SESSIONS) {
- try {
- addAnotherSession(poolKey,acknowledgeMode);
- } catch (final NamingContextException nce) {
- throw new ConnectionException("Unexpected exception accessing Naming Context", nce) ;
- }
-
+ addAnotherSession(poolKey, transacted, mode);
continue ;
} else {
if (emitExpiry)
@@ -238,74 +223,106 @@
}
}
/**
- * This method can be called whenever a Queue Session is needed from the pool.
+ * This method can be called whenever a Session is needed from the pool.
* @return
* @throws NamingException
* @throws JMSException
* @throws ConnectionException
*/
- public QueueSession getQueueSession() throws NamingException, JMSException, ConnectionException
+ public JmsSession getSession() throws NamingException, JMSException, ConnectionException
{
- return (QueueSession) getQueueSession(Session.AUTO_ACKNOWLEDGE);
+ return getSession(Session.AUTO_ACKNOWLEDGE);
}
- public QueueSession getQueueSession(final int acknowledgeMode) throws NamingException, JMSException, ConnectionException
- {
- return (QueueSession) getSession(acknowledgeMode);
+ /**
+ * This method closes an open connection and returns the connection to the pool.
+ * @param session The connection to be returned to the pool.
+ * @throws SQLException
+ * @deprecated
+ */
+ public void closeSession(Session session){
+ if (session instanceof JmsSession) {
+ closeSession((JmsSession)session) ;
+ } else {
+ logger.error("Invalid JMS Session type in closeSession: " + session);
+ }
}
/**
- * This method can be called whenever a Topic Session is needed from the pool.
- * @return
- * @throws NamingException
- * @throws JMSException
- * @throws ConnectionException
+ * This method closes an open connection and returns the connection to the pool.
+ * @param session The connection to be returned to the pool.
+ * @throws SQLException
*/
- public TopicSession getTopicSession() throws NamingException, JMSException, ConnectionException
+ public void closeSession(JmsSession session){
+ session.handleCloseSession(this) ;
+ }
+
+ /**
+ * Handle the real work of closing the connection.
+ * @param session The session to close.
+ */
+ synchronized void handleCloseSession(final JmsSession session)
{
- return (TopicSession) getTopicSession(Session.AUTO_ACKNOWLEDGE);
+ 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) ;
+ }
+ handleReleaseSession(session) ;
}
- public TopicSession getTopicSession(final int acknowledgeMode) throws NamingException, JMSException, ConnectionException
+ /**
+ * Handle the real work of releasing the connection.
+ * @param session The session to release.
+ */
+ synchronized void handleReleaseSession(final JmsSession session)
{
- return (TopicSession) getSession(acknowledgeMode);
+ session.releaseResources() ;
+ 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) ;
+ }
+ notifyAll() ;
}
-
+
/**
- * This method closes an open connection and returns the connection to the pool.
- * @param sessionToClose The connection to be returned to the pool.
+ * This method closes an open session without returning it to the pool.
+ * @param session The session to be returned to the pool.
* @throws SQLException
*/
- public synchronized void closeSession(Session sessionToClose){
- try
- {
- ArrayList<Session> sessions = freeSessionsMap.get(sessionToClose.getAcknowledgeMode());
- if ( sessions != null )
- sessions.add(sessionToClose);
-
- releaseSession(sessionToClose) ;
- } catch (JMSException e)
- {
- logger.error("JMSException while calling getAcknowledgeMode", e);
- }
+ public synchronized void releaseSession(final JmsSession session) {
+ session.handleReleaseSession(this) ;
}
/**
* This method closes an open session without returning it to the pool.
- * @param sessionToClose The session to be returned to the pool.
+ * @param session The session to be returned to the pool.
* @throws SQLException
+ * @deprecated
*/
- public synchronized void releaseSession(final Session sessionToClose) {
- try
- {
- ArrayList<Session> inUseSessions = inUseSessionsMap.get(sessionToClose.getAcknowledgeMode());
- if ( inUseSessions != null )
- inUseSessions.remove(sessionToClose);
- notifyAll() ;
- } catch (JMSException e)
- {
- logger.error("JMSException while calling getAcknowledgeMode", e);
- }
+ public synchronized void releaseSession(final Session session) {
+ if (session instanceof JmsSession) {
+ releaseSession((JmsSession)session) ;
+ } else {
+ logger.error("Invalid JMS Session type in releaseSession: " + session);
+ }
}
/**
@@ -314,20 +331,18 @@
*/
public synchronized void removeSessionPool()
{
- freeSessionsMap.get(Session.AUTO_ACKNOWLEDGE).clear() ;
- freeSessionsMap.get(Session.CLIENT_ACKNOWLEDGE).clear() ;
- freeSessionsMap.get(Session.DUPS_OK_ACKNOWLEDGE).clear() ;
+ freeSessionsMap = null ;
+ inUseSessionsMap = null ;
+ transactionsToSessions = null ;
+ sessionsToTransactions = null ;
- inUseSessionsMap.get(Session.AUTO_ACKNOWLEDGE).clear() ;
- inUseSessionsMap.get(Session.CLIENT_ACKNOWLEDGE).clear() ;
- inUseSessionsMap.get(Session.DUPS_OK_ACKNOWLEDGE).clear() ;
-
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;
+ terminated = true ;
}
JmsConnectionPoolContainer.removePool(poolKey);
}
@@ -337,13 +352,10 @@
* @return the session pool size
*/
public int getSessionsInPool() {
- int nrOfSessions = freeSessionsMap.get(Session.AUTO_ACKNOWLEDGE).size();
- nrOfSessions += freeSessionsMap.get(Session.CLIENT_ACKNOWLEDGE).size();
- nrOfSessions += freeSessionsMap.get(Session.DUPS_OK_ACKNOWLEDGE).size();
- nrOfSessions += inUseSessionsMap.get(Session.AUTO_ACKNOWLEDGE).size();
- nrOfSessions += inUseSessionsMap.get(Session.CLIENT_ACKNOWLEDGE).size();
- nrOfSessions += inUseSessionsMap.get(Session.DUPS_OK_ACKNOWLEDGE).size();
- return nrOfSessions;
+ return getSessionsInPool(Session.AUTO_ACKNOWLEDGE) +
+ getSessionsInPool(Session.CLIENT_ACKNOWLEDGE) +
+ getSessionsInPool(Session.DUPS_OK_ACKNOWLEDGE) +
+ getSessionsInPool(Session.SESSION_TRANSACTED) ;
}
/**
@@ -352,8 +364,8 @@
* @param acknowledgeMode the acknowledge mode of sessions
* @return
*/
- public int getSessionsInPool(final int acknowledgeMode) {
- return freeSessionsMap.get(acknowledgeMode).size() + inUseSessionsMap.get(acknowledgeMode).size();
+ public synchronized int getSessionsInPool(final int acknowledgeMode) {
+ return getFreeSessionsInPool(acknowledgeMode) + getInUseSessionsInPool(acknowledgeMode) ;
}
/**
@@ -361,8 +373,10 @@
* @param acknowledgeMode the acknowledge mode of sessions
* @return int the number of in use sessions
*/
- public int getFreeSessionsInPool(final int acknowledgeMode) {
- return freeSessionsMap.get(acknowledgeMode).size();
+ 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;
}
/**
@@ -371,25 +385,126 @@
* @param acknowledgeMode the acknowledge mode of sessions
* @return int the number of in use sessions
*/
- public int getInUseSessionsInPool(final int acknowledgeMode) {
- return inUseSessionsMap.get(acknowledgeMode).size();
+ 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;
}
- protected String overrideName (String name) throws ConnectionException
+ /**
+ * 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
{
- return name;
+ if (terminated)
+ {
+ throw new ConnectionException("Connection pool has been terminated") ;
+ }
+
+ 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)
+ {
+ removeSessionPool() ;
+ }
+ }) ;
+ jmsConnection.start();
+ } finally {
+ NamingContextPool.releaseNamingContext(jndiContext) ;
+ }
+ }
}
- protected void addExceptionListener () throws JMSException, ConnectionException
+ /**
+ * Get the current transaction.
+ * @return The transaction or null if none present.
+ * @throws ConnectionException if the transaction context cannot be obtained.
+ */
+ private Object getTransaction()
+ throws ConnectionException
{
- jmsConnection.setExceptionListener(new ExceptionListener() {
- public void onException(JMSException arg0)
- {
- removeSessionPool() ;
- }
- }) ;
+ try {
+ return TransactionStrategy.getTransactionStrategy(true).getTransaction() ;
+ } catch (final TransactionStrategyException tse) {
+ throw new ConnectionException("Failed to determine current transaction context", tse) ;
+ }
}
+ /**
+ * Get a JMS session associated with the current transaction.
+ * @return The JMS session or null if not associated.
+ * @throws ConnectionException For accessint the current transaction context
+ */
+ private synchronized JmsXASession getXASession()
+ throws ConnectionException
+ {
+ final Object tx = getTransaction() ;
+ return transactionsToSessions.get(tx) ;
+ }
+
+ /**
+ * 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) ;
+ }
+
static
{
PropertyManager prop = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE);
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -70,50 +70,38 @@
{
return getPool(jmsEpr.getJndiEnvironment(),
jmsEpr.getConnectionFactory(),
- jmsEpr.getDestinationType(),
jmsEpr.getJMSSecurityPrincipal(),
- jmsEpr.getJMSSecurityCredential(),
- jmsEpr.getTransacted());
+ jmsEpr.getJMSSecurityCredential()) ;
}
/**
* Returns the pool given the identifiers for the JMS provider.
*
* @param enviroment - JNDI environment for which a JMSConnectionPool should be retreived
* @param connectionFactory - connectionfactory for which a JMSConnectionPool should be retreived
- * @param destinationType - destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
* @return <code>JmsConnectionPool</code>
* @throws ConnectionException
*/
- public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType)
+ public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory)
throws ConnectionException
{
- return getPool(enviroment, connectionFactory, destinationType, null, null, false);
+ return getPool(enviroment, connectionFactory, null, null);
}
- public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
- final String username, final String password)
- throws ConnectionException
- {
- return getPool( enviroment, connectionFactory, destinationType, username, password, false );
-
- }
/**
* Returns the pool given the identifiers for the JMS provider.
*
* @param enviroment - JNDI evironment for which a JMSConnectionPool should be retreived
* @param connectionFactory - connectionfactory for which a JMSConnectionPool should be retreived
- * @param destinationType - destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
* @param username - username that should be used to create the JMS Connection
* @param password - password that should be used to create the JMS Connection
- * @param transacted - should the JMS Session be transacted
* @return <code>JmsConnectionPool</code>
* @throws ConnectionException
*/
- public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
- final String username, final String password, final boolean transacted)
+ public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory,
+ final String username, final String password)
throws ConnectionException
{
- Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password, transacted);
+ Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, username, password);
final Map<Map<String, String>, JmsConnectionPool> poolMap = getMap() ;
if (poolMap.containsKey(poolKey)) {
@@ -131,25 +119,23 @@
*
* @param environment - the JNDI environment parameters
* @param connectionFactory
- * @param destinationType
* @return
*/
- public static Map<String, String> createPoolKey(Properties environment, String connectionFactory, String destinationType)
+ public static Map<String, String> createPoolKey(Properties environment, String connectionFactory)
{
- return createPoolKey( environment, connectionFactory, destinationType, null, null, false );
+ return createPoolKey( environment, connectionFactory, null, null );
}
/**
* Creates a poolKey using the identifying parameters
*
* @param environment - the JNDI environment parameters
* @param connectionFactory
- * @param destinationType
* @param username the JMS username to be used. Used with {@link javax.jms.ConnectionFactory } createConnection
* @param password the JMS password to be used. Used with {@link javax.jms.ConnectionFactory } createConnection
* @return
*/
- public static Map<String, String> createPoolKey(Properties environment, String connectionFactory, String destinationType,
- final String username, final String password, final boolean transacted)
+ public static Map<String, String> createPoolKey(Properties environment, String connectionFactory,
+ final String username, final String password)
{
Map<String,String> poolKey = new HashMap<String,String>();
if (environment!=null) {
@@ -164,10 +150,7 @@
}
if (connectionFactory!=null) poolKey.put(JMSEpr.CONNECTION_FACTORY_TAG, connectionFactory);
- if (destinationType!=null) poolKey.put(JMSEpr.DESTINATION_TYPE_TAG, destinationType);
- poolKey.put(JMSEpr.TRANSACTED_TAG, String.valueOf(transacted));
-
return poolKey;
}
/**
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,380 @@
+/*
+* 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.io.Serializable;
+import java.util.HashSet;
+
+import javax.jms.BytesMessage;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.Session;
+import javax.jms.StreamMessage;
+import javax.jms.TemporaryQueue;
+import javax.jms.TemporaryTopic;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.jms.TopicSubscriber;
+
+/**
+ * Wrapper for JMS session class, responsible for tracking resources and the pooling.
+ */
+public class JmsSession implements Session
+{
+ /**
+ * The session delegate.
+ */
+ private final Session session ;
+
+ /**
+ * The set of active queue browsers.
+ */
+ private HashSet<QueueBrowser> queueBrowserSet ;
+ /**
+ * The set of active message consumers.
+ */
+ private HashSet<MessageConsumer> messageConsumerSet ;
+ /**
+ * The set of active message producers.
+ */
+ private HashSet<MessageProducer> messageProducerSet ;
+
+ /**
+ * Create the session wrapper.
+ * @param session The session delegate.
+ * @param isJTA True if this tales part in a JTA transaction
+ * @throws JMSException
+ */
+ JmsSession(final Session session)
+ throws JMSException
+ {
+ this.session = session ;
+ }
+
+ public void close() throws JMSException
+ {
+ session.close();
+ }
+
+ public void commit() throws JMSException
+ {
+ session.commit();
+ }
+
+ public QueueBrowser createBrowser(Queue arg0, String arg1)
+ throws JMSException
+ {
+ return trackQueueBrowser(session.createBrowser(arg0, arg1));
+ }
+
+ public QueueBrowser createBrowser(Queue arg0) throws JMSException
+ {
+ return trackQueueBrowser(session.createBrowser(arg0));
+ }
+
+ public BytesMessage createBytesMessage() throws JMSException
+ {
+ associate() ;
+ return session.createBytesMessage();
+ }
+
+ public MessageConsumer createConsumer(Destination arg0, String arg1,
+ boolean arg2) throws JMSException
+ {
+ return trackMessageConsumer(session.createConsumer(arg0, arg1, arg2));
+ }
+
+ public MessageConsumer createConsumer(Destination arg0, String arg1)
+ throws JMSException
+ {
+ return trackMessageConsumer(session.createConsumer(arg0, arg1));
+ }
+
+ public MessageConsumer createConsumer(Destination arg0) throws JMSException
+ {
+ return trackMessageConsumer(session.createConsumer(arg0));
+ }
+
+ public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1,
+ String arg2, boolean arg3) throws JMSException
+ {
+ return trackTopicSubscriber(session.createDurableSubscriber(arg0, arg1, arg2, arg3));
+ }
+
+ public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1)
+ throws JMSException
+ {
+ return trackTopicSubscriber(session.createDurableSubscriber(arg0, arg1));
+ }
+
+ public MapMessage createMapMessage() throws JMSException
+ {
+ associate() ;
+ return session.createMapMessage();
+ }
+
+ public Message createMessage() throws JMSException
+ {
+ associate() ;
+ return session.createMessage();
+ }
+
+ public ObjectMessage createObjectMessage() throws JMSException
+ {
+ associate() ;
+ return session.createObjectMessage();
+ }
+
+ public ObjectMessage createObjectMessage(Serializable arg0)
+ throws JMSException
+ {
+ associate() ;
+ return session.createObjectMessage(arg0);
+ }
+
+ public MessageProducer createProducer(Destination arg0) throws JMSException
+ {
+ return trackMessageProducer(session.createProducer(arg0));
+ }
+
+ public Queue createQueue(String arg0) throws JMSException
+ {
+ associate() ;
+ return session.createQueue(arg0);
+ }
+
+ public StreamMessage createStreamMessage() throws JMSException
+ {
+ associate() ;
+ return session.createStreamMessage();
+ }
+
+ public TemporaryQueue createTemporaryQueue() throws JMSException
+ {
+ associate() ;
+ return session.createTemporaryQueue();
+ }
+
+ public TemporaryTopic createTemporaryTopic() throws JMSException
+ {
+ associate() ;
+ return session.createTemporaryTopic();
+ }
+
+ public TextMessage createTextMessage() throws JMSException
+ {
+ associate() ;
+ return session.createTextMessage();
+ }
+
+ public TextMessage createTextMessage(String arg0) throws JMSException
+ {
+ associate() ;
+ return session.createTextMessage(arg0);
+ }
+
+ public Topic createTopic(String arg0) throws JMSException
+ {
+ associate() ;
+ return session.createTopic(arg0);
+ }
+
+ public int getAcknowledgeMode() throws JMSException
+ {
+ associate() ;
+ return session.getAcknowledgeMode();
+ }
+
+ public MessageListener getMessageListener() throws JMSException
+ {
+ associate() ;
+ return session.getMessageListener();
+ }
+
+ public boolean getTransacted() throws JMSException
+ {
+ associate() ;
+ return session.getTransacted();
+ }
+
+ public void recover() throws JMSException
+ {
+ associate() ;
+ session.recover();
+ }
+
+ public void rollback() throws JMSException
+ {
+ session.rollback();
+ }
+
+ public void run()
+ {
+ session.run();
+ }
+
+ public void setMessageListener(MessageListener arg0) throws JMSException
+ {
+ associate() ;
+ session.setMessageListener(arg0);
+ }
+
+ public void unsubscribe(String arg0) throws JMSException
+ {
+ associate() ;
+ session.unsubscribe(arg0);
+ }
+
+ private synchronized QueueBrowser trackQueueBrowser(QueueBrowser queueBrowser)
+ throws JMSException
+ {
+ associate() ;
+ if (queueBrowserSet == null)
+ {
+ queueBrowserSet = new HashSet<QueueBrowser>() ;
+ }
+ final QueueBrowser result = getQueueBrowser(queueBrowser) ;
+ queueBrowserSet.add(result) ;
+ return result ;
+ }
+
+ private synchronized MessageConsumer trackMessageConsumer(MessageConsumer messageConsumer)
+ throws JMSException
+ {
+ associate() ;
+ if (messageConsumerSet == null)
+ {
+ messageConsumerSet = new HashSet<MessageConsumer>() ;
+ }
+ final MessageConsumer result = getMessageConsumer(messageConsumer) ;
+ messageConsumerSet.add(result) ;
+ return result ;
+ }
+
+ private synchronized TopicSubscriber trackTopicSubscriber(TopicSubscriber topicSubscriber)
+ throws JMSException
+ {
+ associate() ;
+ if (messageConsumerSet == null)
+ {
+ messageConsumerSet = new HashSet<MessageConsumer>() ;
+ }
+ final TopicSubscriber result = getTopicSubscriber(topicSubscriber) ;
+ messageConsumerSet.add(result) ;
+ return result ;
+ }
+
+ private synchronized MessageProducer trackMessageProducer(MessageProducer messageProducer)
+ throws JMSException
+ {
+ associate() ;
+ if (messageProducerSet == null)
+ {
+ messageProducerSet = new HashSet<MessageProducer>() ;
+ }
+ final MessageProducer result = getMessageProducer(messageProducer) ;
+ messageProducerSet.add(result) ;
+ return result ;
+ }
+
+ synchronized void releaseResources()
+ {
+ if (queueBrowserSet != null)
+ {
+ for(QueueBrowser queueBrowser: queueBrowserSet)
+ {
+ try {
+ queueBrowser.close() ;
+ } catch (final JMSException jmse) {} // ignore
+ }
+ queueBrowserSet = null ;
+ }
+ if (messageConsumerSet != null)
+ {
+ for(MessageConsumer messageConsumer: messageConsumerSet)
+ {
+ try {
+ messageConsumer.close() ;
+ } catch (final JMSException jmse) {} // ignore
+ }
+ messageConsumerSet = null ;
+ }
+ if (messageProducerSet != null)
+ {
+ for(MessageProducer messageProducer: messageProducerSet)
+ {
+ try {
+ messageProducer.close() ;
+ } catch (final JMSException jmse) {} // ignore
+ }
+ messageProducerSet = null ;
+ }
+ try
+ {
+ recover() ;
+ }
+ catch (final JMSException jmse) {} // ignore
+ }
+
+ protected QueueBrowser getQueueBrowser(QueueBrowser queueBrowser)
+ {
+ return queueBrowser ;
+ }
+
+ protected MessageConsumer getMessageConsumer(MessageConsumer messageConsumer)
+ {
+ return messageConsumer ;
+ }
+
+ protected TopicSubscriber getTopicSubscriber(TopicSubscriber topicSubscriber)
+ {
+ return topicSubscriber ;
+ }
+
+ protected MessageProducer getMessageProducer(MessageProducer messageProducer)
+ {
+ return messageProducer ;
+ }
+
+ protected void handleCloseSession(final JmsConnectionPool jmsConnectionPool)
+ {
+ jmsConnectionPool.handleCloseSession(this) ;
+ }
+
+ protected void handleReleaseSession(JmsConnectionPool jmsConnectionPool)
+ {
+ jmsConnectionPool.handleReleaseSession(this) ;
+ }
+
+ protected void associate()
+ throws JMSException
+ {
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,230 @@
+/*
+* 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.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.QueueBrowser;
+import javax.jms.TopicSubscriber;
+import javax.jms.XASession;
+import javax.transaction.Synchronization;
+import javax.transaction.xa.XAResource;
+
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+
+/**
+ * Wrapper for JMS XA session class, responsible for tracking resources and the pooling.
+ */
+class JmsXASession extends JmsSession implements Synchronization
+{
+ /**
+ * The connection pool.
+ */
+ private final JmsConnectionPool pool ;
+
+ /**
+ * The session delegate.
+ */
+ private final XASession session ;
+
+ /**
+ * Flag indicating whether this session is associated with a transaction.
+ */
+ private boolean associated ;
+
+ /**
+ * Cleanup actions
+ */
+ private enum Cleanup { close, release }
+
+ /**
+ * The cleanup action for the synchronization.
+ */
+ private Cleanup cleanupAction = Cleanup.close ;
+
+ /**
+ * Create the session wrapper.
+ * @param pool The current connection pool
+ * @param session The session delegate.
+ * @param isJTA True if this tales part in a JTA transaction
+ * @throws JMSException
+ */
+ JmsXASession(final JmsConnectionPool pool, final XASession session)
+ throws JMSException
+ {
+ super(session) ;
+ this.pool = pool ;
+ this.session = session ;
+ }
+
+ @Override
+ public void commit() throws JMSException
+ {
+ // Handled by the transaction
+ }
+
+ @Override
+ public void rollback() throws JMSException
+ {
+ try
+ {
+ TransactionStrategy.getTransactionStrategy(true).rollbackOnly() ;
+ }
+ catch (final TransactionStrategyException tse)
+ {
+ final JMSException ex = new JMSException("Failed to rollback transaction") ;
+ ex.initCause(tse) ;
+ throw ex ;
+ }
+ }
+
+ @Override
+ protected MessageProducer getMessageProducer(MessageProducer messageProducer)
+ {
+ final InvocationHandler handler = new AssociationHandler(messageProducer) ;
+ return (MessageProducer)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {MessageProducer.class}, handler );
+ }
+
+ @Override
+ protected MessageConsumer getMessageConsumer(MessageConsumer messageConsumer)
+ {
+ final InvocationHandler handler = new AssociationHandler(messageConsumer) ;
+ return (MessageConsumer)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {MessageConsumer.class}, handler);
+ }
+
+ @Override
+ protected QueueBrowser getQueueBrowser(QueueBrowser queueBrowser)
+ {
+ final InvocationHandler handler = new AssociationHandler(queueBrowser) ;
+ return (QueueBrowser)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {QueueBrowser.class}, handler);
+ }
+
+ @Override
+ protected TopicSubscriber getTopicSubscriber(TopicSubscriber topicSubscriber)
+ {
+ final InvocationHandler handler = new AssociationHandler(topicSubscriber) ;
+ return (TopicSubscriber)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {TopicSubscriber.class}, handler);
+ }
+
+ protected void handleCloseSession(final JmsConnectionPool jmsConnectionPool)
+ {
+ cleanupAction = Cleanup.close ;
+ }
+
+ protected void handleReleaseSession(JmsConnectionPool jmsConnectionPool)
+ {
+ cleanupAction = Cleanup.release ;
+ }
+
+ protected synchronized void associate()
+ throws JMSException
+ {
+ if (!associated)
+ {
+ final XAResource resource = session.getXAResource() ;
+ final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+ try
+ {
+ transactionStrategy.registerSynchronization(this) ;
+ transactionStrategy.enlistResource(resource) ;
+ }
+ catch (final TransactionStrategyException tse)
+ {
+ final JMSException ex = new JMSException("Failed to initialise transaction resources") ;
+ ex.initCause(tse) ;
+ throw ex ;
+ }
+ try
+ {
+ pool.associateTransaction(this) ;
+ }
+ catch (final ConnectionException ce)
+ {
+ final JMSException ex = new JMSException("Failed to associate session with the current transaction") ;
+ ex.initCause(ce) ;
+ throw ex ;
+ }
+
+ associated = true ;
+ }
+ }
+
+ public void beforeCompletion()
+ {
+ }
+
+ public synchronized void afterCompletion(final int result)
+ {
+ pool.disassociateTransaction(this) ;
+ switch (cleanupAction)
+ {
+ case close:
+ pool.handleCloseSession(this) ;
+ break ;
+ case release:
+ pool.handleReleaseSession(this) ;
+ break ;
+ }
+ associated = false ;
+ }
+
+ /**
+ * Handler responsible for associating XA resources.
+ * @author kevin
+ */
+ private final class AssociationHandler implements InvocationHandler
+ {
+ /**
+ * The target instance.
+ */
+ private final Object target ;
+
+ /**
+ * Construct the handler using the specified target.
+ * @param target The target instance.
+ */
+ public AssociationHandler(final Object target)
+ {
+ this.target = target ;
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ associate() ;
+ try
+ {
+ return method.invoke(target, args);
+ }
+ catch (final InvocationTargetException ite)
+ {
+ throw ite.getCause() ;
+ }
+ }
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRConnectionFactory.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRConnectionFactory.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRConnectionFactory.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRConnectionFactory.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,108 @@
+/*
+ * 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 org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+
+import javax.xml.registry.Connection;
+import javax.xml.registry.ConnectionFactory;
+import javax.xml.registry.JAXRException;
+import java.net.PasswordAuthentication;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * JAXR Connection Factory.
+ * <p/>
+ * Extracted from the {@link JAXRRegistryImpl}.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JAXRConnectionFactory {
+
+ private static Logger logger = Logger.getLogger(JAXRConnectionFactory.class);
+
+ private Set<PasswordAuthentication> creds = new HashSet<PasswordAuthentication>();
+ private Properties props = new Properties();
+
+ public JAXRConnectionFactory() {
+ props = new Properties();
+ props.setProperty("javax.xml.registry.queryManagerURL", Configuration.getRegistryQueryManageURI());
+ props.setProperty("javax.xml.registry.lifeCycleManagerURL", Configuration.getRegistryLifecycleManagerURI());
+ props.setProperty("javax.xml.registry.factoryClass", Configuration.getRegistryFactoryClass());
+ if (Configuration.getRegistrySemanticEquivalences()!=null) {
+ props.setProperty("javax.xml.registry.semanticEquivalences", Configuration.getRegistrySemanticEquivalences());
+ }
+ if (Configuration.getRegistryPostalAddressScheme()!=null) {
+ props.setProperty("javax.xml.registry.postalAddressScheme", Configuration.getRegistryPostalAddressScheme());
+ }
+ if (Configuration.getRegistrySecurityAuthenticationMethod()!=null) {
+ props.setProperty("javax.xml.registry.security.authenticationMethod", Configuration.getRegistrySecurityAuthenticationMethod());
+ }
+ if (Configuration.getRegistryUDDIMaxRows()!=null) {
+ props.setProperty("javax.xml.registry.uddi.maxRows", Configuration.getRegistryUDDIMaxRows());
+ }
+ if (Configuration.getRegistryScoutTransportClass()!=null) {
+ props.setProperty("scout.proxy.transportClass", Configuration.getRegistryScoutTransportClass());
+ }
+ String user = Configuration.getRegistryUser();
+ String password = Configuration.getRegistryPassword();
+ PasswordAuthentication passwdAuth = new PasswordAuthentication(user, password.toCharArray());
+ creds.add(passwdAuth);
+ }
+
+
+ /**
+ * Creates a connecton to a JAXR capable registy.
+ *
+ * @return Connection to a Registry using JAXR.
+ */
+ protected Connection getConnection()
+ {
+ Connection connection = null;
+ try
+ { // Create the connection, passing it the configuration properties
+ ConnectionFactory factory = ConnectionFactory.newInstance();
+ factory.setProperties(props);
+ connection = factory.createConnection();
+ connection.setCredentials(creds);
+ } catch (JAXRException e) {
+ logger.log(Level.ERROR, "Could not set up a connection to the Registry. " + e.getMessage(), e);
+ }
+ return connection;
+ }
+
+ /**
+ * Closes the connection to the Registry
+ */
+ protected void closeConnection(Connection connection)
+ {
+ try {
+ if (connection!=null && !connection.isClosed()) {
+ connection.close();
+ }
+ } catch (JAXRException je) {
+ logger.log(Level.ERROR, je.getMessage(), je);
+ }
+ }
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -22,21 +22,16 @@
package org.jboss.internal.soa.esb.services.registry;
import java.io.UnsupportedEncodingException;
-import java.net.PasswordAuthentication;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Properties;
-import java.util.Set;
import javax.xml.registry.BulkResponse;
import javax.xml.registry.BusinessLifeCycleManager;
import javax.xml.registry.BusinessQueryManager;
import javax.xml.registry.Connection;
-import javax.xml.registry.ConnectionFactory;
import javax.xml.registry.FindQualifier;
import javax.xml.registry.JAXRException;
import javax.xml.registry.JAXRResponse;
@@ -60,7 +55,6 @@
import org.jboss.soa.esb.MarshalException;
import org.jboss.soa.esb.UnmarshalException;
import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.common.Configuration;
import org.jboss.soa.esb.services.registry.Registry;
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.services.registry.ServiceNotFoundException;
@@ -74,79 +68,18 @@
public class JAXRRegistryImpl implements Registry
{
private static Logger logger = Logger.getLogger(JAXRRegistryImpl.class);
- public static Set<PasswordAuthentication> creds = new HashSet<PasswordAuthentication>();
- private static Properties props = new Properties();
+ private JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
private static Organization jbossESBOrganization;
-
- private synchronized static void init()
- {
- props = new Properties();
- props.setProperty("javax.xml.registry.queryManagerURL", Configuration.getRegistryQueryManageURI());
- props.setProperty("javax.xml.registry.lifeCycleManagerURL", Configuration.getRegistryLifecycleManagerURI());
- props.setProperty("javax.xml.registry.factoryClass", Configuration.getRegistryFactoryClass());
- if (Configuration.getRegistrySemanticEquivalences()!=null) {
- props.setProperty("javax.xml.registry.semanticEquivalences", Configuration.getRegistrySemanticEquivalences());
- }
- if (Configuration.getRegistryPostalAddressScheme()!=null) {
- props.setProperty("javax.xml.registry.postalAddressScheme", Configuration.getRegistryPostalAddressScheme());
- }
- if (Configuration.getRegistrySecurityAuthenticationMethod()!=null) {
- props.setProperty("javax.xml.registry.security.authenticationMethod", Configuration.getRegistrySecurityAuthenticationMethod());
- }
- if (Configuration.getRegistryUDDIMaxRows()!=null) {
- props.setProperty("javax.xml.registry.uddi.maxRows", Configuration.getRegistryUDDIMaxRows());
- }
- if (Configuration.getRegistryScoutTransportClass()!=null) {
- props.setProperty("scout.proxy.transportClass", Configuration.getRegistryScoutTransportClass());
- }
- String user = Configuration.getRegistryUser();
- String password = Configuration.getRegistryPassword();
- PasswordAuthentication passwdAuth = new PasswordAuthentication(user, password.toCharArray());
- creds.add(passwdAuth);
- }
/**
- * Creates a connecton to a JAXR capable registy.
- *
- * @return Connection to a Registry using JAXR.
- */
- protected synchronized static Connection getConnection()
- {
- Connection connection = null;
- init();
- try
- { // Create the connection, passing it the configuration properties
- ConnectionFactory factory = ConnectionFactory.newInstance();
- factory.setProperties(props);
- connection = factory.createConnection();
- } catch (JAXRException e) {
- logger.log(Level.ERROR, "Could not set up a connection to the Registry. " + e.getMessage(), e);
- }
- return connection;
- }
- /**
- * Closes the connection to the Registry
- */
- protected synchronized static void closeConnection(Connection connection)
- {
- try {
- if (connection!=null && !connection.isClosed()) {
- connection.close();
- }
- } catch (JAXRException je) {
- logger.log(Level.ERROR, je.getMessage(), je);
- }
- }
- /**
* Publish an EPR to the Registry
*/
protected Service registerService(String category, String serviceName, String serviceDescription) throws JAXRException
{
Service service =null;
Organization organization = getJBossESBOrganization();
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
- connection.setCredentials(JAXRRegistryImpl.creds);
RegistryService rs = connection.getRegistryService();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
@@ -160,9 +93,9 @@
Classification classification = blm.createClassification(cScheme, "category", category);
service.addClassification(classification);
organization.addService(service);
- saveRegistryObject(service);
+ saveRegistryObject(service, jaxrConnectionFactory);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
return service;
}
@@ -172,7 +105,7 @@
@SuppressWarnings("unchecked")
public void unRegisterService(String category, String serviceName) throws RegistryException, ServiceNotFoundException{
// first find the ServiceBindings for this service
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
Service service = null;
try {
service = findService(category, serviceName);
@@ -180,7 +113,6 @@
throw new ServiceNotFoundException("No such EPR found for service with name = "
+ serviceName);
}
- connection.setCredentials(JAXRRegistryImpl.creds);
RegistryService rs = connection.getRegistryService();
BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
Collection<Key> serviceKeys = new ArrayList<Key>();
@@ -189,7 +121,7 @@
} catch (JAXRException je) {
throw new RegistryException(je.getLocalizedMessage(), je);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
/**
@@ -198,7 +130,7 @@
public void registerEPR(String category, String serviceName, String serviceDescription, EPR epr, String eprDescription)
throws RegistryException
{
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
//Find the service
Service service = findService(category,serviceName);
@@ -207,7 +139,6 @@
service = registerService(category, serviceName, serviceDescription);
}
- connection.setCredentials(JAXRRegistryImpl.creds);
RegistryService rs = connection.getRegistryService();
BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
@@ -226,13 +157,13 @@
Classification classification = blm.createClassification(cScheme, "category", category);
service.addClassification(classification);
- saveRegistryObject(serviceBinding);
+ saveRegistryObject(serviceBinding, jaxrConnectionFactory);
} catch (JAXRException je) {
throw new RegistryException(je.getLocalizedMessage(), je);
} catch (MarshalException me) {
throw new RegistryException(me.getLocalizedMessage(), me);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
/**
@@ -240,7 +171,7 @@
*/
public void unRegisterEPR(String category, String serviceName, EPR toBeDeletedEPR) throws RegistryException, ServiceNotFoundException{
//first find the ServiceBindings for this service
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
Service service = null;
try {
service = findService(category, serviceName);
@@ -248,7 +179,6 @@
throw new ServiceNotFoundException("No such Service found for service with category= "
+ category + " and name = " + serviceName);
}
- connection.setCredentials(JAXRRegistryImpl.creds);
Collection serviceBindings = findServiceBindings(service);
service.addServiceBindings(serviceBindings);
for (Iterator i=serviceBindings.iterator();i.hasNext();){
@@ -283,7 +213,7 @@
} catch (MarshalException me) {
throw new RegistryException(me.getLocalizedMessage(), me);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
@@ -308,7 +238,6 @@
/**
* Find Services based on a category ("transformation").
*
- * @param serviceType
* @return collection services
*/
public List<String> findServices(String category) throws RegistryException
@@ -327,13 +256,12 @@
}
/**
*
- * @param service
* @return
*/
public List<EPR> findEPRs(String category, String serviceName) throws RegistryException, ServiceNotFoundException
{
List<EPR> eprs = new ArrayList<EPR>();
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
Service service = findService(category, serviceName);
if (service==null){
@@ -368,19 +296,18 @@
} catch (UnmarshalException me) {
throw new RegistryException(me.getLocalizedMessage(), me);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
return eprs;
}
/**
*
- * @param service
* @return
*/
public EPR findEPR(String category, String serviceName) throws RegistryException, ServiceNotFoundException
{
EPR epr = null;
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
Service service = findService(category, serviceName);
if (service==null){
@@ -410,22 +337,22 @@
} catch (UnmarshalException me) {
throw new RegistryException(me.getLocalizedMessage(), me);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
return epr;
}
- /**
+
+ /**
* Find all Organizations with a name mathing the queryString parameter.
- *
+ *
* @param organizationName used to match with the name of the organization.
* @return the Organization.
*/
- protected synchronized static Organization findOrganization(String organizationName) throws JAXRException
- {
+ public static Organization findOrganization(String organizationName, JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException {
if (organizationName==null) {
organizationName="";
}
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
// Get registry service and business query manager
RegistryService rs = connection.getRegistryService();
@@ -440,7 +367,7 @@
BulkResponse response = bqm.findOrganizations(findQualifiers,
namePatterns, null, null, null, null);
if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
- for (Iterator orgIter = response.getCollection().iterator(); orgIter.hasNext();)
+ for (Iterator orgIter = response.getCollection().iterator(); orgIter.hasNext();)
{
Organization org = (Organization) orgIter.next();
logger.log(Level.DEBUG, "Organization name: " + org.getName().getValue());
@@ -449,7 +376,7 @@
User primaryContact = org.getPrimaryContact();
logger.log(Level.DEBUG, "Primary Contact: " + primaryContact.getPersonName().getFullName());
if (orgIter.hasNext()) {
- logger.log(Level.ERROR, "Found " + response.getCollection().size()
+ logger.log(Level.ERROR, "Found " + response.getCollection().size()
+ " Organization, while expecting only one of name " + organizationName);
}
return org;
@@ -457,16 +384,17 @@
}
return null;
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
- /**
- *
+
+ /**
+ *
* @param category
* @param serviceName
* @return Service
*/
- protected synchronized static Service findService(String category, String serviceName) throws JAXRException
+ protected Service findService(String category, String serviceName) throws JAXRException
{
if (category==null) {
category="";
@@ -474,7 +402,7 @@
if (serviceName==null) {
serviceName="";
}
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
// Get registry service and business query manager
RegistryService rs = connection.getRegistryService();
@@ -487,9 +415,9 @@
findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:category");
Collection<Classification> classifications = new ArrayList<Classification>();
- Classification classification =
- blm.createClassification(
- cScheme,
+ Classification classification =
+ blm.createClassification(
+ cScheme,
"category", category );
classifications.add(classification);
Collection<String> namePatterns = new ArrayList<String>();
@@ -499,7 +427,7 @@
BulkResponse response = bqm.findServices(null, findQualifiers,
namePatterns, classifications, null);
if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
- for (Iterator servIter = response.getCollection().iterator(); servIter.hasNext();)
+ for (Iterator servIter = response.getCollection().iterator(); servIter.hasNext();)
{
Service service = (Service) servIter.next();
logger.log(Level.DEBUG, "Service name: " + service.getName().getValue());
@@ -508,8 +436,8 @@
}
logger.log(Level.DEBUG, "Key id: " + service.getKey().getId());
if (servIter.hasNext()) {
- logger.log(Level.ERROR, "Found " + response.getCollection().size()
- + " Services, while expecting only one by the name of "
+ logger.log(Level.ERROR, "Found " + response.getCollection().size()
+ + " Services, while expecting only one by the name of "
+ serviceName + " in category " + category);
}
return service;
@@ -517,23 +445,23 @@
}
return null;
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
- /**
+
+ /**
* Finds all services for a given category.
* @param category
- * @param serviceName
* @return Service
*/
@SuppressWarnings("unchecked")
- protected synchronized static Collection<Service> findServicesForCategory(String category) throws JAXRException
+ protected Collection<Service> findServicesForCategory(String category) throws JAXRException
{
Collection<Service> services = new ArrayList<Service>();
if (category==null) {
category="";
}
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
// Get registry service and business query manager
RegistryService rs = connection.getRegistryService();
@@ -542,13 +470,13 @@
Collection<String> findQualifiers = new ArrayList<String>();
findQualifiers.add(FindQualifier.AND_ALL_KEYS);
findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
- ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:category");
+ ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:category");
//Create classification
- Classification classification =
- blm.createClassification(
- cScheme,
+ Classification classification =
+ blm.createClassification(
+ cScheme,
"category", category );
-
+
// Define find qualifiers and name patterns
//Collection<String> findQualifiers = new ArrayList<String>();
//findQualifiers.add(FindQualifier.AND_ALL_KEYS);
@@ -564,24 +492,22 @@
}
return services;
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
- /**
+
+ /**
* Create a jbossesb organization under which we will register all our services.
- *
- * @param blm
+ *
* @return
* @throws JAXRException
*/
- protected synchronized static Organization createJBossESBOrganization()
- throws JAXRException
+ protected static Organization createJBossESBOrganization(JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException
{
// Getting the connection to the Registry (reading config)
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
//Logging in
- connection.setCredentials(JAXRRegistryImpl.creds);
RegistryService rs = connection.getRegistryService();
//Building organization
BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
@@ -603,43 +529,43 @@
EmailAddress emailAddress = blm
.createEmailAddress("jbossesb at jboss.com");
emailAddresses.add(emailAddress);
-
+
Collection<TelephoneNumber> numbers = new ArrayList<TelephoneNumber>();
numbers.add(telephoneNumber);
user.setPersonName(personName);
user.setPostalAddresses(postalAddresses);
user.setEmailAddresses(emailAddresses);
user.setTelephoneNumbers(numbers);
-
+
// Scout does not support this (yet), so leaving it out for now.
// ClassificationScheme cScheme = getClassificationScheme(blm,
// blm.createInternationalString("uddi-org:general_keywords"), blm.createInternationalString(""));
// Classification classification = blm.createClassification(cScheme,
// blm.createInternationalString("JBoss ESB"), blm.createInternationalString("JBESB"));
// org.addClassification(classification);
-
- saveRegistryObject(organization);
+
+ saveRegistryObject(organization, jaxrConnectionFactory);
return organization;
} finally {
- closeConnection(connection);
- }
+ jaxrConnectionFactory.closeConnection(connection);
+ }
}
- /**
+
+ /**
* Save Registry Object
*/
- protected synchronized static void saveRegistryObject(RegistryObject registryObject) throws JAXRException
+ private static void saveRegistryObject(RegistryObject registryObject, JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException
{
// Getting the connection to the Registry (reading config)
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
-
+
BulkResponse br = null;
//Logging in
- connection.setCredentials(JAXRRegistryImpl.creds);
RegistryService rs = connection.getRegistryService();
//Building organization
BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
-
+
Class[] interfaces = registryObject.getClass().getInterfaces();
String interfaceName ="";
for (int i=0; i<interfaces.length; i++) {
@@ -696,23 +622,25 @@
throw new JAXRException("Errors occurred during save");
}
} finally {
- JAXRRegistryImpl.closeConnection(connection);
- }
+ jaxrConnectionFactory.closeConnection(connection);
+ }
}
- /**
+
+ /**
* finds the JBossESB Organizationa and creates one if it is not there.
* @return JBossESB Organization
* @throws JAXRException
*/
private Organization getJBossESBOrganization() throws JAXRException
{
- jbossESBOrganization = findOrganization("Red Hat/JBossESB");
+ jbossESBOrganization = findOrganization("Red Hat/JBossESB", jaxrConnectionFactory);
if (jbossESBOrganization==null) {
- jbossESBOrganization = createJBossESBOrganization();
+ jbossESBOrganization = createJBossESBOrganization(jaxrConnectionFactory);
}
return jbossESBOrganization;
}
- /**
+
+ /**
* Find the ServiceBindings for a given Service
* @param service
* @return
@@ -722,7 +650,7 @@
private Collection<ServiceBinding> findServiceBindings(Service service) throws RegistryException
{
Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
- Connection connection = JAXRRegistryImpl.getConnection();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
RegistryService rs = connection.getRegistryService();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
@@ -736,10 +664,9 @@
} catch (Exception je) {
throw new RegistryException(je.getLocalizedMessage(), je);
} finally {
- closeConnection(connection);
+ jaxrConnectionFactory.closeConnection(connection);
}
}
-
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -75,7 +75,7 @@
protected ConfigTree config;
private Logger logger = Logger.getLogger(Aggregator.class);
- private Long timeoutInMillies=null;
+ private Long timeoutInMillis=null;
private Set<String> receivedSplits = new HashSet<String>();
private String splitId;
@@ -86,21 +86,30 @@
this.config = config;
String timeoutAttr = config.getAttribute("timeoutInMillies", null);
+ /*
+ * http://jira.jboss.com/jira/browse/JBESB-1552
+ */
+
if (timeoutAttr != null)
+ logger.warn("Aggregator config: timeoutInMillies is deprecated. Use timeoutInMillis in future.");
+ else
+ timeoutAttr = config.getAttribute("timeoutInMillis", null);
+
+ if (timeoutAttr != null)
{
try
{
- timeoutInMillies = Long.valueOf(timeoutAttr);
+ timeoutInMillis = Long.valueOf(timeoutAttr);
}
catch (NumberFormatException ex)
{
- logger.error("Invalid value for timeoutInMillies: "+timeoutAttr);
+ logger.error("Invalid value for timeoutInMillis: "+timeoutAttr);
throw new ConfigurationException(ex);
}
}
- logger.debug("Aggregator config: timeoutInMillies=" + timeoutInMillies);
+ logger.debug("Aggregator config: timeoutInMillis=" + timeoutInMillis);
splitId = config.getAttribute("splitId");
}
@@ -349,9 +358,9 @@
*/
private boolean isTimedOut(long splitterTimeStamp)
{
- if (timeoutInMillies!=null) {
+ if (timeoutInMillis!=null) {
long now = new Date().getTime();
- long expiration = splitterTimeStamp + timeoutInMillies;
+ long expiration = splitterTimeStamp + timeoutInMillis;
if (logger.isDebugEnabled()) {
DateFormat dateFormat = DateFormat.getTimeInstance();
logger.debug("Current time=" + dateFormat.format(new Date(now))
@@ -390,7 +399,7 @@
boolean running = true ;
while(running) {
//no need to check if no timeout is set
- if (timeoutInMillies!=null) {
+ if (timeoutInMillis!=null) {
// is a snapshot so no lock needed
for (Map<Integer, Message > messageMap : aggregatedMessageMap.values()) {
//Check the first message, they all have the same time stamp
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -34,7 +34,6 @@
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
-import javax.jms.QueueSession;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -43,6 +42,7 @@
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
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;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.actions.ActionProcessingException;
import org.jboss.soa.esb.addressing.EPR;
@@ -321,7 +321,7 @@
}
private static class JMSSendQueueSetup {
- QueueSession jmsSession;
+ JmsSession jmsSession;
Queue jmsQueue;
MessageProducer jmsProducer;
String queueName;
@@ -337,11 +337,11 @@
environment.setProperty(Context.URL_PKG_PREFIXES, Configuration.getJndiServerPkgPrefix());
Context oCtx = NamingContextPool.getNamingContext(environment);
try {
- pool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
+ pool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory");
this.queueName = queueName;
- jmsSession = pool.getQueueSession();
+ jmsSession = pool.getSession();
boolean clean = true ;
try {
try {
@@ -355,7 +355,7 @@
jmsQueue = jmsSession.createQueue(queueName);
}
}
- jmsProducer = jmsSession.createSender(jmsQueue);
+ jmsProducer = jmsSession.createProducer(jmsQueue);
clean = false ;
} finally {
if (clean) {
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -21,25 +21,25 @@
import groovy.lang.Binding;
import groovy.lang.GroovyShell;
+import groovy.lang.Script;
import groovy.util.GroovyScriptEngine;
-
-import java.io.IOException;
-import java.io.InputStream;
-
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.StreamUtils;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.actions.ActionLifecycleException;
import org.jboss.soa.esb.actions.ActionPipelineProcessor;
import org.jboss.soa.esb.actions.ActionProcessingException;
import org.jboss.soa.esb.actions.ActionUtils;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.MessagePayloadProxy;
import org.jboss.soa.esb.message.body.content.BytesBody;
import org.jboss.soa.esb.util.ClassUtil;
+import java.io.IOException;
+import java.io.InputStream;
+
/**
* <a href="http://groovy.codehaus.org">Groovy</a> Scripting action processor.
* <p/>
@@ -53,7 +53,10 @@
* {@link ConfigTree configuration} is bound under the name "config".
* <p/>
* The script can also be supplied to this action as the message payload, allowing you to
- * dynamically supply the action with script.
+ * dynamically supply the action script. For message based scripts to be executable,
+ * the "script" action property must be omitted and the "supportMessageBasedScripting" property must
+ * be set to "true". There are obvious security issues around executing message based scripts,
+ * so use this feature controlled manner.
*
* @author Gregory Pierce.
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -63,7 +66,9 @@
private static Logger logger = Logger.getLogger(GroovyActionProcessor.class);
protected ConfigTree configTree;
protected GroovyScriptEngine scriptEngine;
- private String script;
+ private String scriptPath;
+ private Script script;
+ private boolean cacheScript;
private MessagePayloadProxy payloadProxy;
public GroovyActionProcessor(ConfigTree config) throws ConfigurationException {
@@ -74,16 +79,15 @@
}
public void initialise() throws ActionLifecycleException {
- String scriptPath = configTree.getAttribute("script");
-
+ scriptPath = configTree.getAttribute("script");
+ cacheScript = configTree.getBooleanAttribute("cacheScript", true);
if(scriptPath == null) {
- logger.info("No Groovy script specified on action config " + configTree.getAttribute("name")
- + ". Expecting Groovy script to be in message.");
- } else {
- try {
- script = GroovyActionProcessor.getScriptFromClasspath(scriptPath);
- } catch (IOException e) {
- throw new ActionLifecycleException("Error reading script '" + scriptPath + "' stream.");
+ boolean supportMessageBasedScripting = configTree.getBooleanAttribute("supportMessageBasedScripting", false);
+ if(supportMessageBasedScripting) {
+ logger.info("No Groovy script specified on action config " + configTree.getAttribute("name")
+ + ". Expecting Groovy script to be in message.");
+ } else {
+ throw new ActionLifecycleException("'script' not configured on the action and message based scripting is not enabled ('supportMessageBasedScripting=false').");
}
}
}
@@ -137,8 +141,12 @@
binding.setVariable("config", configTree);
binding.setVariable("payloadProxy", payloadProxy);
- GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
- Object returnVal = shell.evaluate(getScript(message));
+ Script execScript = getScript(message);
+ Object returnVal;
+ synchronized (execScript) {
+ execScript.setBinding(binding);
+ returnVal = execScript.run();
+ }
if(returnVal instanceof Message) {
return (Message) returnVal;
@@ -152,8 +160,17 @@
}
}
- private String getScript(Message message) throws ActionProcessingException {
- if(script != null) {
+ protected Script getScript(Message message) throws ActionProcessingException {
+ if(scriptPath != null) {
+ if(script == null || !cacheScript) {
+ try {
+ String scriptText = GroovyActionProcessor.getScriptFromClasspath(scriptPath);
+ script = constructScriptInstance(scriptText);
+ } catch (IOException e) {
+ throw new ActionProcessingException("Error reading script '" + scriptPath + "' stream.");
+ }
+ }
+
return script;
} else {
// So, the script is being passed in in the message...
@@ -166,15 +183,20 @@
}
if(messageScript instanceof String) {
- return (String)messageScript;
+ return constructScriptInstance((String)messageScript);
} else if(messageScript instanceof byte[]) {
- return new String((byte[])messageScript);
+ return constructScriptInstance(new String((byte[])messageScript));
} else {
throw new ActionProcessingException("Groovy script not specified in message.");
}
}
}
+ private Script constructScriptInstance(String scriptText) {
+ GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader());
+ return shell.parse(scriptText);
+ }
+
public void processException(final Message message, final Throwable th) {
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -182,6 +182,7 @@
* copying should therefore be safe.
*/
final PortReference clone = (PortReference)clone() ;
+ // Hmmm, would seem like this is superflous
clone._extensions = new LinkedList<Extension>(_extensions) ;
return clone;
}
@@ -380,7 +381,7 @@
^ objectHashCode(_uri, 0x8) ^ objectHashCode(_value, 0x10) ^ objectHashCode(
_extensions, 0x20));
}
-
+
private String _tag = null;
private String _prefix = null;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -184,6 +184,9 @@
getAddr().addExtension(Context.URL_PKG_PREFIXES, nl.item(i).getTextContent());
} else if (tag.equals(JNDI_URL_TAG)) {
uri = nl.item(i).getTextContent();
+
+ // remember to add this extension!
+ getAddr().addExtension(Context.PROVIDER_URL, uri);
} else if (tag.equals(MESSAGE_SELECTOR_TAG)) {
getAddr().addExtension(MESSAGE_SELECTOR_TAG, nl.item(i).getTextContent());
} else if (tag.equals(PERSISTENT_TAG)) {
@@ -204,7 +207,6 @@
getAddr().addExtension(JMS_SECURITY_CREDENTIAL_TAG, String.valueOf(password));
} else if (tag.equals(DESTINATION_TYPE_TAG)) {
getAddr().addExtension(DESTINATION_TYPE_TAG, nl.item(i).getTextContent());
- }
} else if (tag.equals(TRANSACTED_TAG)) {
boolean transacted = false;
final String transactedStr = nl.item(i).getTextContent();
@@ -212,6 +214,7 @@
transacted = Boolean.parseBoolean(transactedStr);
getAddr().addExtension(TRANSACTED_TAG, String.valueOf(transacted));
+ }
}
}
}
@@ -527,7 +530,6 @@
addr.addExtension(JMS_SECURITY_CREDENTIAL_TAG, password);
addr.addExtension(TRANSACTED_TAG, String.valueOf(transacted));
-
}
else
throw new IllegalArgumentException("Invalid destination type! "+destinationType);
@@ -606,7 +608,7 @@
}
if(!properties.containsKey(Context.INITIAL_CONTEXT_FACTORY)) {
- properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+ properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, Configuration.getJndiServerContextFactory());
}
if(!properties.containsKey(Context.PROVIDER_URL)) {
properties.setProperty(Context.PROVIDER_URL, Configuration.getJndiServerURL());
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -38,6 +38,9 @@
import org.jboss.soa.esb.couriers.Courier;
import org.jboss.soa.esb.couriers.CourierException;
import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.couriers.CourierTransportException;
+import org.jboss.soa.esb.couriers.CourierServiceBindException;
+import org.jboss.soa.esb.couriers.CourierMarshalUnmarshalException;
import org.jboss.soa.esb.couriers.CourierUtil;
import org.jboss.soa.esb.couriers.FaultMessageException;
import org.jboss.soa.esb.couriers.TwoWayCourier;
@@ -75,12 +78,18 @@
public static final String DEAD_LETTER_SERVICE_NAME = "DeadLetterService";
public static final String DELIVER_TO = "org.jboss.soa.esb.deliver.to";
- /**
+ /*
* Remove (suspected) dead EPRs.
*/
private static boolean removeDeadEprs;
+ /*
+ * Throw an exception on delivery failure rather than retry?
+ */
+
+ private static boolean exceptionOnDeliveryFailure;
+
/**
* Class logger.
*/
@@ -282,7 +291,7 @@
if ((serviceClusterInfo.getEPRs().size() == 0) || (new Date().after(expirationDate))) {
loadServiceClusterInfo();
- if (initialPass && (serviceClusterInfo.getEPRs().size() == 0)) // zero from a previoud send
+ if (initialPass && (serviceClusterInfo.getEPRs().size() == 0)) // zero from a previous send
{
/*
* We need to check to see if this instance used up all of it's attempts to deliver
@@ -320,6 +329,14 @@
if (removeDeadEprs)
RegistryUtil.unregister(service.getCategory(), service.getName(), epr);
+
+ /*
+ * If the message property is set to fail immediately, or the global property is set,
+ * then don't do retries even if there are other EPRs in the list.
+ */
+
+ if (("true".equals(message.getProperties().getProperty(Environment.EXCEPTION_ON_DELIVERY_FAILURE, "false")) || exceptionOnDeliveryFailure))
+ throw new MessageDeliverException("Failed to deliver message ["+message.getHeader()+"] to Service [" + service + "]. Told not to retry.");
}
}
catch (MalformedEPRException ex) // so we can differentiate failure modes, since returning null is limiting
@@ -456,7 +473,7 @@
* @return Returns the message (or a reply message if synchronous) if the message was delivered
* without error, otherwise null.
*/
- private Message attemptDelivery(Message message, EPR epr) throws FaultMessageException, MalformedEPRException {
+ private Message attemptDelivery(Message message, EPR epr) throws FaultMessageException, MalformedEPRException, MessageDeliverException {
TwoWayCourier courier = null;
final EPR targetEPR ;
@@ -519,17 +536,36 @@
}
} catch (FaultMessageException e) {
throw e;
+ } 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());
+
+ // could be stale EPR, so move on to next entry in registry.
+ } catch (final CourierMarshalUnmarshalException e) {
+ logger.warn("Courier indicated (un)marshal related error "+e+" during delivery to EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
+
+ throw new MessageDeliverException("Caught (un)marshal related exception during attempted send/receive.", e);
+ } 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());
} catch (CourierException e) {
- logger.debug("Badly formed EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
+ // probable config error. Log it and move on to next EPR/service entry.
+
+ logger.warn("Possible configuration error while using Courier for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
} catch (MalformedEPRException e) {
// Hmmmm???... Can this really happen? The Courier has already been created. Haven't we already validated the EPR during the Courier lookup (above)??
- logger.warn("Unexpected error. Badly formed EPR [" + targetEPR + "] for Service [" + service + "]. But the EPR has already been validated!!");
+ logger.error("Unexpected error. Badly formed EPR [" + targetEPR + "] for Service [" + service + "]. But the EPR has already been validated!!");
throw e;
} catch (Throwable t) {
- logger.warn("Unexpected exception during attempted message delivery over Courier for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", t);
+ logger.error("Unexpected throwable during attempted message delivery using Courier for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", t);
+
+ // we don't know what state we're in so better to bail-out now!
+
+ throw new MessageDeliverException("Caught unexpected throwable during send. Bailing-out!", t);
} finally {
- // TODO: So does this mean that Couriers are stateful? If so, do we need to synchronize on using them??
CourierUtil.cleanCourier(courier);
// put back the old To since we will have changed it.
@@ -555,5 +591,16 @@
{
removeDeadEprs = false;
}
+
+ String exceptionOnFailure = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.EXCEPTION_ON_DELIVERY_FAILURE, "false");
+
+ if ("true".equalsIgnoreCase(exceptionOnFailure))
+ {
+ exceptionOnDeliveryFailure = true;
+ }
+ else
+ {
+ exceptionOnDeliveryFailure = false;
+ }
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -62,7 +62,7 @@
new KeyValuePair(Environment.ENCRYPT_FACTORY_CLASS, getEncryptionFactoryClass()),
new KeyValuePair(Environment.LOAD_BALANCER_POLICY, getLoadBalancerPolicy()),
new KeyValuePair(Environment.REDELIVER_DLS_SERVICE_ON, getRedeliveryDlsOn()),
- new KeyValuePair(Environment.REGISTRY_CACHE_LIFE_MILLIES, getRegistryCacheLife()),
+ new KeyValuePair(Environment.REGISTRY_CACHE_LIFE_MILLIS, getRegistryCacheLife()),
new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_URL, getStoreUrl()),
new KeyValuePair(Environment.MSG_STORE_DB_JDBC_DRIVER, getStoreDriver()),
new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_USER, getStoreUser()),
@@ -151,8 +151,8 @@
public static String getRegistryCacheLife()
{
- return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.REGISTRY_CACHE_LIFE_MILLIES,
- Environment.DEFAULT_REGISTRY_CACHE_LIFE_MILLIES);
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.REGISTRY_CACHE_LIFE_MILLIS,
+ Environment.DEFAULT_REGISTRY_CACHE_LIFE_MILLIS);
}
/**
* The Registry Query Manager URI can be used to obtain information about services and their endPoints.
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -60,8 +60,10 @@
public static final String ENCRYPT_FACTORY_CLASS = "org.jboss.soa.esb.encryption.factory.class";
public static final String LOAD_BALANCER_POLICY = "org.jboss.soa.esb.loadbalancer.policy";
public static final String REDELIVER_DLS_SERVICE_ON = "org.jboss.soa.esb.dls.redeliver";
- public static final String REGISTRY_CACHE_LIFE_MILLIES = "org.jboss.soa.esb.registry.cache.life";
+ public static final String REGISTRY_CACHE_LIFE_MILLIS = "org.jboss.soa.esb.registry.cache.life";
public static final String REMOVE_DEAD_EPR = "org.jboss.soa.esb.failure.detect.removeDeadEPR";
+ public static final String EXCEPTION_ON_DELIVERY_FAILURE = "org.jboss.soa.esb.exceptionOnDeliverFailure";
+
/**
* The Registry Query Manager URI defines the endPoint where registry queries can be made.
*/
@@ -123,7 +125,7 @@
public static final String DEFAULT_JNDI_PKG_PREFIX = "org.jnp.interfaces";
public static final String DEFAULT_LOAD_BALANCER_POLICY = "org.jboss.soa.esb.listeners.ha.FirstAvailable";
public static final String DEFAULT_REDELIVER_DLS_ON = "true";
- public static final String DEFAULT_REGISTRY_CACHE_LIFE_MILLIES = "60000";
+ public static final String DEFAULT_REGISTRY_CACHE_LIFE_MILLIS = "60000";
/*
* DatabaseMessageStore Persistence Store properties.
*/
@@ -175,6 +177,7 @@
*/
public static final String JMS_MESSAGE_ID = "org.jboss.soa.esb.message.transport.jms.messageID";
+ public static final String JMS_NATIVE_MESSAGE_TYPE = "org.jboss.soa.esb.message.transport.jms.nativeMessageType"; // Text or Object
/*
* Filter properties should be identified by:
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -30,6 +30,7 @@
import javax.transaction.Synchronization;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
+import javax.transaction.xa.XAResource;
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.XMLHelper;
@@ -278,7 +279,25 @@
throw new TransactionStrategyException("Problem when registering synchronization: ", th);
}
}
+
/**
+ * Add a resource to the current transaction.
+ * @param resource
+ * @throws TransactionStrategyException
+ */
+ public void enlistResource(XAResource resource) throws TransactionStrategyException
+ {
+ try
+ {
+ tm.getTransaction().enlistResource(resource);
+ }
+ catch (final Throwable th)
+ {
+ throw new TransactionStrategyException("Problem when enlisting resource", th);
+ }
+ }
+
+ /**
* Is the currently associated transaction active?
* @return
* @throws TransactionStrategyException
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -23,6 +23,7 @@
package org.jboss.soa.esb.common;
import javax.transaction.Synchronization;
+import javax.transaction.xa.XAResource;
/**
* This class represents the transaction strategy that is currently in force
@@ -128,23 +129,13 @@
*/
public abstract void registerSynchronization (Synchronization sync) throws TransactionStrategyException;
- public static void setStrategy (TransactionStrategy txSt)
- {
- _currentStrategy.set(txSt);
- }
+ /**
+ * Add a resource to the current transaction.
+ * @param resource
+ * @throws TransactionStrategyException
+ */
+ public abstract void enlistResource(XAResource resource) throws TransactionStrategyException;
- public static TransactionStrategy getStrategy ()
- {
- return _currentStrategy.get();
- }
-
- public static void removeStrategy ()
- {
- _currentStrategy.remove();
- }
-
- private final static ThreadLocal<TransactionStrategy> _currentStrategy = new ThreadLocal<TransactionStrategy>();
-
/**
* The null transaction strategy.
* @author kevin
@@ -208,6 +199,7 @@
*/
public void resume (Object tx) throws TransactionStrategyException
{
+ throw new TransactionStrategyException("Unsupported in this transaction strategy") ;
}
/**
@@ -217,9 +209,20 @@
*/
public void registerSynchronization (Synchronization sync) throws TransactionStrategyException
{
+ throw new TransactionStrategyException("Unsupported in this transaction strategy") ;
}
/**
+ * Add a resource to the current transaction.
+ * @param resource
+ * @throws TransactionStrategyException
+ */
+ public void enlistResource(XAResource resource) throws TransactionStrategyException
+ {
+ throw new TransactionStrategyException("Unsupported in this transaction strategy") ;
+ }
+
+ /**
* Is the currently associated transaction active?
* @return
* @throws TransactionStrategyException
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -25,7 +25,14 @@
import org.jboss.soa.esb.BaseException;
/**
- * Dispatch Exception.
+ * General Courier exception. Consider this like SystemException. Other
+ * more specific exceptions will be derived from it. Most CourierExceptions
+ * are for configuration problems.
+ *
+ * Note: to preserve existing signatures.
+ * Note: an alternative approach would be similar to SQLException or XAException
+ * with specific error codes.
+ *
* @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
* @since Version 4.0
*/
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierMarshalUnmarshalException.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/src/org/jboss/soa/esb/couriers/CourierMarshalUnmarshalException.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierMarshalUnmarshalException.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierMarshalUnmarshalException.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,58 @@
+/*
+ * 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.couriers;
+
+/**
+ * Problems with the Message that cause delivery to fail. Typically
+ * around marshalling or unmarshalling the Message.
+ *
+ * @since Version 4.2.1CP2
+ */
+
+public class CourierMarshalUnmarshalException extends CourierException
+{
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct an exception instance.
+ *
+ * @param message
+ * Exception message.
+ */
+
+ public CourierMarshalUnmarshalException(String message)
+ {
+ super(message);
+ }
+
+ public CourierMarshalUnmarshalException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public CourierMarshalUnmarshalException (Throwable cause)
+ {
+ super(cause);
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierServiceBindException.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/src/org/jboss/soa/esb/couriers/CourierServiceBindException.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierServiceBindException.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierServiceBindException.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -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.soa.esb.couriers;
+
+/**
+ * An error happened during the service bind or look-up. This could be while
+ * communicating with the Registry or afterwards, while trying to
+ * set up (or bind to) the specific service.
+ *
+ * @since Version 4.2.1CP2
+ */
+
+public class CourierServiceBindException extends CourierException
+{
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct an exception instance.
+ *
+ * @param message
+ * Exception message.
+ */
+
+ public CourierServiceBindException(String message)
+ {
+ super(message);
+ }
+
+ public CourierServiceBindException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public CourierServiceBindException (Throwable cause)
+ {
+ super(cause);
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierTransportException.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/src/org/jboss/soa/esb/couriers/CourierTransportException.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierTransportException.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierTransportException.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,57 @@
+/*
+ * 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.couriers;
+
+/**
+ * Some transport related error was encountered during send or receive.
+ *
+ * @since Version 4.2.1CP2
+ */
+
+public class CourierTransportException extends CourierException
+{
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct an exception instance.
+ *
+ * @param message
+ * Exception message.
+ */
+
+ public CourierTransportException(String message)
+ {
+ super(message);
+ }
+
+ public CourierTransportException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public CourierTransportException (Throwable cause)
+ {
+ super(cause);
+ }
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -28,7 +28,6 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.io.StreamCorruptedException;
@@ -137,6 +136,8 @@
while (retry > 0)
{
+ serial = null;
+
try
{
reader = new FileInputStream(from);
@@ -149,6 +150,13 @@
retry--;
}
+ catch (final IOException ex)
+ {
+ if (serial == null)
+ throw new CourierTransportException(ex);
+ else
+ throw new CourierMarshalUnmarshalException(ex);
+ }
catch (Exception e)
{
e.printStackTrace();
@@ -235,7 +243,7 @@
{
courier.cleanup() ;
}
- catch (Exception e)
+ catch (final Throwable e)
{
_logger.error("Problems invoking clean() Method for class "
+courier.getClass().getSimpleName(),e);
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -282,11 +282,11 @@
}
freeContextOrder.remove(freeContext) ;
- final List<Context> contexts = freeContexts.get(key) ;
+ final List<Context> contexts = freeContexts.get(freeContextKey) ;
contexts.remove(freeContext) ;
if (contexts.size() == 0)
{
- freeContexts.remove(key) ;
+ freeContexts.remove(freeContextKey) ;
}
numContexts-- ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -346,7 +346,17 @@
while(resourceIter.hasNext())
{
final LifecycleResource<?> resource = resourceIter.next() ;
- resource.destroyResources() ;
+
+ try
+ {
+ resource.destroyResources() ;
+ }
+ catch (final Throwable ex)
+ {
+ // log it, but continue on to other resources
+
+ logger.warn("Caught exception "+ex+" during destroyResources.");
+ }
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -35,6 +35,7 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.common.Configuration;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.eprs.FTPEpr;
import org.jboss.soa.esb.addressing.eprs.FileEpr;
@@ -121,11 +122,14 @@
String type = getAttrAndWarn(tree, JMSEpr.DESTINATION_TYPE_TAG,
"queue");
String jndiURL = tree.getAttribute(JMSEpr.JNDI_URL_TAG);
- if (jndiURL!=null) environment.setProperty(Context.PROVIDER_URL, jndiURL);
+ if (jndiURL==null) jndiURL = Configuration.getJndiServerURL() ;
+ environment.setProperty(Context.PROVIDER_URL, jndiURL);
String jndiContextFactory = tree.getAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG);
- if (jndiContextFactory!=null) environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndiContextFactory);
+ if (jndiContextFactory==null) jndiContextFactory = Configuration.getJndiServerContextFactory() ;
+ environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndiContextFactory);
String jndiPkgPrefix = tree.getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG);
- if (jndiPkgPrefix!=null ) environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
+ if (jndiPkgPrefix==null ) jndiPkgPrefix = Configuration.getJndiServerPkgPrefix() ;
+ environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
String jmsFactoryClass = getAttrAndWarn(tree,
JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -250,18 +250,18 @@
}
}
- private File setFileWorking(File file) {
+ protected File setFileWorking(File file) {
File workingFile = getWorkFileName(file, _workingSuffix);
try {
- if (!renameFile(file, workingFile)) {
- return null;
+ if (renameFile(file, workingFile)) {
+ return workingFile;
}
} catch (GatewayException e) {
- _logger.error("Problems renaming file " + file + " to " + workingFile);
+ _logger.error("Unable to rename file '" + file.getAbsolutePath() + "' to it's working name '" + workingFile + "'. May be a contention issue with another listener. You should avoid having multiple listeners polling on the same file subset. Ignoring this file for now!");
}
- return workingFile;
+ return null;
}
protected File getWorkFileName(File fileIn, String suffix) {
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/HibernateInterceptor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/HibernateInterceptor.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/HibernateInterceptor.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -37,6 +37,7 @@
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.couriers.Courier;
import org.jboss.soa.esb.couriers.CourierException;
import org.jboss.soa.esb.couriers.CourierFactory;
@@ -46,6 +47,7 @@
import org.jboss.soa.esb.listeners.ListenerUtil;
import org.jboss.soa.esb.listeners.RegistryUtil;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.services.registry.ServiceNotFoundException;
@@ -66,7 +68,6 @@
private static final long serialVersionUID = 1L;
private ArrayList<HibernateEventBean> m_events;
private final static Logger m_logger = Logger.getLogger(HibernateInterceptor.class);
- private Courier m_courier;
protected Class m_composerClass;
protected Method m_processMethod;
@@ -74,7 +75,7 @@
protected String m_composerName;
protected ConfigTree m_config;
- protected Collection<EPR> m_targetEprs;
+ protected ServiceInvoker m_serviceInvoker;
protected String m_targetServiceCategory, m_targetServiceName;
// Event Strings
@@ -109,14 +110,21 @@
if (m_targetServiceName == null)
throw new ManagedLifecycleException("No target service name defined!");
- m_targetEprs = RegistryUtil.getEprs(m_targetServiceCategory,m_targetServiceName);
- if (null == m_targetEprs || m_targetEprs.size() < 1)
- throw new ManagedLifecycleException("EPR <" + m_targetServiceName + "> not found in registry") ;
+ Collection<EPR> _targetEprs = RegistryUtil.getEprs(m_targetServiceCategory,
+ m_targetServiceName);
+ if (null == _targetEprs || _targetEprs.size() < 1)
+ throw new ManagedLifecycleException("EPR <"
+ + m_targetServiceName + "> not found in registry");
+
+ m_serviceInvoker = new ServiceInvoker(m_targetServiceCategory, m_targetServiceName);
} catch (ServiceNotFoundException snfe) {
- throw new ManagedLifecycleException("EPR <" + m_targetServiceName + " "
- + m_targetServiceName + "> not found in registry");
+ throw new ManagedLifecycleException("EPR <" + m_targetServiceName + " "
+ + m_targetServiceName + "> not found in registry");
} catch (final RegistryException re) {
- throw new ManagedLifecycleException("Unexpected registry exception", re) ;
+ throw new ManagedLifecycleException("Unexpected registry exception", re);
+ } catch (MessageDeliverException mde) {
+ throw new ManagedLifecycleException("EPR <" + m_targetServiceName + " "
+ + m_targetServiceName + "> not found in registry", mde);
} catch (ManagedLifecycleException ex) {
throw ex;
}
@@ -203,36 +211,10 @@
String text = null;
try {
- boolean bSent = false;
- for (EPR current : m_targetEprs) {
- m_courier = CourierFactory.getCourier(current);
-
- try {
- if (m_courier.deliver(message)) {
- bSent = true;
- break;
- }
- } finally {
- CourierUtil.cleanCourier(m_courier) ;
- }
- }
-
- if (!bSent) {
- text = "Target service <" + m_targetServiceCategory + "," + m_targetServiceName + "> is not registered";
- thrown = new Exception(text);
- }
- } catch (ClassCastException e) {
+ m_serviceInvoker.deliverAsync(message);
+ } catch (MessageDeliverException e) {
thrown = e;
- text = "Action class method <" + m_processMethod.getName() + "> returned a non Message object";
- } catch (CourierException e) {
- thrown = e;
- text = "Courier <" + m_courier.getClass().getName() + ".deliverAsync(Message) FAILED";
- } catch (MalformedEPRException ex) {
- thrown = ex;
- text = "Courier <" + m_courier.getClass().getName() + ".deliverAsync(Message) FAILED with malformed EPR.";
- } catch (IllegalArgumentException e) {
- thrown = e;
- text = "Courier <" + m_courier.getClass().getName() + ".deliverAsync(Message) FAILED with IllegalArgumentException.";
+ text = "ServiceInvoker <" + m_targetServiceCategory + " " + m_targetServiceName+ ">.deliverAsync(Message) FAILED";
}
if (null != thrown) {
m_logger.error(text);
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -34,11 +34,7 @@
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import javax.jms.QueueSession;
import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSession;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -46,14 +42,12 @@
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
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;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.couriers.Courier;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.couriers.CourierUtil;
import org.jboss.soa.esb.filter.FilterManager;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.NamingContextException;
@@ -64,6 +58,7 @@
import org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleThreadState;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.services.registry.ServiceNotFoundException;
@@ -88,15 +83,16 @@
* @throws ManagedLifecycleException for errors while initialisation.
*/
protected void doInitialise() throws ManagedLifecycleException {
+ // Needed to retain prior semantics of fail-on-initialise if service lookup fails
try {
- _targetEprs = RegistryUtil.getEprs(_targetServiceCategory,
+ Collection<EPR> _targetEprs = RegistryUtil.getEprs(_targetServiceCategory,
_targetServiceName);
if (null == _targetEprs || _targetEprs.size() < 1)
throw new ManagedLifecycleException("EPR <"
+ _targetServiceName + "> not found in registry");
- } catch (ServiceNotFoundException snfe) {
- throw new ManagedLifecycleException("EPR <" + _targetServiceName + " "
- + _targetServiceName + "> not found in registry");
+ } catch (ServiceNotFoundException snfe) {
+ throw new ManagedLifecycleException("EPR <" + _targetServiceName + " "
+ + _targetServiceName + "> not found in registry");
}
catch (final RegistryException re) {
throw new ManagedLifecycleException(
@@ -104,6 +100,12 @@
}
try {
+ _serviceInvoker = new ServiceInvoker(_targetServiceCategory, _targetServiceName);
+ } catch (MessageDeliverException e) {
+ throw new ManagedLifecycleException(e);
+ }
+
+ try {
prepareMessageReceiver();
}
catch (final ConnectionException ce) {
@@ -154,9 +156,12 @@
Object obj = _processMethod.invoke(_composer, new Object[] {msgIn});
// commit and acknowledge the reception of the message
// this is done after extracting the content of the JMS Message.
- if ( jmsSession != null && jmsSession.getTransacted() )
- jmsSession.commit();
-
+ if (jmsSession.getTransacted()) {
+ jmsSession.commit() ;
+ } else {
+ msgIn.acknowledge() ;
+ }
+
if (null == obj) {
_logger.warn("Action class method <"
+ _processMethod.getName()
@@ -174,26 +179,8 @@
obj = FilterManager.getInstance().doOutputWork((Message) obj, params);
try {
- boolean bSent = false;
- for (EPR current : _targetEprs) {
- _courier = CourierFactory.getCourier(current);
- try {
- if (_courier.deliver((Message) obj)) {
- bSent = true;
- break;
- }
- }
- finally {
- CourierUtil.cleanCourier(_courier);
- }
- }
- if (!bSent) {
- String text = "Target service <"
- + _targetServiceCategory + ","
- + _targetServiceName
- + "> is not registered";
- throw new Exception(text);
- }
+ Message message = (Message) obj;
+ _serviceInvoker.deliverAsync(message);
}
catch (ClassCastException e) {
_logger.error("Action class method <"
@@ -203,15 +190,6 @@
rollbackJMSTransaction();
continue;
}
- catch (CourierException e) {
- String text = (null != _courier) ? "Courier <"
- + _courier.getClass().getName()
- + ".deliverAsync(Message) FAILED"
- : "NULL courier can't deliverAsync Message";
- _logger.error(text, e);
- rollbackJMSTransaction();
- continue;
- }
continue;
}
catch (InvocationTargetException e) {
@@ -246,17 +224,28 @@
private void rollbackJMSTransaction()
{
- try
- {
- if ( jmsSession != null && jmsSession.getTransacted() )
- jmsSession.rollback();
- } catch (JMSException e) {
- final String errorMsg = "JMSException during jmsSession.rollback()";
- _logger.error( errorMsg, e );
- }
+ try {
+ if (jmsSession.getTransacted()) {
+ jmsSession.rollback() ;
+ } else {
+ releaseSession() ;
+ }
+ } catch (final JMSException jmse) {
+ releaseSession() ;
+ }
}
+ private void releaseSession() {
+ if (jmsSession != null) {
+ try {
+ jmsConnectionPool.releaseSession(jmsSession);
+ } finally {
+ jmsSession = null;
+ }
+ }
+ }
+
private void cleanup() {
try {
if (_serviceName != null) {
@@ -409,7 +398,7 @@
_myEpr = (null == _serviceName) ? null : new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, destType,
jmsDestinationName, sFactClass, environment, _messageSelector, persistent, acknowledgeMode,
username, password, transacted );
- jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, sFactClass, destType,username, password, transacted);
+ jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, sFactClass, username, password);
try {
jmsSession = _myEpr != null ? jmsConnectionPool.getSession(((JMSEpr)_myEpr).getAcknowledgeMode()):
@@ -429,7 +418,7 @@
jmsDestination = (Destination) oJndiCtx.lookup(jmsDestinationName);
}
catch (NamingException ne) {
- if(jmsSession instanceof QueueSession) {
+ if(JMSEpr.QUEUE_TYPE.equals(destType)) {
jmsDestination = jmsSession.createQueue(jmsDestinationName);
} else {
jmsDestination = jmsSession.createTopic(jmsDestinationName);
@@ -440,17 +429,7 @@
NamingContextPool.releaseNamingContext(oJndiCtx) ;
}
- if(jmsSession instanceof QueueSession && jmsDestination instanceof Queue) {
- jmsMessageConsumer = ((QueueSession)jmsSession).createReceiver((Queue)jmsDestination, _messageSelector);
- } else if(jmsSession instanceof TopicSession && jmsDestination instanceof Topic) {
- jmsMessageConsumer = ((TopicSession)jmsSession).createSubscriber((Topic)jmsDestination, _messageSelector, false);
- } else {
- try {
- throw new ConfigurationException("The JMS destination identified by name '" + jmsDestinationName + "' must match it's configured destination type '" + jmsDestinationName + "'.");
- } finally {
- cleanup();
- }
- }
+ jmsMessageConsumer = jmsSession.createConsumer(jmsDestination, _messageSelector);
} // ________________________________
/**
@@ -501,7 +480,7 @@
protected String jmsDestinationName;
- protected Session jmsSession;
+ protected JmsSession jmsSession;
protected Destination jmsDestination;
@@ -517,8 +496,8 @@
protected EPR _myEpr;
- protected Collection<EPR> _targetEprs;
-
+ protected ServiceInvoker _serviceInvoker;
+
protected String _composerName;
protected Class _composerClass;
@@ -527,8 +506,6 @@
protected Method _processMethod;
- protected Courier _courier;
-
protected JmsConnectionPool jmsConnectionPool;
/**
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -47,15 +47,12 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.client.ServiceInvoker;
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.couriers.Courier;
import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.couriers.CourierUtil;
import org.jboss.soa.esb.filter.FilterManager;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
@@ -63,10 +60,10 @@
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.ListenerUtil;
import org.jboss.soa.esb.listeners.RegistryUtil;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleThreadState;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.MessagePayloadProxy;
import org.jboss.soa.esb.message.format.MessageFactory;
@@ -120,8 +117,9 @@
* @throws ManagedLifecycleException for errors while initialisation.
*/
protected void doInitialise() throws ManagedLifecycleException {
+ // Needed to retain prior semantics of fail-on-initialise if service lookup fails
try {
- _targetEprs = RegistryUtil.getEprs(_targetServiceCategory,
+ Collection<EPR> _targetEprs = RegistryUtil.getEprs(_targetServiceCategory,
_targetServiceName);
if (null == _targetEprs || _targetEprs.size() < 1)
throw new ManagedLifecycleException("EPR <"
@@ -132,9 +130,15 @@
+ _targetServiceName + "> not found in registry");
}
catch (final RegistryException re) {
- throw new ManagedLifecycleException(
- "Unexpected registry exception", re);
+ throw new ManagedLifecycleException("Unexpected registry exception", re);
}
+
+ try {
+ _serviceInvoker = new ServiceInvoker(_targetServiceCategory, _targetServiceName);
+ _serviceInvoker.loadServiceClusterInfo();
+ } catch (MessageDeliverException mde) {
+ throw new ManagedLifecycleException(mde);
+ }
boolean failure = true;
try {
@@ -190,28 +194,14 @@
params.put(Environment.GATEWAY_CONFIG, _config);
message = FilterManager.getInstance().doOutputWork(message, params);
-
- boolean bSent = false;
- for (EPR current : _targetEprs) {
- _courier = CourierFactory.getCourier(current);
- try {
- if (_courier.deliver(message)) {
- bSent = true;
- break;
- }
- }
- finally {
- CourierUtil.cleanCourier(_courier);
- }
- }
- if (!bSent) {
- text = "Target service <" + _targetServiceCategory
- + "," + _targetServiceName
- + "> is not registered";
- thrown = new Exception(text);
- }
- }
- catch (InvocationTargetException e) {
+
+ _serviceInvoker.deliverAsync(message);
+ } catch (MessageDeliverException e) {
+ thrown = e;
+ text = "Target service <" + _targetServiceCategory
+ + "," + _targetServiceName
+ + "> is not registered";
+ } catch (InvocationTargetException e) {
thrown = e;
text = "Problems invoking method <"
+ _processMethod.getName() + ">";
@@ -228,16 +218,10 @@
}
catch (CourierException e) {
thrown = e;
- text = "Courier <" + _courier.getClass().getName()
- + ".deliverAsync(Message) FAILED";
+ text = "Message filter FAILED";
}
- catch (MalformedEPRException ex) {
- thrown = ex;
- text = "Courier <"
- + _courier.getClass().getName()
- + ".deliverAsync(Message) FAILED with malformed EPR.";
- }
-
+
+
if (null == thrown) {
if (_deleteAfterOK)
deleteCurrentRow();
@@ -861,9 +845,8 @@
protected String _targetServiceCategory, _targetServiceName;
- protected Collection<EPR> _targetEprs;
-
protected String _composerName;
+ protected ServiceInvoker _serviceInvoker;
protected Class _composerClass;
@@ -871,8 +854,6 @@
protected Method _processMethod;
- protected Courier _courier;
-
protected String _driver, _url, _user, _password, _datasource;
protected String _tableName, _selectFields, _keyFields, _timestamp;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -31,7 +31,7 @@
import javax.transaction.TransactionManager;
import javax.transaction.xa.XAResource;
-import org.jboss.logging.Logger;
+import org.apache.log4j.Logger;
import org.jboss.tm.TransactionManagerLocator;
import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JcaMessageAwareListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JcaMessageAwareListener.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JcaMessageAwareListener.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -139,7 +139,14 @@
{
super.doDestroy();
- pipeline.destroy() ;
+ try
+ {
+ pipeline.destroy() ;
+ }
+ catch (final Throwable ex)
+ {
+ }
+
pipeline = null ;
RegistryUtil.unregister(serviceCategory, serviceName, serviceEPR) ;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -32,8 +32,6 @@
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.common.TransactionStrategy;
-import org.jboss.soa.esb.common.TransactionStrategyException;
import org.jboss.soa.esb.couriers.CourierException;
import org.jboss.soa.esb.couriers.CourierFactory;
import org.jboss.soa.esb.couriers.CourierTimeoutException;
@@ -87,10 +85,6 @@
* The error delay.
*/
private long errorDelay ;
-
- private TransactionStrategy transactionStrategy;
- private boolean transactional = false;
- private boolean rollbackOnPipelineFaults = true;
/**
* public constructor
@@ -162,11 +156,6 @@
}
}
_latencySecs = lSeconds ;
-
- transactional = _config.getBooleanAttribute(ListenerTagNames.TRANSACTED_TAG, false) ;
- transactionStrategy = TransactionStrategy.getTransactionStrategy(transactional) ;
-
- rollbackOnPipelineFaults = _config.getBooleanAttribute(ListenerTagNames.ROLLBACK_ON_PIPELINE_FAULTS, true);
}
/**
@@ -272,53 +261,17 @@
}
}
- /**
- * We have JMS transactional delivery/work semantics: before pulling a unit of work
- * we start a transaction. If the pipeline completes successfully then we will
- * commit that transaction and the OUW will be deleted. If we have to roll back
- * the transaction then the UOW will be placed back on the input "queue" (assumes that
- * the courier is transactional).
- *
- * @param maxWaitMillis
- */
public void waitForEventAndProcess (long maxWaitMillis)
{
Message message = null ;
- boolean problem = false;
-
try
{
- transactionStrategy.begin();
-
- /*
- * If this is a transactional receive then the courier
- * needs to be reset afterwards, because we can only
- * guarantee one instance per transaction. If the courier
- * instance does some handy multiplexing internally across different
- * transactions then we won't be able to handle that at this level.
- * However, at the moment that isn't an issue.
- */
-
- TransactionStrategy.setStrategy(transactionStrategy);
-
message = (maxWaitMillis > 0) ? _pickUpCourier
.pickup(maxWaitMillis) : null;
errorDelay = 0 ;
}
- catch (TransactionStrategyException ex)
- {
- // could not begin transaction!
-
- _logger.error("Could not begin transaction!");
-
- problem = true;
-
- return;
- }
catch (CourierTimeoutException e)
{
- problem = true;
-
return;
}
catch (FaultMessageException fme)
@@ -327,79 +280,35 @@
}
catch (CourierException e)
{
- _logger.debug("Courier Exception", e);
- if (errorDelay == 0)
- {
- errorDelay = MIN_ERROR_DELAY ;
- }
- else if (errorDelay < MAX_ERROR_DELAY)
- {
- errorDelay <<= 1 ;
- }
- e.printStackTrace();
- _logger.warn("Error processing courier, backing off for " + errorDelay + " milliseconds") ;
- waitForRunningStateChange(ManagedLifecycleThreadState.STOPPING, errorDelay) ;
-
- problem = true;
-
+ _logger.debug("Courier Exception", e);
+ if (errorDelay == 0)
+ {
+ errorDelay = MIN_ERROR_DELAY ;
+ }
+ else if (errorDelay < MAX_ERROR_DELAY)
+ {
+ errorDelay <<= 1 ;
+ }
+ _logger.warn("Error processing courier, backing off for " + errorDelay + " milliseconds") ;
+ waitForRunningStateChange(ManagedLifecycleThreadState.STOPPING, errorDelay) ;
return;
}
- finally
- {
- if (problem)
- {
- try
- {
- if (transactionStrategy.getTransaction() != null)
- {
- CourierUtil.cleanCourier(_pickUpCourier);
-
- resetCourier();
- }
- }
- catch (Throwable ex)
- {
- CourierUtil.cleanCourier(_pickUpCourier);
-
- resetCourier(); // to be on the safe side!
- }
-
- rollbackTransaction();
- }
-
- TransactionStrategy.removeStrategy();
- }
if (null != message)
{
- try
- {
- final Message pipelineMessage = message ;
- final Object txHandle = transactionStrategy.suspend();
- final TransactionalRunner txRunner = new TransactionalRunner(_pickUpCourier, pipelineMessage, txHandle);
-
- updateThreadCount(+1);
- _execService.execute(txRunner);
-
- if (transactional)
- {
- _pickUpCourier = null; // runner will clean it up.
-
- resetCourier(); // we need another courier for the next msg.
- }
- }
- catch (TransactionStrategyException ex)
- {
- _logger.warn("Caught transaction related exception: ", ex);
- rollbackTransaction();
- }
+ final Message pipelineMessage = message ;
+ final Runnable pipelineRunner = new Runnable() {
+ public void run() {
+ try {
+ pipeline.process(pipelineMessage) ;
+ } finally {
+ updateThreadCount(-1) ;
+ }
+ }
+ } ;
+ updateThreadCount(+1);
+ _execService.execute(pipelineRunner);
}
- else
- {
- // nothing to do, so roll back the transaction before returning.
-
- rollbackTransaction();
- }
} // ________________________________
@@ -413,8 +322,19 @@
{
if (_execService != null)
{
- _execService.shutdown() ;
- checkExecutorTermination() ;
+ try
+ {
+ _execService.shutdown() ;
+ checkExecutorTermination() ;
+ }
+ catch (final ManagedLifecycleException ex)
+ {
+ throw ex;
+ }
+ catch (final Throwable ex)
+ {
+ _logger.warn("Caught throwable during shutdown: "+ex);
+ }
}
pipeline.destroy() ;
@@ -483,134 +403,7 @@
}
}
}
-
- private void rollbackTransaction ()
- {
- try
- {
- transactionStrategy.rollbackOnly();
- transactionStrategy.terminate();
- }
- catch (Throwable ex)
- {
- _logger.warn("Problem while attempting to rollback transaction!"); // timeout should catch it next!
- }
- }
-
- private void resetCourier ()
- {
- TwoWayCourier pickUpCourier = null;
- try
- {
- pickUpCourier = CourierFactory.getPickupCourier(_epr) ;
- try
- {
- final Method setPollLatency = pickUpCourier.getClass().getMethod(
- "setPollLatency", new Class[] { Long.class });
- setPollLatency.invoke(pickUpCourier, new Long(1000 * _latencySecs));
- }
- catch (final NoSuchMethodException nsme)
- {
- // OK, just leave it null
- }
- catch (final Exception ex)
- {
- CourierUtil.cleanCourier(pickUpCourier);
-
- _logger.error("Problems invoking setPollLatency(long)", ex);
- }
- }
- catch (final MalformedEPRException mepre)
- {
- _logger.error("Malformed EPR: " + _epr) ;
- }
- catch (final CourierException ce)
- {
- _logger.error("No appropriate courier can be obtained for " + _epr, ce);
- }
-
- _pickUpCourier = pickUpCourier;
- }
-
- class TransactionalRunner implements Runnable
- {
- public TransactionalRunner (PickUpOnlyCourier courier, Message pipelineMessage, Object txHandle)
- {
- _courier = courier;
- _pipelineMessage = pipelineMessage;
- _txHandle = txHandle;
- }
-
- public void run()
- {
- boolean problem = false;
-
- try
- {
- transactionStrategy.resume(_txHandle);
-
- pipeline.setTransactional(transactional);
-
- TransactionStrategy.setStrategy(transactionStrategy);
-
- /*
- * Current strategy is to commit as long as process returns true.
- * If fails, or any exceptions are caught, then we roll back.
- *
- * TODO re-examine the semantics around true/false from the pipeline.
- */
-
- // TODO consider adding a RollbackOnFalse option to allow override.
-
- problem = rollbackOnPipelineFaults && !pipeline.process(_pipelineMessage);
-
- if (!problem)
- {
- transactionStrategy.terminate();
- }
- }
- catch (TransactionStrategyException ex)
- {
- problem = true;
-
- _logger.warn("TransactionalRunner caught transaction exception: ", ex);
- }
- catch (RuntimeException ex)
- {
- problem = true;
-
- throw ex;
- }
- catch (Throwable ex)
- {
- problem = true;
-
- _logger.warn("TransactionalRunner caught throwable: ",ex);
- }
- finally
- {
- if (problem)
- {
- rollbackTransaction();
- }
-
- if (transactional)
- {
- CourierUtil.cleanCourier(_courier);
- }
-
- TransactionStrategy.removeStrategy();
-
- updateThreadCount(-1);
- }
- }
-
- private PickUpOnlyCourier _courier;
- private Message _pipelineMessage;
- private Object _txHandle;
- };
-
private ConfigTree _config;
private String _eprCategoryName;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -34,6 +34,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
+import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
@@ -168,44 +169,57 @@
final StringBuilder exceptions = new StringBuilder();
for (NotificationFile notificationFile : m_oaOutF)
{
- try
+ try
+ {
+ fileOutStream = new FileOutputStream(notificationFile,
+ notificationFile.append);
+ Object obj = payloadProxy.getPayload(message);
+
+ /*
+ * TODO
+ *
+ * Hmmm, why was this keying off the ESB message type? Change it so
+ * that if it's a byte[] or a String then we'll use the stringNotification.
+ * Otherwise output as a generic Serializable. Slightly different to other
+ * notifiers (except JMSNotifier), but probably the best we can do in the
+ * situation.
+ *
+ * http://jira.jboss.com/jira/browse/JBESB-1607
+ */
+
+ if ((obj instanceof Serializable) && !(obj instanceof byte[]) && !(obj instanceof String))
{
- fileOutStream = new FileOutputStream(notificationFile,
- notificationFile.append);
- if (MessageType.JAVA_SERIALIZED.equals(message.getType()))
- {
- objectNotification(fileOutStream, payloadProxy.getPayload(message));
- }
- else
- {
- Object obj = payloadProxy.getPayload(message);
- String content=null;
- if (obj instanceof byte[]) {
- content = new String((byte[]) obj);
- } else {
- content = obj.toString();
- }
- stringNotification(fileOutStream, content);
- }
+ objectNotification(fileOutStream, payloadProxy.getPayload(message));
}
- catch (IOException e)
+ else
{
- handleException(notificationFile, e, exceptions);
+ String content=null;
+ if (obj instanceof byte[]) {
+ content = new String((byte[]) obj);
+ } else {
+ content = obj.toString();
+ }
+ stringNotification(fileOutStream, content);
}
- catch (MessageDeliverException e) {
- handleException(notificationFile, e, exceptions);
- } finally
+ }
+ catch (IOException e)
+ {
+ handleException(notificationFile, e, exceptions);
+ }
+ catch (MessageDeliverException e) {
+ handleException(notificationFile, e, exceptions);
+ } finally
+ {
+ try
{
- try
- {
- if ( fileOutStream != null )
- fileOutStream.close();
- }
- catch (IOException eCl)
- {
- log.error( "IOException while closing fileOutStream: ", eCl );
- }
+ if ( fileOutStream != null )
+ fileOutStream.close();
}
+ catch (IOException eCl)
+ {
+ log.error( "IOException while closing fileOutStream: ", eCl );
+ }
+ }
}
if ( exceptions.length() > 0 )
throw new NotificationException( exceptions.toString() );
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -41,6 +41,7 @@
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.KeyValuePair;
import org.jboss.soa.esb.message.body.content.BytesBody;
@@ -64,6 +65,13 @@
*/
public abstract class NotifyJMS extends NotificationTarget
{
+ /*
+ * Value can be used to determine how the notification message
+ * will be represented on the JMS "wire".
+ */
+
+ public static enum NativeMessage { text, object }
+
protected Logger log = Logger.getLogger(this.getClass());
/**
@@ -88,18 +96,6 @@
protected abstract void send(final Message p_oMsg, MessageProducer msgProducer ) throws JMSException;
/**
- * Get a session specific to the subclasses implementation
- * i.e Queue or Topic.
- *
- * @param pool
- * @return Session
- * @throws NamingException
- * @throws JMSException
- * @throws ConnectionException
- */
- protected abstract Session getSession( JmsConnectionPool pool ) throws NamingException, JMSException, ConnectionException;
-
- /**
* Creates a message producer specific to the subclasses implementation
* i.e QueueSender or TopicPublisher.
*
@@ -234,12 +230,37 @@
*/
public void sendNotification (org.jboss.soa.esb.message.Message esbMessage) throws NotificationException
{
+ /*
+ * Blah. We do this for backward compatibility.
+ */
+
+ NativeMessage defaultType = NativeMessage.text;
+
+ if (esbMessage != null)
+ {
+ if (esbMessage.getType().equals(MessageType.JAVA_SERIALIZED))
+ defaultType = NativeMessage.object;
+ }
+
+ /*
+ * http://jira.jboss.com/jira/browse/JBESB-1606
+ *
+ * Prior to this, the JMS message type transmitted depended on the
+ * ESB message type! That should be opaque and not affect how the contents
+ * are transmitted. So we fixed it, but need to provide backward
+ * compatibility for now. But the old approach/"feature" is essentially
+ * deprecated.
+ *
+ * http://jira.jboss.com/jira/browse/JBESB-1607
+ */
+
try
{
Message jmsMessage = null;
Object obj = payloadProxy.getPayload(esbMessage);
-
- if (MessageType.JAVA_SERIALIZED.equals(esbMessage.getType()))
+ NativeMessage type = (NativeMessage) esbMessage.getProperties().getProperty(Environment.JMS_NATIVE_MESSAGE_TYPE, defaultType);
+
+ if (type == NativeMessage.object)
{
if(obj == null) {
// create a null payload message...
@@ -247,7 +268,7 @@
} else if(obj instanceof byte[]) {
jmsMessage = sessions[0].createObjectMessage((byte[]) obj);
} else {
- throw new NotificationException("Expected payload type for '" + MessageType.JAVA_SERIALIZED + "' is byte[]. Recieved '" + obj.getClass().getName() + "'.");
+ throw new NotificationException("Expected payload type for '" + esbMessage.getType() + "' is byte[]. Received '" + obj.getClass().getName() + "'.");
}
}
else
@@ -260,10 +281,10 @@
}
jmsMessage = sessions[0].createTextMessage(content);
}
-
+
setJMSProperties( esbMessage, jmsMessage );
- for (Iterator II = m_oProps.keySet().iterator(); II.hasNext();)
+ for (Iterator<Object> II = m_oProps.keySet().iterator(); II.hasNext();)
{
String sKey = (String) II.next();
String sVal = m_oProps.getProperty(sKey);
@@ -337,12 +358,11 @@
* Will setup/create JMS connections, sessions, producers.
*
* @param configTrees
- * @param destinationType
* @throws ConfigurationException
* @throws JMSException
* @throws ConnectionException
*/
- protected void setUpProducers (final ConfigTree[] configTrees, final String destinationType) throws ConfigurationException, JMSException, ConnectionException
+ protected void setUpProducers (final ConfigTree[] configTrees) throws ConfigurationException, JMSException, ConnectionException
{
// REVIEW: The connection factory name is hardcoded and is the same as
// that of the queue connection factory.
@@ -379,9 +399,9 @@
String connectionFactory = configTrees[i].getAttribute(JMSEpr.CONNECTION_FACTORY_TAG, CONNECTION_FACTORY);
- connectionPools[i] = JmsConnectionPoolContainer.getPool(environment, connectionFactory, destinationType);
- sessions[i] = getSession( connectionPools[i] );
- producers[i] = createProducer( connectionPools[i], sAtt, sessions[i], environment );
+ connectionPools[i] = JmsConnectionPoolContainer.getPool(environment, connectionFactory);
+ sessions[i] = connectionPools[i].getSession() ;
+ producers[i] = createProducer( connectionPools[i], sAtt, sessions[i], environment );
final String persistentStr = configTrees[i].getAttribute( PERSISTENT_ATTR, "true" );
deliveryModes[i] = persistentStr.equalsIgnoreCase( "true" ) ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -24,12 +24,10 @@
import java.util.Properties;
+import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
import javax.jms.Session;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -38,7 +36,6 @@
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.NamingContextException;
import org.jboss.soa.esb.helpers.NamingContextPool;
@@ -57,7 +54,6 @@
*/
public class NotifyQueues extends NotifyJMS
{
- @SuppressWarnings("unused")
private Logger log = Logger.getLogger( NotifyQueues.class );
/**
@@ -72,64 +68,50 @@
public NotifyQueues (ConfigTree p_oP) throws ConfigurationException, JMSException, ConnectionException
{
super(p_oP);
- setQueues(p_oP.getChildren(CHILD_QUEUE));
+ setUpProducers(p_oP.getChildren(CHILD_QUEUE));
} // __________________________________
-
- protected void setQueues (ConfigTree[] p_oaP) throws ConfigurationException, JMSException, ConnectionException
- {
- setUpProducers( p_oaP, JMSEpr.QUEUE_TYPE );
- }
protected void send (final Message p_oMsg, MessageProducer msgProducer ) throws JMSException
{
- QueueSender oCurr = (QueueSender) msgProducer;
if ( log.isDebugEnabled() )
{
log.debug( "Sending to queue with DeliveryMode : " + msgProducer.getDeliveryMode());
log.debug( "Sending to queue with Priority : " + msgProducer.getPriority());
log.debug( "Sending to queue with TTL : " + msgProducer.getTimeToLive());
}
- oCurr.send(p_oMsg);
+ msgProducer.send(p_oMsg);
}
- protected QueueSession getSession(final JmsConnectionPool pool) throws NamingException, JMSException, ConnectionException
- {
- return pool.getQueueSession();
- }
-
protected MessageProducer createProducer(
final JmsConnectionPool pool,
final String destinationName,
final Session session,
final Properties environment) throws NamingException, JMSException, ConnectionException
{
-
- QueueSession queueSession = (QueueSession) session;
-
try
{
Context context = NamingContextPool.getNamingContext(environment);
try
{
- Queue queue=null;
+ Destination destination=null;
try
{
- queue = (Queue) context.lookup(destinationName);
+ destination = (Destination) context.lookup(destinationName);
}
catch (NamingException ne)
{
context = NamingContextPool.replaceNamingContext(context, environment);
try
{
- queue = (Queue) context.lookup(destinationName);
+ destination = (Destination) context.lookup(destinationName);
}
catch (NamingException nex)
{
//ActiveMQ
- queueSession.createTopic(destinationName);
+ session.createTopic(destinationName);
}
}
- return queueSession.createSender(queue);
+ return session.createProducer(destination);
}
finally
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -24,20 +24,17 @@
import java.util.Properties;
+import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
import javax.naming.Context;
import javax.naming.NamingException;
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.NamingContextException;
import org.jboss.soa.esb.helpers.NamingContextPool;
@@ -56,58 +53,44 @@
{
super(p_oP);
- setTopics(p_oP.getChildren(CHILD_TOPIC));
+ setUpProducers(p_oP.getChildren(CHILD_TOPIC));
} // __________________________________
- protected void setTopics (ConfigTree[] configTrees) throws ConfigurationException, JMSException, ConnectionException
- {
- setUpProducers( configTrees, JMSEpr.TOPIC_TYPE );
- }
-
protected void send (final Message p_oMsg, MessageProducer msgProducer ) throws JMSException
{
- TopicPublisher oCurr = (TopicPublisher) msgProducer;
- oCurr.publish(p_oMsg);
+ msgProducer.send(p_oMsg);
}
- protected TopicSession getSession(final JmsConnectionPool pool) throws NamingException, JMSException, ConnectionException
- {
- return pool.getTopicSession();
- }
-
protected MessageProducer createProducer(
final JmsConnectionPool pool,
final String destinationName,
final Session session,
final Properties environment) throws NamingException, JMSException, ConnectionException
{
-
- TopicSession topicSession = (TopicSession) session;
-
try
{
Context context = NamingContextPool.getNamingContext(environment);
try
{
- Topic topic=null;
+ Destination destination=null;
try
{
- topic = (Topic) context.lookup(destinationName);
+ destination = (Destination) context.lookup(destinationName);
}
catch (NamingException ne)
{
context = NamingContextPool.replaceNamingContext(context, environment);
try
{
- topic = (Topic) context.lookup(destinationName);
+ destination = (Destination) context.lookup(destinationName);
}
catch (NamingException nex)
{
//ActiveMQ
- topicSession.createTopic(destinationName);
+ session.createTopic(destinationName);
}
}
- return topicSession.createPublisher(topic);
+ return session.createProducer(destination);
}
finally
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -136,6 +136,7 @@
// this is just to make sure they're unique - i.e. so as 1+
// "things" can listen to the same schedule...
+ // This is not thread safe!
name += ("-" + nameDelta++);
trigger.setName(name);
@@ -204,7 +205,7 @@
}
}
- public static class ESBScheduledJob implements Job {
+ public static class ESBScheduledJob implements StatefulJob {
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
final JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap() ;
ScheduledEventListener listener = (ScheduledEventListener) jobDataMap.get(ScheduledEventListener.class.getName());
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/services/registry/RegistryFactory.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/services/registry/RegistryFactory.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -44,14 +44,16 @@
}
- public static Registry getRegistry() throws RegistryException
- {
- // no synchronized block as there should be a service that initializes this
- if (singleton != null) return singleton;
- return createRegistry();
- }
+ public static Registry getRegistry() throws RegistryException {
+ // no synchronized block as there should be a service that initializes this
+ if (singleton != null) {
+ return singleton;
+ }
- public static Registry createRegistry()
+ return createRegistry();
+ }
+
+ public static Registry createRegistry()
throws RegistryException
{
Registry registry = null;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/util/FileUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/util/FileUtil.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/util/FileUtil.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -22,16 +22,20 @@
package org.jboss.soa.esb.util;
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+
import java.io.*;
+import java.util.UUID;
-import org.apache.log4j.Logger;
-
/**
* Common file utility functions.
* @author kevin
*/
public class FileUtil
{
+ public static final String classInstanceUUID = UUID.randomUUID().toString();
+
/**
* The logger for this class.
*/
@@ -45,37 +49,110 @@
*/
public static boolean renameTo(final File from, final File to)
{
+ AssertArgument.isNotNull(from, "from");
+ AssertArgument.isNotNull(to, "to");
+
+ if(!from.exists())
+ {
+ LOGGER.debug("Unable to rename file '" + from.getAbsolutePath() + "' to '" + to.getAbsolutePath() + "'. '" + from.getAbsolutePath() + "' doesn't exist.");
+ return false;
+ }
+
+ if(to.exists()) {
+ LOGGER.debug("Unable to rename file '" + from.getAbsolutePath() + "' to '" + to.getAbsolutePath() + "'. '" + to.getAbsolutePath() + "' already exist.");
+ return false;
+ }
+
if (!from.renameTo(to))
{
- final File tmpFile ;
- try
+ // The rename may have failed because it's really a file move that's being requested i.e.
+ // move the file to a different partition and the local VM doesn't supporting this
+ // in the rename. So we try moving the file...
+ return moveFile(from, to);
+ }
+
+ return true;
+ }
+
+ /**
+ * Moves a "from" file to a "to" file through copying of the file contents.
+ * <p/>
+ * This is not a file rename.
+ *
+ * @param from The source file.
+ * @param to The target file.
+ * @return True if the move was successful, otherwise false.
+ */
+ public static boolean moveFile(File from, File to)
+ {
+ AssertArgument.isNotNull(from, "from");
+ AssertArgument.isNotNull(to, "to");
+
+ if(!from.exists())
+ {
+ LOGGER.debug("Unable to move file '" + from.getAbsolutePath() + "' to '" + to.getAbsolutePath() + "'. '" + from.getAbsolutePath() + "' doesn't exist.");
+ return false;
+ }
+
+ if(to.exists()) {
+ LOGGER.debug("Unable to move file '" + from.getAbsolutePath() + "' to '" + to.getAbsolutePath() + "'. '" + to.getAbsolutePath() + "' already exist.");
+ return false;
+ }
+
+ // Before doing the copy, we perform a local rename of the from file. This is to make
+ // sure that the file is not picked up by another processor while the copy is taking place.
+ // We prefix and postfix the UUID on the rename file, because we don't know the filter pattern being
+ // used by the processors on picking up these files. This still doesn't guarantee that the rename file
+ // is not picked up too, but it is "stronger"!
+
+ File fromFileDir = from.getParentFile();
+ File fromLocalRename = new File(fromFileDir, classInstanceUUID + "." + from.getName() + "." + classInstanceUUID);
+
+ if(!from.renameTo(fromLocalRename))
+ {
+ LOGGER.debug("Unable to perform local rename of file '" + from.getAbsolutePath() + "' to '" + fromLocalRename.getAbsolutePath() + "'. Unable to move file.");
+ return true;
+ }
+
+ if(!fromLocalRename.exists())
+ {
+ LOGGER.debug("Failed to perform local rename of file '" + from.getAbsolutePath() + "' to '" + fromLocalRename.getAbsolutePath() + "'. Unable to move file.");
+ return true;
+ }
+
+ final File tmpFile ;
+ try
+ {
+ tmpFile = File.createTempFile("copy", ".tmp", to.getParentFile()) ;
+ }
+ catch (final IOException ioe)
+ {
+ LOGGER.debug("Could not create temporary file for writing", ioe) ;
+ return true;
+ }
+
+ try
+ {
+ copyFile(fromLocalRename, tmpFile) ;
+ if (!tmpFile.renameTo(to))
{
- tmpFile = File.createTempFile("copy", ".tmp", to.getParentFile()) ;
- }
- catch (final IOException ioe)
- {
- LOGGER.debug("Could not create temporary file for writing", ioe) ;
+ LOGGER.debug("Could not rename temporary file " + tmpFile.getAbsolutePath()) ;
return false ;
}
-
- try
- {
- copyFile(from, tmpFile) ;
- if (!tmpFile.renameTo(to))
- {
- LOGGER.debug("Could not rename temporary file " + tmpFile.getAbsolutePath()) ;
- return false ;
- }
- from.delete();
+ if(!fromLocalRename.delete()) {
+ LOGGER.debug("Failed to delete local rename file '" + fromLocalRename.getAbsolutePath() + "'.");
+ // This is not desireable, but shouldn't be fatal because the from file no longer exists
+ // and the to file has been successfully created.
}
- finally
- {
- tmpFile.delete() ;
- }
}
+ finally
+ {
+ tmpFile.delete() ;
+ }
+
return true;
}
-
+
/**
* Attempt to copy the file.
* @param from The original file
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -34,7 +34,6 @@
import org.jboss.soa.esb.addressing.eprs.JMSEpr;
import org.jboss.soa.esb.couriers.CourierException;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -54,7 +53,7 @@
public void getJmsSession() throws CourierException, JMSException
{
Session jmsSession = jmsCourier.getJmsSession();
- assertTrue( jmsSession.getTransacted() );
+ assertFalse( jmsSession.getTransacted() );
jmsCourier.cleanup();
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -48,10 +48,9 @@
public void createPoolKey_null_environment()
{
final Properties env = null;
- Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE );
+ Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory);
assertEquals( connectionFactory, poolKey.get( CONNECTION_FACTORY_TAG ) );
- assertEquals( QUEUE_TYPE, poolKey.get( DESTINATION_TYPE_TAG ) );
}
@Test
@@ -62,7 +61,7 @@
final Properties env = new Properties();
env.put( Context.SECURITY_PRINCIPAL, username );
env.put( Context.SECURITY_CREDENTIALS, password );
- Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE);
+ Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory);
assertEquals( username, poolKey.get( Context.SECURITY_PRINCIPAL ) );
assertEquals( password, poolKey.get( Context.SECURITY_CREDENTIALS ) );
}
@@ -73,32 +72,12 @@
final String username = "daniel";
final String password = "passwd";
final Properties env = null;
- Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
- username, password, false);
+ Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory,
+ username, password);
assertEquals( username, poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG ) );
assertEquals( password, poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG ) );
}
- @Test
- public void createPoolKey_with_transacted_properties()
- {
- final boolean transacted = true;
- final Properties env = null;
- Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
- null, null, transacted);
- assertEquals( transacted, Boolean.valueOf ( poolKey.get( JMSEpr.TRANSACTED_TAG ) ) );
- }
-
- @Test
- public void createPoolKey_with_non_transacted_properties()
- {
- final boolean transacted = false;
- final Properties env = null;
- Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
- null, null, transacted);
- assertEquals( transacted, Boolean.valueOf ( poolKey.get( JMSEpr.TRANSACTED_TAG ) ) );
- }
-
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter( JmsConnectionPoolContainerUnitTest.class );
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -80,8 +80,9 @@
@Test
public void publishOrganization()
{
+ JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
try {
- Organization org = JAXRRegistryImpl.createJBossESBOrganization();
+ Organization org = JAXRRegistryImpl.createJBossESBOrganization(jaxrConnectionFactory);
logger.debug("Succesfully created organization: " + org.getName().getValue());
assertEquals("Red Hat/JBossESB", org.getName().getValue());
} catch (JAXRException je) {
@@ -92,8 +93,9 @@
@Test
public void findOrganization()
{
+ JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
try {
- Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB");
+ Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB", jaxrConnectionFactory);
logger.debug("Succesfully created organization: " + org.getName().getValue());
assertEquals("Red Hat/JBossESB", org.getName().getValue());
} catch (JAXRException je) {
@@ -101,7 +103,7 @@
assertTrue(false);
}
try {
- Organization org = JAXRRegistryImpl.findOrganization("Not Existing Org");
+ Organization org = JAXRRegistryImpl.findOrganization("Not Existing Org", jaxrConnectionFactory);
logger.debug("Could not find non-existing organization.");
assertEquals(null, org);
} catch (JAXRException je) {
@@ -151,8 +153,9 @@
@Test
public void findServicesForAnOrganization()
{
+ JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
try {
- Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB");
+ Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB", jaxrConnectionFactory);
//Listing out the services and their Bindings
logger.debug("-------------------------------------------------");
logger.debug("Organization name: " + org.getName().getValue());
@@ -187,7 +190,8 @@
*/
public void findServicesByClassification()
{
- Connection connection = JAXRRegistryImpl.getConnection();
+ JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
+ Connection connection = jaxrConnectionFactory.getConnection();
try {
// Get registry service and business query manager
RegistryService rs = connection.getRegistryService();
@@ -210,7 +214,9 @@
} catch (JAXRException je) {
logger.error(je);
}
- finally{}
+ finally{
+ jaxrConnectionFactory.closeConnection(connection);
+ }
}
/**
* Setup the database.
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -24,10 +24,8 @@
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.actions.ActionLifecycleException;
import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.actions.ActionUtils;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.body.content.BytesBody;
import org.jboss.soa.esb.message.format.MessageFactory;
/**
@@ -45,10 +43,35 @@
GroovyActionProcessor processor = new GroovyActionProcessor(config);
Message message = MessageFactory.getInstance().getMessage();
- assertProcessingOK(processor, message, messageContents);
+ assertProcessingOK(processor, message, messageContents, null);
}
- public void test_script_inlined() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
+ public void test_script_caching_on() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
+ ConfigTree config = getConfig("test.groovy");
+ GroovyActionProcessor processor = new GroovyActionProcessor(config);
+ Message message = MessageFactory.getInstance().getMessage();
+
+ processor.initialise();
+ // Test script caching...
+ assertTrue("script should not be null", processor.getScript(message) != null);
+ assertTrue("script should be cached", processor.getScript(message) == processor.getScript(message));
+ }
+
+ public void test_script_caching_off() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
+ ConfigTree config = getConfig("test.groovy");
+ GroovyActionProcessor processor;
+ Message message = MessageFactory.getInstance().getMessage();
+
+ config.setAttribute("cacheScript", "false");
+ processor = new GroovyActionProcessor(config);
+
+ processor.initialise();
+ // Test script caching...
+ assertTrue("script should not be null", processor.getScript(message) != null);
+ assertTrue("script should not be cached", processor.getScript(message) != processor.getScript(message));
+ }
+
+ public void test_script_inlined_fail() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
ConfigTree config = new ConfigTree("<config/>");
String messageContents = "Hello World - Inlined!";
@@ -61,17 +84,41 @@
message.getBody().add("import org.jboss.soa.esb.message.*\n" +
"message.getBody().add(config.getAttribute(\"messageContents\").getBytes());");
- assertProcessingOK(processor, message, messageContents);
+ assertProcessingOK(processor, message, messageContents, "'script' not configured on the action and message based scripting is not enabled ('supportMessageBasedScripting=false').");
}
- private void assertProcessingOK(GroovyActionProcessor processor, Message message, String messageContents) throws ActionLifecycleException, ActionProcessingException {
- processor.initialise();
- processor.process(message);
- byte[] bodyContents = (byte[]) message.getBody().get();
- assertNotNull("Expected body contents to be set.", bodyContents);
- assertEquals(messageContents, new String(bodyContents));
+ public void test_script_inlined_success() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
+ ConfigTree config = new ConfigTree("<config/>");
+ String messageContents = "Hello World - Inlined!";
+
+ config.setAttribute("messageContents", messageContents);
+ config.setAttribute("supportMessageBasedScripting", "true");
+
+ GroovyActionProcessor processor = new GroovyActionProcessor(config);
+ Message message = MessageFactory.getInstance().getMessage();
+
+ // Set the script as the message task object...
+ message.getBody().add("import org.jboss.soa.esb.message.*\n" +
+ "message.getBody().add(config.getAttribute(\"messageContents\").getBytes());");
+
+ assertProcessingOK(processor, message, messageContents, null);
}
+ private void assertProcessingOK(GroovyActionProcessor processor, Message message, String messageContents, String errorMessage) throws ActionLifecycleException, ActionProcessingException {
+ try {
+ processor.initialise();
+ processor.process(message);
+ byte[] bodyContents = (byte[]) message.getBody().get();
+ assertNotNull("Expected body contents to be set.", bodyContents);
+ assertEquals(messageContents, new String(bodyContents));
+ if(errorMessage != null) {
+ fail("Expected error message: \"" + errorMessage + "\".");
+ }
+ } catch(ActionLifecycleException e) {
+ assertEquals(errorMessage, e.getMessage());
+ }
+ }
+
private ConfigTree getConfig(String script) {
ConfigTree config = new ConfigTree("<config/>");
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -24,10 +24,13 @@
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.services.registry.MockRegistry;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.common.tests.BaseTest;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.ListenerTagNames;
@@ -39,39 +42,45 @@
public class FileGatewayListenerUnitTest extends BaseTest
{
private Logger log = Logger.getLogger( FileGatewayListenerUnitTest.class );
-
- public FileGatewayListenerUnitTest ()
+
+ private File tmpDir = new File(System.getProperty("user.dir")) ;
+ private File dir1 = new File(tmpDir, FileGatewayListenerUnitTest.class.getSimpleName());
+ private File dir2 = new File(tmpDir, FileGatewayListenerUnitTest.class.getSimpleName());
+ private File file1 = new File(dir1, "file1");
+ private final File file2 = new File(dir2, "file2");
+
+ public FileGatewayListenerUnitTest ()
{
- }
+ }
public void setUp()
{
MockRegistry.install();
- }
-
- public void tearDown()
+ cleanupTemps();
+ dir1.mkdirs();
+ dir2.mkdirs();
+ }
+
+ public void tearDown()
{
+ cleanupTemps();
MockRegistry.uninstall();
}
- public void testGateway () throws Exception
+ private void cleanupTemps() {
+ file1.delete();
+ file2.delete();
+ dir1.delete();
+ dir2.delete();
+ }
+
+ public void testGateway () throws Exception
{
- ConfigTree tree = new ConfigTree("test");
- final File tmpDir = new File(System.getProperty("user.dir")) ;
- final String tmpDirForm = tmpDir.toURL().toExternalForm() ;
+ ConfigTree tree = createTestListenerConfig();
+ FileGatewayListener gateway = new FileGatewayListener(tree);
- tree.setAttribute("inputDir", tmpDirForm);
- tree.setAttribute("target-service-category", "Example");
- tree.setAttribute("target-service-name", "Test");
- tree.setAttribute("gatewayClass", "org.jboss.soa.esb.listeners.gateway.FileGatewayListener");
- tree.setAttribute("inputSuffix", "dummy");
- tree.setAttribute("workSuffix", "work");
- tree.setAttribute("postDelete", "true");
- tree.setAttribute(ListenerTagNames.POLL_LATENCY_SECS_TAG, "abcd");
+ boolean exception = false;
- FileGatewayListener gateway = new FileGatewayListener(tree);
- boolean exception = false;
-
try
{
gateway.seeIfOkToWorkOnDir(new File("foobarDir"));
@@ -199,5 +208,72 @@
anTestFile.delete();
}
}
-
+
+ public void test_rename_ok() throws GatewayException, IOException, RegistryException, ConfigurationException {
+ ConfigTree tree = createTestListenerConfig();
+
+ FileGatewayListener gateway = new FileGatewayListener(tree) {
+ protected File getWorkFileName(File fileIn, String suffix) {
+ return file2;
+ }
+ };
+
+ file1.createNewFile();
+ assertTrue(file1.exists());
+ assertTrue(!file2.exists());
+
+ File workingFile = gateway.setFileWorking(file1);
+ assertNotNull(workingFile);
+ assertTrue(!file1.exists());
+ assertTrue(file2.exists());
+ assertTrue(file2.equals(workingFile));
+ }
+
+ public void test_rename_no_from_file() throws GatewayException, IOException, RegistryException, ConfigurationException {
+ ConfigTree tree = createTestListenerConfig();
+
+ FileGatewayListener gateway = new FileGatewayListener(tree) {
+ protected File getWorkFileName(File fileIn, String suffix) {
+ return file2;
+ }
+ };
+
+ assertTrue(!file1.exists());
+ assertTrue(!file2.exists());
+
+ assertNull(gateway.setFileWorking(file1));
+ }
+
+ public void test_rename_to_file_exists() throws GatewayException, IOException, RegistryException, ConfigurationException {
+ ConfigTree tree = createTestListenerConfig();
+
+ FileGatewayListener gateway = new FileGatewayListener(tree) {
+ protected File getWorkFileName(File fileIn, String suffix) {
+ return file2;
+ }
+ };
+
+ file2.createNewFile();
+ assertTrue(!file1.exists());
+ assertTrue(file2.exists());
+
+ assertNull(gateway.setFileWorking(file1));
+ }
+
+ private ConfigTree createTestListenerConfig() throws MalformedURLException, ConfigurationException, RegistryException, GatewayException {
+ ConfigTree tree = new ConfigTree("test");
+ final File tmpDir = new File(System.getProperty("user.dir")) ;
+ final String tmpDirForm = tmpDir.toURL().toExternalForm() ;
+
+ tree.setAttribute("inputDir", tmpDirForm);
+ tree.setAttribute("target-service-category", "Example");
+ tree.setAttribute("target-service-name", "Test");
+ tree.setAttribute("gatewayClass", "org.jboss.soa.esb.listeners.gateway.FileGatewayListener");
+ tree.setAttribute("inputSuffix", "dummy");
+ tree.setAttribute("workSuffix", "work");
+ tree.setAttribute("postDelete", "true");
+ tree.setAttribute(ListenerTagNames.POLL_LATENCY_SECS_TAG, "abcd");
+
+ return tree;
+ }
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyJMSUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyJMSUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyJMSUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -131,14 +131,6 @@
{
return null;
}
-
- @Override
- protected Session getSession( JmsConnectionPool pool )
- throws NamingException, JMSException, ConnectionException
- {
- return null;
- }
-
}
private static class MockJMSSession implements Session
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -36,6 +36,7 @@
import javax.jms.Message;
import javax.jms.ObjectMessage;
import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -45,6 +46,7 @@
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.NamingContextException;
import org.jboss.soa.esb.helpers.NamingContextPool;
@@ -120,6 +122,7 @@
public void test_NonStringObj() throws Exception {
org.jboss.soa.esb.message.Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
message.getBody().add(((new Integer(123).toString().getBytes())));
+ message.getProperties().setProperty(Environment.JMS_NATIVE_MESSAGE_TYPE, NotifyJMS.NativeMessage.object);
notifyQueues.sendNotification(message);
checkQueueObjectMessage(mockQueue1, 0, new Integer(123).toString().getBytes());
@@ -130,6 +133,7 @@
public void sendNotification_without_body()
{
org.jboss.soa.esb.message.Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+ message.getProperties().setProperty(Environment.JMS_NATIVE_MESSAGE_TYPE, NotifyJMS.NativeMessage.object);
try
{
notifyQueues.sendNotification(message);
@@ -265,10 +269,44 @@
}
else
{
- return method.invoke(queueConnection, args) ;
+ final Object response = method.invoke(queueConnection, args) ;
+ if (response instanceof QueueSession)
+ {
+ final QueueSession queueSession = (QueueSession)response ;
+ return (QueueSession)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {QueueSession.class},
+ new MockQueueSessionInvocationHandler(queueSession)) ;
+ }
+ else
+ {
+ return response ;
+ }
}
}
}
+
+ private static final class MockQueueSessionInvocationHandler implements InvocationHandler
+ {
+ private final QueueSession queueSession ;
+
+ MockQueueSessionInvocationHandler(final QueueSession queueSession)
+ {
+ this.queueSession = queueSession ;
+ }
+
+ public Object invoke(final Object proxy, final Method method, final Object[] args)
+ throws Throwable
+ {
+ final String methodName = method.getName() ;
+ if ("recover".equals(methodName))
+ {
+ return null ;
+ }
+ else
+ {
+ return method.invoke(queueSession, args) ;
+ }
+ }
+ }
public static junit.framework.Test suite()
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -33,6 +33,7 @@
import javax.jms.ObjectMessage;
import javax.jms.TextMessage;
import javax.jms.TopicConnection;
+import javax.jms.TopicSession;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -40,6 +41,7 @@
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.NamingContextException;
import org.jboss.soa.esb.helpers.NamingContextPool;
@@ -96,6 +98,7 @@
public void test_NonStringObj() throws Exception {
org.jboss.soa.esb.message.Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+ message.getProperties().setProperty(Environment.JMS_NATIVE_MESSAGE_TYPE, NotifyJMS.NativeMessage.object);
message.getBody().add((new Integer(123).toString().getBytes()));
notifyTopics.sendNotification(message);
@@ -217,8 +220,42 @@
}
else
{
- return method.invoke(topicConnection, args) ;
+ final Object response = method.invoke(topicConnection, args) ;
+ if (response instanceof TopicSession)
+ {
+ final TopicSession topicSession = (TopicSession)response ;
+ return (TopicSession)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {TopicSession.class},
+ new MockTopicSessionInvocationHandler(topicSession)) ;
}
+ else
+ {
+ return response ;
+ }
}
}
+ }
+
+ private static final class MockTopicSessionInvocationHandler implements InvocationHandler
+ {
+ private final TopicSession topicSession ;
+
+ MockTopicSessionInvocationHandler(final TopicSession topicSession)
+ {
+ this.topicSession = topicSession ;
+ }
+
+ public Object invoke(final Object proxy, final Method method, final Object[] args)
+ throws Throwable
+ {
+ final String methodName = method.getName() ;
+ if ("recover".equals(methodName))
+ {
+ return null ;
+ }
+ else
+ {
+ return method.invoke(topicSession, args) ;
+ }
+ }
+ }
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -32,7 +32,7 @@
import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsSession;
import org.jboss.soa.esb.common.Environment;
import org.junit.Before;
import org.junit.Test;
@@ -57,14 +57,14 @@
{
JmsConnectionPool jmsConnectionPool = null;
- jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment,"ConnectionFactory", JMSEpr.QUEUE_TYPE);
+ jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment,"ConnectionFactory");
assertEquals(0, jmsConnectionPool.getSessionsInPool());
//Open 3 concurrent sessions
- Session session1 = jmsConnectionPool.getQueueSession();
+ JmsSession session1 = jmsConnectionPool.getSession();
assertEquals(1, jmsConnectionPool.getSessionsInPool());
- Session session2 = jmsConnectionPool.getQueueSession();
+ JmsSession session2 = jmsConnectionPool.getSession();
assertEquals(2, jmsConnectionPool.getSessionsInPool());
- Session session3 = jmsConnectionPool.getQueueSession();
+ JmsSession session3 = jmsConnectionPool.getSession();
assertEquals(3, jmsConnectionPool.getSessionsInPool());
//Close them
jmsConnectionPool.closeSession(session1);
@@ -76,8 +76,8 @@
assertEquals(0, jmsConnectionPool.getSessionsInPool());
assertEquals(0, JmsConnectionPoolContainer.getNumberOfPools());
- //Use it again and add one session
- jmsConnectionPool.getQueueSession();
+ jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment,"ConnectionFactory");
+ jmsConnectionPool.getSession();
assertEquals(1, jmsConnectionPool.getSessionsInPool());
assertEquals(1, JmsConnectionPoolContainer.getNumberOfPools());
//I should be able to remove the entire pool and have it do closing
@@ -88,61 +88,55 @@
@Test
public void testCreateSecondPool() throws Exception
{
- JmsConnectionPool jmsConnectionPool1 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
- jmsConnectionPool1 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
+ JmsConnectionPool jmsConnectionPool1 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory");
+ jmsConnectionPool1 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory");
//This should be the same pool
assertEquals(1, JmsConnectionPoolContainer.getNumberOfPools());
- JmsConnectionPool jmsConnectionPool2 = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.TOPIC_TYPE);
+ JmsConnectionPool jmsConnectionPool2 = JmsConnectionPoolContainer.getPool(null, "ConnectionFactory");
//This should be a different pool, so now we should have 2.
assertEquals(2, JmsConnectionPoolContainer.getNumberOfPools());
- JmsConnectionPool jmsConnectionPool3 = JmsConnectionPoolContainer.getPool(null, "ConnectionFactory", JMSEpr.TOPIC_TYPE);
- //This should be a different pool, so now we should have 3.
- assertEquals(3, JmsConnectionPoolContainer.getNumberOfPools());
-
//Now lets cleanup after ourselves
- jmsConnectionPool3.removeSessionPool();
- assertEquals(2, JmsConnectionPoolContainer.getNumberOfPools());
+ jmsConnectionPool2.removeSessionPool();
+ assertEquals(1, JmsConnectionPoolContainer.getNumberOfPools());
jmsConnectionPool1.removeSessionPool();
- jmsConnectionPool2.removeSessionPool();
- jmsConnectionPool3.removeSessionPool();
assertEquals(0, JmsConnectionPoolContainer.getNumberOfPools());
}
@Test
public void testPoolAndSessionsWithAcknowledgeMode() throws Exception
{
- JmsConnectionPool jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment,"ConnectionFactory", JMSEpr.QUEUE_TYPE);
+ JmsConnectionPool jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment,"ConnectionFactory");
assertEquals(0, jmsConnectionPool.getSessionsInPool());
- Session autoAckSession1 = jmsConnectionPool.getQueueSession(Session.AUTO_ACKNOWLEDGE);
+ JmsSession autoAckSession1 = jmsConnectionPool.getSession(Session.AUTO_ACKNOWLEDGE);
assertEquals(Session.AUTO_ACKNOWLEDGE, autoAckSession1.getAcknowledgeMode());
assertEquals(1, jmsConnectionPool.getSessionsInPool());
assertEquals(1, jmsConnectionPool.getSessionsInPool(Session.AUTO_ACKNOWLEDGE));
- Session autoAckSession2 = jmsConnectionPool.getQueueSession(Session.AUTO_ACKNOWLEDGE);
+ JmsSession autoAckSession2 = jmsConnectionPool.getSession(Session.AUTO_ACKNOWLEDGE);
assertEquals(Session.AUTO_ACKNOWLEDGE, autoAckSession2.getAcknowledgeMode());
assertEquals(2, jmsConnectionPool.getSessionsInPool());
assertEquals(2, jmsConnectionPool.getSessionsInPool(Session.AUTO_ACKNOWLEDGE));
- Session clientAckSession1 = jmsConnectionPool.getQueueSession(Session.CLIENT_ACKNOWLEDGE);
+ JmsSession clientAckSession1 = jmsConnectionPool.getSession(Session.CLIENT_ACKNOWLEDGE);
assertEquals(Session.CLIENT_ACKNOWLEDGE, clientAckSession1.getAcknowledgeMode());
assertEquals(3, jmsConnectionPool.getSessionsInPool());
assertEquals(1, jmsConnectionPool.getSessionsInPool(Session.CLIENT_ACKNOWLEDGE));
- Session clientAckSession2 = jmsConnectionPool.getQueueSession(Session.CLIENT_ACKNOWLEDGE);
+ JmsSession clientAckSession2 = jmsConnectionPool.getSession(Session.CLIENT_ACKNOWLEDGE);
assertEquals(Session.CLIENT_ACKNOWLEDGE, clientAckSession2.getAcknowledgeMode());
assertEquals(4, jmsConnectionPool.getSessionsInPool());
assertEquals(2, jmsConnectionPool.getSessionsInPool(Session.CLIENT_ACKNOWLEDGE));
- Session dupsOkAcSession1 = jmsConnectionPool.getQueueSession(Session.DUPS_OK_ACKNOWLEDGE);
+ JmsSession dupsOkAcSession1 = jmsConnectionPool.getSession(Session.DUPS_OK_ACKNOWLEDGE);
assertEquals(Session.DUPS_OK_ACKNOWLEDGE, dupsOkAcSession1.getAcknowledgeMode());
assertEquals(5, jmsConnectionPool.getSessionsInPool());
assertEquals(1, jmsConnectionPool.getSessionsInPool(Session.DUPS_OK_ACKNOWLEDGE));
- Session dupsOkAcSession2 = jmsConnectionPool.getQueueSession(Session.DUPS_OK_ACKNOWLEDGE);
+ JmsSession dupsOkAcSession2 = jmsConnectionPool.getSession(Session.DUPS_OK_ACKNOWLEDGE);
assertEquals(Session.DUPS_OK_ACKNOWLEDGE, dupsOkAcSession2.getAcknowledgeMode());
assertEquals(6, jmsConnectionPool.getSessionsInPool());
assertEquals(2, jmsConnectionPool.getSessionsInPool(Session.DUPS_OK_ACKNOWLEDGE));
@@ -182,7 +176,8 @@
assertEquals(0, jmsConnectionPool.getSessionsInPool());
assertEquals(0, JmsConnectionPoolContainer.getNumberOfPools());
- jmsConnectionPool.getQueueSession();
+ jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment,"ConnectionFactory");
+ jmsConnectionPool.getSession();
assertEquals(1, jmsConnectionPool.getSessionsInPool());
assertEquals(1, JmsConnectionPoolContainer.getNumberOfPools());
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/MockScheduledEventListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/MockScheduledEventListener.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/MockScheduledEventListener.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -29,11 +29,15 @@
public static ConfigTree config;
public static boolean onSchedule;
public static boolean uninitialised;
+ public static int execCount;
+ public static long sleep;
public static void reset() {
config = null;
onSchedule = false;
uninitialised = false;
+ execCount = 0;
+ sleep = 0;
}
public void initialize(ConfigTree config) {
@@ -42,6 +46,14 @@
public void onSchedule() throws SchedulingException {
onSchedule = true;
+ execCount++;
+ if(sleep > 0) {
+ try {
+ Thread.sleep(sleep);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
}
public void uninitialize() {
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -85,6 +85,14 @@
assertTrue(MockScheduledEventMessageComposer.composedMessages.size() > 1);
}
+ public void test_simple_schedule_03_1() throws UnsupportedEncodingException, ParamRepositoryException, ConfigurationException, ManagedLifecycleException, SAXException, InterruptedException {
+ MockScheduledEventListener.sleep = 6000;
+ runTestConfig("config-03.1.xml", 7000);
+
+ // Just check that the schedule wasn't run concrurrently...
+ assertTrue(MockScheduledEventListener.execCount < 3);
+ }
+
public void test_simple_schedule_04() throws UnsupportedEncodingException, ParamRepositoryException, ConfigurationException, ManagedLifecycleException, SAXException, InterruptedException {
runTestConfig("config-04.xml", 5000);
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/config-03.1.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/tests/src/org/jboss/soa/esb/schedule/config-03.1.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/config-03.1.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/schedule/config-03.1.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,17 @@
+<?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">
+
+ <services>
+ <service category="ServiceCat" name="ServiceName" description="Test Service">
+
+ <listeners>
+ <scheduled-listener name="simple-schedule-listener" schedule-frequency="1" event-processor="org.jboss.soa.esb.schedule.MockScheduledEventListener" />
+ </listeners>
+
+ <actions>
+ <action name="action" class="org.jboss.soa.esb.mock.MockAction" />
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -67,6 +67,7 @@
reader.close();
return sb.toString();
}
+
/**
* Write a String into a file.
* @param file - File to which we write the String
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/util/FileUtilUnitTest.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/rosetta/tests/src/org/jboss/soa/esb/util/FileUtilUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/util/FileUtilUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/util/FileUtilUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,82 @@
+/*
+ * 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.util;
+
+import junit.framework.TestCase;
+
+import java.io.*;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class FileUtilUnitTest extends TestCase {
+
+ private File tmpDir = new File(System.getProperty("user.dir")) ;
+ private File dir1 = new File(tmpDir, FileUtilUnitTest.class.getSimpleName());
+ private File dir2 = new File(tmpDir, FileUtilUnitTest.class.getSimpleName());
+ private File file1 = new File(dir1, "file1");
+ private final File file2 = new File(dir2, "file2");
+
+ protected void setUp() throws Exception {
+ cleanupTemps();
+ dir1.mkdirs();
+ dir2.mkdirs();
+ }
+
+ protected void tearDown() throws Exception {
+ cleanupTemps();
+ }
+
+ public void test_moveTo_good() throws IOException {
+ writeToFile(file1, "Hi there!");
+
+ assertTrue(file1.exists());
+ assertTrue(!file2.exists());
+
+ assertTrue(FileUtil.moveFile(file1, file2));
+
+ assertTrue(!file1.exists());
+ assertTrue(file2.exists());
+
+ assertEquals("Hi there!", FileUtil.readTextFile(file2));
+ }
+
+ public void test_moveTo_from_doesnt_exists() throws IOException {
+ assertTrue(!FileUtil.moveFile(file1, file2));
+ }
+
+ public void test_moveTo_to_exists() throws IOException {
+ file2.createNewFile();
+ assertTrue(!FileUtil.moveFile(file1, file2));
+ }
+
+ private void cleanupTemps() {
+ file1.delete();
+ file2.delete();
+ dir1.delete();
+ dir2.delete();
+ }
+
+ public static void writeToFile(File file, String str) throws IOException {
+ Writer writer = new FileWriter(file);
+ writer.write(str);
+ writer.close();
+ }
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -39,7 +39,7 @@
<echo message="This target is not implemented for this quickstart. Please run 'ant deployProcess' and 'ant startProcess'"/>
</target>
- <target name="deployProcess" description="deploys the process definition" depends="jbossesb-dependencies">
+ <target name="deployProcess" description="deploys the process definition" depends="dependencies">
<echo>Deploy the process definition</echo>
<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -26,7 +26,6 @@
<action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>BPM_Orchestration_Service2</esbCategoryName>
<esbServiceName>Service2</esbServiceName>
- <millisToWaitForResponse>5000</millisToWaitForResponse>
<bpmToEsbVars>
<mapping bpm="theBody" esb="BODY_CONTENT" />
</bpmToEsbVars>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -31,7 +31,7 @@
<echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
</target>
- <target name="deployProcess" description="deploys the process definition" depends="jbossesb-dependencies">
+ <target name="deployProcess" description="deploys the process definition" depends="dependencies">
<echo>Deploy the process definition</echo>
<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -35,7 +35,7 @@
<echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
</target>
- <target name="deployProcess" description="deploys the process definition" depends="jbossesb-dependencies">
+ <target name="deployProcess" description="deploys the process definition" depends="dependencies">
<echo>Deploy the process definition</echo>
<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -7,7 +7,7 @@
<hibernate-bus busid="helloHibernateChannel" >
<hibernate-message-filter
classname="org.jboss.soa.esb.samples.quickstart.hibernateaction.Order"
- event="onLoad,onDelete"/>
+ event="onSave,onDelete"/>
</hibernate-bus>
</hibernate-provider>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/readme.txt 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/readme.txt 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,7 +1,7 @@
Overview:
=========
This is a demonstration of a Hibernate listener. This test is configured
- to use a mysql database running on localhost (see jbossesb.xml). This
+ to use an hsqldb database (see jbossesb.xml). This
quickstart builds an ear containing both an .esb and a .war. The .war
has a series of .jsps which demonstrate insert/delete/load/update.
@@ -25,30 +25,29 @@
Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
and a more detailed descripton of the different ways to run the quickstarts.
- Make sure that you have MySQL running before starting this quickstart. Once
- it is running, execute 'ant createdb' to create the database.
-
Installation instructions can be found in the install/readme.txt.
-Setting up MySQL
+Setting Up
=======================
-By default, this quickstart uses a standard MySQL database with root as the
-user and no password set. You can easily change these settings by changing
-the hibernate.cfg.xml file. Note that you may also have to make minor
-modifications to the createdb target of build.xml.
+By default, this quickstart uses a standard hsqldb DB with "sa" as the
+user and "sa" as the password. You can easily change these settings by
+changing the hibernate.cfg.xml file and the appropriate build.xml targets.
This quickstart uses the same database settings that are required in the
helloworld_sql_action quickstart.
To Run .esb mode:
=======================
- 1. In a command terminal window in the quickstart folder type 'ant deploy'.
- 2. Start your appserver. This quickstart deploys a jar into a common
+ 1. Make sure your appserver is stopped. If it is running, please
+ shutdown before installing this quickstart.
+ 2. In a command terminal window in the quickstart folder type 'ant deploy'.
+ 3. Start your appserver. This quickstart deploys a jar into a common
lib directory, so it is important that the app server be started
after deployment. You may see JSP compilation errors if you try
to deploy the quickstart for the first time while the appserver is
still running.
- 3. Assuming that your appserver is running tomcat on port 8080, Browse to
+ 4. Assuming that your appserver is running tomcat on port 8080, Browse to
http://localhost:8080/hibernateaction/index.jsp
- 4. Watch the events in the JBoss appserver console.
- 5. To undeploy the application, type 'ant undeploy'
+ 5. Watch the events in the JBoss appserver console - by default this
+ quickstart logs the onSave and onDelete actions.
+ 6. To undeploy the application, type 'ant undeploy'
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/resources/application.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/resources/application.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_hibernate_action/resources/application.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -21,8 +21,4 @@
<java>Quickstart_helloworld_hibernate_action.esb</java>
</module>
- <module>
- <java>mysql-connector-java-3.1.12-bin.jar</java>
- </module>
-
</application>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -13,7 +13,7 @@
status-column="STATUS_COL"
order-by="DATA_COLUMN"
where-condition="DATA_COLUMN like 'data%'"
- message-column="message"
+ message-column="DATA_COLUMN"
message-id-column="UNIQUE_ID"
insert-timestamp-column="TIMESTAMP_COL"
/>
@@ -29,7 +29,7 @@
message-id-column="MESSAGE_ID"
status-column="STATUS_COL"
insert-timestamp-column="TIMESTAMP_COL"
- message-column="DATA_COL"
+ message-column="DATA_COLUMN"
/>
</sql-bus>
</sql-provider>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/hsqldb/create.sql
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/hsqldb/create.sql 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/hsqldb/create.sql 2008-03-21 12:50:50 UTC (rev 19174)
@@ -2,5 +2,14 @@
(
unique_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
data_column VARCHAR(255) NOT NULL,
-status_col VARCHAR(255) NOT NULL
+status_col VARCHAR(255) NOT NULL,
+timestamp_col VARCHAR(255)
);
+
+create table TX_ESB_MESSAGES
+(
+message_id VARCHAR(255) NOT NULL,
+data_column VARCHAR(255) NOT NULL,
+status_col VARCHAR(255) NOT NULL,
+timestamp_col VARCHAR(255)
+);
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldtxsqlaction/MyAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldtxsqlaction/MyAction.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldtxsqlaction/MyAction.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -48,13 +48,15 @@
for (Map.Entry<String,Object> curr : rowData.entrySet()) {
results.append("column "+curr.getKey()+" = <" + curr.getValue()+">");
- if (curr.getValue().equals("data 22"))
+ if ("data 22".equals(curr.getValue()))
{
System.out.println("DATA READ: "+curr.getValue());
- if (checkIter++ < 2)
+ if (checkIter++ < 2) {
problem = true;
- }
+ break;
+ }
+ }
}
System.out.println(results.toString());
logFooter();
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt 2008-03-21 12:50:50 UTC (rev 19174)
@@ -27,7 +27,7 @@
To Run '.esb' archive mode:
===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant deploy-jms-dests' and then 'ant deploy'.
+ 1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
2. Open another command terminal window in this folder ("Window2"), type
'ant runtest' or 'ant runtest-secure'.
3. Switch back to Application Server console to see the output from the ESB
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,113 +0,0 @@
-<project name="Quickstart_twoservers" default="run" basedir=".">
-
- <description>
- ${ant.project.name}
- ${line.separator}
- </description>
-
- <!-- Import the base Ant build script... -->
- <import file="../conf/base-build.xml"/>
-
- <property file="server.properties"/>
-
- <target name="setup-servers">
- <input message="The following task is going to delete the directories ${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first} and ${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second} and replace them. Continue (Y/N)?" validargs="Y,N" addproperty="input.response"/>
- <condition property="exit.setup" value="blah">
- <matches string="${input.response}" pattern="^Y$"/>
- </condition>
-
- <fail unless="exit.setup"/>
-
- <delete dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}"/>
- <delete dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}"/>
-
- <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}">
- <fileset dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.orig.config}" includes="**"/>
- </copy>
- <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}">
- <fileset dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.orig.config}" includes="**"/>
- </copy>
-
- <copy overwrite="true" file="resources/jboss-service.xml" todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}/conf">
- <filterset>
- <filter token="server.name" value="ports-01"/>
- </filterset>
- </copy>
-
- <copy overwrite="true" file="resources/jboss-service.xml" todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/conf">
- <filterset>
- <filter token="server.name" value="ports-02"/>
- </filterset>
- </copy>
-
- </target>
-
- <!-- This Quickstart requires two different .esb packages, one for each
- server, so we need to override the deploy-esb and package-deployment
- targets -->
- <target name="package-deployment">
-
- <copy overwrite="true" file="jboss-esb.xml.first" tofile="build/META-INF/jboss-esb.xml"/>
-
- <jar destfile="${build.dir}/${ant.project.name}-first.esb">
- <fileset dir="${build.dir}/classes" />
- <fileset dir="${build.dir}" includes="*.jar,*.war"/>
- <fileset dir="${build.dir}" includes="deployment.xml"/>
- <fileset dir="${build.dir}" includes="META-INF/**" />
- <fileset dir="${basedir}/src" excludes="**/*.java" /> <!-- Please leave the src dir in here! -->
- <fileset dir="${basedir}" includes="${jms.service.file} ${additional.deploys}" excludes="build/**" />
- <fileset dir="${basedir}/lib" includes="*.jar"/>
- </jar>
-
- <copy overwrite="true" file="jboss-esb.xml.second" tofile="build/META-INF/jboss-esb.xml"/>
-
- <jar destfile="${build.dir}/${ant.project.name}-second.esb">
- <fileset dir="${build.dir}/classes" />
- <fileset dir="${build.dir}" includes="*.jar,*.war"/>
- <fileset dir="${build.dir}" includes="deployment.xml"/>
- <fileset dir="${build.dir}" includes="META-INF/**" />
- <fileset dir="${basedir}/src" excludes="**/*.java" /> <!-- Please leave the src dir in here! -->
- <fileset dir="${basedir}" includes="${jms.service.file} ${additional.deploys}" excludes="build/**" />
- <fileset dir="${basedir}/lib" includes="*.jar"/>
- </jar>
-
- </target>
-
- <target name="deploy-esb">
- <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}/deploy">
- <fileset dir="build" includes="${ant.project.name}-first.esb"/>
- </copy>
-
- <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/deploy">
- <fileset dir="build" includes="${ant.project.name}-second.esb"/>
- </copy>
- </target>
-
- <target name="quickstart-specific-undeploys">
- <delete verbose="true" includeemptydirs="true" quiet="true"
- dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/deploy/${ant.project.name}-first.esb"/>
- <delete verbose="true" includeemptydirs="true" quiet="true"
- dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/deploy/${ant.project.name}-second.esb"/>
- </target>
-
- <target name="runtest" depends="compile"
- description="sends a JMS message to queue/quickstart_twoservers_Request_gw">
- <echo>Runs Test JMS Sender</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.twoservers.test.SendJMSMessage" failonerror="true">
- <arg value="Hello World"/>
- <classpath refid="exec-classpath"/>
- </java>
- </target>
-
- <target name="sendesb" depends="compile"
- description="Will send an esb Message">
- <echo>Runs Test ESB Message Sender</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.twoservers.test.SendEsbMessage" failonerror="true">
- <arg value="FirstServiceESB"/> <!-- service category -->
- <arg value="SimpleListener"/> <!-- service name -->
- <arg value="Hello World - Straight to ESB listener - no Gateway"/> <!-- Message text -->
- <classpath refid="exec-classpath"/>
- </java>
- </target>
-
-</project>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/build.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,113 @@
+<project name="Quickstart_twoservers" default="run" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <!-- Import the base Ant build script... -->
+ <import file="../conf/base-build.xml"/>
+
+ <property file="server.properties"/>
+
+ <target name="setup-servers">
+ <input message="The following task is going to delete the directories ${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first} and ${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second} and replace them. Continue (Y/N)?" validargs="Y,N" addproperty="input.response"/>
+ <condition property="exit.setup" value="blah">
+ <matches string="${input.response}" pattern="^Y$"/>
+ </condition>
+
+ <fail unless="exit.setup"/>
+
+ <delete dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}"/>
+ <delete dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}"/>
+
+ <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}">
+ <fileset dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.orig.config}" includes="**"/>
+ </copy>
+ <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}">
+ <fileset dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.orig.config}" includes="**"/>
+ </copy>
+
+ <copy overwrite="true" file="resources/jboss-service.xml" todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}/conf">
+ <filterset>
+ <filter token="server.name" value="ports-01"/>
+ </filterset>
+ </copy>
+
+ <copy overwrite="true" file="resources/jboss-service.xml" todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/conf">
+ <filterset>
+ <filter token="server.name" value="ports-02"/>
+ </filterset>
+ </copy>
+
+ </target>
+
+ <!-- This Quickstart requires two different .esb packages, one for each
+ server, so we need to override the deploy-esb and package-deployment
+ targets -->
+ <target name="package-deployment">
+
+ <copy overwrite="true" file="jboss-esb.xml.first" tofile="build/META-INF/jboss-esb.xml"/>
+
+ <jar destfile="${build.dir}/${ant.project.name}-first.esb">
+ <fileset dir="${build.dir}/classes" />
+ <fileset dir="${build.dir}" includes="*.jar,*.war"/>
+ <fileset dir="${build.dir}" includes="deployment.xml"/>
+ <fileset dir="${build.dir}" includes="META-INF/**" />
+ <fileset dir="${basedir}/src" excludes="**/*.java" /> <!-- Please leave the src dir in here! -->
+ <fileset dir="${basedir}" includes="${jms.service.file} ${additional.deploys}" excludes="build/**" />
+ <fileset dir="${basedir}/lib" includes="*.jar"/>
+ </jar>
+
+ <copy overwrite="true" file="jboss-esb.xml.second" tofile="build/META-INF/jboss-esb.xml"/>
+
+ <jar destfile="${build.dir}/${ant.project.name}-second.esb">
+ <fileset dir="${build.dir}/classes" />
+ <fileset dir="${build.dir}" includes="*.jar,*.war"/>
+ <fileset dir="${build.dir}" includes="deployment.xml"/>
+ <fileset dir="${build.dir}" includes="META-INF/**" />
+ <fileset dir="${basedir}/src" excludes="**/*.java" /> <!-- Please leave the src dir in here! -->
+ <fileset dir="${basedir}" includes="${jms.service.file} ${additional.deploys}" excludes="build/**" />
+ <fileset dir="${basedir}/lib" includes="*.jar"/>
+ </jar>
+
+ </target>
+
+ <target name="deploy-esb">
+ <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.first}/deploy">
+ <fileset dir="build" includes="${ant.project.name}-first.esb"/>
+ </copy>
+
+ <copy todir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/deploy">
+ <fileset dir="build" includes="${ant.project.name}-second.esb"/>
+ </copy>
+ </target>
+
+ <target name="quickstart-specific-undeploys">
+ <delete verbose="true" includeemptydirs="true" quiet="true"
+ dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/deploy/${ant.project.name}-first.esb"/>
+ <delete verbose="true" includeemptydirs="true" quiet="true"
+ dir="${org.jboss.esb.twoservers.home}/server/${org.jboss.esb.twoservers.dest.second}/deploy/${ant.project.name}-second.esb"/>
+ </target>
+
+ <target name="runtest" depends="compile"
+ description="sends a JMS message to queue/quickstart_twoservers_Request_gw">
+ <echo>Runs Test JMS Sender</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.twoservers.test.SendJMSMessage" failonerror="true">
+ <arg value="Hello World"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="sendesb" depends="compile"
+ description="Will send an esb Message">
+ <echo>Runs Test ESB Message Sender</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.twoservers.test.SendEsbMessage" failonerror="true">
+ <arg value="FirstServiceESB"/> <!-- service category -->
+ <arg value="SimpleListener"/> <!-- service name -->
+ <arg value="Hello World - Straight to ESB listener - no Gateway"/> <!-- Message text -->
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+</project>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/deployment.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,4 +0,0 @@
-<jbossesb-deployment>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_esb</depends>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_gw</depends>
-</jbossesb-deployment>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/deployment.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_gw</depends>
+</jbossesb-deployment>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jbm-queue-service.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_esb"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_gw"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-</server>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbm-queue-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jbmq-queue-service.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
- <mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_esb">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
- </mbean>
- <mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_gw">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
- </mbean>
-</server>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbmq-queue-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_twoservers_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+</server>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jboss-esb.xml.first 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,57 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
- <providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1199" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
- <jms-bus busid="quickstartGwChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_twoservers_Request_gw"
- />
- </jms-bus>
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_twoservers_Request_esb"
- />
- </jms-bus>
-
- </jms-provider>
- </providers>
-
- <services>
- <service
- category="FirstServiceESB"
- name="SimpleListener"
- description="Hello World">
- <listeners>
- <jms-listener name="JMS-Gateway"
- busidref="quickstartGwChannel"
- maxThreads="1"
- is-gateway="true"
- />
- <jms-listener name="helloWorld"
- busidref="quickstartEsbChannel"
- maxThreads="1"
- />
- </listeners>
- <actions mep="OneWay">
- <action name="appenderAction" class="org.jboss.soa.esb.samples.quickstart.twoservers.StringAppender"/>
- <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
- <property name="okMethod" value="notifyOK" />
- <property name="notification-details">
- <NotificationList type="ok">
- <target class="NotifyConsole"/>
- <target class="NotifyQueues">
- <queue jndiName="queue/quickstart_twoservers_Request_gw" jndi-URL="jnp://127.0.0.1:1299"/>
- </target>
- </NotificationList>
- </property>
- </action>
- </actions>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jboss-esb.xml.first)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.first 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,57 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-URL="jnp://127.0.0.1:1199" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_twoservers_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_twoservers_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="FirstServiceESB"
+ name="SimpleListener"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ maxThreads="1"
+ is-gateway="true"
+ />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="appenderAction" class="org.jboss.soa.esb.samples.quickstart.twoservers.StringAppender"/>
+ <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
+ <property name="okMethod" value="notifyOK" />
+ <property name="notification-details">
+ <NotificationList type="ok">
+ <target class="NotifyConsole"/>
+ <target class="NotifyQueues">
+ <queue jndiName="queue/quickstart_twoservers_Request_gw" jndi-URL="jnp://127.0.0.1:1299"/>
+ </target>
+ </NotificationList>
+ </property>
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jboss-esb.xml.second 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,54 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
- <providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1299" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
- <jms-bus busid="quickstartGwChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_twoservers_Request_gw"
- />
- </jms-bus>
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_twoservers_Request_esb"
- />
- </jms-bus>
-
- </jms-provider>
- </providers>
-
- <services>
- <service
- category="FirstServiceESB"
- name="SimpleListener"
- description="Hello World">
- <listeners>
- <jms-listener name="JMS-Gateway"
- busidref="quickstartGwChannel"
- maxThreads="1"
- is-gateway="true"
- />
- <jms-listener name="helloWorld"
- busidref="quickstartEsbChannel"
- maxThreads="1"
- />
- </listeners>
- <actions mep="OneWay">
- <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
- <property name="okMethod" value="notifyOK" />
- <property name="notification-details">
- <NotificationList type="ok">
- <target class="NotifyConsole"/>
- </NotificationList>
- </property>
- </action>
- </actions>
- </service>
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jboss-esb.xml.second)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jboss-esb.xml.second 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,54 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-URL="jnp://127.0.0.1:1299" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_twoservers_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_twoservers_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="FirstServiceESB"
+ name="SimpleListener"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ maxThreads="1"
+ is-gateway="true"
+ />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
+ <property name="okMethod" value="notifyOK" />
+ <property name="notification-details">
+ <NotificationList type="ok">
+ <target class="NotifyConsole"/>
+ </NotificationList>
+ </property>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jbossesb-properties.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- JBoss, Home of Professional Open Source
- Copyright 2006, JBoss Inc., and others contributors as indicated
- by the @authors tag. All rights reserved.
- See the copyright.txt in the distribution for a
- full listing of individual contributors.
- This copyrighted material is made available to anyone wishing to use,
- modify, copy, or redistribute it subject to the terms and conditions
- of the GNU Lesser General Public License, v. 2.1.
- This program is distributed in the hope that it will be useful, but WITHOUT A
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License,
- v.2.1 along with this distribution; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- MA 02110-1301, USA.
-
- (C) 2005-2006,
- @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
- These options are described in the JBossESB manual.
- Defaults are provided here for convenience only.
-
- Please read through this file prior to using the system, and consider
- updating the specified entries.
--->
-<esb
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
- <properties name="core">
- <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
- <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
- <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
- </properties>
- <properties name="registry">
- <property name="org.jboss.soa.esb.registry.queryManagerURI"
- value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
- <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
- value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
- <property name="org.jboss.soa.esb.registry.implementationClass"
- value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
- <property name="org.jboss.soa.esb.registry.factoryClass"
- value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
- <property name="org.jboss.soa.esb.registry.user"
- value="jbossesb"/>
- <property name="org.jboss.soa.esb.registry.password"
- value="password"/>
- <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
- <property name="org.jboss.soa.esb.scout.proxy.transportClass"
- value="org.apache.ws.scout.transport.RMITransport"/>
- </properties>
- <properties name="transports" depends="core">
- <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
- <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
- <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
- <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
- </properties>
- <properties name="connection">
- <property name="min-pool-size" value="5"/>
- <property name="max-pool=size" value="10"/>
- <property name="blocking-timeout-millis" value="5000"/>
- <property name="abandoned-connection-timeout" value="10000"/>
- <property name="abandoned-connection-time-interval" value="30000"/>
- </properties>
- <properties name="dbstore">
- <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
- <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
- <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
- <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
- <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
- <!--table managed by pool to test for valid connections - created by pool automatically -->
- <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
- <!-- # of milliseconds to timeout waiting for a connection from pool -->
- <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
- </properties>
- <properties name="messagerouting">
- <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
- </properties>
-</esb>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jbossesb-properties.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, JBoss Inc., and others contributors as indicated
+ by the @authors tag. All rights reserved.
+ See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU Lesser General Public License, v. 2.1.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ You should have received a copy of the GNU Lesser General Public License,
+ v.2.1 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+ value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+ value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+ value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout" value="10000"/>
+ <property name="abandoned-connection-time-interval" value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool automatically -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jndi.properties 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/jndi.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/jndi.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/juddi.properties 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,69 +0,0 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
-
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/juddi.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/juddi.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/lib (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/lib)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/listener.log
===================================================================
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/listener.log (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/listener.log)
===================================================================
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/log4j.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Target" value="System.out"/>
- <param name="Threshold" value="INFO"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
- </layout>
- </appender>
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A size based file rolling appender -->
- <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="./listener.log"/>
- <param name="Append" value="false"/>
- <param name="MaxFileSize" value="500KB"/>
- <param name="MaxBackupIndex" value="1"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
- </layout>
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <category name="org.jboss">
- <priority value="WARN"/>
- </category>
- <category name="org.jboss.soa.esb">
- <priority value="ERROR"/>
- </category>
- <category name="org.jboss.internal.soa.esb">
- <priority value="ERROR"/>
- </category>
- <category name="org.apache">
- <priority value="ERROR"/>
- </category>
- <category name="quickstart">
- <priority value="DEBUG"/>
- </category>
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/log4j.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/log4j.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A size based file rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./listener.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.jboss.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.jboss.internal.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.apache">
+ <priority value="ERROR"/>
+ </category>
+ <category name="quickstart">
+ <priority value="DEBUG"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/readme.txt 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,27 +0,0 @@
-Overview:
-=========
- The purpose of the two_servers quickstart sample is to demonstrate
- running two versions of the ESB server (or the JBoss AS).
-
- The sample bindings depend on a sample-bindings.xml, which spells out
- which ports are used for different services. Each binding depends on a port
- profile (in this example, ports-01 and ports-02), which is then referenced
- in the server's jboss-service.xml (see $JBOSS_HOME/server/first/conf/jboss-service.xml
- and $JBOSS_HOME/server/second/conf/jboss-service.xml).
-
- This quickstart is a bit different than others in that it will not deploy .esb
- packages to the config specified in your deployment.properties file, but will
- create two configs based on the server.properties file in this directory.
-
-Running this quickstart:
-========================
- Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
- and a more detailed descripton of the different ways to run the quickstarts.
-
-To Run '.esb' archive mode:
-===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant setup-servers'. Note that this will remove both the SERVER_HOME/server/first and SERVER_HOME/server/second directories, and will make a copy of the default directory in each of these locations.
- 2. In Window 1, ant deploy
- 3. In Window 2, start the first application server (./run.sh -c first)
- 4. In Window 3, start the second application server (./run.sh -c second)
- 5. In Window 1, ant runtest
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/readme.txt)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/readme.txt 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,27 @@
+Overview:
+=========
+ The purpose of the two_servers quickstart sample is to demonstrate
+ running two versions of the ESB server (or the JBoss AS).
+
+ The sample bindings depend on a sample-bindings.xml, which spells out
+ which ports are used for different services. Each binding depends on a port
+ profile (in this example, ports-01 and ports-02), which is then referenced
+ in the server's jboss-service.xml (see $JBOSS_HOME/server/first/conf/jboss-service.xml
+ and $JBOSS_HOME/server/second/conf/jboss-service.xml).
+
+ This quickstart is a bit different than others in that it will not deploy .esb
+ packages to the config specified in your deployment.properties file, but will
+ create two configs based on the server.properties file in this directory.
+
+Running this quickstart:
+========================
+ Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+ and a more detailed descripton of the different ways to run the quickstarts.
+
+To Run '.esb' archive mode:
+===========================
+ 1. In a command terminal window in this folder ("Window1"), type 'ant setup-servers'. Note that this will remove both the SERVER_HOME/server/first and SERVER_HOME/server/second directories, and will make a copy of the default directory in each of these locations.
+ 2. In Window 1, ant deploy
+ 3. In Window 2, start the first application server (./run.sh -c first)
+ 4. In Window 3, start the second application server (./run.sh -c second)
+ 5. In Window 1, ant runtest
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/resources)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/resources/jboss-service.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,696 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id: jboss-service.xml 62434 2007-04-19 21:22:50Z dimitris at jboss.org $ -->
-
-<!-- ===================================================================== -->
-<!-- JBoss Server Configuration -->
-<!-- ===================================================================== -->
-
-<server>
-
- <!-- Load all jars from the JBOSS_DIST/server/<config>/lib directory. This
- can be restricted to specific jars by specifying them in the archives
- attribute.
- -->
- <classpath codebase="${jboss.server.lib.url:lib}" archives="*"/>
-
- <!-- ==================================================================== -->
- <!-- JSR-77 Single JBoss Server Management Domain -->
- <!-- ==================================================================== -->
- <mbean code="org.jboss.management.j2ee.LocalJBossServerDomain"
- name="jboss.management.local:j2eeType=J2EEDomain,name=Manager">
- <attribute name="MainDeployer">jboss.system:service=MainDeployer</attribute>
- <attribute name="SARDeployer">jboss.system:service=ServiceDeployer</attribute>
- <attribute name="EARDeployer">jboss.j2ee:service=EARDeployer</attribute>
- <attribute name="EJBDeployer">jboss.ejb:service=EJBDeployer</attribute>
- <attribute name="RARDeployer">jboss.jca:service=RARDeployer</attribute>
- <attribute name="CMDeployer">jboss.jca:service=ConnectionFactoryDeployer</attribute>
- <attribute name="WARDeployer">jboss.web:service=WebServer</attribute>
- <attribute name="CARDeployer">jboss.j2ee:service=ClientDeployer</attribute>
- <attribute name="MailService">jboss:service=Mail</attribute>
- <attribute name="JMSService">jboss.mq:service=DestinationManager</attribute>
- <attribute name="JNDIService">jboss:service=Naming</attribute>
- <attribute name="JTAService">jboss:service=TransactionManager</attribute>
- <attribute name="UserTransactionService">jboss:service=ClientUserTransaction</attribute>
- <attribute name="RMI_IIOPService">jboss:service=CorbaORB</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- XMBean Persistence -->
- <!-- ==================================================================== -->
- <mbean code="org.jboss.system.pm.AttributePersistenceService"
- name="jboss:service=AttributePersistenceService"
- xmbean-dd="resource:xmdesc/AttributePersistenceService-xmbean.xml">
- <!-- the AttributePersistenceService is persistent, itself -->
-
- <!--
- <attribute name="AttributePersistenceManagerClass">org.jboss.system.pm.XMLAttributePersistenceManager</attribute>
- <attribute name="AttributePersistenceManagerConfig">
- <data-directory>data/xmbean-attrs</data-directory>
- </attribute>
- <attribute name="ApmDestroyOnServiceStop">false</attribute>
- <attribute name="VersionTag"></attribute>
- -->
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Thread Pool -->
- <!-- ==================================================================== -->
-
- <!-- A Thread pool service -->
- <mbean code="org.jboss.util.threadpool.BasicThreadPool"
- name="jboss.system:service=ThreadPool">
- <attribute name="Name">JBoss System Threads</attribute>
- <attribute name="ThreadGroupName">System Threads</attribute>
- <!-- How long a thread will live without any tasks in MS -->
- <attribute name="KeepAliveTime">60000</attribute>
- <!-- The max number of threads in the pool -->
- <attribute name="MaximumPoolSize">10</attribute>
- <!-- The max number of tasks before the queue is full -->
- <attribute name="MaximumQueueSize">1000</attribute>
- <!-- The behavior of the pool when a task is added and the queue is full.
- abort - a RuntimeException is thrown
- run - the calling thread executes the task
- wait - the calling thread blocks until the queue has room
- discard - the task is silently discarded without being run
- discardOldest - check to see if a task is about to complete and enque
- the new task if possible, else run the task in the calling thread
- -->
- <attribute name="BlockingMode">run</attribute>
- </mbean>
-
- <!-- Preload all custom editors for VMs that don't use the thread
- context class loader when searching for PropertyEditors. Uncomment
- if your JDK 1.3.0 VM fails to find JBoss PropertyEditors.
- <mbean code="org.jboss.varia.property.PropertyEditorManagerService"
- name="jboss:type=Service,name=BootstrapEditors">
- <attribute name="BootstrapEditors">
- java.math.BigDecimal=org.jboss.util.propertyeditor.BigDecimalEditor
- java.lang.Boolean=org.jboss.util.propertyeditor.BooleanEditor
- java.lang.Class=org.jboss.util.propertyeditor.ClassEditor
- java.util.Date=org.jboss.util.propertyeditor.DateEditor
- java.io.File=org.jboss.util.propertyeditor.FileEditor
- java.net.InetAddress=org.jboss.util.propertyeditor.InetAddressEditor
- java.lang.Integer=org.jboss.util.propertyeditor.IntegerEditor
- javax.management.ObjectName=org.jboss.mx.util.propertyeditor.ObjectNameEditor
- java.util.Properties=org.jboss.util.propertyeditor.PropertiesEditor
- [Ljava.lang.String;=org.jboss.util.propertyeditor.StringArrayEditor
- java.net.URL=org.jboss.util.propertyeditor.URLEditor
- </attribute>
- </mbean>
- -->
-
- <!-- ==================================================================== -->
- <!-- Log4j Initialization -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.logging.Log4jService"
- name="jboss.system:type=Log4jService,service=Logging"
- xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
- <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
- <!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8
- this needs to be set to avoid a possible deadlock on exception at the
- appender level. See bug#696819.
- -->
- <attribute name="Log4jQuietMode">true</attribute>
- <!-- How frequently in seconds the ConfigurationURL is checked for changes -->
- <attribute name="RefreshPeriod">60</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Active Alarm Table -->
- <!-- ==================================================================== -->
-
- <!--
- | The ActiveAlarmTable service is a simple JMX notification listener
- | that maintains a table with the received notifications (alarms).
- | The alarms can be acknowledged through the jmx or the web console.
- | Modify the SubscriptionList below to subscribe for any notification
- | in the system and treat it as an alarm.
- | The JMXNotificationAppender is a log4j Appender that can be configured
- | in log4j.xml, that trasforms logging events to JMX notification so they
- | can be fed back into the table. By storing the WARN or higher level logging
- | events you can have a quick view of important system faults.
- |
- | The following attributes may be set:
- |
- | MaxTableSize (default 1000)
- | - set an upper limit to the number of stored alarms
- | LogLevel (default DEBUG)
- | - the log level to use for received notification, can be set to NONE
- | ServerId (default jboss)
- | - used to construct unique alarm ids
- | SubscriptionList
- | - subscribe for the notifications to be stored in the table
-
- <mbean code="org.jboss.monitor.services.ActiveAlarmTable"
- name="jboss.monitor:service=ActiveAlarmTable">
- <attribute name="SubscriptionList">
- <subscription-list>
- <mbean name="jboss.monitor:*">
- <notification type="jboss.alarm"/>
- <notification type="JBOSS_MONITOR_NOTIFICATION"/>
- </mbean>
- <mbean name="jboss.system:service=Logging,type=JMXNotificationAppender"/>
- </subscription-list>
- </attribute>
- </mbean>
- -->
-
- <!-- ==================================================================== -->
- <!-- JBoss RMI Classloader - only install when available -->
- <!-- ==================================================================== -->
- <mbean code="org.jboss.util.property.jmx.SystemPropertyClassValue"
- name="jboss.rmi:type=RMIClassLoader">
- <attribute name="Property">java.rmi.server.RMIClassLoaderSpi</attribute>
- <attribute name="ClassName">org.jboss.system.JBossRMIClassLoader</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Service Binding -->
- <!-- ==================================================================== -->
-
- <!-- Automatically activated when generatting the clustering environment -->
- <!-- @TESTSUITE_CLUSTER_CONFIG@ -->
-
- <!--
- | Binding service manager for port/host mapping. This is a sample
- | config that demonstrates a JBoss instances with a server name 'ports-02'
- | loading its bindings from an XML file using the ServicesStoreFactory
- | implementation returned by the XMLServicesStoreFactory.
- |
- | ServerName: The unique name assigned to a JBoss server instance for
- | lookup purposes. This allows a single ServicesStore to handle mulitiple
- | JBoss servers.
- |
- | StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore
- | during initialization that specifies how to connect to the bindings store.
- | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
- | implementation to create to obtain the ServicesStore instance.
--->
-
- <mbean code="org.jboss.services.binding.ServiceBindingManager"
- name="jboss.system:service=ServiceBindingManager">
- <attribute name="ServerName">@server.name@</attribute>
- <attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
- <attribute name="StoreFactoryClassName">
- org.jboss.services.binding.XMLServicesStoreFactory
- </attribute>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Class Loading -->
- <!-- ==================================================================== -->
-
- <!-- A mini webserver used for dynamic and class and resource loading -->
- <mbean code="org.jboss.web.WebService"
- name="jboss:service=WebService">
- <!-- The Bind address and Port -->
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
- <attribute name="Port">8083</attribute>
- <!-- The address to use for the host portion of the RMI codebase URL -->
- <attribute name="Host">${java.rmi.server.hostname}</attribute>
- <!-- Should non-EJB .class files be downloadable -->
- <attribute name="DownloadServerClasses">true</attribute>
- <!-- Should resources other than .class files be downloadable. Both
- DownloadServerClasses and DownloadResources must be true for resources
- to be downloadable. This is false by default because its generally a
- bad idea as server configuration files that container security
- information can be accessed.
- -->
- <attribute name="DownloadResources">false</attribute>
-
- <!-- Use the default thread pool for dynamic class loading -->
- <depends optional-attribute-name="ThreadPool"
- proxy-type="attribute">jboss.system:service=ThreadPool</depends>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- JNDI -->
- <!-- ==================================================================== -->
-
- <!-- A simple mbean wrapper around the jndi Naming object. This
- only handles an in memory instance. The NamingService uses this
- as the JNDI store and exposes it remotely.
- -->
- <mbean code="org.jnp.server.NamingBeanImpl"
- name="jboss:service=NamingBeanImpl"
- xmbean-dd="resource:xmdesc/NamingBean-xmbean.xml">
- </mbean>
-
- <mbean code="org.jboss.naming.NamingService"
- name="jboss:service=Naming"
- xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
- <!-- The call by value mode. true if all lookups are unmarshalled using
- the caller's TCL, false if in VM lookups return the value by reference.
- -->
- <attribute name="CallByValue">false</attribute>
- <!-- The listening port for the bootstrap JNP service. Set this to -1
- to run the NamingService without the JNP invoker listening port.
- -->
- <attribute name="Port">1099</attribute>
- <!-- The bootstrap JNP server bind address. This also sets the default
- RMI service bind address. Empty == all addresses
- -->
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
- <!-- The port of the RMI naming service, 0 == anonymous -->
- <attribute name="RmiPort">1098</attribute>
- <!-- The RMI service bind address. Empty == all addresses
- -->
- <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
- <!-- The thread pool service used to control the bootstrap lookups -->
- <depends optional-attribute-name="LookupPool"
- proxy-type="attribute">jboss.system:service=ThreadPool</depends>
- <!-- An example of using the unifed invoker as the transport.
- <depends optional-attribute-name="InvokerProxyFactory"
- proxy-type="attribute">jboss:service=proxyFactory,type=unified,target=Naming</depends>
- -->
- <depends optional-attribute-name="Naming"
- proxy-type="attribute">jboss:service=NamingBeanImpl</depends>
- </mbean>
-
- <mbean code="org.jboss.naming.JNDIView"
- name="jboss:service=JNDIView"
- xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">
- <!-- The HANamingService service name -->
- <attribute name="HANamingService">jboss:service=HAJNDI</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Security -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.security.plugins.SecurityConfig"
- name="jboss.security:service=SecurityConfig">
- <attribute name="LoginConfig">jboss.security:service=XMLLoginConfig</attribute>
- </mbean>
- <mbean code="org.jboss.security.auth.login.XMLLoginConfig"
- name="jboss.security:service=XMLLoginConfig">
- <attribute name="ConfigResource">login-config.xml</attribute>
- </mbean>
-
- <!-- JAAS security manager and realm mapping -->
- <mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
- name="jboss.security:service=JaasSecurityManager">
- <!-- A flag which indicates whether the SecurityAssociation server mode
- is set on service creation. This is true by default since the
- SecurityAssociation should be thread local for multi-threaded server
- operation.
- -->
- <attribute name="ServerMode">true</attribute>
- <attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
- <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute>
- <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
- in seconds.
- If you want to disable caching of security credentials, set this to 0 to
- force authentication to occur every time. This has no affect if the
- AuthenticationCacheJndiName has been changed from the default value.
- -->
- <attribute name="DefaultCacheTimeout">1800</attribute>
- <!-- DefaultCacheResolution: Specifies the default timed cache policy
- resolution in seconds. This controls the interval at which the cache
- current timestamp is updated and should be less than the DefaultCacheTimeout
- in order for the timeout to be meaningful. This has no affect if the
- AuthenticationCacheJndiName has been changed from the default value.
- -->
- <attribute name="DefaultCacheResolution">60</attribute>
- <!-- DeepCopySubjectMode: This set the copy mode of subjects done by the
- security managers to be deep copies that makes copies of the subject
- principals and credentials if they are cloneable. It should be set to
- true if subject include mutable content that can be corrupted when
- multiple threads have the same identity and cache flushes/logout clearing
- the subject in one thread results in subject references affecting other
- threads.
- -->
- <attribute name="DeepCopySubjectMode">false</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Transactions -->
- <!-- ==================================================================== -->
-
- <!-- The configurable Xid factory. For use with Oracle, set pad to true -->
- <mbean code="org.jboss.tm.XidFactory"
- name="jboss:service=XidFactory">
- <!--attribute name="Pad">true</attribute-->
- </mbean>
-
- <!--
- | The fast in-memory transaction manager.
- | Deprecated in JBossAS v4.2. Use JBossTS JTA instead.
- - ->
- <mbean code="org.jboss.tm.TransactionManagerService"
- name="jboss:service=TransactionManager"
- xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
- <attribute name="TransactionTimeout">300</attribute>
- <!- - set to false to disable transaction demarcation over IIOP - ->
- <attribute name="GlobalIdsEnabled">true</attribute>
- <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
-
- <!- - Transaction Integrity Checking - ->
- <!- - Force a rollback if another thread is associated with the transaction at commit - ->
- <!- - <depends optional-attribute-name="TransactionIntegrityFactory"
- proxy-type="org.jboss.tm.integrity.TransactionIntegrityFactory">
- <mbean code="org.jboss.tm.integrity.FailIncompleteTransaction"
- name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/>
- </depends> - ->
- </mbean>
- -->
-
- <!-- JBoss Transactions JTA -->
- <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
- name="jboss:service=TransactionManager">
- <attribute name="TransactionTimeout">300</attribute>
- <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
- </mbean>
-
- <!--
- | UserTransaction support.
- -->
- <mbean code="org.jboss.tm.usertx.server.ClientUserTransactionService"
- name="jboss:service=ClientUserTransaction"
- xmbean-dd="resource:xmdesc/ClientUserTransaction-xmbean.xml">
- <depends>
- <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
- name="jboss:service=proxyFactory,target=ClientUserTransactionFactory">
- <attribute name="InvokerName">jboss:service=invoker,type=jrmp</attribute>
- <attribute name="TargetName">jboss:service=ClientUserTransaction</attribute>
- <attribute name="JndiName">UserTransactionSessionFactory</attribute>
- <attribute name="ExportedInterface">org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory</attribute>
- <attribute name="ClientInterceptors">
- <interceptors>
- <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </interceptors>
- </attribute>
- <depends>jboss:service=invoker,type=jrmp</depends>
- </mbean>
- </depends>
- <depends optional-attribute-name="TxProxyName">
- <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
- name="jboss:service=proxyFactory,target=ClientUserTransaction">
- <attribute name="InvokerName">jboss:service=invoker,type=jrmp</attribute>
- <attribute name="TargetName">jboss:service=ClientUserTransaction</attribute>
- <attribute name="JndiName"></attribute>
- <attribute name="ExportedInterface">org.jboss.tm.usertx.interfaces.UserTransactionSession</attribute>
- <attribute name="ClientInterceptors">
- <interceptors>
- <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </interceptors>
- </attribute>
- <depends>jboss:service=invoker,type=jrmp</depends>
- </mbean>
- </depends>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Invokers to the JMX node -->
- <!-- ==================================================================== -->
-
- <!-- Unified invoker (based on remoting) -->
- <mbean code="org.jboss.invocation.unified.server.UnifiedInvoker"
- name="jboss:service=invoker,type=unified">
- <!-- To turn on strict RMI exception propagation uncomment block below -->
- <!-- This will cause the UnifiedInvokerProxy to wrap RemoteExceptions -->
- <!-- within a ServerException, otherwise will throw root exception -->
- <!-- (not RemoteException) -->
- <!-- <attribute name="StrictRMIException">true</attribute> -->
- <depends>jboss:service=TransactionManager</depends>
- <depends>jboss.remoting:service=Connector,transport=socket</depends>
- </mbean>
-
- <!-- RMI/JRMP invoker -->
- <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
- name="jboss:service=invoker,type=jrmp">
- <attribute name="RMIObjectPort">4444</attribute>
- <attribute name="ServerAddress">${jboss.bind.address}</attribute>
- <!--
- <attribute name="RMIClientSocketFactory">custom</attribute>
- <attribute name="RMIServerSocketFactory">custom</attribute>
- <attribute name="RMIServerSocketAddr">custom</attribute>
- <attribute name="SecurityDomain">ssl-domain-name</attribute>
- -->
- <depends>jboss:service=TransactionManager</depends>
- </mbean>
-
- <mbean code="org.jboss.invocation.local.LocalInvoker"
- name="jboss:service=invoker,type=local">
-
- <depends>jboss:service=TransactionManager</depends>
- </mbean>
-
- <mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
- name="jboss:service=invoker,type=pooled">
- <attribute name="NumAcceptThreads">1</attribute>
- <attribute name="MaxPoolSize">300</attribute>
- <attribute name="ClientMaxPoolSize">300</attribute>
- <attribute name="SocketTimeout">60000</attribute>
- <attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
- <attribute name="ServerBindPort">4445</attribute>
- <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
- <attribute name="ClientConnectPort">0</attribute>
- <attribute name="ClientRetryCount">1</attribute>
- <attribute name="EnableTcpNoDelay">false</attribute>
-
- <!-- Customized socket factory attributes
- <attribute name="ClientSocketFactoryName">custom.client.factory</attribute>
- <attribute name="ServerSocketFactoryName">custom.server.factory</attribute>
- <attribute name="SslDomain">java:/jaas/pooledInvoker</attribute>
- -->
- <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Remoting services -->
- <!-- ==================================================================== -->
-
- <!-- For detailed description of all these configuration attributes, please see the -->
- <!-- JBoss Remoting User's Guide or wiki (http://labs.jboss.com/portal/jbossremoting/docs/guide/index.html) -->
-
- <!-- The NetworkRegistry contains all the local and remote -->
- <!-- servers that it recognizes. The remote ones registered -->
- <!-- are dependant on the detectors running and which domains -->
- <!-- they are configured to identify. -->
- <mbean code="org.jboss.remoting.network.NetworkRegistry"
- name="jboss.remoting:service=NetworkRegistry"/>
-
- <!-- The Connector is the core component of the remoting server service. -->
- <!-- It binds the remoting invoker (transport protocol, callback configuration, -->
- <!-- data marshalling, etc.) with the invocation handlers. -->
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=socket"
- display-name="Socket transport Connector">
-
- <!-- Can either just specify the InvokerLocator attribute and not the invoker element in the -->
- <!-- Configuration attribute, or do the full invoker configuration in the in invoker element -->
- <!-- of the Configuration attribute. -->
-
- <!-- Remember that if you do use more than one param on the uri, will have to include as a CDATA, -->
- <!-- otherwise, parser will complain. -->
- <!-- <attribute name="InvokerLocator"><![CDATA[socket://${jboss.bind.address}:4446/?datatype=invocation]]></attribute> -->
-
- <attribute name="Configuration">
- <!-- Using the following <invoker> element instead of the InvokerLocator above because specific attributes needed. -->
- <!-- If wanted to use any of the parameters below, can just add them as parameters to the url above if wanted use the InvokerLocator attribute. -->
- <config>
- <!-- Other than transport type and handler, none of these configurations are required (will just use defaults). -->
- <invoker transport="socket">
- <attribute name="dataType" isParam="true">invocation</attribute>
- <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
- <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
- <!-- This will be port on which the marshall loader port runs on. -->
- <!-- <attribute name="loaderport" isParam="true">4447</attribute> -->
- <!-- The following are specific to socket invoker -->
- <!-- <attribute name="numAcceptThreads">1</attribute>-->
- <!-- <attribute name="maxPoolSize">303</attribute>-->
- <!-- <attribute name="clientMaxPoolSize" isParam="true">304</attribute>-->
- <attribute name="socketTimeout" isParam="true">600000</attribute>
- <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
- <attribute name="serverBindPort">4446</attribute>
- <!-- <attribute name="clientConnectAddress">216.23.33.2</attribute> -->
- <!-- <attribute name="clientConnectPort">7777</attribute> -->
- <attribute name="enableTcpNoDelay" isParam="true">true</attribute>
- <!-- <attribute name="backlog">200</attribute>-->
- <!-- The following is for callback configuration and is independant of invoker type -->
- <!-- <attribute name="callbackMemCeiling">30</attribute>-->
- <!-- indicates callback store by fully qualified class name -->
- <!-- <attribute name="callbackStore">org.jboss.remoting.CallbackStore</attribute>-->
- <!-- indicates callback store by object name -->
- <!-- <attribute name="callbackStore">jboss.remoting:service=CallbackStore,type=Serializable</attribute> -->
- <!-- config params for callback store. if were declaring callback store via object name, -->
- <!-- could have specified these config params there. -->
- <!-- StoreFilePath indicates to which directory to write the callback objects. -->
- <!-- The default value is the property value of 'jboss.server.data.dir' and if this is not set, -->
- <!-- then will be 'data'. Will then append 'remoting' and the callback client's session id. -->
- <!-- An example would be 'data\remoting\5c4o05l-9jijyx-e5b6xyph-1-e5b6xyph-2'. -->
- <!-- <attribute name="StoreFilePath">callback</attribute>-->
- <!-- StoreFileSuffix indicates the file suffix to use for the callback objects written to disk. -->
- <!-- The default value for file suffix is 'ser'. -->
- <!-- <attribute name="StoreFileSuffix">cst</attribute>-->
- </invoker>
-
- <!-- At least one handler is required by the connector. If have more than one, must decalre -->
- <!-- different subsystem values. Otherwise, all invocations will be routed to the only one -->
- <!-- that is declared. -->
- <handlers>
- <!-- can also specify handler by fully qualified classname -->
- <handler subsystem="invoker">jboss:service=invoker,type=unified</handler>
- </handlers>
- </config>
- </attribute>
- <depends>jboss.remoting:service=NetworkRegistry</depends>
- </mbean>
-
-
- <!-- <mbean code="org.jboss.remoting.detection.jndi.JNDIDetector"-->
- <!-- name="jboss.remoting:service=Detector,transport=jndi">-->
- <!-- host to which the detector will connect to for the JNDI server. -->
- <!-- <attribute name="Host">localhost</attribute>-->
- <!-- port to which detector will connect to for the JNDI server. -->
- <!-- <attribute name="Port">5555</attribute>-->
- <!-- context factory string used when connecting to the JNDI server. -->
- <!-- The default is org.jnp.interfaces.NamingContextFactory. -->
- <!-- <attribute name="ContextFactory">org.acme.NamingContextFactory</attribute> -->
- <!-- url package string to use when connecting to the JNDI server. -->
- <!-- The default is org.jboss.naming:org.jnp.interfaces. -->
- <!-- <attribute name="URLPackage">org.acme.naming</attribute> -->
- <!-- Sets the number of detection iterations before manually pinging -->
- <!-- remote server to make sure still alive. This is needed since remote server -->
- <!-- could crash and yet still have an entry in the JNDI server, -->
- <!-- thus making it appear that it is still there. The default value is 5. -->
- <!-- <attribute name="CleanDetectionNumber">20</attribute>-->
-
- <!-- Specifies the domains in which the detector will recognize -->
- <!-- detections. If servers are not configured to be in these -->
- <!-- domains, they will not be added to NetworkRegistry. -->
- <!-- <attribute name="Configuration">-->
- <!-- <domains>-->
- <!-- <domain>roxanne</domain>-->
- <!-- <domain>sparky</domain>-->
- <!-- </domains>-->
- <!-- </attribute>-->
- <!-- </mbean>-->
-
-
- <!-- ==================================================================== -->
- <!-- Monitoring and Management -->
- <!-- ==================================================================== -->
-
- <!-- Uncomment to enable JMX monitoring of the bean cache
- <mbean code="org.jboss.monitor.BeanCacheMonitor"
- name="jboss.monitor:name=BeanCacheMonitor"/>
- -->
-
- <!-- Uncomment to enable JMX monitoring of the entity bean locking
- <mbean code="org.jboss.monitor.EntityLockMonitor"
- name="jboss.monitor:name=EntityLockMonitor"/>
- -->
-
- <!-- ==================================================================== -->
- <!-- An MBean that is a registry for JDBC type-mapping metadata -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.ejb.plugins.cmp.jdbc.metadata.MetaDataLibrary"
- name="jboss.jdbc:service=metadata"/>
-
- <!-- ==================================================================== -->
- <!-- Deployment Scanning -->
- <!-- ==================================================================== -->
-
- <!-- An mbean for hot deployment/undeployment of archives.
- -->
- <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
- name="jboss.deployment:type=DeploymentScanner,flavor=URL">
-
- <!-- Uncomment (and comment/remove version below) to enable usage of the
- DeploymentCache
- <depends optional-attribute-name="Deployer">jboss.deployment:type=DeploymentCache</depends>
- -->
- <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>
-
- <!-- The URLComparator can be used to specify a deployment ordering
- for deployments found in a scanned directory. The class specified
- must be an implementation of java.util.Comparator, it must be able
- to compare two URL objects, and it must have a no-arg constructor.
- Two deployment comparators are shipped with JBoss:
- - org.jboss.deployment.DeploymentSorter
- Sorts by file extension, as follows:
- "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
- "*"
- - org.jboss.deployment.scanner.PrefixDeploymentSorter
- If the name portion of the url begins with 1 or more digits, those
- digits are converted to an int (ignoring leading zeroes), and
- files are deployed in that order. Files that do not start with
- any digits will be deployed first, and they will be sorted by
- extension as above with DeploymentSorter.
- -->
- <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
-
- <!--
- <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
- -->
-
- <!-- The FilterInstance specifies a URLLister.URLFilter for scanned
- directories. This DeploymentFilter is initialized with the given
- prefixes, suffixes and matches that define which URLs should be
- ignored.
- -->
- <attribute name="FilterInstance"
- attributeClass="org.jboss.deployment.scanner.DeploymentFilter"
- serialDataType="javaBean">
- <!-- Files starting with theses strings are ignored -->
- <property name="prefixes">#,%,\,,.,_$</property>
- <!-- Files ending with theses strings are ignored -->
- <property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
- <!-- Files matching with theses strings are ignored -->
- <property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
- </attribute>
-
- <!-- Frequency in milliseconds to rescan the URLs for changes -->
- <attribute name="ScanPeriod">5000</attribute>
-
- <!-- A flag to disable the scans -->
- <attribute name="ScanEnabled">true</attribute>
-
- <!-- URLs are comma separated and resolve relative to the server home URL
- unless the given path is absolute. If the URL ends in "/" it is
- considered a collection and scanned, otherwise it is simply deployed;
- this follows RFC2518 convention and allows discrimination between
- collections and directories that are simply unpacked archives.
-
- URLs may be local (file:) or remote (http:). Scanning is supported
- for remote URLs but unpacked deployment units are not.
-
- Example URLs:
- deploy/
- scans ${jboss.server.url}/deploy/, which is local or remote
- depending on the URL used to boot the server
- ${jboss.server.home}/deploy/
- scans ${jboss.server.home)/deploy, which is always local
- file:/var/opt/myapp.ear
- deploy myapp.ear from a local location
- file:/var/opt/apps/
- scans the specified directory
- http://www.test.com/netboot/myapp.ear
- deploys myapp.ear from a remote location
- http://www.test.com/netboot/apps/
- scans the specified WebDAV location
- -->
- <attribute name="URLs">
- deploy/
- </attribute>
-
- <!-- Indicates if the scanner should recursively scan directories that
- contain no "." in their names. This can be used to group applications
- and services that must be deployed and that have the same
- logical function in the same directory i.e.
- deploy/JMX/
- deploy/JMS/
- ...
- -->
- <attribute name="RecursiveSearch">True</attribute>
-
- </mbean>
-
-</server>
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/resources/jboss-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/resources/jboss-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,696 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: jboss-service.xml 62434 2007-04-19 21:22:50Z dimitris at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- JBoss Server Configuration -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <!-- Load all jars from the JBOSS_DIST/server/<config>/lib directory. This
+ can be restricted to specific jars by specifying them in the archives
+ attribute.
+ -->
+ <classpath codebase="${jboss.server.lib.url:lib}" archives="*"/>
+
+ <!-- ==================================================================== -->
+ <!-- JSR-77 Single JBoss Server Management Domain -->
+ <!-- ==================================================================== -->
+ <mbean code="org.jboss.management.j2ee.LocalJBossServerDomain"
+ name="jboss.management.local:j2eeType=J2EEDomain,name=Manager">
+ <attribute name="MainDeployer">jboss.system:service=MainDeployer</attribute>
+ <attribute name="SARDeployer">jboss.system:service=ServiceDeployer</attribute>
+ <attribute name="EARDeployer">jboss.j2ee:service=EARDeployer</attribute>
+ <attribute name="EJBDeployer">jboss.ejb:service=EJBDeployer</attribute>
+ <attribute name="RARDeployer">jboss.jca:service=RARDeployer</attribute>
+ <attribute name="CMDeployer">jboss.jca:service=ConnectionFactoryDeployer</attribute>
+ <attribute name="WARDeployer">jboss.web:service=WebServer</attribute>
+ <attribute name="CARDeployer">jboss.j2ee:service=ClientDeployer</attribute>
+ <attribute name="MailService">jboss:service=Mail</attribute>
+ <attribute name="JMSService">jboss.mq:service=DestinationManager</attribute>
+ <attribute name="JNDIService">jboss:service=Naming</attribute>
+ <attribute name="JTAService">jboss:service=TransactionManager</attribute>
+ <attribute name="UserTransactionService">jboss:service=ClientUserTransaction</attribute>
+ <attribute name="RMI_IIOPService">jboss:service=CorbaORB</attribute>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- XMBean Persistence -->
+ <!-- ==================================================================== -->
+ <mbean code="org.jboss.system.pm.AttributePersistenceService"
+ name="jboss:service=AttributePersistenceService"
+ xmbean-dd="resource:xmdesc/AttributePersistenceService-xmbean.xml">
+ <!-- the AttributePersistenceService is persistent, itself -->
+
+ <!--
+ <attribute name="AttributePersistenceManagerClass">org.jboss.system.pm.XMLAttributePersistenceManager</attribute>
+ <attribute name="AttributePersistenceManagerConfig">
+ <data-directory>data/xmbean-attrs</data-directory>
+ </attribute>
+ <attribute name="ApmDestroyOnServiceStop">false</attribute>
+ <attribute name="VersionTag"></attribute>
+ -->
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Thread Pool -->
+ <!-- ==================================================================== -->
+
+ <!-- A Thread pool service -->
+ <mbean code="org.jboss.util.threadpool.BasicThreadPool"
+ name="jboss.system:service=ThreadPool">
+ <attribute name="Name">JBoss System Threads</attribute>
+ <attribute name="ThreadGroupName">System Threads</attribute>
+ <!-- How long a thread will live without any tasks in MS -->
+ <attribute name="KeepAliveTime">60000</attribute>
+ <!-- The max number of threads in the pool -->
+ <attribute name="MaximumPoolSize">10</attribute>
+ <!-- The max number of tasks before the queue is full -->
+ <attribute name="MaximumQueueSize">1000</attribute>
+ <!-- The behavior of the pool when a task is added and the queue is full.
+ abort - a RuntimeException is thrown
+ run - the calling thread executes the task
+ wait - the calling thread blocks until the queue has room
+ discard - the task is silently discarded without being run
+ discardOldest - check to see if a task is about to complete and enque
+ the new task if possible, else run the task in the calling thread
+ -->
+ <attribute name="BlockingMode">run</attribute>
+ </mbean>
+
+ <!-- Preload all custom editors for VMs that don't use the thread
+ context class loader when searching for PropertyEditors. Uncomment
+ if your JDK 1.3.0 VM fails to find JBoss PropertyEditors.
+ <mbean code="org.jboss.varia.property.PropertyEditorManagerService"
+ name="jboss:type=Service,name=BootstrapEditors">
+ <attribute name="BootstrapEditors">
+ java.math.BigDecimal=org.jboss.util.propertyeditor.BigDecimalEditor
+ java.lang.Boolean=org.jboss.util.propertyeditor.BooleanEditor
+ java.lang.Class=org.jboss.util.propertyeditor.ClassEditor
+ java.util.Date=org.jboss.util.propertyeditor.DateEditor
+ java.io.File=org.jboss.util.propertyeditor.FileEditor
+ java.net.InetAddress=org.jboss.util.propertyeditor.InetAddressEditor
+ java.lang.Integer=org.jboss.util.propertyeditor.IntegerEditor
+ javax.management.ObjectName=org.jboss.mx.util.propertyeditor.ObjectNameEditor
+ java.util.Properties=org.jboss.util.propertyeditor.PropertiesEditor
+ [Ljava.lang.String;=org.jboss.util.propertyeditor.StringArrayEditor
+ java.net.URL=org.jboss.util.propertyeditor.URLEditor
+ </attribute>
+ </mbean>
+ -->
+
+ <!-- ==================================================================== -->
+ <!-- Log4j Initialization -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.logging.Log4jService"
+ name="jboss.system:type=Log4jService,service=Logging"
+ xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
+ <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
+ <!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8
+ this needs to be set to avoid a possible deadlock on exception at the
+ appender level. See bug#696819.
+ -->
+ <attribute name="Log4jQuietMode">true</attribute>
+ <!-- How frequently in seconds the ConfigurationURL is checked for changes -->
+ <attribute name="RefreshPeriod">60</attribute>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Active Alarm Table -->
+ <!-- ==================================================================== -->
+
+ <!--
+ | The ActiveAlarmTable service is a simple JMX notification listener
+ | that maintains a table with the received notifications (alarms).
+ | The alarms can be acknowledged through the jmx or the web console.
+ | Modify the SubscriptionList below to subscribe for any notification
+ | in the system and treat it as an alarm.
+ | The JMXNotificationAppender is a log4j Appender that can be configured
+ | in log4j.xml, that trasforms logging events to JMX notification so they
+ | can be fed back into the table. By storing the WARN or higher level logging
+ | events you can have a quick view of important system faults.
+ |
+ | The following attributes may be set:
+ |
+ | MaxTableSize (default 1000)
+ | - set an upper limit to the number of stored alarms
+ | LogLevel (default DEBUG)
+ | - the log level to use for received notification, can be set to NONE
+ | ServerId (default jboss)
+ | - used to construct unique alarm ids
+ | SubscriptionList
+ | - subscribe for the notifications to be stored in the table
+
+ <mbean code="org.jboss.monitor.services.ActiveAlarmTable"
+ name="jboss.monitor:service=ActiveAlarmTable">
+ <attribute name="SubscriptionList">
+ <subscription-list>
+ <mbean name="jboss.monitor:*">
+ <notification type="jboss.alarm"/>
+ <notification type="JBOSS_MONITOR_NOTIFICATION"/>
+ </mbean>
+ <mbean name="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+ </subscription-list>
+ </attribute>
+ </mbean>
+ -->
+
+ <!-- ==================================================================== -->
+ <!-- JBoss RMI Classloader - only install when available -->
+ <!-- ==================================================================== -->
+ <mbean code="org.jboss.util.property.jmx.SystemPropertyClassValue"
+ name="jboss.rmi:type=RMIClassLoader">
+ <attribute name="Property">java.rmi.server.RMIClassLoaderSpi</attribute>
+ <attribute name="ClassName">org.jboss.system.JBossRMIClassLoader</attribute>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Service Binding -->
+ <!-- ==================================================================== -->
+
+ <!-- Automatically activated when generatting the clustering environment -->
+ <!-- @TESTSUITE_CLUSTER_CONFIG@ -->
+
+ <!--
+ | Binding service manager for port/host mapping. This is a sample
+ | config that demonstrates a JBoss instances with a server name 'ports-02'
+ | loading its bindings from an XML file using the ServicesStoreFactory
+ | implementation returned by the XMLServicesStoreFactory.
+ |
+ | ServerName: The unique name assigned to a JBoss server instance for
+ | lookup purposes. This allows a single ServicesStore to handle mulitiple
+ | JBoss servers.
+ |
+ | StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore
+ | during initialization that specifies how to connect to the bindings store.
+ | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
+ | implementation to create to obtain the ServicesStore instance.
+-->
+
+ <mbean code="org.jboss.services.binding.ServiceBindingManager"
+ name="jboss.system:service=ServiceBindingManager">
+ <attribute name="ServerName">@server.name@</attribute>
+ <attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
+ <attribute name="StoreFactoryClassName">
+ org.jboss.services.binding.XMLServicesStoreFactory
+ </attribute>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Class Loading -->
+ <!-- ==================================================================== -->
+
+ <!-- A mini webserver used for dynamic and class and resource loading -->
+ <mbean code="org.jboss.web.WebService"
+ name="jboss:service=WebService">
+ <!-- The Bind address and Port -->
+ <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ <attribute name="Port">8083</attribute>
+ <!-- The address to use for the host portion of the RMI codebase URL -->
+ <attribute name="Host">${java.rmi.server.hostname}</attribute>
+ <!-- Should non-EJB .class files be downloadable -->
+ <attribute name="DownloadServerClasses">true</attribute>
+ <!-- Should resources other than .class files be downloadable. Both
+ DownloadServerClasses and DownloadResources must be true for resources
+ to be downloadable. This is false by default because its generally a
+ bad idea as server configuration files that container security
+ information can be accessed.
+ -->
+ <attribute name="DownloadResources">false</attribute>
+
+ <!-- Use the default thread pool for dynamic class loading -->
+ <depends optional-attribute-name="ThreadPool"
+ proxy-type="attribute">jboss.system:service=ThreadPool</depends>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- JNDI -->
+ <!-- ==================================================================== -->
+
+ <!-- A simple mbean wrapper around the jndi Naming object. This
+ only handles an in memory instance. The NamingService uses this
+ as the JNDI store and exposes it remotely.
+ -->
+ <mbean code="org.jnp.server.NamingBeanImpl"
+ name="jboss:service=NamingBeanImpl"
+ xmbean-dd="resource:xmdesc/NamingBean-xmbean.xml">
+ </mbean>
+
+ <mbean code="org.jboss.naming.NamingService"
+ name="jboss:service=Naming"
+ xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
+ <!-- The call by value mode. true if all lookups are unmarshalled using
+ the caller's TCL, false if in VM lookups return the value by reference.
+ -->
+ <attribute name="CallByValue">false</attribute>
+ <!-- The listening port for the bootstrap JNP service. Set this to -1
+ to run the NamingService without the JNP invoker listening port.
+ -->
+ <attribute name="Port">1099</attribute>
+ <!-- The bootstrap JNP server bind address. This also sets the default
+ RMI service bind address. Empty == all addresses
+ -->
+ <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ <!-- The port of the RMI naming service, 0 == anonymous -->
+ <attribute name="RmiPort">1098</attribute>
+ <!-- The RMI service bind address. Empty == all addresses
+ -->
+ <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
+ <!-- The thread pool service used to control the bootstrap lookups -->
+ <depends optional-attribute-name="LookupPool"
+ proxy-type="attribute">jboss.system:service=ThreadPool</depends>
+ <!-- An example of using the unifed invoker as the transport.
+ <depends optional-attribute-name="InvokerProxyFactory"
+ proxy-type="attribute">jboss:service=proxyFactory,type=unified,target=Naming</depends>
+ -->
+ <depends optional-attribute-name="Naming"
+ proxy-type="attribute">jboss:service=NamingBeanImpl</depends>
+ </mbean>
+
+ <mbean code="org.jboss.naming.JNDIView"
+ name="jboss:service=JNDIView"
+ xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">
+ <!-- The HANamingService service name -->
+ <attribute name="HANamingService">jboss:service=HAJNDI</attribute>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Security -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.security.plugins.SecurityConfig"
+ name="jboss.security:service=SecurityConfig">
+ <attribute name="LoginConfig">jboss.security:service=XMLLoginConfig</attribute>
+ </mbean>
+ <mbean code="org.jboss.security.auth.login.XMLLoginConfig"
+ name="jboss.security:service=XMLLoginConfig">
+ <attribute name="ConfigResource">login-config.xml</attribute>
+ </mbean>
+
+ <!-- JAAS security manager and realm mapping -->
+ <mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
+ name="jboss.security:service=JaasSecurityManager">
+ <!-- A flag which indicates whether the SecurityAssociation server mode
+ is set on service creation. This is true by default since the
+ SecurityAssociation should be thread local for multi-threaded server
+ operation.
+ -->
+ <attribute name="ServerMode">true</attribute>
+ <attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
+ <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute>
+ <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
+ in seconds.
+ If you want to disable caching of security credentials, set this to 0 to
+ force authentication to occur every time. This has no affect if the
+ AuthenticationCacheJndiName has been changed from the default value.
+ -->
+ <attribute name="DefaultCacheTimeout">1800</attribute>
+ <!-- DefaultCacheResolution: Specifies the default timed cache policy
+ resolution in seconds. This controls the interval at which the cache
+ current timestamp is updated and should be less than the DefaultCacheTimeout
+ in order for the timeout to be meaningful. This has no affect if the
+ AuthenticationCacheJndiName has been changed from the default value.
+ -->
+ <attribute name="DefaultCacheResolution">60</attribute>
+ <!-- DeepCopySubjectMode: This set the copy mode of subjects done by the
+ security managers to be deep copies that makes copies of the subject
+ principals and credentials if they are cloneable. It should be set to
+ true if subject include mutable content that can be corrupted when
+ multiple threads have the same identity and cache flushes/logout clearing
+ the subject in one thread results in subject references affecting other
+ threads.
+ -->
+ <attribute name="DeepCopySubjectMode">false</attribute>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Transactions -->
+ <!-- ==================================================================== -->
+
+ <!-- The configurable Xid factory. For use with Oracle, set pad to true -->
+ <mbean code="org.jboss.tm.XidFactory"
+ name="jboss:service=XidFactory">
+ <!--attribute name="Pad">true</attribute-->
+ </mbean>
+
+ <!--
+ | The fast in-memory transaction manager.
+ | Deprecated in JBossAS v4.2. Use JBossTS JTA instead.
+ - ->
+ <mbean code="org.jboss.tm.TransactionManagerService"
+ name="jboss:service=TransactionManager"
+ xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
+ <attribute name="TransactionTimeout">300</attribute>
+ <!- - set to false to disable transaction demarcation over IIOP - ->
+ <attribute name="GlobalIdsEnabled">true</attribute>
+ <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
+
+ <!- - Transaction Integrity Checking - ->
+ <!- - Force a rollback if another thread is associated with the transaction at commit - ->
+ <!- - <depends optional-attribute-name="TransactionIntegrityFactory"
+ proxy-type="org.jboss.tm.integrity.TransactionIntegrityFactory">
+ <mbean code="org.jboss.tm.integrity.FailIncompleteTransaction"
+ name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/>
+ </depends> - ->
+ </mbean>
+ -->
+
+ <!-- JBoss Transactions JTA -->
+ <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
+ name="jboss:service=TransactionManager">
+ <attribute name="TransactionTimeout">300</attribute>
+ <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
+ </mbean>
+
+ <!--
+ | UserTransaction support.
+ -->
+ <mbean code="org.jboss.tm.usertx.server.ClientUserTransactionService"
+ name="jboss:service=ClientUserTransaction"
+ xmbean-dd="resource:xmdesc/ClientUserTransaction-xmbean.xml">
+ <depends>
+ <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+ name="jboss:service=proxyFactory,target=ClientUserTransactionFactory">
+ <attribute name="InvokerName">jboss:service=invoker,type=jrmp</attribute>
+ <attribute name="TargetName">jboss:service=ClientUserTransaction</attribute>
+ <attribute name="JndiName">UserTransactionSessionFactory</attribute>
+ <attribute name="ExportedInterface">org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory</attribute>
+ <attribute name="ClientInterceptors">
+ <interceptors>
+ <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+ <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+ </interceptors>
+ </attribute>
+ <depends>jboss:service=invoker,type=jrmp</depends>
+ </mbean>
+ </depends>
+ <depends optional-attribute-name="TxProxyName">
+ <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+ name="jboss:service=proxyFactory,target=ClientUserTransaction">
+ <attribute name="InvokerName">jboss:service=invoker,type=jrmp</attribute>
+ <attribute name="TargetName">jboss:service=ClientUserTransaction</attribute>
+ <attribute name="JndiName"></attribute>
+ <attribute name="ExportedInterface">org.jboss.tm.usertx.interfaces.UserTransactionSession</attribute>
+ <attribute name="ClientInterceptors">
+ <interceptors>
+ <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+ <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+ </interceptors>
+ </attribute>
+ <depends>jboss:service=invoker,type=jrmp</depends>
+ </mbean>
+ </depends>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Invokers to the JMX node -->
+ <!-- ==================================================================== -->
+
+ <!-- Unified invoker (based on remoting) -->
+ <mbean code="org.jboss.invocation.unified.server.UnifiedInvoker"
+ name="jboss:service=invoker,type=unified">
+ <!-- To turn on strict RMI exception propagation uncomment block below -->
+ <!-- This will cause the UnifiedInvokerProxy to wrap RemoteExceptions -->
+ <!-- within a ServerException, otherwise will throw root exception -->
+ <!-- (not RemoteException) -->
+ <!-- <attribute name="StrictRMIException">true</attribute> -->
+ <depends>jboss:service=TransactionManager</depends>
+ <depends>jboss.remoting:service=Connector,transport=socket</depends>
+ </mbean>
+
+ <!-- RMI/JRMP invoker -->
+ <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
+ name="jboss:service=invoker,type=jrmp">
+ <attribute name="RMIObjectPort">4444</attribute>
+ <attribute name="ServerAddress">${jboss.bind.address}</attribute>
+ <!--
+ <attribute name="RMIClientSocketFactory">custom</attribute>
+ <attribute name="RMIServerSocketFactory">custom</attribute>
+ <attribute name="RMIServerSocketAddr">custom</attribute>
+ <attribute name="SecurityDomain">ssl-domain-name</attribute>
+ -->
+ <depends>jboss:service=TransactionManager</depends>
+ </mbean>
+
+ <mbean code="org.jboss.invocation.local.LocalInvoker"
+ name="jboss:service=invoker,type=local">
+
+ <depends>jboss:service=TransactionManager</depends>
+ </mbean>
+
+ <mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
+ name="jboss:service=invoker,type=pooled">
+ <attribute name="NumAcceptThreads">1</attribute>
+ <attribute name="MaxPoolSize">300</attribute>
+ <attribute name="ClientMaxPoolSize">300</attribute>
+ <attribute name="SocketTimeout">60000</attribute>
+ <attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
+ <attribute name="ServerBindPort">4445</attribute>
+ <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
+ <attribute name="ClientConnectPort">0</attribute>
+ <attribute name="ClientRetryCount">1</attribute>
+ <attribute name="EnableTcpNoDelay">false</attribute>
+
+ <!-- Customized socket factory attributes
+ <attribute name="ClientSocketFactoryName">custom.client.factory</attribute>
+ <attribute name="ServerSocketFactoryName">custom.server.factory</attribute>
+ <attribute name="SslDomain">java:/jaas/pooledInvoker</attribute>
+ -->
+ <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
+ </mbean>
+
+ <!-- ==================================================================== -->
+ <!-- Remoting services -->
+ <!-- ==================================================================== -->
+
+ <!-- For detailed description of all these configuration attributes, please see the -->
+ <!-- JBoss Remoting User's Guide or wiki (http://labs.jboss.com/portal/jbossremoting/docs/guide/index.html) -->
+
+ <!-- The NetworkRegistry contains all the local and remote -->
+ <!-- servers that it recognizes. The remote ones registered -->
+ <!-- are dependant on the detectors running and which domains -->
+ <!-- they are configured to identify. -->
+ <mbean code="org.jboss.remoting.network.NetworkRegistry"
+ name="jboss.remoting:service=NetworkRegistry"/>
+
+ <!-- The Connector is the core component of the remoting server service. -->
+ <!-- It binds the remoting invoker (transport protocol, callback configuration, -->
+ <!-- data marshalling, etc.) with the invocation handlers. -->
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=socket"
+ display-name="Socket transport Connector">
+
+ <!-- Can either just specify the InvokerLocator attribute and not the invoker element in the -->
+ <!-- Configuration attribute, or do the full invoker configuration in the in invoker element -->
+ <!-- of the Configuration attribute. -->
+
+ <!-- Remember that if you do use more than one param on the uri, will have to include as a CDATA, -->
+ <!-- otherwise, parser will complain. -->
+ <!-- <attribute name="InvokerLocator"><![CDATA[socket://${jboss.bind.address}:4446/?datatype=invocation]]></attribute> -->
+
+ <attribute name="Configuration">
+ <!-- Using the following <invoker> element instead of the InvokerLocator above because specific attributes needed. -->
+ <!-- If wanted to use any of the parameters below, can just add them as parameters to the url above if wanted use the InvokerLocator attribute. -->
+ <config>
+ <!-- Other than transport type and handler, none of these configurations are required (will just use defaults). -->
+ <invoker transport="socket">
+ <attribute name="dataType" isParam="true">invocation</attribute>
+ <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
+ <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
+ <!-- This will be port on which the marshall loader port runs on. -->
+ <!-- <attribute name="loaderport" isParam="true">4447</attribute> -->
+ <!-- The following are specific to socket invoker -->
+ <!-- <attribute name="numAcceptThreads">1</attribute>-->
+ <!-- <attribute name="maxPoolSize">303</attribute>-->
+ <!-- <attribute name="clientMaxPoolSize" isParam="true">304</attribute>-->
+ <attribute name="socketTimeout" isParam="true">600000</attribute>
+ <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
+ <attribute name="serverBindPort">4446</attribute>
+ <!-- <attribute name="clientConnectAddress">216.23.33.2</attribute> -->
+ <!-- <attribute name="clientConnectPort">7777</attribute> -->
+ <attribute name="enableTcpNoDelay" isParam="true">true</attribute>
+ <!-- <attribute name="backlog">200</attribute>-->
+ <!-- The following is for callback configuration and is independant of invoker type -->
+ <!-- <attribute name="callbackMemCeiling">30</attribute>-->
+ <!-- indicates callback store by fully qualified class name -->
+ <!-- <attribute name="callbackStore">org.jboss.remoting.CallbackStore</attribute>-->
+ <!-- indicates callback store by object name -->
+ <!-- <attribute name="callbackStore">jboss.remoting:service=CallbackStore,type=Serializable</attribute> -->
+ <!-- config params for callback store. if were declaring callback store via object name, -->
+ <!-- could have specified these config params there. -->
+ <!-- StoreFilePath indicates to which directory to write the callback objects. -->
+ <!-- The default value is the property value of 'jboss.server.data.dir' and if this is not set, -->
+ <!-- then will be 'data'. Will then append 'remoting' and the callback client's session id. -->
+ <!-- An example would be 'data\remoting\5c4o05l-9jijyx-e5b6xyph-1-e5b6xyph-2'. -->
+ <!-- <attribute name="StoreFilePath">callback</attribute>-->
+ <!-- StoreFileSuffix indicates the file suffix to use for the callback objects written to disk. -->
+ <!-- The default value for file suffix is 'ser'. -->
+ <!-- <attribute name="StoreFileSuffix">cst</attribute>-->
+ </invoker>
+
+ <!-- At least one handler is required by the connector. If have more than one, must decalre -->
+ <!-- different subsystem values. Otherwise, all invocations will be routed to the only one -->
+ <!-- that is declared. -->
+ <handlers>
+ <!-- can also specify handler by fully qualified classname -->
+ <handler subsystem="invoker">jboss:service=invoker,type=unified</handler>
+ </handlers>
+ </config>
+ </attribute>
+ <depends>jboss.remoting:service=NetworkRegistry</depends>
+ </mbean>
+
+
+ <!-- <mbean code="org.jboss.remoting.detection.jndi.JNDIDetector"-->
+ <!-- name="jboss.remoting:service=Detector,transport=jndi">-->
+ <!-- host to which the detector will connect to for the JNDI server. -->
+ <!-- <attribute name="Host">localhost</attribute>-->
+ <!-- port to which detector will connect to for the JNDI server. -->
+ <!-- <attribute name="Port">5555</attribute>-->
+ <!-- context factory string used when connecting to the JNDI server. -->
+ <!-- The default is org.jnp.interfaces.NamingContextFactory. -->
+ <!-- <attribute name="ContextFactory">org.acme.NamingContextFactory</attribute> -->
+ <!-- url package string to use when connecting to the JNDI server. -->
+ <!-- The default is org.jboss.naming:org.jnp.interfaces. -->
+ <!-- <attribute name="URLPackage">org.acme.naming</attribute> -->
+ <!-- Sets the number of detection iterations before manually pinging -->
+ <!-- remote server to make sure still alive. This is needed since remote server -->
+ <!-- could crash and yet still have an entry in the JNDI server, -->
+ <!-- thus making it appear that it is still there. The default value is 5. -->
+ <!-- <attribute name="CleanDetectionNumber">20</attribute>-->
+
+ <!-- Specifies the domains in which the detector will recognize -->
+ <!-- detections. If servers are not configured to be in these -->
+ <!-- domains, they will not be added to NetworkRegistry. -->
+ <!-- <attribute name="Configuration">-->
+ <!-- <domains>-->
+ <!-- <domain>roxanne</domain>-->
+ <!-- <domain>sparky</domain>-->
+ <!-- </domains>-->
+ <!-- </attribute>-->
+ <!-- </mbean>-->
+
+
+ <!-- ==================================================================== -->
+ <!-- Monitoring and Management -->
+ <!-- ==================================================================== -->
+
+ <!-- Uncomment to enable JMX monitoring of the bean cache
+ <mbean code="org.jboss.monitor.BeanCacheMonitor"
+ name="jboss.monitor:name=BeanCacheMonitor"/>
+ -->
+
+ <!-- Uncomment to enable JMX monitoring of the entity bean locking
+ <mbean code="org.jboss.monitor.EntityLockMonitor"
+ name="jboss.monitor:name=EntityLockMonitor"/>
+ -->
+
+ <!-- ==================================================================== -->
+ <!-- An MBean that is a registry for JDBC type-mapping metadata -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.ejb.plugins.cmp.jdbc.metadata.MetaDataLibrary"
+ name="jboss.jdbc:service=metadata"/>
+
+ <!-- ==================================================================== -->
+ <!-- Deployment Scanning -->
+ <!-- ==================================================================== -->
+
+ <!-- An mbean for hot deployment/undeployment of archives.
+ -->
+ <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
+ name="jboss.deployment:type=DeploymentScanner,flavor=URL">
+
+ <!-- Uncomment (and comment/remove version below) to enable usage of the
+ DeploymentCache
+ <depends optional-attribute-name="Deployer">jboss.deployment:type=DeploymentCache</depends>
+ -->
+ <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>
+
+ <!-- The URLComparator can be used to specify a deployment ordering
+ for deployments found in a scanned directory. The class specified
+ must be an implementation of java.util.Comparator, it must be able
+ to compare two URL objects, and it must have a no-arg constructor.
+ Two deployment comparators are shipped with JBoss:
+ - org.jboss.deployment.DeploymentSorter
+ Sorts by file extension, as follows:
+ "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
+ "*"
+ - org.jboss.deployment.scanner.PrefixDeploymentSorter
+ If the name portion of the url begins with 1 or more digits, those
+ digits are converted to an int (ignoring leading zeroes), and
+ files are deployed in that order. Files that do not start with
+ any digits will be deployed first, and they will be sorted by
+ extension as above with DeploymentSorter.
+ -->
+ <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
+
+ <!--
+ <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
+ -->
+
+ <!-- The FilterInstance specifies a URLLister.URLFilter for scanned
+ directories. This DeploymentFilter is initialized with the given
+ prefixes, suffixes and matches that define which URLs should be
+ ignored.
+ -->
+ <attribute name="FilterInstance"
+ attributeClass="org.jboss.deployment.scanner.DeploymentFilter"
+ serialDataType="javaBean">
+ <!-- Files starting with theses strings are ignored -->
+ <property name="prefixes">#,%,\,,.,_$</property>
+ <!-- Files ending with theses strings are ignored -->
+ <property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
+ <!-- Files matching with theses strings are ignored -->
+ <property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
+ </attribute>
+
+ <!-- Frequency in milliseconds to rescan the URLs for changes -->
+ <attribute name="ScanPeriod">5000</attribute>
+
+ <!-- A flag to disable the scans -->
+ <attribute name="ScanEnabled">true</attribute>
+
+ <!-- URLs are comma separated and resolve relative to the server home URL
+ unless the given path is absolute. If the URL ends in "/" it is
+ considered a collection and scanned, otherwise it is simply deployed;
+ this follows RFC2518 convention and allows discrimination between
+ collections and directories that are simply unpacked archives.
+
+ URLs may be local (file:) or remote (http:). Scanning is supported
+ for remote URLs but unpacked deployment units are not.
+
+ Example URLs:
+ deploy/
+ scans ${jboss.server.url}/deploy/, which is local or remote
+ depending on the URL used to boot the server
+ ${jboss.server.home}/deploy/
+ scans ${jboss.server.home)/deploy, which is always local
+ file:/var/opt/myapp.ear
+ deploy myapp.ear from a local location
+ file:/var/opt/apps/
+ scans the specified directory
+ http://www.test.com/netboot/myapp.ear
+ deploys myapp.ear from a remote location
+ http://www.test.com/netboot/apps/
+ scans the specified WebDAV location
+ -->
+ <attribute name="URLs">
+ deploy/
+ </attribute>
+
+ <!-- Indicates if the scanner should recursively scan directories that
+ contain no "." in their names. This can be used to group applications
+ and services that must be deployed and that have the same
+ logical function in the same directory i.e.
+ deploy/JMX/
+ deploy/JMS/
+ ...
+ -->
+ <attribute name="RecursiveSearch">True</attribute>
+
+ </mbean>
+
+</server>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/server.properties 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,5 +0,0 @@
-org.jboss.esb.twoservers.home=/Users/tcunning/src/esb/branch/product/build/jbossesb-server-4.2.1GA
-#org.jboss.esb.twoservers.home=/opt/jbossesb-server-4.2.1GA
-org.jboss.esb.twoservers.orig.config=default
-org.jboss.esb.twoservers.dest.first=first
-org.jboss.esb.twoservers.dest.second=second
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/server.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/server.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,5 @@
+org.jboss.esb.twoservers.home=/Users/tcunning/src/esb/branch/product/build/jbossesb-server-4.2.1GA
+#org.jboss.esb.twoservers.home=/opt/jbossesb-server-4.2.1GA
+org.jboss.esb.twoservers.orig.config=default
+org.jboss.esb.twoservers.dest.first=first
+org.jboss.esb.twoservers.dest.second=second
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.twoservers;
-
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction extends AbstractActionLifecycle
-{
-
- protected ConfigTree _config;
-
- public MyJMSListenerAction(ConfigTree config) { _config = config; }
-
-
- public Message displayMessage(Message message) throws Exception{
-
- System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
- System.out.println("Body: " + message.getBody().get()) ;
- System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
- return message;
-
- }
-
-
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/MyJMSListenerAction.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.twoservers;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction extends AbstractActionLifecycle
+{
+
+ protected ConfigTree _config;
+
+ public MyJMSListenerAction(ConfigTree config) { _config = config; }
+
+
+ public Message displayMessage(Message message) throws Exception{
+
+ System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+ System.out.println("Body: " + message.getBody().get()) ;
+ System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+ return message;
+
+ }
+
+
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.twoservers;
-
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class StringAppender extends AbstractActionLifecycle
-{
-
- protected ConfigTree _config;
-
- public StringAppender(ConfigTree config) { _config = config; }
-
-
- public Message process(Message message) throws Exception{
- String appendString = (String) message.getBody().get();
- appendString = "===== " + appendString + "=====";
- message.getBody().add(appendString);
- return message;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/StringAppender.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.twoservers;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class StringAppender extends AbstractActionLifecycle
+{
+
+ protected ConfigTree _config;
+
+ public StringAppender(ConfigTree config) { _config = config; }
+
+
+ public Message process(Message message) throws Exception{
+ String appendString = (String) message.getBody().get();
+ appendString = "===== " + appendString + "=====";
+ message.getBody().add(appendString);
+ return message;
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,59 +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.soa.esb.samples.quickstart.twoservers.test;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.client.ServiceInvoker;
-
-/**
- * Standalone class with to send ESB messages to a 'known' [category,name].
- * <p/> arg0 - service category
- * <br/>arg1 - service name
- * <br/>arg2 - Text of message to send
- *
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- *
- */
-public class SendEsbMessage
-{
- public static void main(String args[]) throws Exception
- {
-// Setting the ConnectionFactory such that it will use scout
- System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
-
- if (args.length < 3)
- {
- System.out.println("Usage SendEsbMessage <category> <name> <text to send>");
- }
-
- Message esbMessage = MessageFactory.getInstance().getMessage();
-
- esbMessage.getBody().add(args[2]);
-
- new ServiceInvoker(args[0], args[1]).deliverAsync(esbMessage);
-
- }
-
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendEsbMessage.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -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.soa.esb.samples.quickstart.twoservers.test;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.client.ServiceInvoker;
+
+/**
+ * Standalone class with to send ESB messages to a 'known' [category,name].
+ * <p/> arg0 - service category
+ * <br/>arg1 - service name
+ * <br/>arg2 - Text of message to send
+ *
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ *
+ */
+public class SendEsbMessage
+{
+ public static void main(String args[]) throws Exception
+ {
+// Setting the ConnectionFactory such that it will use scout
+ System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
+
+ if (args.length < 3)
+ {
+ System.out.println("Usage SendEsbMessage <category> <name> <text to send>");
+ }
+
+ Message esbMessage = MessageFactory.getInstance().getMessage();
+
+ esbMessage.getBody().add(args[2]);
+
+ new ServiceInvoker(args[0], args[1]).deliverAsync(esbMessage);
+
+ }
+
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.twoservers.test;
-
-import java.util.Properties;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-public class SendJMSMessage {
- QueueConnection conn;
- QueueSession session;
- Queue que;
-
-
- public void setupConnection() throws JMSException, NamingException
- {
- Properties properties1 = new Properties();
- properties1.put(Context.INITIAL_CONTEXT_FACTORY,
- "org.jnp.interfaces.NamingContextFactory");
- properties1.put(Context.URL_PKG_PREFIXES,
- "org.jboss.naming:org.jnp.interfaces");
- properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1199");
- InitialContext iniCtx = new InitialContext(properties1);
-
- Object tmp = iniCtx.lookup("ConnectionFactory");
- QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
- conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_twoservers_Request_gw");
- session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
- conn.start();
- System.out.println("Connection Started");
- }
-
- public void stop() throws JMSException
- {
- conn.stop();
- session.close();
- conn.close();
- }
-
- public void sendAMessage(String msg) throws JMSException {
-
- QueueSender send = session.createSender(que);
- ObjectMessage tm = session.createObjectMessage(msg);
-
- send.send(tm);
- send.close();
- }
-
-
- public static void main(String args[]) throws Exception
- {
- SendJMSMessage sm = new SendJMSMessage();
- sm.setupConnection();
- sm.sendAMessage(args[0]);
- sm.stop();
-
- }
-
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/two_servers/src/org/jboss/soa/esb/samples/quickstart/twoservers/test/SendJMSMessage.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.twoservers.test;
+
+import java.util.Properties;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+ QueueConnection conn;
+ QueueSession session;
+ Queue que;
+
+
+ public void setupConnection() throws JMSException, NamingException
+ {
+ Properties properties1 = new Properties();
+ properties1.put(Context.INITIAL_CONTEXT_FACTORY,
+ "org.jnp.interfaces.NamingContextFactory");
+ properties1.put(Context.URL_PKG_PREFIXES,
+ "org.jboss.naming:org.jnp.interfaces");
+ properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1199");
+ InitialContext iniCtx = new InitialContext(properties1);
+
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup("queue/quickstart_twoservers_Request_gw");
+ session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ conn.start();
+ System.out.println("Connection Started");
+ }
+
+ public void stop() throws JMSException
+ {
+ conn.stop();
+ session.close();
+ conn.close();
+ }
+
+ public void sendAMessage(String msg) throws JMSException {
+
+ QueueSender send = session.createSender(que);
+ ObjectMessage tm = session.createObjectMessage(msg);
+
+ send.send(tm);
+ send.close();
+ }
+
+
+ public static void main(String args[]) throws Exception
+ {
+ SendJMSMessage sm = new SendJMSMessage();
+ sm.setupConnection();
+ sm.sendAMessage(args[0]);
+ sm.stop();
+
+ }
+
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -365,13 +365,23 @@
boolean error=false;
Connection con = null;
+
try
{
con = mgr.getConnection();
con.setAutoCommit(false);
con.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
-
-
+ }
+ catch (final SQLException e)
+ {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Deadlocks may occur under normal processing.");
+ logger.debug(e.getMessage(), e);
+ }
+ }
+
+ try
+ {
Message message=select(uuid, con);
if (message!=null && delete(uuid, RedeliverStore.CLASSIFICATION_RDLVR, con)==1) {
@@ -411,12 +421,10 @@
}
}
}
- catch (SQLException e)
+ catch (final SQLException e)
{
- if (logger.isDebugEnabled()) {
- logger.debug("Deadlocks may occur under normal processing");
- logger.debug(e.getMessage(), e);
- }
+ logger.warn("DBMessageStoreImpl caught exception "+e+". Will force transaction to rollback.");
+
error=true;
}
finally
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/ExceptionFlowTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/ExceptionFlowTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/ExceptionFlowTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -106,7 +106,7 @@
//Move the process to service1
processInstance.signal();
jbpmContext.close();
- //Our timer fires after 1000 millies, so let's wait for that
+ //Our timer fires after 1000 millis, so let's wait for that
int seconds=0;
while(true) {
jbpmContext = jbpmConfiguration.createJbpmContext();
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -217,7 +217,7 @@
{
// read in the rules
logger.debug("Going to read the rule: " + rulesFile);
- InputStream inputStreamDrl = ClassUtil.getResourceAsStream("/" + rulesFile, JBossRulesRouter.class);
+ InputStream inputStreamDrl = ClassUtil.getResourceAsStream(rulesFile.charAt(0) == '/' ? rulesFile : "/" + rulesFile, JBossRulesRouter.class);
if (inputStreamDrl == null)
{
logger.error("Could not find rulesFile: " + rulesFile);
@@ -239,7 +239,7 @@
else
{
logger.debug("Going to read the language: " + ruleLanguage);
- InputStream inputStreamDsl = ClassUtil.getResourceAsStream("/" + ruleLanguage, JBossRulesRouter.class);
+ InputStream inputStreamDsl = ClassUtil.getResourceAsStream(ruleLanguage.charAt(0) == '/' ? ruleLanguage : "/" + ruleLanguage, JBossRulesRouter.class);
if (inputStreamDsl == null)
{
logger.error("Could not find ruleLanguage: " + rulesFile);
@@ -284,7 +284,7 @@
throws IOException
{
logger.debug("Going to hash the rule: " + rulesFile);
- InputStream inputStreamDrl = ClassUtil.getResourceAsStream("/" + rulesFile, JBossRulesRouter.class);
+ InputStream inputStreamDrl = ClassUtil.getResourceAsStream(rulesFile.charAt(0) == '/' ? rulesFile : "/" + rulesFile, JBossRulesRouter.class);
if (inputStreamDrl == null)
{
logger.error("Could not find rulesFile: " + rulesFile);
@@ -305,7 +305,7 @@
if (ruleLanguage != null)
{
logger.debug("Going to hash the language: " + ruleLanguage);
- InputStream inputStreamDsl = ClassUtil.getResourceAsStream("/" + ruleLanguage, JBossRulesRouter.class);
+ InputStream inputStreamDsl = ClassUtil.getResourceAsStream(ruleLanguage.charAt(0) == '/' ? ruleLanguage : "/" + ruleLanguage, JBossRulesRouter.class);
if (inputStreamDsl == null)
{
logger.error("Could not find language: " + ruleLanguage);
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -77,14 +77,21 @@
* </div>
*
* <h3>Action Configuration</h3>
- * The <action ... /> configuration for this action is very straightforward. The action just takes one
- * property value, which is the name of the JBossWS endpoint it's exposing (invoking).
+ * The <action ... /> configuration for this action is very straightforward. The action requires only one
+ * mandatory property value, which is the "jbossws-endpoint" property. This property names the JBossWS endpoint
+ * that the SOAPProcessor is exposing (invoking).
*
* <pre>
* <action name="ShippingProcessor" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
* <property name="<b>jbossws-endpoint</b>" value="<b>ABI_Shipping</b>"/>
+ * <property name="<b>rewrite-endpoint-url</b>" value="true/false"/> <-- Optional. Default "true". -->
* </action>
* </pre>
+ *
+ * The optional "rewrite-endpoint-url" property is there to support load balancing on HTTP endpoints,
+ * in which case the Webservice endpoint container will have been configured to set the HTTP(S) endpoint address
+ * in the WSDL to that of the Load Balancer. The "rewrite-endpoint-url" property can be used to turn off HTTP endpoint
+ * address rewriting in situations such as this. It has no effect for non-HTTP protocols.
*
* <h3>Quickstarts</h3>
* A number of quickstarts that demonstrate how to use this action are available in the JBossESB
@@ -97,6 +104,7 @@
public class SOAPProcessor extends AbstractActionPipelineProcessor {
public static final String JBOSSWS_ENDPOINT = "jbossws-endpoint";
+ public static final String REWRITE_ENDPOINT_URL = "rewrite-endpoint-url";
private static ThreadLocal<Message> messageTL = new ThreadLocal<Message>();
private String jbossws_endpoint;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -54,6 +54,7 @@
private static Logger logger = Logger.getLogger(WebserviceContractPublisher.class);
private String endpointName;
+ private boolean rewriteEndpointUrl = true;
private Smooks transformer;
/**
@@ -67,8 +68,10 @@
for(PropertyDocument.Property property : properties) {
if(property.getName().equals(SOAPProcessor.JBOSSWS_ENDPOINT)) {
endpointName = property.getValue();
- break;
}
+ if(property.getName().equals(SOAPProcessor.REWRITE_ENDPOINT_URL)) {
+ rewriteEndpointUrl = !property.getValue().equals("false");
+ }
}
if(endpointName == null) {
@@ -149,10 +152,15 @@
* @param wsdl WSDL input.
* @param epr The SOAP endpoint from the ESB perspective.
* @param targetServiceCat
- *@param targetServiceName
+ * @param targetServiceName
* @param targetProtocol @return The updated WSDL.
*/
protected String updateWsdl(String wsdl, EPR epr, String targetServiceCat, String targetServiceName, String targetProtocol) throws SAXException, IOException, ConfigurationException {
+ if(!rewriteEndpointUrl && targetProtocol.startsWith("http")) {
+ // return the wsdl unchanged...
+ return wsdl;
+ }
+
URI endpointURI = URI.create(epr.getAddr().getAddress());
StringWriter writer = new StringWriter();
StandaloneExecutionContext execContext = transformer.createExecutionContext();
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -19,18 +19,19 @@
*/
package org.jboss.soa.esb.actions.soap;
-import java.io.IOException;
-import java.net.URI;
-
import junit.framework.TestCase;
-
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.StreamUtils;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument;
import org.jboss.soa.esb.testutils.StringUtils;
-import org.jboss.soa.esb.addressing.EPR;
import org.xml.sax.SAXException;
+import java.io.IOException;
+import java.net.URI;
+
/**
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
@@ -48,4 +49,50 @@
log.debug(wsdlOut);
assertTrue("WSDL Update failed. \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
}
+
+ public void test_http_rewrite() throws ConfigurationException, IOException, SAXException {
+ WebserviceContractPublisher publisher = new WebserviceContractPublisher();
+ String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+ String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected-http-rewrite.wsdl")));
+ EPR epr = new EPR(URI.create("http://x.y.x:8989/"));
+
+ publisher.setActionConfig(buildActionConfig(true));
+
+ publisher.initializeTransform();
+ String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
+ log.debug(wsdlOut);
+ assertTrue("WSDL Update failed. \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
+ }
+
+ public void test_http_norewrite() throws ConfigurationException, IOException, SAXException {
+ WebserviceContractPublisher publisher = new WebserviceContractPublisher();
+ String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+ String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl"))); // expected same as input wsdl
+ EPR epr = new EPR(URI.create("http://x.y.x:8989/"));
+
+ publisher.setActionConfig(buildActionConfig(false));
+
+ publisher.initializeTransform();
+ String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
+ log.debug(wsdlOut);
+ assertTrue("WSDL Update failed. \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
+ }
+
+ private ActionDocument.Action buildActionConfig(boolean rewriteUrls) {
+ ActionDocument.Action action = ActionDocument.Action.Factory.newInstance();
+ PropertyDocument.Property[] properties = new PropertyDocument.Property[2];
+
+ properties[0] = newConfigProperty(SOAPProcessor.JBOSSWS_ENDPOINT, "BlahEndpoint");
+ properties[1] = newConfigProperty(SOAPProcessor.REWRITE_ENDPOINT_URL, Boolean.toString(rewriteUrls));
+ action.setPropertyArray(properties);
+
+ return action;
+ }
+
+ private PropertyDocument.Property newConfigProperty(String name, String value) {
+ PropertyDocument.Property property = PropertyDocument.Property.Factory.newInstance();
+ property.setName(name);
+ property.setValue(value);
+ return property;
+ }
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected-http-rewrite.wsdl (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected-http-rewrite.wsdl)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected-http-rewrite.wsdl (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected-http-rewrite.wsdl 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,55 @@
+<definitions name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&resource=MTOMEndpoint_PortType61314.wsdl&serviceCat=myServiceCat&serviceName=myServiceName&protocol=http" namespace="http://org.jboss.ws/xop/doclit"/>
+ <types/>
+ <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
+ <part name="String_1" type="xsd:string"/>
+
+ </message>
+ <message name="GoodbyeWorldWS_sayGoodbye">
+ <part name="String_1" type="xsd:string"/>
+ </message>
+ <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+ <message name="GoodbyeWorldWS_sayGoodbyeResponse">
+ <part name="result" type="xsd:string"/>
+ </message>
+ <portType name="GoodbyeWorldWS">
+
+ <operation name="sayGoodbye" parameterOrder="String_1">
+ <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
+ <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
+ </operation>
+ <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
+ <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
+ <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="GoodbyeWorldWSBinding" type="tns:GoodbyeWorldWS">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="sayGoodbye">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+ </output>
+ </operation>
+ <operation name="sayGoodbyeWithoutResponse">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+ </output>
+ </operation>
+ </binding>
+ <service name="GoodbyeWorldWSService">
+ <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+ <soap:address location="http://x.y.x:8989/"/>
+ </port>
+ </service>
+</definitions>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -64,6 +64,7 @@
private DocumentBuilderFactory docBuilderFactory ;
private Map<String, Smooks> smooksCache;
private ESBProperties properties;
+ private static final String CLONED_POSTFIX = " - cloned";
/**
* Public default constructor.
@@ -211,7 +212,17 @@
collectionSize = calculateCollectionSize(ognl, params);
- if(collectionSize < 1) {
+ if(collectionSize == -1) {
+ // It's a collection, but has no entries that match the OGNL expression for this element...
+ if(clonePoint == element) {
+ // If the clonePoint is the element itself, we remove it... we're done with it...
+ clonePoint.getParentNode().removeChild(clonePoint);
+ } else {
+ // If the clonePoint is not the element itself (it's a child element), leave it
+ // and check it again when we get to it...
+ resetClonePoint(clonePoint);
+ }
+ } else if(collectionSize == 0) {
// It's a collection, but has no entries, remove it...
clonePoint.getParentNode().removeChild(clonePoint);
} else if(collectionSize == 1) {
@@ -273,6 +284,7 @@
return maxIndex + 1;
}
+ // It's a collection, but nothing in this message for it collection...
return -1;
}
@@ -282,7 +294,7 @@
// Is it this element...
comment = getCommentBefore(element);
if(comment != null && comment.getTextContent().endsWith(SOAPUI_CLONE_COMMENT)) {
- comment.setTextContent(comment.getTextContent() + " - cloned");
+ comment.setTextContent(comment.getTextContent() + CLONED_POSTFIX);
return element;
}
@@ -291,7 +303,7 @@
if(firstChildElement != null) {
comment = getCommentBefore(firstChildElement);
if(comment != null && comment.getTextContent().endsWith(SOAPUI_CLONE_COMMENT)) {
- comment.setTextContent(comment.getTextContent() + " - cloned");
+ comment.setTextContent(comment.getTextContent() + CLONED_POSTFIX);
return firstChildElement;
}
}
@@ -299,6 +311,21 @@
return null;
}
+ private void resetClonePoint(Element clonePoint) {
+ Comment comment = getCommentBefore(clonePoint);
+
+ if(comment == null) {
+ throw new IllegalStateException("Call to reset a 'clonePoint' that doesn't have a comment before it.");
+ }
+
+ String commentText = comment.getTextContent();
+ if(!commentText.endsWith(CLONED_POSTFIX)) {
+ throw new IllegalStateException("Call to reset a 'clonePoint' that doesn't have a proper clone comment before it.");
+ }
+
+ comment.setTextContent(commentText.substring(0, commentText.length() - CLONED_POSTFIX.length()));
+ }
+
private Comment getCommentBefore(Element element) {
Node sibling = element.getPreviousSibling();
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -151,6 +151,45 @@
assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_01.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_01.xml"), new ByteArrayInputStream(message.getBytes())));
}
+ public void test_has_collections_02_JBESB_1329() throws IOException, SAXException, ConfigurationException {
+ File wsdlFile = new File(WSDL_LOCATAION + "/orderprocessing/OrderProcessing_JBESB-1329.wsdl");
+ SoapUIClientService mbean = new SoapUIClientService();
+ Map params = new HashMap();
+ ArrayList<LineItem> lineItems = new ArrayList<LineItem>();
+
+ properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+
+ Order order = new Order();
+ ProcessOrderRequest request = new ProcessOrderRequest(order);
+ order.setId(123L);
+ order.setShipTo("Skeagh Bridge");
+ order.setLineItems(lineItems);
+
+ LineItem lineItem;
+
+ lineItem = new LineItem();
+ lineItems.add(lineItem);
+ lineItem.setId(456L);
+ lineItem.setName("item1");
+ lineItem.setPrice(10.99f);
+
+ lineItem = new LineItem();
+ lineItems.add(lineItem);
+ lineItem.setId(890L);
+ lineItem.setName("item2");
+ lineItem.setPrice(12.11f);
+
+ lineItem = new LineItem();
+ lineItems.add(lineItem);
+ lineItem.setId(321L);
+ lineItem.setName("item3");
+ lineItem.setPrice(76.34f);
+
+ params.put("processOrder", request);
+ String message = mbean.buildRequest(wsdlFile.toURI().toString(), "processOrder", params, properties, null, null);
+ assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_01_JBESB-1329.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_01_JBESB-1329.xml"), new ByteArrayInputStream(message.getBytes())));
+ }
+
public void test_has_collections_03() throws IOException, SAXException, ConfigurationException {
File wsdlFile = new File(WSDL_LOCATAION + "/orderprocessing/OrderProcessing.wsdl");
SoapUIClientService mbean = new SoapUIClientService();
@@ -172,6 +211,27 @@
assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_02.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_02.xml"), new ByteArrayInputStream(message.getBytes())));
}
+ public void test_has_collections_03_JBESB_1329() throws IOException, SAXException, ConfigurationException {
+ File wsdlFile = new File(WSDL_LOCATAION + "/orderprocessing/OrderProcessing_JBESB-1329.wsdl");
+ SoapUIClientService mbean = new SoapUIClientService();
+ Map params = new HashMap();
+ ArrayList<LineItem> lineItems = new ArrayList<LineItem>();
+
+ properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+
+ Order order = new Order();
+ ProcessOrderRequest request = new ProcessOrderRequest(order);
+ order.setId(123L);
+ order.setShipTo("Skeagh Bridge");
+ order.setLineItems(lineItems);
+
+ // No line Items....
+
+ params.put("processOrder", request);
+ String message = mbean.buildRequest(wsdlFile.toURI().toString(), "processOrder", params, properties, null, null);
+ assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_02_JBESB-1329.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_02_JBESB-1329.xml"), new ByteArrayInputStream(message.getBytes())));
+ }
+
public void test_has_collections_04() throws IOException, SAXException, ConfigurationException {
File wsdlFile = new File(WSDL_LOCATAION + "/orderprocessing/OrderProcessing.wsdl");
SoapUIClientService mbean = new SoapUIClientService();
@@ -196,6 +256,30 @@
assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_01.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_01.xml"), new ByteArrayInputStream(message.getBytes())));
}
+ public void test_has_collections_04_JBESB_1329() throws IOException, SAXException, ConfigurationException {
+ File wsdlFile = new File(WSDL_LOCATAION + "/orderprocessing/OrderProcessing_JBESB-1329.wsdl");
+ SoapUIClientService mbean = new SoapUIClientService();
+ Map params = new HashMap();
+
+ properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+
+ params.put("processOrder.order.id", 123L);
+ params.put("processOrder.order.shipTo", "Skeagh Bridge");
+
+ params.put("processOrder.order.lineItems[0].id", 456L);
+ params.put("processOrder.order.lineItems[0].name", "item1");
+ params.put("processOrder.order.lineItems[0].price", 10.99f);
+ params.put("processOrder.order.lineItems[1].id", 890L);
+ params.put("processOrder.order.lineItems[1].name", "item2");
+ params.put("processOrder.order.lineItems[1].price", 12.11f);
+ params.put("processOrder.order.lineItems[2].id", 321L);
+ params.put("processOrder.order.lineItems[2].name", "item3");
+ params.put("processOrder.order.lineItems[2].price", 76.34f);
+
+ String message = mbean.buildRequest(wsdlFile.toURI().toString(), "processOrder", params, properties, null, null);
+ assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_01_JBESB-1329.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_01_JBESB-1329.xml"), new ByteArrayInputStream(message.getBytes())));
+ }
+
public void test_has_collections_05() throws IOException, SAXException, ConfigurationException {
File wsdlFile = new File(WSDL_LOCATAION + "/orderprocessing/OrderProcessing.wsdl");
SoapUIClientService mbean = new SoapUIClientService();
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessingSchema_JBESB-1329.xsd (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessingSchema_JBESB-1329.xsd)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessingSchema_JBESB-1329.xsd (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessingSchema_JBESB-1329.xsd 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://endpoint/" xmlns:tns="http://endpoint/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="processOrder" type="tns:processOrder"/>
+
+ <xs:element name="processOrderResponse" type="tns:processOrderResponse"/>
+
+ <xs:complexType name="processOrder">
+ <xs:sequence>
+ <xs:element name="order" type="tns:order" minOccurs="0"/>
+ </xs:sequence>
+
+ </xs:complexType>
+
+ <xs:complexType name="order">
+ <xs:sequence>
+ <xs:element name="lineItems" type="tns:lineItem" nillable="true" maxOccurs="unbounded" minOccurs="0"/>
+ <xs:element name="id" type="xs:long" minOccurs="0"/>
+ <xs:element name="shipTo" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="lineItem">
+ <xs:sequence>
+ <xs:element name="id" type="xs:long" minOccurs="0"/>
+ <xs:element name="name" type="xs:string" minOccurs="0"/>
+ <xs:element name="price" type="xs:float" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="processOrderResponse">
+
+ <xs:sequence>
+ <xs:element name="return" type="tns:orderStatus" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="orderStatus">
+ <xs:sequence>
+ <xs:element name="comment" type="xs:string" minOccurs="0"/>
+ <xs:element name="id" type="xs:long" minOccurs="0"/>
+
+ <xs:element name="returnCode" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessing_JBESB-1329.wsdl (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessing_JBESB-1329.wsdl)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessing_JBESB-1329.wsdl (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/OrderProcessing_JBESB-1329.wsdl 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/" name="OrderProcessingService">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/" schemaLocation="OrderProcessingSchema_JBESB-1329.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="processOrder">
+ <part name="parameters" element="tns:processOrder"/>
+ </message>
+
+ <message name="processOrderResponse">
+ <part name="parameters" element="tns:processOrderResponse"/>
+ </message>
+ <portType name="OrderProcessing">
+ <operation name="processOrder">
+ <input message="tns:processOrder"/>
+ <output message="tns:processOrderResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="OrderProcessingPortBinding" type="tns:OrderProcessing">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="processOrder">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+
+ </output>
+ </operation>
+ </binding>
+ <service name="OrderProcessingService">
+ <port name="OrderProcessingPort" binding="tns:OrderProcessingPortBinding">
+ <soap:address location="http://tfennelly:8080/order-processing/OrderProcessingService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,37 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:end="http://endpoint/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <end:processOrder>
+ <!--Optional:-->
+ <order>
+ <!--Zero or more repetitions: - cloned-->
+ <lineItems>
+ <!--Optional:-->
+ <id>456</id>
+ <!--Optional:-->
+ <name>item1</name>
+ <!--Optional:-->
+ <price>10.99</price>
+ </lineItems>
+ <!--Optional:-->
+ <lineItems>
+ <!--Optional:-->
+ <id>890</id>
+ <!--Optional:-->
+ <name>item2</name>
+ <!--Optional:-->
+ <price>12.11</price>
+ </lineItems><lineItems>
+ <!--Optional:-->
+ <id>321</id>
+ <!--Optional:-->
+ <name>item3</name>
+ <!--Optional:-->
+ <price>76.34</price>
+ </lineItems><id>123</id>
+ <!--Optional:-->
+ <shipTo>Skeagh Bridge</shipTo>
+ </order>
+ </end:processOrder>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_02_JBESB-1329.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_02_JBESB-1329.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_02_JBESB-1329.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_02_JBESB-1329.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,16 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:end="http://endpoint/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <end:processOrder>
+ <!--Optional:-->
+ <order>
+ <!--Zero or more repetitions: - cloned-->
+
+ <!--Optional:-->
+ <id>123</id>
+ <!--Optional:-->
+ <shipTo>Skeagh Bridge</shipTo>
+ </order>
+ </end:processOrder>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -21,6 +21,10 @@
value="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib">
<available type="dir" file="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib"/>
</condition>
+ <condition property="esb.lib.dir"
+ value="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib">
+ <available type="dir" file="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib"/>
+ </condition>
<condition property="server.lib.dir"
value="../../../server/default/lib">
<available type="dir" file="../../../server/default/lib"
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFiler.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFiler.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFiler.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -162,7 +162,7 @@
* @param f_sb statistics bean
*/
public void insertStatistics(StatisticsBean f_sb) {
- TransactionStrategy txStrategy = TransactionStrategy.getStrategy();
+ TransactionStrategy txStrategy = TransactionStrategy.getTransactionStrategy(true);
Object txHandle = null;
if (txStrategy != null)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/InvokerFiler.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/InvokerFiler.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/InvokerFiler.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -67,7 +67,7 @@
* @see org.jboss.soa.esb.monitoring.server.Filer#persistData()
*/
public void persistData() {
- TransactionStrategy txS = TransactionStrategy.getStrategy();
+ TransactionStrategy txS = TransactionStrategy.getTransactionStrategy(true);
Object txHandle = null;
if (txS != null)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/OperationsFiler.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/OperationsFiler.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/OperationsFiler.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -95,7 +95,7 @@
public void insertOperations(ServiceControlCommand f_ob) {
Session sess = null;
Transaction tx = null;
- TransactionStrategy txS = TransactionStrategy.getStrategy();
+ TransactionStrategy txS = TransactionStrategy.getTransactionStrategy(true);
Object txHandle = null;
if (txS != null)
@@ -158,7 +158,7 @@
public void updateActiveFlag(String serverName) {
Session sess = null;
Transaction tx = null;
- TransactionStrategy txS = TransactionStrategy.getStrategy();
+ TransactionStrategy txS = TransactionStrategy.getTransactionStrategy(true);
Object txHandle = null;
if (txS != null)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/base-cp.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/qa/base-cp.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/base-cp.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/base-cp.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,65 @@
+<project name="base-cp">
+ <!--
+ This file extracts the common classpath configuration from the junit/quickstarts directories.
+ There are other sections of those build.xml files than can be consolidated in future.
+ -->
+
+ <!--
+ When updating this file please bear in mind the following
+ - make sure jbossall-client.jar is last.
+ - make sure jaxr-api-1.0rc1.jar precedes jboss-j2ee.jar.
+ - Restrict jar files to those known to be required.
+ -->
+ <property name="org.jboss.esb.server.server"
+ location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}" />
+ <dirname property="pwd" file="${ant.file.base-cp}" />
+ <path id="base.cp">
+ <pathelement location="${product.dir}/lib/ext/jaxr-api-1.0rc1.jar" />
+ <fileset dir="${org.jboss.esb.server.server}/lib" includes="jboss-remoting.jar jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jboss-messaging-client.jar" /> <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.server}/lib"
+ includes="hibernate3.jar commons-collections.jar hsqldb.jar" /> <!-- Required for jbpm Client Code. -->
+ <fileset dir="${org.jboss.esb.server.server}/lib" includes="bsh.jar" /> <!-- Required for scripting Client Code. -->
+ <fileset dir="${org.jboss.esb.server.home}/lib/endorsed"
+ includes="*.jar" /> <!-- Required for JMS Client Code. -->
+ <fileset
+ dir="${org.jboss.esb.server.server}/deploy/jboss-aop-jdk50.deployer"
+ includes="jboss-aop-jdk50.jar" /> <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="javassist.jar trove.jar" /> <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="hibernate-client.jar" /> <!-- Required for jbpm Client Code. -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.sar/lib"
+ includes="*.jar" />
+ <!-- jbossesb config -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.esb"
+ includes="*.jar" />
+ <!-- jbpm config -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/jbpm.esb"
+ includes="*.jar" />
+ <pathelement location="${org.jboss.esb.server.server}/lib/cglib.jar" />
+ <!-- smooks config -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/smooks.esb"
+ includes="*.jar" />
+ <!-- jbrules config -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/jbrules.esb"
+ includes="*.jar" />
+ <!-- spring config -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/spring.esb"
+ includes="*.jar" />
+ <!-- soap config -->
+ <fileset dir="${org.jboss.esb.server.server}/deploy/soap.esb"
+ includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.server}/lib" includes="activation.jar, mail.jar, jboss-ejb3x.jar" />
+ <!-- general libs -->
+ <pathelement location="${org.jboss.esb.server.home}/lib/commons-logging.jar" />
+ <pathelement location="${org.jboss.esb.server.home}/lib/commons-codec.jar" />
+ <pathelement location="${org.jboss.esb.server.home}/lib/jboss-system.jar" />
+ <pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar" />
+ <pathelement location="${org.jboss.esb.server.server}/lib/log4j.jar" />
+ <fileset dir="${product.dir}/lib/ext">
+ <include name="emma*.jar" />
+ </fileset>
+ <fileset dir="${qa.lib}/ext" includes="*.jar" />
+ <pathelement location="${org.jboss.esb.server.home}/client/jbossall-client.jar" />
+ <pathelement location="${pwd}" />
+ </path>
+</project>
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -23,6 +23,10 @@
<propertyref regex="soa.test.*"/>
</propertyset>
+ <propertyset id="org.jboss.esb.server">
+ <propertyref regex="org.jboss.esb.server.*"/>
+ </propertyset>
+
<property name="junit.jar" location="lib/ext/junit-4.1.jar"/>
<macrodef name="runant">
<attribute name="target"/>
@@ -34,6 +38,7 @@
fork="true" failonerror="@{failonerror}"
resultproperty="@{resultproperty}">
<syspropertyset refid="soa.props"/>
+ <syspropertyset refid="org.jboss.esb.server"/>
<sysproperty key="ant.home" value="${ant.home}"/>
<sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
<sysproperty key="org.jboss.esb.properties" value="${org.jboss.esb.properties}"/>
@@ -87,6 +92,10 @@
<ant dir="junit" target="test" />
</target>
+ <target name="quickstarts" depends="esb.init" description="Run Quickstart based QA tests.">
+ <ant dir="quickstarts" target="ci-test"/>
+ </target>
+
<target name="test.junit" depends="esb.init" description="Run JUnit based QA tests.">
<ant dir="junit" target="test" />
<ant dir="quickstarts" target="all-test" />
@@ -111,6 +120,7 @@
<sysproperty key="build.dir" value="${build.location}"/>
<jvmarg value="-Xmx512m"/>
<jvmarg value="-Xms512m"/>
+ <jvmarg value="-XX:MaxPermSize=128m"/>
</start-server>
<wait-on-server seconds="${server.timeout.seconds}"/>
</target>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,8 +1,7 @@
<?xml version="1.0"?>
<project name="JUnit" default="test" basedir=".">
-
+ <property name="product.dir" location="../../product"/>
<property name="product.build" location="../../product/build"/>
- <property name="product.lib" location="${product.build}/jbossesb/lib"/>
<property name="coverage" location="${product.build}/tests/coverage"/>
<property name="qa.build" location="../build"/>
<property name="qa.build.lib" location="../build/lib"/>
@@ -22,20 +21,8 @@
<property file="${org.jboss.esb.properties}"/>
- <path id="base.cp">
- <fileset dir="${product.lib}/ext"
- excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
- <fileset dir="${qa.lib}/ext" includes="*.jar"/>
- <fileset dir="${product.lib}/ext" includes="*.jar"/>
- <fileset dir="${product.lib}/jbpm.esb" includes="*.jar"/>
- <pathelement location="../"/>
- </path>
+ <import file="../base-cp.xml"/>
- <path id="qa.junit.cp">
- <path refid="base.cp"/>
- <fileset dir="${product.lib}" includes="*.jar"/>
- </path>
-
<path id="qa.junit.emma.cp">
<fileset dir="${coverage}/all" includes="jbossesb-instr-all.jar"/>
<path refid="base.cp"/>
@@ -46,10 +33,9 @@
<target name="compile">
<echo message="Running JUnit based QA tests..."/>
-
<!-- Build the tests... -->
<mkdir dir="${qa.junit.classes}"/>
- <javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.cp" debug="on"/>
+ <javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="base.cp" debug="on"/>
</target>
<target name="compile-versioned">
@@ -57,7 +43,6 @@
<path id="qa.junit.versioned.cp">
<path refid="base.cp"/>
- <fileset dir="${product.lib}" includes="*.jar"/>
<pathelement location="${qa.junit.classes}"/>
</path>
@@ -162,6 +147,7 @@
haltonfailure="false"
fork="true">
+ <sysproperty key="org.jboss.esb.jmsimpl" value="${org.jboss.soa.esb.qa.jmsprovider}"/>
<sysproperty key="jbosstest.deploy.dir" value="${qa.build.lib}"/>
<sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
<sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
@@ -174,7 +160,7 @@
<classpath>
<pathelement location="${qa.junit.classes}"/>
- <path refid="qa.junit.cp"/>
+ <path refid="base.cp"/>
<pathelement location="${qa.junit.src}"/>
<!-- jndi.properties and other client prop files -->
<pathelement location="${qa.junit.resources}/server"/>
@@ -234,14 +220,16 @@
<exclude name="${tests.exclude}"/>
</fileset>
</batchtest>
+
<classpath>
<pathelement location="${qa.junit.classes}"/>
- <path refid="qa.junit.cp"/>
+ <path refid="base.cp"/>
<pathelement location="${qa.junit.src}"/>
<pathelement location="${qa.junit.resources}/server"/>
</classpath>
<jvmarg value="-Xmx${qa.junit.memory}"/>
+ <sysproperty key="org.jboss.esb.jmsimpl" value="${org.jboss.soa.esb.qa.jmsprovider}"/>
<sysproperty key="jbosstest.deploy.dir" value="${qa.build.lib}"/>
<sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
<sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -87,10 +87,13 @@
public static Test suite() throws Exception {
DeploymentArchive deployment = new DeploymentArchive("LogicalEPRUnitTest.esb");
-
+ String jmsImpl = System.getProperty("org.jboss.esb.jmsimpl");
+ if (jmsImpl == null) {
+ jmsImpl = "jbm";
+ }
deployment.addEntry("META-INF/jboss-esb.xml", LogicalEPRUnitTest.class.getResourceAsStream("jboss-esb.xml"));
deployment.addEntry("META-INF/deployment.xml", LogicalEPRUnitTest.class.getResourceAsStream("deployment.xml"));
- deployment.addEntry("jms-service.xml", LogicalEPRUnitTest.class.getResourceAsStream("jms-service.xml"));
+ deployment.addEntry(jmsImpl + "-queue-service.xml", LogicalEPRUnitTest.class.getResourceAsStream(jmsImpl + "-service.xml"));
deployment.addEntry(ServiceInvokerAction.class);
deployment.addEntry(Service2Action.class);
deployment.addEntry(Service3Action1.class);
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbm-service.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/qa/junit/src/org/jboss/soa/esb/epr/jbm-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbm-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbm-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service4"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+</server>
\ No newline at end of file
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbmq-service.xml (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/qa/junit/src/org/jboss/soa/esb/epr/jbmq-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbmq-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jbmq-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service4">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+</server>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service4"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
-</server>
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/SimpleDeployUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/SimpleDeployUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/SimpleDeployUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -46,8 +46,6 @@
public class SimpleDeployUnitTest
extends JBossTestCase
{
- org.jboss.logging.Logger log = getLog();
-
static boolean deployed = false;
static int test = 0;
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/jca/JcaUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/jca/JcaUnitTest.java 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/junit/src/org/jboss/soa/esb/server/jca/JcaUnitTest.java 2008-03-21 12:50:50 UTC (rev 19174)
@@ -47,8 +47,6 @@
public class JcaUnitTest
extends JBossTestCase
{
- org.jboss.logging.Logger log = getLog();
-
static boolean deployed = false;
static int test = 0;
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/javassist.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/jboss-aop-jdk50.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/jboss-messaging-client.jar
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/test-util.jar (from rev 19173, labs/jbossesb/tags/JBESB_4_2_1_GA_CP2_IR1/qa/lib/ext/test-util.jar)
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/lib/ext/trove.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml 2008-03-21 12:50:50 UTC (rev 19174)
@@ -4,8 +4,6 @@
<property name="product.dir" location="../../product"/>
<property name="product.build" location="${product.dir}/build"/>
- <property name="product.lib" location="${product.build}/jbossesb/lib"/>
- <property name="product.lib.ext" location="${product.lib}/ext"/>
<property name="org.jboss.esb.test.quickstarts.dir" location="${product.build}/jbossesb/samples/quickstarts"/>
<property name="coverage" location="${product.build}/tests/coverage"/>
<property name="qa.dir" location=".."/>
@@ -26,7 +24,10 @@
<property name="org.jboss.soa.esb.paramsRepository.file.root" location="src"/>
- <property name="junit.jar" location="${product.lib.ext}/junit-4.1.jar"/>
+ <property name="junit.jar" location="${product.dir}/lib/ext/junit-4.1.jar"/>
+
+ <import file="../base-cp.xml"/>
+
<macrodef name="runant">
<attribute name="target"/>
<attribute name="failonerror" default="true"/>
@@ -48,12 +49,6 @@
</sequential>
</macrodef>
- <path id="base.cp">
- <fileset dir="${qa.lib}/ext" includes="*.jar"/>
- <fileset dir="${product.lib}/ext" includes="*.jar"/>
- <pathelement location="${qa.dir}/"/>
- </path>
-
<path id="qa.quickstarts.cp">
<fileset dir="${product.dir}/services/jbossesb/build">
<include name="**/*.jar"/>
@@ -94,16 +89,16 @@
<include name="business_rules_service/build/classes"/>
<include name="custom_action/build/classes"/>
<include name="deadletter/build/classes"/>
- <include name="dynamic_router/build/classes"/>
+ <include name="dynamic_router/build/classes"/>
<include name="exceptions_faults/build/classes"/>
<include name="fun_cbr/build/classes"/>
<include name="groovy_gateway/build/classes"/>
- <include name="helloworld/build/classes"/>
- <include name="helloworld_action/build/classes"/>
- <include name="helloworld_db_registration/build/classes"/>
- <include name="helloworld_file_action/build/classes"/>
+ <include name="helloworld/build/classes"/>
+ <include name="helloworld_action/build/classes"/>
+ <include name="helloworld_db_registration/build/classes"/>
+ <include name="helloworld_file_action/build/classes"/>
<include name="helloworld_file_notifier/build/classes"/>
- <include name="helloworld_sql_action/build/classes"/>
+ <include name="helloworld_sql_action/build/classes"/>
<include name="jms_secured/build/classes"/>
<include name="jms_topic/build/classes"/>
<include name="load_generator/build/classes"/>
@@ -111,29 +106,26 @@
<include name="messagefilter/build/classes"/>
<include name="messagestore/build/classes"/>
<include name="native_client/build/classes"/>
- <include name="recipient_list/build/classes"/>
+ <include name="recipient_list/build/classes"/>
<include name="scheduled_services/build/classes"/>
<include name="scripting_groovy/build/classes"/>
- <include name="simple_cbr/build/classes"/>
+ <include name="simple_cbr/build/classes"/>
<include name="spring_aop/build/classes"/>
<include name="spring_helloworld/build/classes"/>
<include name="spring_jpetstore/build/classes"/>
- <include name="static_router/build/classes"/>
- <include name="transform_CSV2XML/build/classes"/>
- <include name="transform_EDI2XML_Groovy_XSLT/build/classes"/>
- <include name="transform_XML2POJO/build/classes"/>
- <include name="transform_XML2XML_date_manipulation/build/classes"/>
- <include name="transform_XML2XML_simple/build/classes"/>
+ <include name="static_router/build/classes"/>
+ <include name="transform_CSV2XML/build/classes"/>
+ <include name="transform_EDI2XML_Groovy_XSLT/build/classes"/>
+ <include name="transform_XML2POJO/build/classes"/>
+ <include name="transform_XML2XML_date_manipulation/build/classes"/>
+ <include name="transform_XML2XML_simple/build/classes"/>
<include name="webservice_consumer1/build/classes"/>
<include name="webservice_consumer2/build/classes"/>
<include name="webservice_producer/build/classes"/>
<include name="wiretap/build/classes"/>
</dirset>
-
- <fileset dir="${product.lib.ext}" includes="*.jar"/>
- <fileset dir="${product.lib}" includes="*.jar"/>
<pathelement location="${qa.quickstarts.resources}"/>
- <path refid="base.cp"/>
+ <path refid="base.cp"/>
</path>
<path id="qa.quickstarts.emma.cp">
@@ -257,9 +249,6 @@
<exec-quickstart quickstart="helloworld_sql_action" target="prepare-deployment"/>
<exec-quickstart quickstart="jms_secured" target="prepare-deployment"/>
<exec-quickstart quickstart="jms_topic" target="prepare-deployment"/>
- <!--
- <exec-quickstart quickstart="load_generator" target="prepare-deployment"/>
- -->
<exec-quickstart quickstart="messagefilter" target="prepare-deployment"/>
<exec-quickstart quickstart="messagestore" target="prepare-deployment"/>
<exec-quickstart quickstart="native_client" target="prepare-deployment"/>
@@ -372,12 +361,13 @@
<exclude name="**/SpringJPetStoreTest.java"/>
<exclude name="**/HelloWorldSQLActionTest.java"/>
<exclude name="**/BPMOrchestration1Test.java"/>
- <!-- The following quickstart is broken -->
+ <!-- The following quickstart is broken -->
<exclude name="**/BPMOrchestration3Test.java"/>
<exclude name="**/HelloWorldFileNotifierTest.java"/>
<exclude name="**/RecipientlistTest.java"/>
<exclude name="**/ExceptionsFaultsTest.java"/>
<exclude name="**/DynamicRouterTest.java"/>
+
<!-- The Groovy Gateway test requires testing UI -->
<exclude name="**/GroovyGatewayTest.java"/>
<exclude name="**/LoadGeneratorTest.java"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/test.properties
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/test.properties 2008-03-21 12:29:31 UTC (rev 19173)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/test.properties 2008-03-21 12:50:50 UTC (rev 19174)
@@ -6,3 +6,12 @@
org.jboss.soa.esb.jndi.server.type=jboss
org.jboss.soa.esb.jndi.server.url=localhost
+
+####
+# Set these options to run the tests against a SOA/JBoss AS container
+####
+#soa.test.no-prepare=true
+#org.jboss.esb.server.home=/opt/jboss-soa-p.4.2.0/jboss-as
+#org.jboss.esb.test.server.config=all
+#org.jboss.esb.server.config=all
+
More information about the jboss-svn-commits
mailing list