[jboss-svn-commits] JBL Code SVN: r29552 - in labs/jbossesb/workspace/dbevenius/saml_support: product and 67 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Oct 8 04:09:06 EDT 2009
Author: beve
Date: 2009-10-08 04:08:59 -0400 (Thu, 08 Oct 2009)
New Revision: 29552
Added:
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/http/HttpContentTypeUtil.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ExtractorUtil.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_09.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator120ModelUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_esbaware.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_gateways.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.120.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/regex-rules.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/META-INF/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts/test/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/lib/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/listener.log
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AuthBASICWsdlContractPublisher.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlLoader.java
Removed:
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/META-INF/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts/test/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/lib/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/listener.log
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java
Modified:
labs/jbossesb/workspace/dbevenius/saml_support/
labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/docs/ProgrammersGuide.odt
labs/jbossesb/workspace/dbevenius/saml_support/product/docs/ServicesGuide.odt
labs/jbossesb/workspace/dbevenius/saml_support/product/etc/schemas/xml/jbossesb-1.2.0.xsd
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTemporaryTransport.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTransport.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/tx/InVMXAResource.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/HttpGatewayDeploymentFactory.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ActionMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ESBAwareGenerator.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/GatewayGenerator.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/HttpGatewayMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/MapperUtil.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/UntypedListenerMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/XMLBeansModel.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model120SchemaParser.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/Util.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/security/JBossSTSActionUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_01.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_02.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_03.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_04.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_05.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_06.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_07.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_08.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_09.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_10.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/SampleOrder.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/deployment.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbmq-queue-service.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/readme.txt
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/samples/quickstart/funcbr/test/SendJMSMessage.java
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/soap-login.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/error-soap-message.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlContractPublisher.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java
labs/jbossesb/workspace/dbevenius/saml_support/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java
Log:
Merged revisions 29485,29500,29503-29505,29509-29515,29517-29519,29526,29528,29531,29533,29539 via svnmerge from
https://svn.jboss.org/repos/labs/labs/jbossesb/trunk
.......
r29485 | kevin.conner at jboss.com | 2009-09-28 14:45:24 +0200 (Mon, 28 Sep 2009) | 1 line
Fix javadoc generation: JBESB-2850
.......
r29500 | kevin.conner at jboss.com | 2009-09-29 14:36:40 +0200 (Tue, 29 Sep 2009) | 1 line
Enable WSA extension test: JBESB-2857
.......
r29503 | tfennelly | 2009-09-29 16:01:41 +0200 (Tue, 29 Sep 2009) | 2 lines
https://jira.jboss.org/jira/browse/JBESB-2583
Add support for XPath routing
.......
r29504 | kevin.conner at jboss.com | 2009-09-29 16:10:35 +0200 (Tue, 29 Sep 2009) | 1 line
Fix namespace and include activation test in CI runs: JBESB-2858
.......
r29505 | tfennelly | 2009-09-29 18:22:34 +0200 (Tue, 29 Sep 2009) | 2 lines
https://jira.jboss.org/jira/browse/JBESB-2582
Add support for regexp routing
.......
r29509 | kevin.conner at jboss.com | 2009-09-30 09:55:59 +0200 (Wed, 30 Sep 2009) | 1 line
rolled back revision 29503 changes: JBESB-2863
.......
r29510 | kevin.conner at jboss.com | 2009-09-30 10:42:09 +0200 (Wed, 30 Sep 2009) | 1 line
Fix untyped listener: JBESB-2859
.......
r29511 | kevin.conner at jboss.com | 2009-09-30 11:44:26 +0200 (Wed, 30 Sep 2009) | 1 line
Add support for ActivationMapper: JBESB-2860
.......
r29512 | kevin.conner at jboss.com | 2009-09-30 11:47:22 +0200 (Wed, 30 Sep 2009) | 1 line
Add tests for schema 1.2.0: JBESB-2851
.......
r29513 | beve | 2009-09-30 13:46:48 +0200 (Wed, 30 Sep 2009) | 2 lines
Work for https://jira.jboss.org/jira/browse/JBESB-2864 "Create global configuration section in jboss-esb.xml for setting that are global to the whole configuration file."
.......
r29514 | beve | 2009-09-30 14:17:36 +0200 (Wed, 30 Sep 2009) | 2 lines
Work for https://jira.jboss.org/jira/browse/JBESB-2852 "Upgrade Smooks to a patch release of 1.2.1"
.......
r29515 | beve | 2009-09-30 15:27:25 +0200 (Wed, 30 Sep 2009) | 2 lines
Attempting to fix the build.
.......
r29517 | tfennelly | 2009-09-30 21:03:31 +0200 (Wed, 30 Sep 2009) | 2 lines
https://jira.jboss.org/jira/browse/JBESB-2362
Support "binary/octet-stream" or "application/octet-stream" mimetype in JBossRemotingGatewayListenerSupport "binary/octet-stream" or "application/octet-stream" mimetype in JBossRemotingGatewayListener
.......
r29518 | dward | 2009-10-01 00:36:09 +0200 (Thu, 01 Oct 2009) | 2 lines
Fix for https://jira.jboss.org/jira/browse/JBESB-2855
.......
r29519 | beve | 2009-10-01 13:27:13 +0200 (Thu, 01 Oct 2009) | 2 lines
Work for https://jira.jboss.org/jira/browse/JBESB-2552 "Web service publishing support for ESB services ignores WS-Security."
.......
r29526 | beve | 2009-10-01 21:45:22 +0200 (Thu, 01 Oct 2009) | 2 lines
Work for https://jira.jboss.org/jira/browse/JBESB-2647 "Remove parameter declaration duplication in FtpClientUtil and RemoteFileSystem"
.......
r29528 | dward | 2009-10-02 15:03:41 +0200 (Fri, 02 Oct 2009) | 2 lines
https://jira.jboss.org/jira/browse/JBESB-2855
.......
r29531 | tcunning | 2009-10-02 19:25:18 +0200 (Fri, 02 Oct 2009) | 5 lines
JBESB-2585
Adding a service and an action length/time alert threshold. The threshold
can be specified in jboss-esb.xml and the messagealerts quickstart demonstrates
its use and how it can be viewed in the server console.
.......
r29533 | kevin.conner at jboss.com | 2009-10-05 12:52:49 +0200 (Mon, 05 Oct 2009) | 1 line
Move null check: JBESB-2869
.......
r29539 | tfennelly | 2009-10-06 17:32:25 +0200 (Tue, 06 Oct 2009) | 2 lines
https://jira.jboss.org/jira/browse/JBESB-2866
Add a max resent attribute for transactional invm transport
.......
Property changes on: labs/jbossesb/workspace/dbevenius/saml_support
___________________________________________________________________
Name: svnmerge-integrated
- /labs/jbossesb/trunk:1-29481
+ /labs/jbossesb/trunk:1-29547
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -250,6 +250,7 @@
<path path="${org.jboss.esb.internal.src}"/>
<path path="${org.jboss.esb.internal.dest}/schema-model/classes"/>
<path path="${org.jboss.esb.internal.dest}/schema-model/classes110"/>
+ <path path="${org.jboss.esb.internal.dest}/schema-model/classes120"/>
<fileset dir="lib" includes="*.jar" />
<fileset dir="lib/ext" includes="*.jar" />
<fileset dir="lib/ext/standalone" includes="*.jar" />
@@ -257,9 +258,9 @@
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="xbean-*.jar jbossall-client*.jar hibernate*.jar log4j-*.jar milyn-*.jar commons-httpclient-*.jar mail*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-metadata-*.jar activation-*.jar bsf-*.jar commons-io-*.jar dom4j-*.jar jboss-dependency-*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-deployers-client-spi-*.jar jboss-deployers-spi-*.jar jboss-deployers-structure-spi-*.jar"/>
- <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-kernel-*.jar jgroups-*.jar jboss-system-*.jar stringtemplate-*.jar"/>
- <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="xercesImpl-*.jar jboss-4*.jar jaxb-api-*.jar jboss-deployers-core-spi-*.jar"/>
- <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="stax-api*.jar jboss-vfs-*.jar jboss-deployers-vfs-spi-*.jar mvel-*.jar bsh-*.jar groovy-all-*.jar mina-core-*.jar"/>
+ <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-kernel-*.jar jgroups-*.jar jboss-system-*.jar jboss-common-core-*.jar stringtemplate-*.jar"/>
+ <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="xercesImpl-*.jar jboss-4*.jar jaxb-api-*.jar jboss-deployers-core-spi-*.jar jboss-deployers-vfs-*.jar"/>
+ <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="stax-api*.jar jboss-vfs-*.jar jboss-deployers-vfs-spi-*.jar mvel2-*.jar bsh-*.jar groovy-all-*.jar mina-core-*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="javassist-*.jar jboss-cache-*.jar commons-codec-*.jar quartz-*.jar jsch-*.jar ognl-*.jar"/>
</classpath>
</javadoc>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/docs/ServicesGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/etc/schemas/xml/jbossesb-1.2.0.xsd
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/etc/schemas/xml/jbossesb-1.2.0.xsd 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/etc/schemas/xml/jbossesb-1.2.0.xsd 2009-10-08 08:08:59 UTC (rev 29552)
@@ -19,6 +19,8 @@
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0"
+ ref="jesb:globals" />
+ <xsd:element maxOccurs="1" minOccurs="0"
ref="jesb:providers" />
<xsd:element maxOccurs="1" minOccurs="0"
ref="jesb:services" />
@@ -44,6 +46,42 @@
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
+
+ <xsd:element name="globals">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ A container for the configurations global to a jbossesb config file
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="war-security" minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ Security configuration that is global to the jboss-esb.xml file.
+ These configuration settings are shared for all http-providers and EBWS that are defined in jboss-esb.xml.Domain.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="method" use="optional" default="BASIC">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="BASIC" />
+ <xsd:enumeration value="DIGEST" />
+ <xsd:enumeration value="CLIENT-CERT" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="domain" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">Security Domain.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
Provider and Bus base types.
@@ -312,6 +350,32 @@
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
+ <xsd:attribute name="alertTimeThreshold"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ A value used for monitoring to produce alerts
+ if the service takes longer to complete than
+ the value of the field.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="alertLengthThreshold"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ A value used for monitoring to produce alerts
+ if the service takes longer to complete than
+ the value of the field.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+ </xsd:attribute>
<xsd:attribute name="invmScope" type="jesb:invmScope" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">
@@ -414,6 +478,32 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
+ <xsd:attribute name="alertTimeThreshold"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ A value used for monitoring to produce alerts
+ if the service takes longer to complete than
+ the value of the field.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="alertLengthThreshold"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ A value used for monitoring to produce alerts
+ if the service takes longer to complete than
+ the value of the field.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+ </xsd:attribute>
</xsd:complexType>
</xsd:element>
@@ -479,7 +569,7 @@
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1"
- ref="jesb:listener" />
+ ref="jesb:abstract-listener" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
@@ -524,7 +614,7 @@
</xsd:complexContent>
</xsd:complexType>
- <xsd:complexType abstract="true" name="dual-listener">
+ <xsd:complexType name="dual-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Listener type that can act as both a message-aware and message-unaware listener (gateway).
@@ -553,8 +643,10 @@
</xsd:complexContent>
</xsd:complexType>
- <xsd:element name="listener" type="jesb:listener" />
+ <xsd:element name="abstract-listener" type="jesb:listener" abstract="true"/>
+ <xsd:element name="listener" type="jesb:dual-listener" substitutionGroup="jesb:abstract-listener"/>
+
<xsd:complexType abstract="true"
name="abstract-scheduled-listener">
<xsd:annotation>
@@ -601,7 +693,7 @@
</xsd:complexType>
<xsd:element name="scheduled-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Scheduled listener.
@@ -647,7 +739,7 @@
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="jca-gateway" substitutionGroup="jesb:listener">
+ <xsd:element name="jca-gateway" substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A specific gateway using JCA inflow.
@@ -904,7 +996,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="jms-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A specific listener using the jms protocol.
@@ -1060,7 +1152,7 @@
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
- <xsd:element name="fs-listener" substitutionGroup="jesb:listener">
+ <xsd:element name="fs-listener" substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A specific listener using the file protocol.
@@ -1310,7 +1402,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="ftp-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A specific listener using the ftp protocol.
@@ -1509,7 +1601,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="sql-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A specific listener using the SQL protocol.
@@ -1612,7 +1704,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="hibernate-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A specific listener using the hibernate protocol.
@@ -1695,7 +1787,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="jbr-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
JBoss Remoting Listener.
@@ -1779,24 +1871,6 @@
<xsd:complexContent>
<xsd:extension base="jesb:bus-provider">
<xsd:sequence>
- <xsd:element name="auth" minOccurs="0" maxOccurs="1">
- <xsd:complexType>
- <xsd:attribute name="method" use="optional" default="BASIC">
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="BASIC" />
- <xsd:enumeration value="DIGEST" />
- <xsd:enumeration value="CLIENT-CERT" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="domain" type="xsd:string" use="optional">
- <xsd:annotation>
- <xsd:documentation xml:lang="en">Security Domain.</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- </xsd:complexType>
- </xsd:element>
<xsd:element name="exception" type="jesb:httpExceptionMappings" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:extension>
@@ -1804,7 +1878,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="http-gateway"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
http Listener.
@@ -1903,7 +1977,7 @@
Groovy Gateway Type Implementations.
88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
<xsd:element name="groovy-listener"
- substitutionGroup="jesb:listener">
+ substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Groovy Listener.
@@ -1930,7 +2004,7 @@
<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
UDP Gateway Type Implementations.
88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
- <xsd:element name="udp-listener" substitutionGroup="jesb:listener">
+ <xsd:element name="udp-listener" substitutionGroup="jesb:abstract-listener">
<xsd:annotation>
<xsd:documentation xml:lang="en">
UDP Listener that uses Mina.
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTemporaryTransport.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTemporaryTransport.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTemporaryTransport.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -121,26 +121,8 @@
{
LOGGER.debug("Delivering message to " + serviceId) ;
}
- final Object addedObject ;
- if (inVMEpr.getPassByValue())
- {
- try
- {
- addedObject = MessageSerializer.serialize(message) ;
- }
- catch (final IOException ex)
- {
- throw new InVMException("Could not serialize message to pass by value.", ex) ;
- }
- }
- else if (message instanceof ByReferenceMessage)
- {
- addedObject = ((ByReferenceMessage)message).reference() ;
- }
- else
- {
- addedObject = message ;
- }
+
+ final Object addedObject = InVMTransport.toDeliveryObject(message, inVMEpr.getPassByValue());
if (InVMTransport.isTransactional())
{
@@ -220,28 +202,9 @@
final Object msgObject = queueEntry.getValue() ;
if (msgObject != null)
{
- final Message message ;
- try
- {
- if (msgObject instanceof byte[])
- {
- message = MessageSerializer.deserialize((byte[])msgObject) ;
- }
- else if (inVMEpr.getPassByValue())
- {
- // pass by reference but now expecting value.
- message = ((Message)msgObject).copy() ;
- }
- else
- {
- message = (Message)msgObject ;
- }
- }
- catch (final IOException ioe)
- {
- throw new InVMException("Failed to deserialise incoming message", ioe) ;
- }
-
+
+ final Message message = InVMTransport.fromDeliveryObject(msgObject, inVMEpr.getPassByValue());
+
if (InVMTransport.isTransactional())
{
/*
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTransport.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTransport.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/transport/InVMTransport.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -370,6 +370,10 @@
try
{
entry = serviceIdToEntry.get(serviceId) ;
+ if (entry == null)
+ {
+ throw new InVMException("Could not locate service entry for epr " + inVMEpr) ;
+ }
passByValue = entry.isPassByValue() ;
lockstep = entry.getLockstep() ;
}
@@ -377,32 +381,9 @@
{
releaseReadLock() ;
}
- if (entry == null)
- {
- throw new InVMException("Could not locate service entry for epr " + inVMEpr) ;
- }
+
+ final Object addedObject = toDeliveryObject(message, passByValue);
- final Object addedObject ;
- if (passByValue)
- {
- try
- {
- addedObject = MessageSerializer.serialize(message) ;
- }
- catch (final IOException ex)
- {
- throw new InVMException("Could not serialize message to pass by value.", ex) ;
- }
- }
- else if (message instanceof ByReferenceMessage)
- {
- addedObject = ((ByReferenceMessage)message).reference() ;
- }
- else
- {
- addedObject = message ;
- }
-
if (isTransactional())
{
if (LOGGER.isDebugEnabled())
@@ -458,7 +439,7 @@
{
throw new InVMException("Could not locate service entry for epr " + inVMEpr) ;
}
-
+
final Object msgObject = entry.pickup(millis) ;
if (msgObject != null)
{
@@ -466,28 +447,9 @@
{
LOGGER.debug("Pickup of message from " + serviceId) ;
}
- final Message message ;
- try
- {
- if (msgObject instanceof byte[])
- {
- message = MessageSerializer.deserialize((byte[])msgObject) ;
- }
- else if (inVMEpr.getPassByValue())
- {
- // pass by reference but now expecting value.
- message = ((Message)msgObject).copy() ;
- }
- else
- {
- message = (Message)msgObject ;
- }
- }
- catch (final IOException ioe)
- {
- throw new InVMException("Failed to deserialise incoming message", ioe) ;
- }
-
+
+ final Message message = fromDeliveryObject(msgObject, inVMEpr.getPassByValue());
+
if (isTransactional())
{
/*
@@ -520,7 +482,7 @@
* Deliver an object as a consequence of a transaction. This will either be a
* rollback, placing the object back on the source queue, or a commit delivering
* to a target queue.
- *
+ *
* @param inVMEpr The EPR to receive the message.
* @param msgObject The object to deliver.
* @throws InVMException for InVM transport specific errors.
@@ -543,7 +505,7 @@
{
throw new InVMException("Could not locate service entry for epr " + inVMEpr) ;
}
-
+
if (LOGGER.isDebugEnabled())
{
LOGGER.debug("Transactional redelivery of message to " + serviceId) ;
@@ -552,6 +514,69 @@
}
/**
+ * Encode a message to an Object ready for delivery.
+ * @param message The message to be encoded.
+ * @param passByValue If the message will be delivered by value (as opposed to be reference).
+ * @return The delivery Object.
+ * @throws InVMException Error encoding message.
+ */
+ public static Object toDeliveryObject(Message message, boolean passByValue) throws InVMException {
+ final Object object ;
+ if (passByValue)
+ {
+ try
+ {
+ object = MessageSerializer.serialize(message) ;
+ }
+ catch (final IOException ex)
+ {
+ throw new InVMException("Could not serialize message to pass by value.", ex) ;
+ }
+ }
+ else if (message instanceof ByReferenceMessage)
+ {
+ object = ((ByReferenceMessage)message).reference() ;
+ }
+ else
+ {
+ object = message ;
+ }
+ return object;
+ }
+
+ /**
+ * Decode a delivery Object instance back to an ESB {@link Message} object instance.
+ * @param msgObject The delivery Object to be decoded.
+ * @param passByValue If the message was delivered by value (as opposed to be reference).
+ * @return The ESB Message Object instance.
+ * @throws InVMException Error decoding message.
+ */
+ public static Message fromDeliveryObject(Object msgObject, boolean passByValue) throws InVMException {
+ final Message message ;
+ try
+ {
+ if (msgObject instanceof byte[])
+ {
+ message = MessageSerializer.deserialize((byte[])msgObject) ;
+ }
+ else if (passByValue)
+ {
+ // pass by reference but now expecting value.
+ message = ((Message)msgObject).copy() ;
+ }
+ else
+ {
+ message = (Message)msgObject ;
+ }
+ }
+ catch (final IOException ioe)
+ {
+ throw new InVMException("Failed to deserialise incoming message", ioe) ;
+ }
+ return message;
+ }
+
+ /**
* Acquire a read lock for accessing the data.
*/
private void acquireReadLock()
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/tx/InVMXAResource.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/tx/InVMXAResource.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/couriers/tx/InVMXAResource.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -31,7 +31,14 @@
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.couriers.transport.InVMTemporaryTransport;
import org.jboss.internal.soa.esb.couriers.transport.InVMTransport;
+import org.jboss.internal.soa.esb.couriers.transport.InVMException;
import org.jboss.soa.esb.addressing.eprs.InVMEpr;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
/**
* This XAResource instance controls the InVM queue manipulation under the control
@@ -54,12 +61,33 @@
public class InVMXAResource implements XAResource, Serializable
{
+
+ public static final String INVM_RETRY_COUNT = "org.jboss.soa.esb.invm.retry.count";
+
/**
* Serial version UID for this class.
*/
private static final long serialVersionUID = 77430212548543969L;
+ /**
+ * Redelivery retry limit.
+ */
+ private static int retryLimit;
+ /**
+ * Dead letter channel ServiceInvoker. Messages are delivered to the DLQ after the retry limit for a
+ * failed message has been exceeded.
+ */
+ private static ServiceInvoker dlQueueInvoker;
public enum operation { INSERT, REMOVE };
+
+ static {
+ String retryLimitConfig = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.INVM_RETRY_LIMIT, "5").trim();
+ try {
+ retryLimit = Integer.parseInt(retryLimitConfig);
+ } catch (NumberFormatException e) {
+ retryLimit = 5;
+ }
+ }
public InVMXAResource (final InVMEpr inVMEpr, final Object msgObject, final operation op)
{
@@ -154,30 +182,38 @@
* TODO we could add a queue-insertion policy that allows the developer to override
* how the message gets placed back into the queue.
*/
-
- boolean problem = false;
-
- try
- {
- deliverTx() ;
+ if(assertRedeliver()) {
+ boolean problem = false;
+ try
+ {
+ deliverTx() ;
+ }
+ catch (final Exception ex)
+ {
+ _logger.debug("Unexpected exception received when delivering to the courier", ex) ;
+
+ problem = true;
+ }
+
+ if (problem) // shouldn't get here, but ...
+ {
+ _logger.warn("InVMXAResource could not rollback and put Message on to InVM queue!");
+
+ throw new XAException(XAException.XA_HEURHAZ);
+ }
+ } else {
+ // Send to the DLQ...
+ try {
+ deliverToDLQ(getMessage());
+ } catch (MessageDeliverException e) {
+ _logger.debug("Unexpected exception received when delivering to the courier", e) ;
+ throw new XAException(XAException.XA_HEURHAZ);
+ }
}
- catch (final Exception ex)
- {
- _logger.debug("Unexpected exception received when delivering to the courier", ex) ;
-
- problem = true;
- }
-
- if (problem) // shouldn't get here, but ...
- {
- _logger.warn("InVMXAResource could not rollback and put Message on to InVM queue!");
-
- throw new XAException(XAException.XA_HEURHAZ);
- }
}
}
- private void deliverTx()
+ protected void deliverTx()
throws Exception
{
if (inVMEpr.isTemporaryEPR())
@@ -201,6 +237,66 @@
{
}
+ private boolean assertRedeliver() throws XAException {
+ Message message = getMessage();
+ Integer retryCount = (Integer) message.getContext().getContext(INVM_RETRY_COUNT);
+
+ if(retryCount == null || retryCount < retryLimit) {
+ // Increment the retry count...
+ if(retryCount == null) {
+ message.getContext().setContext(INVM_RETRY_COUNT, 1);
+ } else {
+ message.getContext().setContext(INVM_RETRY_COUNT, retryCount + 1);
+ }
+
+ // Need to recreate the delivery object with the incremented
+ // redelivery count...
+ try {
+ msgObject = InVMTransport.toDeliveryObject(message, inVMEpr.getPassByValue());
+ } catch (InVMException e) {
+ _logger.debug("Unexpected exception received when delivering to the courier", e) ;
+ throw new XAException(XAException.XA_HEURHAZ);
+ }
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ private Message getMessage() throws XAException {
+ Message message;
+ try {
+ message = InVMTransport.fromDeliveryObject(msgObject, inVMEpr.getPassByValue());
+ } catch (InVMException e) {
+ _logger.debug("Unexpected exception received when delivering to the courier", e) ;
+ throw new XAException(XAException.XA_HEURHAZ);
+ }
+ return message;
+ }
+
+ /**
+ * Deliver a message to the Dead Letter Channel Service.
+ *
+ * @param message The message to be delivered to the dead letter chennel.
+ * @throws org.jboss.soa.esb.listeners.message.MessageDeliverException Message delivery failure.
+ */
+ protected void deliverToDLQ(Message message) throws MessageDeliverException {
+ if (!"true".equalsIgnoreCase(Configuration.getRedeliveryDlsOn())) {
+ _logger.debug("org.jboss.soa.esb.dls.redeliver is turned off");
+ } else {
+ if (dlQueueInvoker == null) {
+ synchronized (ServiceInvoker.dlqService) {
+ if (dlQueueInvoker == null) {
+ dlQueueInvoker = new ServiceInvoker(ServiceInvoker.dlqService);
+ }
+ }
+ }
+
+ dlQueueInvoker.deliverAsync(message);
+ }
+ }
+
public boolean isSameRM (XAResource xares) throws XAException
{
return (xares == this);
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/HttpGatewayDeploymentFactory.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/HttpGatewayDeploymentFactory.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/HttpGatewayDeploymentFactory.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -61,13 +61,6 @@
// Map all config tree attributes as servlet parameters...
servlet.getParams().addAll(webEndpointConfig.attributesAsList());
-
- // Set the authentication method and domain. Yes... this can result in the auth method/domain being set
- // and reset by multiple listeners, but the auth method source config should be the
- // same for them all. Also, we throw an exception from inside the WebModel if an attempt
- // is made to reset it to something else...
- webModel.setAuthMethod(webEndpointConfig.getAttribute(AUTH_METHOD));
- webModel.setAuthDomain(webEndpointConfig.getAttribute(AUTH_DOMAIN));
}
private void addSecurityConstraints(ConfigTree webEndpointConfig, Servlet servlet) {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpMarshaller.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -43,28 +43,17 @@
if(object instanceof InvocationResponse) {
Object result = ((InvocationResponse)object).getResult();
InvocationRequest currentRequest = JBossRemotingGatewayListener.getCurrentRequest();
- boolean isRemotingClient = false;
- boolean isBinaryResponse = false;
+ boolean sendJavaResponse = false;
if(result != null && currentRequest != null) {
Map requestMetadata = currentRequest.getRequestPayload();
Map responseMetadata = currentRequest.getReturnPayload();
- Object userAgentObj = requestMetadata.get(HTTPMetadataConstants.REMOTING_USER_AGENT);
+ String userAgent = (String) requestMetadata.get(HTTPMetadataConstants.REMOTING_USER_AGENT);
- if(userAgentObj != null) {
- isRemotingClient = ((String)userAgentObj).startsWith("JBossRemoting");
-
- // In this case, assume non binary if the content type has not been set.
- // Will only kick in if the object is an InvocationResponse.
- if(JBossRemotingUtil.getContentType(responseMetadata) == null) {
- isBinaryResponse = true;
- } else {
- isBinaryResponse = JBossRemotingUtil.isBinaryPayload(responseMetadata);
- }
- }
+ sendJavaResponse = JBossRemotingUtil.sendJavaObjectPayload(responseMetadata, userAgent);
}
- if(isRemotingClient && !isBinaryResponse) {
+ if(!sendJavaResponse) {
// This block of code tries to work around a bug in JBoss Remoting, while at the same time
// providing backward compatibility for earlier versions of the ESB. This code should not
// have been present. See https://jira.jboss.org/jira/browse/JBESB-2611
@@ -72,6 +61,8 @@
outputStream.write((byte[])result);
outputStream.flush();
} else {
+ // Going to rely on the base class to encode it anyway because
+ // we don't know....
super.write(result, outputStream, version);
}
} else {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -23,6 +23,7 @@
import org.jboss.remoting.marshal.UnMarshaller;
import org.jboss.remoting.marshal.serializable.SerializableUnMarshaller;
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.soa.esb.http.HttpContentTypeUtil;
import java.io.*;
import java.util.List;
@@ -55,7 +56,7 @@
* @throws ClassNotFoundException
*/
public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException {
- if (JBossRemotingUtil.isBinaryPayload(metadata)) {
+ if (JBossRemotingUtil.receiveJavaObjectPayload(metadata)) {
try {
return super.read(inputStream, metadata, version);
}
@@ -64,8 +65,6 @@
}
}
- int contentLength = -1;
- Object ret = null;
int bufferSize = 1024;
byte[] byteBuffer = new byte[bufferSize];
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
@@ -85,7 +84,7 @@
}
if (value instanceof String) {
try {
- contentLength = Integer.parseInt((String) value);
+ Integer.parseInt((String) value);
}
catch (NumberFormatException e) {
log.warn("Error converting Content-Length value (" + value + ") from metadata into int value.");
@@ -112,49 +111,18 @@
return null;
}
- //boolean isError = isErrorReturn(metadata);
- //if(isBinary || isError)
-
- if (metadata != null) {
- Object value = metadata.get("Content-Type");
- if (value == null) {
- value = metadata.get("content-type");
- }
- if (value != null) {
- if (value instanceof List) {
- List valueList = (List) value;
- if (valueList != null && valueList.size() > 0) {
- value = valueList.get(0);
- }
- }
- final String contentType = (String)value ;
- if (contentType.startsWith("multipart/"))
- {
- return totalByteArray ;
- }
- /*
- * Requests reaching this code might still have a binary content. For instance
- * "binary/octet-stream" mime type. This will make sure we return a byte array for theses
- * cases. The isBinaryData method called at the beginning of this method only filters
- * "application/octet-stream" it also assumes that binary==java serializable which is not
- * always a valid assumption.
- */
- if (contentType.endsWith("octet-stream")) {
- return totalByteArray;
- }
- }
+ String contentType = JBossRemotingUtil.getContentType(metadata);
+ if(!HttpContentTypeUtil.isTextMimetype(contentType)) {
+ return totalByteArray ;
}
try {
- ret = new String(totalByteArray);
+ return new String(totalByteArray);
}
catch (Exception e) {
log.error("Can not unmarshall inputstream. Tried to unmarshall as both an object and string type.", e);
throw new IOException("Can not unmarshall inputstream.");
}
-
- return ret;
-
}
public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/remoting/JBossRemotingUtil.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -22,10 +22,10 @@
package org.jboss.internal.soa.esb.remoting;
import org.jboss.remoting.transport.web.WebUtil;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
import java.util.Map;
import java.util.List;
-import java.io.IOException;
/**
* JBoss Remoting utility methods.
@@ -35,24 +35,43 @@
public class JBossRemotingUtil {
/**
- * Check the request/response metadata and determine whether or not the
- * message payload is a binary payload type.
+ * Check if the server should expect a Java Object payload.
+ * <p/>
+ * Only relevant if the client is a JBoss Remoting client.
+ *
+ * @param metadata Request metadata.
+ * @return True if the metadata indicates that the client/server is/should expect a Java Object
+ * payload, otherwise false.
+ */
+ public static boolean receiveJavaObjectPayload(Map metadata) {
+ return isJavaPayloadToFromJBRClient(metadata, (String) metadata.get(HTTPMetadataConstants.REMOTING_USER_AGENT));
+ }
+
+ /**
+ * Check if the server should send a Java Object payload.
+ * <p/>
+ * Only relevant if the client is a JBoss Remoting client.
*
- * @param metadata Request/Response metadata.
- * @return True of the Content-Type indicates a binary payload, otherwise false.
+ * @param metadata Response metadata.
+ * @param clientUserAgent Client User Agent.
+ * @return True if the metadata indicates that the client/server is/should expect a Java Object
+ * payload, otherwise false.
*/
- public static boolean isBinaryPayload(Map metadata) {
- boolean isBinary = false;
+ public static boolean sendJavaObjectPayload(Map metadata, String clientUserAgent) {
+ return isJavaPayloadToFromJBRClient(metadata, clientUserAgent);
+ }
+ private static boolean isJavaPayloadToFromJBRClient(Map metadata, String clientUserAgent) {
if (metadata != null) {
- String value = getContentType(metadata);
-
- if (value != null) {
- isBinary = WebUtil.isBinary(value);
+ if(clientUserAgent != null && clientUserAgent.startsWith("JBossRemoting")) {
+ String value = getContentType(metadata);
+ if (value != null) {
+ return WebUtil.isBinary(value);
+ }
}
}
-
- return isBinary;
+
+ return false;
}
/**
@@ -61,6 +80,10 @@
* @return The content type if set, otherwise null.
*/
public static String getContentType(Map metadata) {
+ if(metadata == null) {
+ return null;
+ }
+
Object value = metadata.get("Content-Type");
if (value == null) {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -58,6 +58,10 @@
import org.jboss.soa.esb.message.MessagePayloadProxy;
import org.jboss.soa.esb.message.Properties;
import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.security.SecurityServiceException;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
+import org.jboss.soa.esb.services.security.auth.ExtractorUtil;
+import org.jboss.soa.esb.services.security.auth.ws.WSSecuritySoapExtractor;
import org.w3c.dom.Document;
import com.arjuna.common.util.propertyservice.PropertyManager;
@@ -79,6 +83,8 @@
private static final String ADDRESSING_NAMESPACE = ADDRESSING_BUILDER.getNamespaceURI() ;
private static final QName ADDRESSING_REPLY = new QName(ADDRESSING_NAMESPACE, "Reply") ;
+ private final WSSecuritySoapExtractor securityExtractor = new WSSecuritySoapExtractor();
+
protected final ServiceInvoker serviceInvoker ;
protected final MessagePayloadProxy requestProxy ;
protected final MessagePayloadProxy responseProxy ;
@@ -139,6 +145,11 @@
{
initialiseWSAProps(esbReq, soapIncomingProps) ;
}
+
+ // Extract security info from SOAPMessage.
+ AuthenticationRequest authRequest = extractSecurityDetails(request, esbReq);
+
+ ExtractorUtil.addAuthRequestToMessage(authRequest, esbReq);
final Message esbRes = deliverMessage(esbReq) ;
if (esbRes != null)
@@ -236,6 +247,11 @@
}
}
+ protected AuthenticationRequest extractSecurityDetails(SOAPMessage request, Message esbReq) throws SecurityServiceException
+ {
+ return securityExtractor.extractSecurityInfo(request);
+ }
+
private SOAPMessage generateFault(final Throwable th)
throws SOAPException
{
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedRouter.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedRouter.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedRouter.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.actions;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+/**
+ * ContentBasedRouter implements the Content Based Routing pattern.
+ * It routes a message to one or more destination services based on the message content
+ * and the rule set it is evaluating it against.
+ * <p/>
+ * For configuration details see
+ *
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @author kstam at jboss.com
+ *
+ * @see ContentBasedWiretap
+ *
+ */
+public class ContentBasedRouter extends ContentBasedWiretap
+{
+ public ContentBasedRouter(ConfigTree config) throws ConfigurationException, RegistryException, MessageRouterException
+ {
+ super(config) ;
+ }
+ /** Route the message to one or more destinations, using the ContentBasedRouter to figure out
+ * to which destinations it is going to be routed too.
+ *
+ * @param message
+ * @return Message
+ * @throws ActionProcessingException
+ */
+ public Message process(Message message) throws ActionProcessingException
+ {
+ super.process(message) ;
+ return null ;
+ }
+
+ /**
+ * @deprecated no longer needed, leaving this in here for backwards compatibility,
+ * use the default "process".
+ * */
+ public Message split(Message message) throws ActionProcessingException
+ {
+ _logger.warn("Depricated, please use the default 'process' method in your configuration");
+ return process(message);
+ }
+
+ protected static Logger _logger = Logger.getLogger(ContentBasedRouter.class);
+}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,329 @@
+/*
+ * 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.actions;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.actions.cbr.XPathRouter;
+import org.jboss.soa.esb.actions.cbr.RegexRouter;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.client.MessageMulticaster;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.mapping.ObjectMapper;
+import org.jboss.soa.esb.message.mapping.ObjectMappingException;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
+
+/**
+ * ContentBasedWirtap implements the WireTap pattern.
+ * The WireTap is an Enterprise Integration Pattern (EIP) where a copy of the message is
+ * sent to a control channel.
+ * <br>
+ * The CBRWT is identical in functionality to the ContentBasedRouter,
+ * however it does not terminate the pipeline which makes it suitable to be used as a WireTap.
+ * <p/>
+ *
+ * Configuration Example:
+ *<pre>{@code
+ *
+ *<action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="OrderDiscountBasedOnCustomerHistory">
+ * <property name="ruleSet" value="OrderDiscountOnMultipleOrders.drl" />
+ * <property name="ruleReload" value="false" />
+ * <property name="stateful" value="true" />
+ * <property name="object-paths">
+ * <object-path esb="body.TheOrderHeader" />
+ * <object-path esb="body.TheCustomer" />
+ * </property>
+ * <property name="destinations">
+ * <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
+ * <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
+ * <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
+ * </property>
+ *</action>
+ *
+ * }</pre>
+ * Property description:
+ * <lu>
+ * <li> <i>class</i> action class, one of : org.jboss.soa.esb.actions.ContentBasedRouter, org.jboss.soa.esb.actions.ContentBasedWireTap,<br>
+ * or org.jboss.soa.esb.actions.MessageFilter
+ * <li> <i>ruleSet</i> Name of the filename containing the Drools ruleSet.
+ * <li> <i>ruleLanguage</i> Optional reference to a file containing the definition of a Domain Specific Language to be used for evaluating
+ * the rule set.
+ * <li> <i>ruleReload</i> Optional property which can be to true to enable 'hot' redeployment of rule sets.
+ * <li> <i>stateful</i> Optional property which tells the RuleService to use a stateful session where facts will be
+ * remembered between invokations.
+ * <li> <i>object-paths</i> Optional property to pass Message objects into Rule Services WorkingMemory.
+ * <li> <i>destinations</i> A set of route-to properties each containing the logical name
+ * of the destination along with the Service category and name
+ * as referenced in the registry.<br> The logical name is the name
+ * which should be used in the rule set.
+ * </lu>
+ * </br>
+ *
+ *
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @author kstam at jboss.com
+ * @author kevin.conner at jboss.com
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ */
+public class ContentBasedWiretap extends AbstractActionPipelineProcessor {
+
+ public static final String ROUTE_TO_TAG = "route-to";
+
+ public static final String OBJECT_PATH_TAG = "object-path";
+
+ public static final String OBJECT_PATH = "esb";
+
+ public static final String ENTRY_POINT = "entry-point";
+
+ public static final String DEFAULT_CBR_CLASS = "org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter";
+
+ ServiceInvoker dlQueueInvoker;
+
+ public ContentBasedWiretap(ConfigTree config)
+ throws ConfigurationException, RegistryException,
+ MessageRouterException {
+ _config = config;
+ checkMyParms();
+ _registry = RegistryFactory.getRegistry();
+ _cbr = ContentBasedRouterFactory.getRouter(_cbrClass);
+ _cbr.setConfigTree(config);
+ _mapper = new ObjectMapper(config);
+ try {
+ dlQueueInvoker = new ServiceInvoker(ServiceInvoker.INTERNAL_SERVICE_CATEGORY, ServiceInvoker.DEAD_LETTER_SERVICE_NAME);
+ } catch (MessageDeliverException e) {
+ throw new MessageRouterException(e);
+ }
+ }
+
+ public void initialise() { }
+
+ /**
+ * Router the message to one or more destinations, using the
+ * ContentBasedRouter to figure out to which destinations it is going to
+ * be routed too.
+ *
+ * @param message
+ * @return Message
+ * @throws ActionProcessingException
+ */
+ public Message process(Message message) throws ActionProcessingException
+ {
+ try {
+ List<Service> outgoingDestinations = executeRules(message);
+ if (outgoingDestinations.size()==0) {
+ String error = "No rule destination(s) "+ _destinations.keySet() + " were matched, "
+ + ". Please fix your configuration and/or routing rules.";
+ _logger.error(error);
+ try {
+ _logger.debug("Sending message to the DeadLetterService");
+ dlQueueInvoker.deliverAsync(message);
+ throw new ActionProcessingException(error);
+ } catch (MessageDeliverException e) {
+ throw new MessageRouterException("Failed to deliver message to Dead Letter Channel.", e);
+ }
+ } else {
+ routeMessage(message, outgoingDestinations);
+ }
+ } catch (MessageRouterException e) {
+ throw new ActionProcessingException(e);
+ }
+ return message;
+ }
+
+ protected List<Service> executeRules(Message message)
+ throws MessageRouterException
+ {
+ List<Service> outgoingDestinations = new ArrayList<Service>();
+ try {
+ List<Object> objectList = _mapper.createObjectList(message,
+ _messagePathList);
+ List<String> destinations = _cbr.route(_ruleSet, _ruleLanguage,
+ _ruleReload, message, objectList);
+ for (String destination : destinations) {
+ if (_destinations.containsKey(destination)) {
+ outgoingDestinations.add(_destinations.get(destination));
+ } else {
+ throw new MessageRouterException("Destination " + destination + " does not exist your configuration");
+ }
+ }
+ } catch (ObjectMappingException ome) {
+ throw new MessageRouterException(ome);
+ }
+ return outgoingDestinations;
+ }
+
+ protected final void routeMessage(Message message, List<Service> outgoingDestinations)
+ throws MessageRouterException
+ {
+ try {
+ messageMulticaster.sendToSubset(message, outgoingDestinations);
+ } catch (RegistryException e) {
+ throw new MessageRouterException(e);
+ } catch (MessageDeliverException e) {
+ throw new MessageRouterException(e);
+ }
+ }
+
+ /**
+ * Reading the piece of configTree specific to the CBR, and setting the
+ * configuration.
+ *
+ * @throws ConfigurationException
+ */
+ protected void checkMyParms() throws ConfigurationException {
+ _ruleSet = _config.getAttribute(ListenerTagNames.RULE_SET_TAG);
+ _ruleLanguage = _config.getAttribute(ListenerTagNames.RULE_LANGUAGE_TAG);
+ String ruleReload = _config.getAttribute(ListenerTagNames.RULE_RELOAD_TAG);
+ if (ruleReload != null && "true".equals(ruleReload)) {
+ _ruleReload = true;
+ }
+
+ String cbrAlias = _config.getAttribute(ListenerTagNames.CBR_ALIAS);
+
+ _cbrClass = _config.getAttribute(ListenerTagNames.CBR_CLASS);
+ if(cbrAlias != null && _cbrClass != null) {
+ throw new ConfigurationException("Invalid " + getClass().getSimpleName() + " configuration. Cannot configure both '" + ListenerTagNames.CBR_ALIAS + "' and '" + ListenerTagNames.CBR_CLASS + "' properties on the same action configuration.");
+ }
+
+ if(_cbrClass == null) {
+ if(cbrAlias == null) {
+ _cbrClass = DEFAULT_CBR_CLASS;
+ } else if(cbrAlias.equalsIgnoreCase("JBRules") || cbrAlias.equalsIgnoreCase("Drools")) {
+ _cbrClass = DEFAULT_CBR_CLASS;
+ } else if(cbrAlias.equalsIgnoreCase("XPath")) {
+ _cbrClass = XPathRouter.class.getName();
+ } else if(cbrAlias.equalsIgnoreCase("Regex") || cbrAlias.equalsIgnoreCase("Regexp")) {
+ _cbrClass = RegexRouter.class.getName();
+ } else {
+ throw new ConfigurationException("Invalid " + getClass().getSimpleName() + " configuration. Unsupported '" + ListenerTagNames.CBR_ALIAS + "' property value '" + cbrAlias + "'.");
+ }
+ }
+
+ _destinations = new HashMap<String, Service>();
+ ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
+ if (destList != null) {
+ for (ConfigTree curr : destList) {
+ try {
+ String key = buildDestinationKey(curr);
+ String category = curr.getAttribute(
+ ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
+ String name = curr
+ .getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+ Service service = new Service(category, name);
+ _destinations.put(key, service);
+ messageMulticaster.addRecipient(service);
+ }
+ catch (Exception e) {
+ throw new ConfigurationException(
+ "Problems with destination list", e);
+ }
+ }
+ }
+ _messagePathList = new ArrayList<String>();
+ entryPointMap = new HashMap<String, List<String>>();
+ ConfigTree[] objectList = _config.getChildren(OBJECT_PATH_TAG);
+ if (objectList != null) {
+ for (ConfigTree curr : objectList) {
+ try {
+ final String objectPath = curr.getRequiredAttribute(OBJECT_PATH);
+ final String entryPoint = curr.getAttribute(ENTRY_POINT);
+ if (entryPoint != null)
+ {
+ List<String> list = entryPointMap.get(entryPoint);
+ if (list == null)
+ {
+ list = new ArrayList<String>();
+ // Add the list to the entrypoint map indexed by the entry-point name.
+ entryPointMap.put(entryPoint, list);
+ }
+ // Add the object path to the entry-point list.
+ list.add(objectPath);
+ }
+ else
+ {
+ _messagePathList.add(objectPath);
+ }
+ }
+ catch (Exception e) {
+ throw new ConfigurationException( "Problems with object path list", e);
+ }
+ }
+ }
+
+
+ }
+
+ public static String buildDestinationKey(ConfigTree destinationConfig) throws ConfigurationException {
+ String key = destinationConfig.getAttribute(ListenerTagNames.DESTINATION_NAME_TAG);
+
+ if(key != null) {
+ return key;
+ }
+
+ // Otherwise, build a key from the service category and name...
+ String category = destinationConfig.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
+ String name = destinationConfig.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+
+ return category + "-" + name;
+ }
+
+ protected ConfigTree _config;
+
+ protected Map<String, Service> _destinations;
+
+ protected MessageMulticaster messageMulticaster = new MessageMulticaster();
+
+ protected String _cbrClass;
+
+ protected String _ruleSet;
+
+ protected String _ruleLanguage;
+
+ protected boolean _ruleReload;
+
+ protected List<String> _messagePathList;
+
+ protected Map<String, List<String>> entryPointMap;
+
+ protected ObjectMapper _mapper;
+
+ protected Registry _registry;
+
+ protected org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter _cbr;
+
+ protected static Logger _logger = Logger
+ .getLogger(ContentBasedWiretap.class);
+
+}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,187 +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, JBoss Inc.
- */
-package org.jboss.soa.esb.actions.cbr;
-
-import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.MessagePayloadProxy;
-import org.jboss.soa.esb.message.mapping.ObjectMapper;
-import org.jboss.soa.esb.message.mapping.ObjectMappingException;
-import org.jboss.soa.esb.util.ClassUtil;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.actions.ContentBasedWiretap;
-import org.jboss.soa.esb.ConfigurationException;
-import org.apache.log4j.Logger;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Abstract Property Rules Router.
- * <p/>
- * Abstract base class for rules based routers that define their rules in
- * in {@link Properties} based formats (.properties files).
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-abstract class AbstractPropertyRulesRouter implements ContentBasedRouter {
-
- protected Logger logger;
- private String ruleSetConfig;
- private File ruleSetFile;
- private long lastLoaded = 0L;
- private Map<String, RoutingRule> routingMap;
- private MessagePayloadProxy payloadProxy;
-
- protected AbstractPropertyRulesRouter() {
- logger = Logger.getLogger(getClass());
- }
-
- public void setConfigTree(ConfigTree configTree) throws MessageRouterException {
- ruleSetConfig = configTree.getAttribute(ListenerTagNames.RULE_SET_TAG);
- if(ruleSetConfig != null) {
- ruleSetFile = new File(ruleSetConfig);
- routingMap = buildRoutingMap(loadRules());
- } else {
- ConfigTree[] routeToConfigs = configTree.getChildren(ContentBasedWiretap.ROUTE_TO_TAG);
-
- Properties rules = new Properties();
- for(ConfigTree routeToConfig : routeToConfigs) {
- try {
- String destinationName = ContentBasedWiretap.buildDestinationKey(routeToConfig);
- String expression = routeToConfig.getRequiredAttribute("expression");
-
- rules.setProperty(destinationName, expression);
- } catch (ConfigurationException e) {
- throw new MessageRouterException("Error processing <rule> configuration.", e);
- }
- }
- routingMap = buildRoutingMap(rules);
- }
-
- payloadProxy = new MessagePayloadProxy(configTree);
- }
-
- public Map<String, RoutingRule> getRoutingMap() {
- return routingMap;
- }
-
- public abstract Map<String, RoutingRule> buildRoutingMap(Properties rules) throws MessageRouterException;
-
- public List<String> route(String ruleSet, String ruleLanguage, boolean ruleReload, Message message, List<Object> objectList) throws MessageRouterException {
- return route(ruleSet, ruleReload, message, objectList);
- }
-
- public List<String> route(String ruleSet, boolean ruleReload, Message message, List<Object> objectList) throws MessageRouterException {
- if(ruleReload && ruleSetFile != null) {
- if(ruleSetFile.exists() && ruleSetFile.lastModified() != lastLoaded) {
- routingMap = buildRoutingMap(loadRules());
- }
- }
-
- List<Object> objectsToTest = getMessageObjectsToTest(message, objectList);
- List<String> destinations = new ArrayList<String>();
- Set<Map.Entry<String, RoutingRule>> routingRules = routingMap.entrySet();
-
- for(Map.Entry<String, RoutingRule> routingRule : routingRules) {
- for(Object objectToTest : objectsToTest) {
- if(routingRule.getValue().evaluate(objectToTest)) {
- destinations.add(routingRule.getKey());
- }
- }
- }
-
- return destinations;
- }
-
- private Properties loadRules() throws MessageRouterException {
- InputStream ruleStream;
-
- // Get the properties file stream...
- if(ruleSetFile.exists()) {
- try {
- ruleStream = new FileInputStream(ruleSetFile);
- } catch (FileNotFoundException e) {
- throw new MessageRouterException("Unable to open rule properties file '" + ruleSetFile.getAbsolutePath() + "'.", e);
- }
- lastLoaded = ruleSetFile.lastModified();
- } else {
- ruleStream = ClassUtil.getResourceAsStream(ruleSetConfig, AbstractPropertyRulesRouter.class);
- }
-
- if(ruleStream == null) {
- throw new MessageRouterException("Unable to open rule properties file '" + ruleSetConfig + "'.");
- }
-
- // Load the rule properties...
- Properties rules = new Properties();
- try {
- try {
- rules.load(ruleStream);
- } catch (IOException e) {
- throw new MessageRouterException("Error reading rule properties file '" + ruleSetConfig + "'.", e);
- }
- } finally {
- try {
- ruleStream.close();
- } catch (IOException e) {
- throw new MessageRouterException("Error closing rule properties file '" + ruleSetConfig + "'.", e);
- }
- }
-
- return rules;
- }
-
- private List<Object> getMessageObjectsToTest(Message message, List<Object> objectList) throws MessageRouterException {
- List<Object> objectsToTest = new ArrayList<Object>();
-
- if(objectList == null || objectList.isEmpty()) {
- try {
- objectsToTest.add(payloadProxy.getPayload(message));
- } catch (MessageDeliverException e) {
- throw new MessageRouterException("Failed to get message payload from message.", e);
- }
- } else {
- ObjectMapper objectMapper = new ObjectMapper();
-
- for(Object object : objectList) {
- if(object instanceof String) {
- try {
- Object mappedObject = objectMapper.getObjectFromMessage(message, (String) object);
-
- if(mappedObject == null) {
- logger.debug("Object '" + object + "' not present on message.");
- continue;
- }
-
- objectsToTest.add(mappedObject);
- } catch (ObjectMappingException e) {
- logger.debug("Object '" + object + "' not present on message.");
- }
- }
- }
- }
-
- return objectsToTest;
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/AbstractPropertyRulesRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,187 @@
+/*
+ * 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.actions.cbr;
+
+import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.MessagePayloadProxy;
+import org.jboss.soa.esb.message.mapping.ObjectMapper;
+import org.jboss.soa.esb.message.mapping.ObjectMappingException;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.actions.ContentBasedWiretap;
+import org.jboss.soa.esb.ConfigurationException;
+import org.apache.log4j.Logger;
+
+import java.util.*;
+import java.io.*;
+
+/**
+ * Abstract Property Rules Router.
+ * <p/>
+ * Abstract base class for rules based routers that define their rules in
+ * in {@link Properties} based formats (.properties files).
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+abstract class AbstractPropertyRulesRouter implements ContentBasedRouter {
+
+ protected Logger logger;
+ private String ruleSetConfig;
+ private File ruleSetFile;
+ private long lastLoaded = 0L;
+ private Map<String, RoutingRule> routingMap;
+ private MessagePayloadProxy payloadProxy;
+
+ protected AbstractPropertyRulesRouter() {
+ logger = Logger.getLogger(getClass());
+ }
+
+ public void setConfigTree(ConfigTree configTree) throws MessageRouterException {
+ ruleSetConfig = configTree.getAttribute(ListenerTagNames.RULE_SET_TAG);
+ if(ruleSetConfig != null) {
+ ruleSetFile = new File(ruleSetConfig);
+ routingMap = buildRoutingMap(loadRules());
+ } else {
+ ConfigTree[] routeToConfigs = configTree.getChildren(ContentBasedWiretap.ROUTE_TO_TAG);
+
+ Properties rules = new Properties();
+ for(ConfigTree routeToConfig : routeToConfigs) {
+ try {
+ String destinationName = ContentBasedWiretap.buildDestinationKey(routeToConfig);
+ String expression = routeToConfig.getRequiredAttribute("expression");
+
+ rules.setProperty(destinationName, expression);
+ } catch (ConfigurationException e) {
+ throw new MessageRouterException("Error processing <rule> configuration.", e);
+ }
+ }
+ routingMap = buildRoutingMap(rules);
+ }
+
+ payloadProxy = new MessagePayloadProxy(configTree);
+ }
+
+ public Map<String, RoutingRule> getRoutingMap() {
+ return routingMap;
+ }
+
+ public abstract Map<String, RoutingRule> buildRoutingMap(Properties rules) throws MessageRouterException;
+
+ public List<String> route(String ruleSet, String ruleLanguage, boolean ruleReload, Message message, List<Object> objectList) throws MessageRouterException {
+ return route(ruleSet, ruleReload, message, objectList);
+ }
+
+ public List<String> route(String ruleSet, boolean ruleReload, Message message, List<Object> objectList) throws MessageRouterException {
+ if(ruleReload && ruleSetFile != null) {
+ if(ruleSetFile.exists() && ruleSetFile.lastModified() != lastLoaded) {
+ routingMap = buildRoutingMap(loadRules());
+ }
+ }
+
+ List<Object> objectsToTest = getMessageObjectsToTest(message, objectList);
+ List<String> destinations = new ArrayList<String>();
+ Set<Map.Entry<String, RoutingRule>> routingRules = routingMap.entrySet();
+
+ for(Map.Entry<String, RoutingRule> routingRule : routingRules) {
+ for(Object objectToTest : objectsToTest) {
+ if(routingRule.getValue().evaluate(objectToTest)) {
+ destinations.add(routingRule.getKey());
+ }
+ }
+ }
+
+ return destinations;
+ }
+
+ private Properties loadRules() throws MessageRouterException {
+ InputStream ruleStream;
+
+ // Get the properties file stream...
+ if(ruleSetFile.exists()) {
+ try {
+ ruleStream = new FileInputStream(ruleSetFile);
+ } catch (FileNotFoundException e) {
+ throw new MessageRouterException("Unable to open rule properties file '" + ruleSetFile.getAbsolutePath() + "'.", e);
+ }
+ lastLoaded = ruleSetFile.lastModified();
+ } else {
+ ruleStream = ClassUtil.getResourceAsStream(ruleSetConfig, AbstractPropertyRulesRouter.class);
+ }
+
+ if(ruleStream == null) {
+ throw new MessageRouterException("Unable to open rule properties file '" + ruleSetConfig + "'.");
+ }
+
+ // Load the rule properties...
+ Properties rules = new Properties();
+ try {
+ try {
+ rules.load(ruleStream);
+ } catch (IOException e) {
+ throw new MessageRouterException("Error reading rule properties file '" + ruleSetConfig + "'.", e);
+ }
+ } finally {
+ try {
+ ruleStream.close();
+ } catch (IOException e) {
+ throw new MessageRouterException("Error closing rule properties file '" + ruleSetConfig + "'.", e);
+ }
+ }
+
+ return rules;
+ }
+
+ private List<Object> getMessageObjectsToTest(Message message, List<Object> objectList) throws MessageRouterException {
+ List<Object> objectsToTest = new ArrayList<Object>();
+
+ if(objectList == null || objectList.isEmpty()) {
+ try {
+ objectsToTest.add(payloadProxy.getPayload(message));
+ } catch (MessageDeliverException e) {
+ throw new MessageRouterException("Failed to get message payload from message.", e);
+ }
+ } else {
+ ObjectMapper objectMapper = new ObjectMapper();
+
+ for(Object object : objectList) {
+ if(object instanceof String) {
+ try {
+ Object mappedObject = objectMapper.getObjectFromMessage(message, (String) object);
+
+ if(mappedObject == null) {
+ logger.debug("Object '" + object + "' not present on message.");
+ continue;
+ }
+
+ objectsToTest.add(mappedObject);
+ } catch (ObjectMappingException e) {
+ logger.debug("Object '" + object + "' not present on message.");
+ }
+ }
+ }
+ }
+
+ return objectsToTest;
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,75 +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, JBoss Inc.
- */
-package org.jboss.soa.esb.actions.cbr;
-
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.util.XPathNamespaceContext;
-import org.jboss.soa.esb.ConfigurationException;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.apache.taglibs.bsf.expression;
-
-import javax.xml.xpath.*;
-import java.util.*;
-import java.util.regex.Pattern;
-import java.io.*;
-
-/**
- * Regex Content Based Router implementation.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class RegexRouter extends AbstractPropertyRulesRouter {
-
- public Map<String, RoutingRule> buildRoutingMap(Properties rules) throws MessageRouterException {
- Map<String, RoutingRule> routingMap = new HashMap<String, RoutingRule>();
-
- Set<Map.Entry<Object, Object>> ruleSet = rules.entrySet();
- for(Map.Entry<Object, Object> rule : ruleSet) {
- String destinationName = (String) rule.getKey();
- String expression = (String) rule.getValue();
-
- routingMap.put(destinationName, new RegexRoutingRule(Pattern.compile(expression, Pattern.DOTALL)));
- }
-
- return routingMap;
- }
-
- private class RegexRoutingRule implements RoutingRule {
-
- private Pattern regexExpression;
-
- private RegexRoutingRule(Pattern regexExpression) {
- this.regexExpression = regexExpression;
- }
-
- public boolean evaluate(Object objectToTest) throws MessageRouterException {
- if(objectToTest instanceof CharSequence) {
- return regexExpression.matcher((CharSequence) objectToTest).matches();
- } else {
- logger.debug("Unsupported Regex evaluation type '" + objectToTest.getClass().getName() + "'. Only supports CharSequence types.");
- }
-
- return false;
- }
- }
-}
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RegexRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,75 @@
+/*
+ * 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.actions.cbr;
+
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.util.XPathNamespaceContext;
+import org.jboss.soa.esb.ConfigurationException;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.apache.taglibs.bsf.expression;
+
+import javax.xml.xpath.*;
+import java.util.*;
+import java.util.regex.Pattern;
+import java.io.*;
+
+/**
+ * Regex Content Based Router implementation.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class RegexRouter extends AbstractPropertyRulesRouter {
+
+ public Map<String, RoutingRule> buildRoutingMap(Properties rules) throws MessageRouterException {
+ Map<String, RoutingRule> routingMap = new HashMap<String, RoutingRule>();
+
+ Set<Map.Entry<Object, Object>> ruleSet = rules.entrySet();
+ for(Map.Entry<Object, Object> rule : ruleSet) {
+ String destinationName = (String) rule.getKey();
+ String expression = (String) rule.getValue();
+
+ routingMap.put(destinationName, new RegexRoutingRule(Pattern.compile(expression, Pattern.DOTALL)));
+ }
+
+ return routingMap;
+ }
+
+ private class RegexRoutingRule implements RoutingRule {
+
+ private Pattern regexExpression;
+
+ private RegexRoutingRule(Pattern regexExpression) {
+ this.regexExpression = regexExpression;
+ }
+
+ public boolean evaluate(Object objectToTest) throws MessageRouterException {
+ if(objectToTest instanceof CharSequence) {
+ return regexExpression.matcher((CharSequence) objectToTest).matches();
+ } else {
+ logger.debug("Unsupported Regex evaluation type '" + objectToTest.getClass().getName() + "'. Only supports CharSequence types.");
+ }
+
+ return false;
+ }
+ }
+}
\ No newline at end of file
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,37 +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, JBoss Inc.
- */
-package org.jboss.soa.esb.actions.cbr;
-
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-
-/**
- * Routing Rule.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public interface RoutingRule {
-
- /**
- * Evaluate the rule for the supplied Object.
- * @param objectToTest The object to test.
- * @return True if the object "matches" the rule, otherwise false.
- * @throws MessageRouterException Error evaluating the rule against the object.
- */
- boolean evaluate(Object objectToTest) throws MessageRouterException;
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/RoutingRule.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,37 @@
+/*
+ * 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.actions.cbr;
+
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+
+/**
+ * Routing Rule.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface RoutingRule {
+
+ /**
+ * Evaluate the rule for the supplied Object.
+ * @param objectToTest The object to test.
+ * @return True if the object "matches" the rule, otherwise false.
+ * @throws MessageRouterException Error evaluating the rule against the object.
+ */
+ boolean evaluate(Object objectToTest) throws MessageRouterException;
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,118 +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, JBoss Inc.
- */
-package org.jboss.soa.esb.actions.cbr;
-
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.util.XPathNamespaceContext;
-import org.jboss.soa.esb.ConfigurationException;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-import javax.xml.xpath.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * XPath Content Based Router implementation.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class XPathRouter extends AbstractPropertyRulesRouter {
-
- private XPathNamespaceContext namespaceContext;
-
- public void setConfigTree(ConfigTree configTree) throws MessageRouterException {
- try {
- namespaceContext = new NamespaceContext(configTree.getChildren("namespace"));
- } catch (ConfigurationException e) {
- throw new MessageRouterException("Error loading namespace prefix mappings.", e);
- }
-
- super.setConfigTree(configTree);
- }
-
- public Map<String, RoutingRule> buildRoutingMap(Properties rules) throws MessageRouterException {
- XPathFactory xPathFactory = XPathFactory.newInstance();
- XPath xpath = xPathFactory.newXPath();
- Map<String, RoutingRule> routingMap = new HashMap<String, RoutingRule>();
-
- xpath.setNamespaceContext(namespaceContext);
-
- Set<Map.Entry<Object, Object>> ruleSet = rules.entrySet();
- for(Map.Entry<Object, Object> rule : ruleSet) {
- String destinationName = (String) rule.getKey();
- String expression = (String) rule.getValue();
- try {
- routingMap.put(destinationName, new XPathRoutingRule(xpath.compile(expression)));
- } catch (XPathExpressionException e) {
- throw new MessageRouterException("Error compiling XPath expression '" + expression + "'.", e);
- }
- }
-
- return routingMap;
- }
-
- public javax.xml.namespace.NamespaceContext getNamespaceContext() {
- return namespaceContext;
- }
-
- private class XPathRoutingRule implements RoutingRule {
-
- private XPathExpression xpathExpression;
-
- private XPathRoutingRule(XPathExpression xpathExpression) {
- this.xpathExpression = xpathExpression;
- }
-
- public boolean evaluate(Object objectToTest) throws MessageRouterException {
- try {
- if(objectToTest instanceof String) {
- return (Boolean) xpathExpression.evaluate(new InputSource(new StringReader((String) objectToTest)), XPathConstants.BOOLEAN);
- } else if(objectToTest instanceof byte[]) {
- return (Boolean) xpathExpression.evaluate(new InputSource(new ByteArrayInputStream((byte[]) objectToTest)), XPathConstants.BOOLEAN);
- } else if(objectToTest instanceof Node || objectToTest instanceof NodeList) {
- return (Boolean) xpathExpression.evaluate(objectToTest, XPathConstants.BOOLEAN);
- } else {
- logger.debug("Unsupported XPath evaluation type '" + objectToTest.getClass().getName() + "'.");
- }
- } catch (XPathExpressionException e) {
- logger.debug("Error evaluating xpath expression.", e);
- }
-
- return false;
- }
- }
-
- private class NamespaceContext extends XPathNamespaceContext {
-
- public NamespaceContext(ConfigTree[] namespaces) throws ConfigurationException {
- if(namespaces != null) {
- for(ConfigTree namespace : namespaces) {
- String prefix = namespace.getRequiredAttribute("prefix");
- String uri = namespace.getRequiredAttribute("uri");
-
- setMapping(prefix, uri);
- }
- }
- }
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/actions/cbr/XPathRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,118 @@
+/*
+ * 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.actions.cbr;
+
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.util.XPathNamespaceContext;
+import org.jboss.soa.esb.ConfigurationException;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import javax.xml.xpath.*;
+import java.util.*;
+import java.io.*;
+
+/**
+ * XPath Content Based Router implementation.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class XPathRouter extends AbstractPropertyRulesRouter {
+
+ private XPathNamespaceContext namespaceContext;
+
+ public void setConfigTree(ConfigTree configTree) throws MessageRouterException {
+ try {
+ namespaceContext = new NamespaceContext(configTree.getChildren("namespace"));
+ } catch (ConfigurationException e) {
+ throw new MessageRouterException("Error loading namespace prefix mappings.", e);
+ }
+
+ super.setConfigTree(configTree);
+ }
+
+ public Map<String, RoutingRule> buildRoutingMap(Properties rules) throws MessageRouterException {
+ XPathFactory xPathFactory = XPathFactory.newInstance();
+ XPath xpath = xPathFactory.newXPath();
+ Map<String, RoutingRule> routingMap = new HashMap<String, RoutingRule>();
+
+ xpath.setNamespaceContext(namespaceContext);
+
+ Set<Map.Entry<Object, Object>> ruleSet = rules.entrySet();
+ for(Map.Entry<Object, Object> rule : ruleSet) {
+ String destinationName = (String) rule.getKey();
+ String expression = (String) rule.getValue();
+ try {
+ routingMap.put(destinationName, new XPathRoutingRule(xpath.compile(expression)));
+ } catch (XPathExpressionException e) {
+ throw new MessageRouterException("Error compiling XPath expression '" + expression + "'.", e);
+ }
+ }
+
+ return routingMap;
+ }
+
+ public javax.xml.namespace.NamespaceContext getNamespaceContext() {
+ return namespaceContext;
+ }
+
+ private class XPathRoutingRule implements RoutingRule {
+
+ private XPathExpression xpathExpression;
+
+ private XPathRoutingRule(XPathExpression xpathExpression) {
+ this.xpathExpression = xpathExpression;
+ }
+
+ public boolean evaluate(Object objectToTest) throws MessageRouterException {
+ try {
+ if(objectToTest instanceof String) {
+ return (Boolean) xpathExpression.evaluate(new InputSource(new StringReader((String) objectToTest)), XPathConstants.BOOLEAN);
+ } else if(objectToTest instanceof byte[]) {
+ return (Boolean) xpathExpression.evaluate(new InputSource(new ByteArrayInputStream((byte[]) objectToTest)), XPathConstants.BOOLEAN);
+ } else if(objectToTest instanceof Node || objectToTest instanceof NodeList) {
+ return (Boolean) xpathExpression.evaluate(objectToTest, XPathConstants.BOOLEAN);
+ } else {
+ logger.debug("Unsupported XPath evaluation type '" + objectToTest.getClass().getName() + "'.");
+ }
+ } catch (XPathExpressionException e) {
+ logger.debug("Error evaluating xpath expression.", e);
+ }
+
+ return false;
+ }
+ }
+
+ private class NamespaceContext extends XPathNamespaceContext {
+
+ public NamespaceContext(ConfigTree[] namespaces) throws ConfigurationException {
+ if(namespaces != null) {
+ for(ConfigTree namespace : namespaces) {
+ String prefix = namespace.getRequiredAttribute("prefix");
+ String uri = namespace.getRequiredAttribute("uri");
+
+ setMapping(prefix, uri);
+ }
+ }
+ }
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -41,6 +41,7 @@
public static final String DEFAULT_INVM_SCOPE = "jboss.esb.invm.scope.default";
public static final String INVM_EXPIRY_TIME = "org.jboss.soa.esb.invm.expiryTime";
+ public static final String INVM_RETRY_LIMIT = "org.jboss.soa.esb.invm.retry.limit";
public static final String SMTP_HOST = "org.jboss.soa.esb.mail.smtp.host";
public static final String SMTP_USERNAME = "org.jboss.soa.esb.mail.smtp.user";
@@ -187,7 +188,8 @@
public static final String MESSAGE_ENTRY_TIME = "org.jboss.soa.esb.message.time.dob"; // time born
public static final String MESSAGE_EXIT_TIME = "org.jboss.soa.esb.message.time.dod"; // time died
public static final String MESSAGE_BYTE_SIZE = "org.jboss.soa.esb.message.byte.size"; // size
-
+ public static final String MESSAGE_TIME_PROCESSED = "org.jboss.soa.esb.message.time.processed"; //
+
/** Message property name for original filename */
public static final String ORIGINAL_FILE_NAME_MSG_PROP = "org.jboss.soa.esb.gateway.original.file.name";
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/http/HttpContentTypeUtil.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/http/HttpContentTypeUtil.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/http/HttpContentTypeUtil.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/http/HttpContentTypeUtil.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,57 @@
+/*
+ * 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.http;
+
+import org.jboss.soa.esb.common.ModulePropertyManager;
+
+import java.util.regex.Pattern;
+
+/**
+ * HTTP Content Type utility methods.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class HttpContentTypeUtil {
+
+ private static Pattern[] textMimePatterns;
+
+ static {
+ String[] textTypes = ModulePropertyManager.getPropertyManager("core").getProperty("org.jboss.soa.esb.mime.text.types", "text/*;application/xml;application/*-xml").split(";");
+
+ textMimePatterns = new Pattern[textTypes.length];
+ for(int i = 0; i < textMimePatterns.length; i++) {
+ textMimePatterns[i] = Pattern.compile(textTypes[i].trim().replace("*", ".*"));
+ }
+ }
+
+ public static boolean isTextMimetype(String contentType) {
+ if(contentType == null) {
+ return false;
+ }
+
+ for(int i = 0; i < textMimePatterns.length; i++) {
+ if(textMimePatterns[i].matcher(contentType).matches()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -48,6 +48,10 @@
public static final String SERVICE_CATEGORY_NAME_TAG = "service-category";
public static final String SERVICE_NAME_TAG = "service-name";
public static final String SERVICE_DESCRIPTION_TAG = "service-description";
+ public static final String SERVICE_ALERT_TIME_TAG = "service-alert-time";
+ public static final String SERVICE_ALERT_LENGTH_TAG = "service-alert-length";
+ public static final String ACTION_ALERT_TIME_TAG = "action-alert-time";
+ public static final String ACTION_ALERT_LENGTH_TAG = "action-alert-length";
public static final String EPR_DESCRIPTION_TAG = "epr-description";
public static final String REMOVE_OLD_SERVICE = "remove-old-service";
@@ -113,6 +117,7 @@
/** Content Based Routing */
/** RuleSet reference (Filename) */
public static final String CBR_CLASS = "cbrClass";
+ public static final String CBR_ALIAS = "cbrAlias";
public static final String RULE_SET_TAG = "ruleSet";
public static final String RULE_LANGUAGE_TAG = "ruleLanguage";
public static final String RULE_RELOAD_TAG = "ruleReload";
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -485,6 +485,12 @@
final List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>() ;
WebDeploymentArchive webDeployment = new WebDeploymentArchive(getESBWarFileName(di));
WebModel webModel = webDeployment.getWebModel();
+
+ // Set the global security domain and global security method.
+ // These setting are shared for all http-providers and EBWSs
+ // in a jboss-esb.xml file.
+ webModel.setAuthDomain(model.getAuthDomain());
+ webModel.setAuthMethod(model.getAuthMethod());
// Add the EBWS components...
createWebserviceWars(di, model, deploymentName, publishers, webDeployment);
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ActionMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ActionMapper.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ActionMapper.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -124,6 +124,14 @@
actionConfigTree.setAttribute(ListenerTagNames.ACTION_ELEMENT_TAG, action.getName());
actionConfigTree.setAttribute(ListenerTagNames.ACTION_CLASS_TAG, action.getClass1());
actionConfigTree.setAttribute(ListenerTagNames.PROCESS_METHOD_TAG, action.getProcess());
+
+ if (action.getAlertLengthThreshold() != null) {
+ actionConfigTree.setAttribute(ListenerTagNames.ACTION_ALERT_LENGTH_TAG, action.getAlertLengthThreshold().toString());
+ }
+ if ( action.getAlertTimeThreshold() != null) {
+ actionConfigTree.setAttribute(ListenerTagNames.ACTION_ALERT_TIME_TAG, action.getAlertTimeThreshold().toString());
+ }
+
// The "okMethods" and "exceptionMethod" attributes are supported by adding them as child <property> elements.
// Map the property elements to action attributes...
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ESBAwareGenerator.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ESBAwareGenerator.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/ESBAwareGenerator.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -29,6 +29,7 @@
import org.jboss.soa.esb.dom.YADOMUtil;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.AbstractScheduledListener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.DualListener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsProviderType;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Provider;
@@ -146,7 +147,7 @@
if (service.isSetInvmScope()) {
return service.getInvmTransacted() ;
} else if (service.isSetListeners()) {
- for (Listener listener: service.getListeners().getListenerList()) {
+ for (Listener listener: service.getListeners().getAbstractListenerList()) {
if (listener instanceof ScheduledListener) {
if (((ScheduledListener)listener).getTransacted())
return true ;
@@ -209,8 +210,10 @@
return;
} else if (listener instanceof GroovyListener) {
listenerConfigTree = GroovyListenerMapper.map(root, (GroovyListener)listener, model);
+ } else if (listener instanceof DualListener){
+ listenerConfigTree = UntypedListenerMapper.map(root, (DualListener)listener, model);
} else {
- listenerConfigTree = UntypedListenerMapper.map(root, listener, model);
+ throw new ConfigurationException("Unexpected listener type encountered: " + listener) ;
}
if (listener instanceof AbstractScheduledListener) {
@@ -224,4 +227,4 @@
ActionMapper.map(listenerConfigTree, listenerService, model);
NotificationMapper.map(listenerConfigTree, listenerService, model);
}
-}
\ No newline at end of file
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/GatewayGenerator.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/GatewayGenerator.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/GatewayGenerator.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -37,6 +37,7 @@
import org.jboss.soa.esb.listeners.config.xbeanmodel120.ServiceDocument.Service;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.SqlListenerDocument.SqlListener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.UdpListenerDocument.UdpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.DualListener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.JcaGatewayDocument;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.AbstractScheduledListener;
@@ -143,8 +144,10 @@
listenerConfig = HibernateListenerMapper.map(root, (HibernateListener) gateway, model);
} else if (gateway instanceof UdpListener) {
listenerConfig = UdpListenerMapper.map(root, (UdpListener) gateway, model);
+ } else if (gateway instanceof DualListener){
+ listenerConfig = UntypedListenerMapper.map(root, (DualListener)gateway, model);
} else {
- listenerConfig = UntypedListenerMapper.map(root, gateway, model);
+ throw new ConfigurationException("Unexpected gateway type encountered: " + gateway) ;
}
if (gateway instanceof AbstractScheduledListener) {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/HttpGatewayMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/HttpGatewayMapper.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/HttpGatewayMapper.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -89,7 +89,6 @@
List<HttpBus.ProtectedMethods> protectedMethodsList = bus.getProtectedMethodsList();
List<HttpBus.AllowedRoles> rolesList = bus.getAllowedRolesList();
- HttpProvider.Auth authType = provider.getAuth();
HttpBus.TransportGuarantee.Enum transportGuarantee = bus.getTransportGuarantee();
MapperUtil.mapProperties(bus.getPropertyList(), listenerNode);
@@ -119,10 +118,6 @@
}
listenerNode.setAttribute(HttpGatewayDeploymentFactory.ALLOWED_ROLES, rolesString.toString());
}
- if(authType != null) {
- listenerNode.setAttribute(HttpGatewayDeploymentFactory.AUTH_METHOD, authType.getMethod().toString());
- listenerNode.setAttribute(HttpGatewayDeploymentFactory.AUTH_DOMAIN, authType.getDomain());
- }
if(transportGuarantee != null) {
listenerNode.setAttribute(HttpGatewayDeploymentFactory.TRANSPORT_GUARANTEE, transportGuarantee.toString());
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapper.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapper.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -21,16 +21,16 @@
package org.jboss.soa.esb.listeners.config.mappers120;
-import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
-import javax.jms.Queue;
-import javax.jms.Topic;
-
import org.apache.log4j.Logger;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.common.ModulePropertyManager;
import org.jboss.soa.esb.dom.YADOMUtil;
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsProviderType;
@@ -43,14 +43,17 @@
import org.jboss.soa.esb.listeners.config.xbeanmodel120.PropertyDocument.Property;
import org.jboss.soa.esb.listeners.gateway.JmsGatewayListener;
import org.jboss.soa.esb.listeners.gateway.PackageJmsMessageContents;
+import org.jboss.soa.esb.listeners.jca.ActivationMapper;
import org.jboss.soa.esb.listeners.jca.JcaConstants;
import org.jboss.soa.esb.listeners.jca.JcaGatewayListener;
import org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter;
import org.jboss.soa.esb.listeners.jca.JcaJMSMessageAwareComposer;
import org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener;
+import org.jboss.soa.esb.util.ClassUtil;
import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
/**
* Performs the mapping of a <jms-listener> XSD based configuration to the "ConfigTree"
* style configuration, adding the "ConfigTree" listener config to the "root" node.
@@ -58,6 +61,8 @@
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
public class JmsListenerMapper {
+ // The default JMS JCA adapter.
+ private static final String DEFAULT_JMS_ADAPTER = "jms-ra.rar" ;
@SuppressWarnings("unused")
private static Logger log = Logger.getLogger( JmsListenerMapper.class );
@@ -99,7 +104,7 @@
final Class<?> gatewayClass ;
if (provider instanceof JmsJcaProvider) {
final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
- mapJmsJcaAttributes(listener, listenerNode, jmsJcaProvider, messageFilter) ;
+ mapJmsJcaAttributes(listener, listenerNode, bus, jmsJcaProvider, messageFilter) ;
gatewayClass = JcaGatewayListener.class ;
} else {
gatewayClass = JmsGatewayListener.class ;
@@ -158,20 +163,12 @@
toElement.setAttribute(JMSEpr.TRANSACTED_TAG, Boolean.toString( messageFilter.getTransacted()));
}
- /*
- * @throws ConfigurationException is one of the following activation-config
- * properties are overridden:
- * - destination
- * - destinationType
- * - messageSelector
- * - maxMessages
- */
private static void mapJmsJcaAttributes(final JmsListener listener,
- final Element listenerNode, final JmsJcaProvider jmsJcaProvider,
+ final Element listenerNode, final JmsBus bus, final JmsJcaProvider jmsJcaProvider,
final JmsMessageFilter messageFilter)
throws ConfigurationException {
setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ADAPTER,
- jmsJcaProvider.getAdapter(), "jms-ra.rar") ;
+ jmsJcaProvider.getAdapter(), DEFAULT_JMS_ADAPTER) ;
setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ENDPOINT_CLASS,
jmsJcaProvider.getEndpointClass(), JcaJMSInflowMessageProcessorAdapter.class.getName()) ;
setAttribute(listenerNode, JcaConstants.ATTRIBUTE_MESSAGING_TYPE,
@@ -206,36 +203,35 @@
JcaJMSMessageAwareComposer.class.getName()) ;
}
- final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
- addPropertyElement(activationConfigElement, "destination", messageFilter.getDestName()) ;
- if (jmsJcaProvider.isSetProviderAdapterJNDI())
- {
- addPropertyElement(activationConfigElement, "providerAdapterJNDI", jmsJcaProvider.getProviderAdapterJNDI()) ;
- }
+ final ActivationMapper activationMapper = getActivationMapper(listener, bus, jmsJcaProvider) ;
+ final Map<String, String> activationConfigValues = new HashMap<String, String>() ;
+ activationMapper.setDestination(activationConfigValues, messageFilter.getDestName()) ;
+ activationMapper.setProviderAdapterJNDI(activationConfigValues, jmsJcaProvider.getProviderAdapterJNDI()) ;
final int destType = messageFilter.getDestType().intValue() ;
if (destType == DestType.INT_QUEUE)
{
- addPropertyElement(activationConfigElement, "destinationType", Queue.class.getName()) ;
+ activationMapper.setDestinationType(activationConfigValues, true) ;
}
else if (destType == DestType.INT_TOPIC)
{
- addPropertyElement(activationConfigElement, "destinationType", Topic.class.getName()) ;
+ activationMapper.setDestinationType(activationConfigValues, false) ;
}
else
{
throw new ConfigurationException("Unknown destination type: " + messageFilter.getDestType()) ;
}
- if (messageFilter.getSelector() != null)
+ activationMapper.setMessageSelector(activationConfigValues, messageFilter.getSelector()) ;
+ final Integer maxThreads = (listener.isSetMaxThreads() ? new Integer(listener.getMaxThreads()) : null) ;
+ activationMapper.setMaxThreads(activationConfigValues, maxThreads) ;
+
+ final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+ for(Map.Entry<String, String> entry: activationConfigValues.entrySet())
{
- addPropertyElement(activationConfigElement, "messageSelector", messageFilter.getSelector()) ;
+ addPropertyElement(activationConfigElement, entry.getKey(), entry.getValue()) ;
}
- if (listener.getMaxThreads() > 0)
- {
- addPropertyElement(activationConfigElement, "maxMessages", Integer.toString(listener.getMaxThreads())) ;
- }
- final List<String> defaultPropertyNames = getDefaultActivationConfigNames( activationConfigElement );
+ final Set<String> defaultPropertyNames = activationConfigValues.keySet() ;
log.debug("Default activation-config properties :" + defaultPropertyNames );
/*
@@ -256,16 +252,6 @@
}
}
- private static List<String> getDefaultActivationConfigNames(final Element activationConfigElement )
- {
- NodeList defaultActivationProperties = activationConfigElement.getElementsByTagName( "property" );
- final List<String> defaultPropertyNames = new ArrayList<String>(5);
- for (int i = defaultActivationProperties.getLength() ; i-->0 ; )
- defaultPropertyNames.add(defaultActivationProperties.item( i ).getAttributes().getNamedItem( "name" ).getNodeValue() );
-
- return defaultPropertyNames;
- }
-
private static void setAttribute(final Element listenerNode,
final String name, final String value)
{
@@ -296,4 +282,85 @@
propertyElement.setAttribute("name", name) ;
propertyElement.setAttribute("value", value) ;
}
+
+ private static ActivationMapper getActivationMapper(final JmsListener listener,
+ final JmsBus bus, final JmsJcaProvider jmsJcaProvider)
+ throws ConfigurationException
+ {
+ final String activationMapper = getActivationMapperClass(listener, bus, jmsJcaProvider); ;
+ if (activationMapper == null)
+ {
+ throw new ConfigurationException("Could not locate ActivationMapper for adapter " + jmsJcaProvider.getAdapter()) ;
+ }
+ final Class activationMapperClass ;
+ try
+ {
+ activationMapperClass = ClassUtil.forName(activationMapper.trim(), JmsListenerMapper.class) ;
+ }
+ catch (final ClassNotFoundException cnfe)
+ {
+ throw new ConfigurationException("Could not locate activation mapper class " + activationMapper, cnfe) ;
+ }
+
+ if (!ActivationMapper.class.isAssignableFrom(activationMapperClass))
+ {
+ throw new ConfigurationException("Activation mapper class " + activationMapper + " does not implement ActivationMapper interface") ;
+ }
+ try
+ {
+ return (ActivationMapper)(activationMapperClass.newInstance()) ;
+ }
+ catch (final Throwable th)
+ {
+ throw new ConfigurationException("Failed to instantiate activation mapper class " + activationMapper, th) ;
+ }
+ }
+
+ private static String getActivationMapperClass(final JmsListener listener,
+ final JmsBus bus, final JmsJcaProvider jmsJcaProvider)
+ throws ConfigurationException
+ {
+ final String listenerActivationMapper = findProperty(listener.getPropertyList(), ListenerTagNames.JCA_ACTIVATION_MAPPER) ;
+ if (listenerActivationMapper != null)
+ {
+ return listenerActivationMapper ;
+ }
+
+ final String busActivationMapper = findProperty(bus.getPropertyList(), ListenerTagNames.JCA_ACTIVATION_MAPPER) ;
+ if (busActivationMapper != null)
+ {
+ return busActivationMapper ;
+ }
+
+ final String providerActivationMapper = findProperty(jmsJcaProvider.getPropertyList(), ListenerTagNames.JCA_ACTIVATION_MAPPER) ;
+ if (providerActivationMapper != null)
+ {
+ return providerActivationMapper ;
+ }
+
+ final String adapter = (jmsJcaProvider.getAdapter() == null ? DEFAULT_JMS_ADAPTER : jmsJcaProvider.getAdapter()) ;
+
+ final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE);
+ final String activationMapper = propertyManager.getProperty("org.jboss.soa.esb.jca.activation.mapper." + adapter) ;
+ if (activationMapper == null)
+ {
+ throw new ConfigurationException("Could not locate activation mapper for adapter " + adapter) ;
+ }
+ return activationMapper ;
+ }
+
+ private static String findProperty(final List<Property> properties, final String name)
+ {
+ if ((properties != null) && (name != null))
+ {
+ for(Property property: properties)
+ {
+ if (name.equals(property.getName()))
+ {
+ return property.getValue() ;
+ }
+ }
+ }
+ return null ;
+ }
}
\ No newline at end of file
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/MapperUtil.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/MapperUtil.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/MapperUtil.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -52,7 +52,6 @@
Service service = model.getService(listener);
boolean isGateway = XMLBeansModel.isGateway(listener);
- // Map maxThreads - appears to be a JMS only attrib...
if(listener instanceof DualListener) {
listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, String.valueOf(((DualListener)listener).getMaxThreads()));
} else {
@@ -95,6 +94,12 @@
listenerNode.setAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, service.getCategory());
listenerNode.setAttribute(ListenerTagNames.SERVICE_NAME_TAG, service.getName());
}
+ if (service.getAlertTimeThreshold() != null) {
+ listenerNode.setAttribute(ListenerTagNames.SERVICE_ALERT_TIME_TAG, service.getAlertTimeThreshold().toString());
+ }
+ if (service.getAlertLengthThreshold() != null) {
+ listenerNode.setAttribute(ListenerTagNames.SERVICE_ALERT_LENGTH_TAG, service.getAlertLengthThreshold().toString());
+ }
}
/**
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/UntypedListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/UntypedListenerMapper.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/UntypedListenerMapper.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -25,10 +25,11 @@
import org.jboss.soa.esb.dom.YADOMUtil;
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.DualListener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.Provider;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.impl.BusImpl;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.impl.ListenerImpl;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.impl.DualListenerImpl;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.impl.BusProviderImpl;
import org.w3c.dom.Element;
@@ -54,7 +55,7 @@
* @return The ConfigTree listener configuration node.
* @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
*/
- public static Element map(Element root, Listener listener, XMLBeansModel model) throws ConfigurationException {
+ public static Element map(Element root, DualListener listener, XMLBeansModel model) throws ConfigurationException {
Element listenerNode = YADOMUtil.addElement(root, "listener");
listenerNode.setAttribute("name", listener.getName());
@@ -66,7 +67,9 @@
// Map the <property> elements targeted at the listener - from the listener itself.
MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
- if(listenerNode.getAttribute(ListenerTagNames.IS_GATEWAY_TAG).equals("true")) {
+ if(listener.getIsGateway()) {
+ listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
MapperUtil.mapEPRProperties(listener, listenerNode, model);
} else {
Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
@@ -93,7 +96,7 @@
// Note we're purposely performing instanceof comparisons here...
- if(listener.getClass() != ListenerImpl.class) {
+ if(listener.getClass() != DualListenerImpl.class) {
throw new ConfigurationException("Can only use the " + UntypedListenerMapper.class.getName() + " mapper on the base listener type. Cannot use on " + listener.getClass().getName());
}
Bus bus = model.getBus(listener.getBusidref());
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/XMLBeansModel.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/XMLBeansModel.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/XMLBeansModel.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -41,6 +41,8 @@
import org.jboss.soa.esb.listeners.config.xbeanmodel120.*;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.ActionDocument.Action;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.GlobalsDocument.Globals;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.GlobalsDocument.Globals.WarSecurity;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Jbossesb;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.PropertyDocument.Property;
import org.jboss.soa.esb.listeners.config.xbeanmodel120.ProvidersDocument.Providers;
@@ -100,7 +102,7 @@
ListenersDocument.Listeners listeners = service.getListeners();
if(listeners != null) {
- List<Listener> listenerList = listeners.getListenerList();
+ List<Listener> listenerList = listeners.getAbstractListenerList();
if(listenerList != null) {
for(Listener serviceListener : listenerList) {
@@ -264,7 +266,7 @@
for(Service service: services) {
final ListenersDocument.Listeners listeners = service.getListeners() ;
if (listeners != null) {
- for (Listener listener: listeners.getListenerList()) {
+ for (Listener listener: listeners.getAbstractListenerList()) {
if (listener instanceof AbstractScheduledListener) {
count++ ;
}
@@ -302,7 +304,7 @@
ListenersDocument.Listeners listeners = service.getListeners();
if(listeners != null) {
- for(Listener listener : listeners.getListenerList()) {
+ for(Listener listener : listeners.getAbstractListenerList()) {
if(isGateway(listener) == isGateway) {
gateways.add(listener);
listenerAdded = true;
@@ -574,4 +576,34 @@
}
return endpointServices ;
}
+
+ public String getAuthDomain()
+ {
+ WarSecurity warSecurity = getWarSecurity();
+ if (warSecurity != null)
+ {
+ return warSecurity.getDomain();
+ }
+ return null;
+ }
+
+ public String getAuthMethod()
+ {
+ WarSecurity warSecurity = getWarSecurity();
+ if (warSecurity != null)
+ {
+ return warSecurity.getMethod().toString();
+ }
+ return null;
+ }
+
+ private WarSecurity getWarSecurity()
+ {
+ Globals globals = jbossesb.getGlobals();
+ if (globals != null)
+ {
+ return globals.getWarSecurity();
+ }
+ return null;
+ }
}
\ No newline at end of file
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -156,5 +156,23 @@
{
return model.getWebserviceServices() ;
}
+
+ /**
+ * This feature in not implemented in the 1.0.1 version of the schema.
+ * @return null Since this feature is not implemented.
+ */
+ public String getAuthDomain()
+ {
+ return null;
+ }
+
+ /**
+ * This feature in not implemented in the 1.0.1 version of the schema.
+ * @return null Since this feature is not implemented.
+ */
+ public String getAuthMethod()
+ {
+ return null;
+ }
}
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -155,5 +155,23 @@
{
return model.getWebserviceServices() ;
}
+
+ /**
+ * This feature in not implemented in the 1.0.1 version of the schema.
+ * @return null Since this feature is not implemented.
+ */
+ public String getAuthDomain()
+ {
+ return null;
+ }
+
+ /**
+ * This feature in not implemented in the 1.0.1 version of the schema.
+ * @return null Since this feature is not implemented.
+ */
+ public String getAuthMethod()
+ {
+ return null;
+ }
}
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model120SchemaParser.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model120SchemaParser.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model120SchemaParser.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -154,5 +154,15 @@
{
return model.getWebserviceServices() ;
}
+
+ public String getAuthDomain()
+ {
+ return model.getAuthDomain();
+ }
+
+ public String getAuthMethod()
+ {
+ return model.getAuthMethod();
+ }
}
}
\ No newline at end of file
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -79,4 +79,18 @@
* @return The list of services.
*/
public List<WebserviceInfo> getWebserviceServices() ;
+
+ /**
+ * Gets the global authentication domain.
+ *
+ * @return String The name of the authentication domain.
+ */
+ public String getAuthDomain() ;
+
+ /**
+ * Gets the global authentication method.
+ *
+ * @return String The name of the authentication method.
+ */
+ public String getAuthMethod() ;
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -208,7 +208,14 @@
}
WebModel webModel = new WebModel(esbMetaData.getArchiveName());
+
try {
+ // Set the global security domain and global security method.
+ // These setting are shared for all http-providers and EBWSs
+ // in a jboss-esb.xml file.
+ webModel.setAuthDomain(esbMetaData.getModel().getAuthDomain());
+ webModel.setAuthMethod(esbMetaData.getModel().getAuthMethod());
+
ModelUtil.updateWebModel(ModelUtil.getListenerGroups(esbMetaData.getModel()), webModel);
} catch (ConfigurationException e) {
throw new DeploymentException("Failed to capture web metadata from ESB configuration.", e);
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -54,6 +54,7 @@
import org.jboss.soa.esb.services.security.SecurityService;
import org.jboss.soa.esb.services.security.SecurityServiceException;
import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
+import org.jboss.soa.esb.services.security.auth.ExtractorUtil;
import org.jboss.soa.esb.services.security.auth.http.JbrHttpSecurityInfoExtractor;
import org.jboss.soa.esb.services.security.auth.ws.WSSecurityInfoExtractor;
import org.jboss.soa.esb.util.ClassUtil;
@@ -597,18 +598,11 @@
if ( authRequest == null && payload instanceof String) {
authRequest = wsSecurityExtractor.extractSecurityInfo((String) payload);
}
-
- if ( authRequest != null ) {
- try {
- byte[] encrypted = PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest);
- if (encrypted != null) {
- message.getContext().setContext(SecurityService.AUTH_REQUEST, encrypted);
- } else {
- logger.warn("No public keystore has been configured which means that the authentication request cannot be encrypted. Please configure jbossesb-properties.xml with a publickey store.");
- }
- } catch (final SecurityServiceException e) {
- throw new MessageDeliverException(e.getMessage(), e);
- }
+
+ try {
+ ExtractorUtil.addAuthRequestToMessage(authRequest, message);
+ } catch (final SecurityServiceException e) {
+ throw new MessageDeliverException(e.getMessage(), e);
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -22,7 +22,6 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.*;
-import java.util.regex.Pattern;
import java.nio.charset.Charset;
import javax.servlet.http.HttpServletRequest;
@@ -40,7 +39,6 @@
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.MessagePayloadProxy;
import org.jboss.soa.esb.message.MessagePayloadProxy.NullPayloadHandling;
-import org.jboss.soa.esb.common.ModulePropertyManager;
import org.jboss.soa.esb.services.security.auth.ws.WSSecurityInfoExtractor;
import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
import org.jboss.soa.esb.services.security.PublicCryptoUtil;
@@ -72,7 +70,6 @@
private MessagePayloadProxy payloadProxy;
private String payloadAs;
- private Pattern[] textMimePatterns;
private WSSecurityInfoExtractor wsSecurityExtractor = new WSSecurityInfoExtractor();
@@ -91,16 +88,7 @@
super.setConfiguration(config);
payloadProxy = new MessagePayloadProxy(config);
payloadProxy.setNullSetPayloadHandling(NullPayloadHandling.LOG);
-
payloadAs = config.getAttribute("payloadAs");
- if(payloadAs == null) {
- // Get the globally configured text mime types...
- String[] textTypes = ModulePropertyManager.getPropertyManager("core").getProperty("org.jboss.soa.esb.mime.text.types", "text/*;application/xml;application/*-xml").split(";");
- textMimePatterns = new Pattern[textTypes.length];
- for(int i = 0; i < textMimePatterns.length; i++) {
- textMimePatterns[i] = Pattern.compile(textTypes[i].trim().replace("*", ".*"));
- }
- }
}
protected MessagePayloadProxy getPayloadProxy() {
@@ -132,7 +120,7 @@
if(payloadAs == null) {
String contentType = request.getContentType();
- if(contentType != null && isTextMimetype(contentType)) {
+ if(contentType != null && HttpContentTypeUtil.isTextMimetype(contentType)) {
try {
String payload = new String(bodyBytes, charset.name());
@@ -164,17 +152,6 @@
requestInfo.setRequest(message);
}
- private boolean isTextMimetype(String contentType) {
- for(int i = 0; i < textMimePatterns.length; i++) {
- if(textMimePatterns[i].matcher(contentType).matches()) {
- return true;
- }
- }
-
- return false;
- }
-
-
/*
* Method for decompsing a esb message to a HttpServletResponse
*/
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -428,7 +428,7 @@
long procTime = System.nanoTime() - start;
MessageCounterStatistics.getMessageCounterStatistics().update(new MessageStatusBean(procTime, message,
MessageStatusBean.MESSAGE_FAILED));
-
+
return false;
}
}
@@ -568,7 +568,7 @@
// Need to propagate the security context regardless if security was enabled for this service or not.
propagateSecurityContext(message, securityContext, authRequest);
- return (Boolean) Subject.doAsPrivileged(securityContext.getSubject(), getPrivilegedAction(message), null);
+ return (Boolean) Subject.doAsPrivileged(securityContext.getSubject(), getPrivilegedAction(message), null);
}
catch (final SecurityServiceException e)
{
@@ -668,7 +668,7 @@
final long totalProcTime = System.nanoTime() - start;
serviceMessageCounter.update(new ActionStatusBean(procTime, count, message,
- ActionStatusBean.ACTION_FAILED));
+ ActionStatusBean.ACTION_FAILED, serviceMessageCounter.getObjectName().toString()));
MessageCounterStatistics.getMessageCounterStatistics().update(new MessageStatusBean(totalProcTime, message,
MessageStatusBean.MESSAGE_FAILED));
@@ -680,7 +680,7 @@
}
final long procTime = System.nanoTime() - actionStart;
serviceMessageCounter.update(new ActionStatusBean(procTime, count, message,
- ActionStatusBean.ACTION_SENT));
+ ActionStatusBean.ACTION_SENT, serviceMessageCounter.getObjectName().toString()));
if (currentMessage == null)
{
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -37,6 +37,7 @@
private String m_status;
private long m_procTime;
private long m_bytesProcessed;
+ private long serviceTime;
public static final String ACTION_SENT = "SENT";
@@ -47,20 +48,36 @@
* @param procTime processing time
* @param f_procCount counter that identifies the action processor in the ConfigTree
* @param f_status status string
+ * @param objectName object name of the ServiceMessageCounter
*/
- public ActionStatusBean(long procTime, int f_procCount, Message f_message, String f_status) {
+ public ActionStatusBean(long procTime, int f_procCount, Message f_message, String f_status, String objectName) {
m_procTime = procTime;
m_procCount = f_procCount;
m_status = f_status;
m_bytesProcessed = 0;
+ serviceTime = 0;
+
+ String timeLabel = objectName + "Time";
try {
String bytes = (String) f_message.getProperties().getProperty(Environment.MESSAGE_BYTE_SIZE);
+ if (f_message.getProperties().getProperty(timeLabel) != null) {
+ Long messageServiceTime = (Long) f_message.getProperties().getProperty(objectName + "Time");
+ serviceTime = messageServiceTime.longValue() + procTime;
+ f_message.getProperties().setProperty(timeLabel, new Long(serviceTime));
+ } else {
+ serviceTime = procTime;
+ f_message.getProperties().setProperty(timeLabel, new Long(procTime));
+ }
m_bytesProcessed = Long.parseLong(bytes);
} catch (NullPointerException npe) {
} catch (NumberFormatException nfe) {
}
}
-
+
+ /**
+ * Processed bytes getter.
+ * @return bytes processed
+ */
public long getBytesProcessed() {
return m_bytesProcessed;
}
@@ -82,10 +99,18 @@
}
/**
- * Processing Time getter.
+ * Action processing Time getter.
* @return processing time elapsed
*/
public long getProcTime() {
return m_procTime;
}
+
+ /**
+ * Service processing Time getter.
+ * @return processing time elapsed
+ */
+ public long getServiceTime() {
+ return serviceTime;
+ }
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -22,6 +22,8 @@
package org.jboss.soa.esb.listeners.message;
+import java.lang.reflect.Method;
+import java.util.Enumeration;
import java.util.Hashtable;
import javax.management.Attribute;
@@ -30,6 +32,7 @@
import javax.management.DynamicMBean;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
+import javax.management.IntrospectionException;
import javax.management.InvalidAttributeValueException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanException;
@@ -51,6 +54,11 @@
* how many failed and successful messages have been processed and shows the processing time
* of each.
*
+ * Alert thresholds have also been added to this bean. There are thresholds on the
+ * size of the message as well as the length of the message for both services and for
+ * individual actions. The alerts will produce a log4j warning as well as provide for the
+ * option of JMX integration with other products.
+ *
* @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
* @since Version 4.2
*/
@@ -60,6 +68,9 @@
private Hashtable<String, LongHolder> actionProcessTimeHash;
private Hashtable<String, LongHolder> actionBytesProcessedHash;
private Hashtable<String, LongHolder> actionBytesFailedHash;
+
+ private Hashtable<String, Long> actionLengthThresholdHash;
+ private Hashtable<String, Long> actionTimeThresholdHash;
private String[] actionNames;
private final ObjectName listObjectName ;
@@ -69,6 +80,9 @@
private long bytesProcessed;
private long bytesOverall;
+ private Long alertTime = new Long("-1");
+ private Long alertLength = new Long("-1");
+
public static final String RESET_COUNTER = "resetCounter";
private static final String MESSAGE_COUNTER = "messages successfully processed count";
private static final String FAILED_MESSAGE_COUNTER = "messages failed count";
@@ -81,10 +95,85 @@
private static final String OVERALL_BYTES_PROCESSED = "overall processedbytes";
private static final String OVERALL_BYTES_FAILED = "overall failed bytes";
+ private static final String ALERT_TIME = "service alert time";
+ private static final String ALERT_LENGTH = "service alert length";
+ private static final String ALERT_TIME_DESC = "set service alert time";
+ private static final String ALERT_LENGTH_DESC = "set service alert desc";
+
+ private static final String ACTION_ALERT_TIME = "action alert time";
+ private static final String ACTION_ALERT_LENGTH = "action alert length";
+ private static final String ACTION_ALERT_TIME_DESC = "set action alert time";
+ private static final String ACTION_ALERT_LENGTH_DESC = "set action alert length";
+
+ private static final int NANOSECONDS_PER_MILLISECONDS = 1000000;
+
private static final Logger logger = Logger.getLogger(ServiceMessageCounter.class);
+ /**
+ * Service alert time getter
+ * @return max message processing time for the service before an alert is fired
+ */
+ public Long getAlertTime() {
+ return alertTime;
+ }
+
+ /**
+ * Service alert time setter
+ * @param alertTime max message size passing through service before an alert is fired
+ */
+ public void setAlertTime(Long alertTime) {
+ this.alertTime = alertTime;
+ }
+
+ /**
+ * Service alert length getter
+ * @return max length of message passing through service before an alert is fired
+ */
+ public Long getAlertLength() {
+ return alertLength;
+ }
+
+ /**
+ * Service alert length setter
+ * @param alertLength max message processing time for the service before an alert is fired
+ */
+ public void setAlertLength(Long alertLength) {
+ this.alertLength = alertLength;
+ }
+
+ /**
+ * Action alert time getter
+ * @return max message processing time before an alert is fired
+ */
+ public Long getActionAlertTime() {
+ return alertTime;
+ }
+
+ /**
+ * Action alert time setter
+ * @param alertLength max time (ms) the action can take before an alert is fired.
+ */
+ public void setActionAlertTime(Long alertTime) {
+ this.alertTime = alertTime;
+ }
/**
+ * Action alert length getter
+ * @return max message size passing through action before an alert is fired
+ */
+ public Long getActionAlertLength() {
+ return alertLength;
+ }
+
+ /**
+ * Action alert length setter
+ * @param alertLength max message size passing through action before an alert is fired
+ */
+ public void setActionAlertLength(Long alertLength) {
+ this.alertLength = alertLength;
+ }
+
+ /**
* Constructor
* @param f_config config tree
* @param objectName The name to use as the MBean.
@@ -95,7 +184,18 @@
actionProcessTimeHash = new Hashtable<String, LongHolder>();
actionBytesProcessedHash = new Hashtable<String, LongHolder>();
actionBytesFailedHash = new Hashtable<String, LongHolder>();
+
+ actionLengthThresholdHash = new Hashtable<String, Long>();
+ actionTimeThresholdHash = new Hashtable<String, Long>();
+ if (f_config.getAttribute(ListenerTagNames.SERVICE_ALERT_LENGTH_TAG) != null) {
+ alertLength = new Long(f_config.getAttribute(ListenerTagNames.SERVICE_ALERT_LENGTH_TAG));
+ }
+
+ if (f_config.getAttribute(ListenerTagNames.SERVICE_ALERT_TIME_TAG) != null) {
+ alertTime = new Long(f_config.getAttribute(ListenerTagNames.SERVICE_ALERT_TIME_TAG));
+ }
+
init(f_config);
ObjectName listObjectName = null ;
try
@@ -148,6 +248,12 @@
actionProcessTimeHash.put(actionId + " " + PROCESSING_TIME, new LongHolder());
actionBytesFailedHash.put(actionId + " " + BYTES_FAILED, new LongHolder());
actionBytesProcessedHash.put(actionId + " " + BYTES_PROCESSED, new LongHolder());
+ if (actionConfig.getAttribute(ListenerTagNames.ACTION_ALERT_LENGTH_TAG) != null) {
+ actionLengthThresholdHash.put(actionId, new Long(actionConfig.getAttribute(ListenerTagNames.ACTION_ALERT_LENGTH_TAG)));
+ }
+ if (actionConfig.getAttribute(ListenerTagNames.ACTION_ALERT_TIME_TAG) != null) {
+ actionTimeThresholdHash.put(actionId, new Long(actionConfig.getAttribute(ListenerTagNames.ACTION_ALERT_LENGTH_TAG)));
+ }
actionNames[count] = actionId ;
}
serviceCount = new Integer(0);
@@ -197,8 +303,10 @@
int count = actionCounterHash.size() + actionProcessTimeHash.size()
+ actionFailedCounterHash.size() + actionBytesProcessedHash.size()
- + actionBytesFailedHash.size() + 4; // the extra 4 here are overall service count, failed byte size
- // processed byte size, and overall bytes
+ + actionBytesFailedHash.size() + actionLengthThresholdHash.size()
+ + actionTimeThresholdHash.size() + 6; // the extra 6 here are overall service count, failed byte size
+ // processed byte size, overall bytes, alert time, and alert
+ // length
MBeanAttributeInfo[] attrs = new MBeanAttributeInfo[count];
int counter = 0;
@@ -251,7 +359,89 @@
"Property " + OVERALL_BYTES, true, false, false);
attrs[counter] = overallBytes;
counter++;
+
+ try {
+ Method alertTimeGetter = this.getClass().getMethod("getAlertTime", new Class[0]);
+ Method alertTimeSetter = this.getClass().getMethod("setAlertTime", new Class[]{Long.class});
+ MBeanAttributeInfo alertTimeInfo = new MBeanAttributeInfo(ALERT_TIME, ALERT_TIME_DESC,
+ alertTimeGetter, alertTimeSetter);
+ attrs[counter] = alertTimeInfo;
+ counter++;
+ } catch (SecurityException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IntrospectionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ Method alertLengthGetter = this.getClass().getMethod("getAlertLength", new Class[0]);
+ Method alertLengthSetter = this.getClass().getMethod("setAlertLength", new Class[]{Long.class});
+ MBeanAttributeInfo alertLengthInfo = new MBeanAttributeInfo(ALERT_LENGTH, ALERT_LENGTH_DESC,
+ alertLengthGetter, alertLengthSetter);
+ attrs[counter] = alertLengthInfo;
+ counter++;
+ } catch (SecurityException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IntrospectionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ try {
+ Enumeration<String> keys = actionLengthThresholdHash.keys();
+ while (keys.hasMoreElements()) {
+ String actionId = keys.nextElement();
+ Method alertLengthGetter = this.getClass().getMethod("getActionAlertLength", new Class[0]);
+ Method alertLengthSetter = this.getClass().getMethod("setActionAlertLength", new Class[]{Long.class});
+ MBeanAttributeInfo alertLengthInfo = new MBeanAttributeInfo(actionId + " " + ACTION_ALERT_LENGTH,
+ actionId + " " + ACTION_ALERT_LENGTH_DESC,
+ alertLengthGetter, alertLengthSetter);
+ attrs[counter] = alertLengthInfo;
+ counter++;
+ }
+ } catch (SecurityException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IntrospectionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ try {
+ Enumeration<String> keys = actionTimeThresholdHash.keys();
+ while (keys.hasMoreElements()) {
+ String actionId = keys.nextElement();
+ Method alertLengthGetter = this.getClass().getMethod("getActionAlertTime", new Class[0]);
+ Method alertLengthSetter = this.getClass().getMethod("setActionAlertTime", new Class[]{Long.class});
+ MBeanAttributeInfo alertLengthInfo = new MBeanAttributeInfo(actionId + " " + ACTION_ALERT_TIME,
+ actionId + " " + ACTION_ALERT_TIME_DESC,
+ alertLengthGetter, alertLengthSetter);
+ attrs[counter] = alertLengthInfo;
+ counter++;
+ }
+ } catch (SecurityException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IntrospectionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
MBeanOperationInfo[] opers = {
new MBeanOperationInfo(
RESET_COUNTER, "Reset the counter",
@@ -294,6 +484,16 @@
return bytesFailed;
} else if (OVERALL_BYTES.equals(key)) {
return bytesOverall;
+ } else if (ALERT_TIME.equals(key)) {
+ return alertTime;
+ } else if (ALERT_LENGTH.equals(key)) {
+ return alertLength;
+ } else if (key.endsWith(ACTION_ALERT_LENGTH)) {
+ String temp = key.replace(" " + ACTION_ALERT_LENGTH, "");
+ return actionLengthThresholdHash.get(temp);
+ } else if (key.endsWith(ACTION_ALERT_TIME)) {
+ String temp = key.replace (" " + ACTION_ALERT_TIME, "");
+ return actionTimeThresholdHash.get(temp);
}
return null;
}
@@ -357,6 +557,19 @@
* @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute)
*/
public void setAttribute(Attribute arg0) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {
+ if (ALERT_TIME.equals(arg0.getName())) {
+ alertTime = (Long) arg0.getValue();
+ } else if (ALERT_LENGTH.equals(arg0.getName())) {
+ alertLength = (Long) arg0.getValue();
+ } else if (arg0.getName().endsWith(ACTION_ALERT_LENGTH)) {
+ String temp = arg0.getName().replace(" " + ACTION_ALERT_LENGTH, "");
+ actionLengthThresholdHash.remove(temp);
+ actionLengthThresholdHash.put(temp, (Long) arg0.getValue());
+ } else if (arg0.getName().endsWith(ACTION_ALERT_TIME)) {
+ String temp = arg0.getName().replace (" " + ACTION_ALERT_TIME, "");
+ actionTimeThresholdHash.remove(temp);
+ actionTimeThresholdHash.put(temp, (Long) arg0.getValue());
+ }
}
/* (non-Javadoc)
@@ -418,23 +631,79 @@
}
}
+ /*
+ * Produce alerts for services if the length or time thresholds are met.
+ */
+ public synchronized void alertService (ActionStatusBean asb) {
+ if (!(this.getAlertTime().longValue() < 0)) {
+ if ( (asb.getServiceTime() / NANOSECONDS_PER_MILLISECONDS) > this.getAlertTime().longValue()) {
+ logger.warn(this.getObjectName().toString()
+ + " service alert time " + (asb.getServiceTime() / NANOSECONDS_PER_MILLISECONDS)
+ + " took longer than " + this.getAlertTime()
+ + " ms");
+ }
+ }
+
+ if (!(this.getAlertLength().longValue() < 0)) {
+ if (asb.getBytesProcessed() > this.getAlertLength().longValue()) {
+ logger.warn(this.getObjectName().toString()
+ + " service message size " + asb.getBytesProcessed()
+ + " was larger than " + this.getAlertLength()
+ + " bytes");
+ }
+ }
+ }
+
+ /*
+ * Produce alerts for actions if the length or time thresholds are met.
+ */
+ public synchronized void alertAction (ActionStatusBean asb, String actionName) {
+ long actionTime = -1;
+ if ((actionName != null) && (actionTimeThresholdHash.containsKey(actionName))) {
+ actionTime = actionTimeThresholdHash.get(actionName);
+ }
+ if (!(actionTime < 0)) {
+ if ( (asb.getProcTime() / NANOSECONDS_PER_MILLISECONDS) > actionTime) {
+ logger.warn(this.getObjectName().toString() + " service, " + actionName
+ + " action alert time " + (asb.getProcTime() / NANOSECONDS_PER_MILLISECONDS)
+ + " took longer than " + actionTime
+ + " ms");
+ }
+ }
+
+ long actionLength = -1;
+ if ((actionName != null) && (actionLengthThresholdHash.containsKey(actionName))) {
+ actionLength = actionLengthThresholdHash.get(actionName);
+ }
+ if (!(actionLength < 0)) {
+ if (asb.getBytesProcessed() > actionLength) {
+ logger.warn(this.getObjectName().toString() + " service, " + actionName
+ + " action message size " + asb.getBytesProcessed()
+ + " was larger than " + actionLength
+ + " bytes");
+ }
+ }
+ }
+
/**
* Update the ServiceMessageCounter
* @param asb ActionStatusBean
*/
public synchronized void update(ActionStatusBean asb) {
- String actionName = actionNames[asb.getProcCount()];
-
+ String actionName = actionNames[asb.getProcCount()];
+
if (ActionStatusBean.ACTION_SENT.equals(asb.getStatus())) {
IntHolder count = actionCounterHash.get(actionName + " " + MESSAGE_COUNTER);
count.value++ ;
LongHolder time = actionProcessTimeHash.get(actionName + " " + PROCESSING_TIME);
time.value += asb.getProcTime();
LongHolder bProcessed = actionBytesProcessedHash.get(actionName + " " + BYTES_PROCESSED);
- bProcessed.value += asb.getBytesProcessed();
+ bProcessed.value += asb.getBytesProcessed();
+ alertAction(asb, actionName);
if (asb.getProcCount() == (actionNames.length-1)) {
- bytesProcessed += asb.getBytesProcessed();
+ bytesProcessed += asb.getBytesProcessed();
+ alertService(asb);
}
} else if (ActionStatusBean.ACTION_FAILED.equals(asb.getStatus())) {
IntHolder count = actionFailedCounterHash.get(actionName + " " + FAILED_MESSAGE_COUNTER);
@@ -444,6 +713,7 @@
LongHolder bFailed = actionBytesFailedHash.get(actionName + " " + BYTES_FAILED);
bFailed.value += asb.getBytesProcessed();
bytesFailed += asb.getBytesProcessed();
+ alertService(asb);
}
if (asb.getProcCount() == 0) {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -27,6 +27,7 @@
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.ConfigurationException;
/**
* Content Based Router Interface. Separates implementation from the runtime, allowing
@@ -37,7 +38,7 @@
*/
public interface ContentBasedRouter
{
- public abstract void setConfigTree(ConfigTree configTree);
+ public abstract void setConfigTree(ConfigTree configTree) throws MessageRouterException;
/**
* Route a message using a certain ruleSet and reference a custom
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ExtractorUtil.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ExtractorUtil.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ExtractorUtil.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ExtractorUtil.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.security.auth;
+
+import java.io.Serializable;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
+import org.jboss.soa.esb.services.security.SecurityService;
+import org.jboss.soa.esb.services.security.SecurityServiceException;
+
+/**
+ * Util class for operations common to security extractors
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public final class ExtractorUtil
+{
+ private static Logger log = Logger.getLogger(ExtractorUtil.class);
+
+ private ExtractorUtil()
+ {
+ }
+
+ public static void addAuthRequestToMessage(final AuthenticationRequest authRequest, final Message message) throws SecurityServiceException
+ {
+ if (authRequest != null)
+ {
+ byte[] encrypted = PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest);
+ if (encrypted != null)
+ {
+ message.getContext().setContext(SecurityService.AUTH_REQUEST, encrypted);
+ }
+ else
+ {
+ log.warn("No public keystore has been configured which means that the authentication request cannot be encrypted. Please configure jbossesb-properties.xml with a publickey store.");
+ }
+ }
+ }
+
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -67,13 +67,20 @@
* SOAP Message Security 1.0 NameSpace URL
*/
public static final String WSSE_NS = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
+ public static final String WSSE_NS2 = "http://schemas.xmlsoap.org/ws/2002/04/secext";
+ /**
+ * SOAP Message Security 1.1 NameSpace URL
+ */
+ public static final String WSSE11_NS = "http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd";
+
private Logger log = Logger.getLogger(WSSecuritySoapExtractor.class);
/**
* Extracts UsernameToken element is one exists and creates
* a Principal with the username and sets a Credential using
* the password. The type of the Credential is a character array.
+ *
* If the SOAP message contains a BinarySecurityToken this will be
* extracted and added as a Credential.
* <p>
@@ -155,9 +162,13 @@
final SOAPHeaderElement header = (SOAPHeaderElement) headerElements.next();
final Name name = header.getElementName();
- if (name.getLocalName().equalsIgnoreCase(WSSE_LN) && name.getURI().equalsIgnoreCase(WSSE_NS) )
+ if (name.getLocalName().equalsIgnoreCase(WSSE_LN))
{
- return header;
+ String nsURI = name.getURI();
+ if (nsURI.equalsIgnoreCase(WSSE_NS) || nsURI.equalsIgnoreCase(WSSE_NS2) || nsURI.equalsIgnoreCase(WSSE11_NS))
+ {
+ return header;
+ }
}
}
return null;
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -55,22 +55,6 @@
public class FtpClientUtil
{
- public static final String PARMS_FTP_SERVER = "ftpServer";
-
- public static final String PARMS_USER = "ftpUser";
-
- public static final String PARMS_PASSWD = "ftpPassword";
-
- public static final String PARMS_PORT = "ftpPort";
-
- public static final String PARMS_REMOTE_DIR = "ftpRemoteDir";
-
- public static final String PARMS_LOCAL_DIR = "ftpLocalDir";
-
- public static final String PARMS_ASCII = "ftpAscii";
-
- public static final String PARMS_PASSIVE = "ftpPassive";
-
private static final String TMP_SUFFIX = ".rosettaPart";
public enum XFER_TYPE
@@ -474,31 +458,31 @@
private void checkParms () throws ConfigurationException
{
- m_sFtpServer = m_oParms.getAttribute(PARMS_FTP_SERVER);
+ m_sFtpServer = m_oParms.getAttribute(RemoteFileSystem.PARMS_FTP_SERVER);
if (null == m_sFtpServer)
throw new ConfigurationException("No FTP server specified");
- m_sUser = m_oParms.getAttribute(PARMS_USER);
+ m_sUser = m_oParms.getAttribute(RemoteFileSystem.PARMS_USER);
if (null == m_sUser)
throw new ConfigurationException("No username specified for FTP");
- m_sPasswd = m_oParms.getAttribute(PARMS_PASSWD);
+ m_sPasswd = m_oParms.getAttribute(RemoteFileSystem.PARMS_PASSWD);
if (null == m_sPasswd)
throw new ConfigurationException("No password specified for FTP");
- m_sRemoteDir = m_oParms.getAttribute(PARMS_REMOTE_DIR);
+ m_sRemoteDir = m_oParms.getAttribute(RemoteFileSystem.PARMS_REMOTE_DIR);
if (null == m_sRemoteDir)
m_sRemoteDir = "";
- m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
+ m_sLocalDir = m_oParms.getAttribute(RemoteFileSystem.PARMS_LOCAL_DIR);
if (null == m_sLocalDir)
m_sLocalDir = ".";
- String sAux = m_oParms.getAttribute(PARMS_PORT);
+ String sAux = m_oParms.getAttribute(RemoteFileSystem.PARMS_PORT);
m_iPort = (null == sAux) ? 21 : Integer.parseInt(sAux);
boolean bAscii = false;
- sAux = m_oParms.getAttribute(PARMS_ASCII);
+ sAux = m_oParms.getAttribute(RemoteFileSystem.PARMS_ASCII);
if (null != sAux)
bAscii = Boolean.parseBoolean(sAux);
@@ -506,7 +490,7 @@
m_bAsciiTransferType = bAscii;
m_bPassive = false;
- sAux = m_oParms.getAttribute(PARMS_PASSIVE);
+ sAux = m_oParms.getAttribute(RemoteFileSystem.PARMS_PASSIVE);
m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
String renameRetryString = ModulePropertyManager.getPropertyManager(
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/Util.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/Util.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/util/Util.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -190,6 +190,7 @@
out.flush();
int size = baos.toByteArray().length;
message.getProperties().setProperty(Environment.MESSAGE_BYTE_SIZE, "" + size);
+ message.getProperties().setProperty(Environment.MESSAGE_TIME_PROCESSED, "0");
return baos.toString();
}
catch (final XMLStreamException xmlse)
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/build.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/build.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -20,6 +20,7 @@
<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
<property name="model101.classes" location="${gendir}/classes" />
<property name="model110.classes" location="${gendir}/classes110" />
+ <property name="model120.classes" location="${gendir}/classes120" />
<property name="org.jboss.esb.test.persistdb.dir" location="${org.jboss.esb.internal.dest}/testdb"/>
@@ -37,6 +38,7 @@
<pathelement location="${org.jboss.esb.module.classes.root.dir}/rosetta"/>
<pathelement location="${model101.classes}"/>
<pathelement location="${model110.classes}"/>
+ <pathelement location="${model120.classes}"/>
<pathelement location="${org.jboss.esb.module.classes.dir}"/>
<pathelement location="${org.jboss.esb.root.dir}/rosetta/tests/resources/etc"/>
<pathelement location="${org.jboss.esb.module.tests.conf.dir}"/>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,88 +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, JBoss Inc.
- */
-package org.jboss.internal.soa.esb.couriers.tx;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.addressing.eprs.InVMEpr;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.internal.soa.esb.couriers.transport.InVMTransport;
-
-import java.net.URI;
-
-/**
- * Test for https://jira.jboss.org/jira/browse/JBESB-2866.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class JBESB_2866_UnitTest extends TestCase {
-
- public void test_passByVal() throws Throwable {
- test(true);
- }
-
- public void test_passByRef() throws Throwable {
- test(false);
- }
-
- public void test(boolean passByVal) throws Throwable {
- InVMEpr epr = new InVMEpr(new URI("invm://service"));
- Message message = MessageFactory.getInstance().getMessage();
-
- epr.setPassByValue(passByVal);
- MockInVMXAResource resource = new MockInVMXAResource(epr, InVMTransport.toDeliveryObject(message, epr.getPassByValue()), InVMXAResource.operation.REMOVE);
-
- // In reality, a new XAResource would be created for each retry, but it's the underlying
- // message that matters, so we just need to create 1 instance of MockInVMXAResource and
- // retry the rollback multiple times...
- resource.rollback(null);
- resource.rollback(null);
- resource.rollback(null);
- resource.rollback(null);
- resource.rollback(null);
- assertEquals(5, resource.deliveryCount);
- assertFalse(resource.deliveredToDQL); // not set yet
-
- // The retry count (default 5) has been hit now. Nest attempt should result
- // in the message being sent to the DLQ...
- resource.rollback(null);
- assertEquals(5, resource.deliveryCount); // Same as last time
- assertTrue(resource.deliveredToDQL); // set now
- }
-
- private class MockInVMXAResource extends InVMXAResource {
-
- private int deliveryCount;
- private boolean deliveredToDQL;
-
- public MockInVMXAResource(final InVMEpr inVMEpr, final Object msgObject, final operation op) {
- super(inVMEpr, msgObject, op);
- }
-
- protected void deliverTx() throws Exception {
- deliveryCount++;
- }
-
- protected void deliverToDLQ(Message message) throws MessageDeliverException {
- deliveredToDQL = true;
- }
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tx/JBESB_2866_UnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,88 @@
+/*
+ * 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.couriers.tx;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.addressing.eprs.InVMEpr;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.internal.soa.esb.couriers.transport.InVMTransport;
+
+import java.net.URI;
+
+/**
+ * Test for https://jira.jboss.org/jira/browse/JBESB-2866.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBESB_2866_UnitTest extends TestCase {
+
+ public void test_passByVal() throws Throwable {
+ test(true);
+ }
+
+ public void test_passByRef() throws Throwable {
+ test(false);
+ }
+
+ public void test(boolean passByVal) throws Throwable {
+ InVMEpr epr = new InVMEpr(new URI("invm://service"));
+ Message message = MessageFactory.getInstance().getMessage();
+
+ epr.setPassByValue(passByVal);
+ MockInVMXAResource resource = new MockInVMXAResource(epr, InVMTransport.toDeliveryObject(message, epr.getPassByValue()), InVMXAResource.operation.REMOVE);
+
+ // In reality, a new XAResource would be created for each retry, but it's the underlying
+ // message that matters, so we just need to create 1 instance of MockInVMXAResource and
+ // retry the rollback multiple times...
+ resource.rollback(null);
+ resource.rollback(null);
+ resource.rollback(null);
+ resource.rollback(null);
+ resource.rollback(null);
+ assertEquals(5, resource.deliveryCount);
+ assertFalse(resource.deliveredToDQL); // not set yet
+
+ // The retry count (default 5) has been hit now. Nest attempt should result
+ // in the message being sent to the DLQ...
+ resource.rollback(null);
+ assertEquals(5, resource.deliveryCount); // Same as last time
+ assertTrue(resource.deliveredToDQL); // set now
+ }
+
+ private class MockInVMXAResource extends InVMXAResource {
+
+ private int deliveryCount;
+ private boolean deliveredToDQL;
+
+ public MockInVMXAResource(final InVMEpr inVMEpr, final Object msgObject, final operation op) {
+ super(inVMEpr, msgObject, op);
+ }
+
+ protected void deliverTx() throws Exception {
+ deliveryCount++;
+ }
+
+ protected void deliverToDLQ(Message message) throws MessageDeliverException {
+ deliveredToDQL = true;
+ }
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -51,6 +51,10 @@
executeTest("jbossesb_config_06.110.xml") ;
}
+ public void testRequestResponseFault120() throws Exception {
+ executeTest("jbossesb_config_06.120.xml") ;
+ }
+
public void testRequestResponse() throws Exception {
executeTest("jbossesb_config_07.xml") ;
}
@@ -59,6 +63,10 @@
executeTest("jbossesb_config_07.110.xml") ;
}
+ public void testRequestResponse120() throws Exception {
+ executeTest("jbossesb_config_07.120.xml") ;
+ }
+
public void testRequest() throws Exception {
executeTest("jbossesb_config_08.xml") ;
}
@@ -67,6 +75,10 @@
executeTest("jbossesb_config_08.110.xml") ;
}
+ public void testRequest120() throws Exception {
+ executeTest("jbossesb_config_08.120.xml") ;
+ }
+
public void testDuplicateSchemas() throws Exception {
Definition def = executeTest("jbossesb_duplicate_schemas.xml") ;
Types types = def.getTypes();
@@ -77,12 +89,20 @@
assertEquals(2, types.getExtensibilityElements().size());
}
- @SuppressWarnings("unchecked")
- public void _testWSAExtensions110() throws Exception {
+ public void testWSAExtensions110() throws Exception {
+ executeWSAExtensionsTest("jbossesb_config_09.110.xml") ;
+ }
+
+ public void testWSAExtensions120() throws Exception {
+ executeWSAExtensionsTest("jbossesb_config_09.120.xml") ;
+ }
+
+ //@SuppressWarnings("unchecked")
+ private void executeWSAExtensionsTest(final String resourceName) throws Exception {
final String targetNamespace = "http://soa.jboss.org/FirstServiceESB" ;
final String wsawNamespace = "http://www.w3.org/2006/05/addressing/wsdl" ;
- final Definition def = executeTest("jbossesb_config_09.110.xml") ;
+ final Definition def = executeTest(resourceName) ;
assertNotNull("Definition", def) ;
final QName portName = new QName(targetNamespace, "SimpleListenerPortType") ;
@@ -126,7 +146,6 @@
final WebserviceInfo service = services.get(0) ;
final ESBServiceEndpointInfo endpointInfo = new ESBServiceEndpointInfo(service) ;
String wsdl = ESBContractGenerator.generateWSDL(service, endpointInfo);
- //System.out.println(wsdl);
java.io.StringReader strReader = new java.io.StringReader(wsdl);
InputSource inputSource = new InputSource(strReader);
Definition def = WSDLFactory.newInstance().newWSDLReader().readWSDL("file://tmp.wsdl", inputSource);
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,18 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+ <services>
+ <service category="FirstServiceESB" name="SimpleListener"
+ description="Hello World" invmScope="GLOBAL">
+ <actions
+ inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
+ outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd"
+ faultXsd="/org/jboss/internal/soa/esb/webservice/fault.xsd">
+ <action name="action2"
+ class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="true" />
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.2.0.xsd">
+ <services>
+ <service category="FirstServiceESB" name="SimpleListener"
+ description="Hello World" invmScope="GLOBAL">
+ <actions
+ inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
+ outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd">
+ <action name="action2"
+ class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="true" />
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,16 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+ <services>
+ <service category="FirstServiceESB" name="SimpleListener"
+ description="Hello World" invmScope="GLOBAL">
+ <actions
+ inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd">
+ <action name="action2"
+ class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="true" />
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_09.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_09.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_09.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_09.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,19 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+ <services>
+ <service category="FirstServiceESB" name="SimpleListener"
+ description="Hello World" invmScope="GLOBAL">
+ <actions
+ inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
+ outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd"
+ faultXsd="/org/jboss/internal/soa/esb/webservice/fault.xsd"
+ addressing="true">
+ <action name="action2"
+ class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="true" />
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,105 +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, JBoss Inc.
- */
-package org.jboss.soa.esb.actions.cbr.regex;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.testutils.ESBConfigUtil;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.actions.cbr.RoutingRule;
-import org.jboss.soa.esb.actions.cbr.RegexRouter;
-import org.jboss.soa.esb.actions.cbr.XPathRouter;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.File;
-import java.util.Map;
-import java.util.List;
-import java.util.Arrays;
-import java.util.regex.Pattern;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class RegexRouterUnitTest extends TestCase {
-
- public void test_rulefile_load_classpath() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- test("1");
- }
-
- public void test_rulefile_load_filesys() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- String cwd = new File(".").getAbsolutePath().replace("\\", "/");
- if(!cwd.endsWith("product/.")) {
- throw new IllegalStateException("Invalid working directory for test. Must be the 'product/rosetta/tests' dir. Current working directory is '" + cwd + "'.");
- }
-
- test("2");
- }
-
- public void test_inlineRules() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- test("3");
- }
-
- private void test(String configName) throws MessageRouterException, IOException, SAXException, ConfigurationException {
- ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
- ConfigTree configTree = esbConfig.getActionConfig("null-listener", configName);
- RegexRouter router = new RegexRouter();
-
- router.setConfigTree(configTree);
-
- Map<String, RoutingRule> map = router.getRoutingMap();
- assertEquals(3, map.size());
- assertNotNull(map.get("scat-red"));
- assertNotNull(map.get("scat-green"));
- assertNotNull(map.get("scat-blue"));
- }
-
- public static final String GREEN_MESSAGE = "#############333#############";
-
- public void test_routing_String() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- Message message = MessageFactory.getInstance().getMessage();
-
- message.getBody().add(GREEN_MESSAGE);
- test_routing(message, null);
- }
-
- public void test_routing_ObjectList() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- Message message = MessageFactory.getInstance().getMessage();
-
- message.getBody().add("x", "<x/>");
- message.getBody().add("y", GREEN_MESSAGE);
- test_routing(message, Arrays.asList("y"));
- test_routing(message, Arrays.asList("body.y"));
- }
-
- public void test_routing(Message message, List objectLists) throws IOException, SAXException, ConfigurationException, MessageRouterException {
- ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
- ConfigTree configTree = esbConfig.getActionConfig("null-listener", "3");
- RegexRouter router = new RegexRouter();
-
- router.setConfigTree(configTree);
-
- List<String> destinations = router.route(null, false, message, objectLists);
- assertEquals("[scat-green]", destinations.toString());
- }
-}
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/RegexRouterUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,105 @@
+/*
+ * 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.actions.cbr.regex;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.testutils.ESBConfigUtil;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.actions.cbr.RoutingRule;
+import org.jboss.soa.esb.actions.cbr.RegexRouter;
+import org.jboss.soa.esb.actions.cbr.XPathRouter;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.File;
+import java.util.Map;
+import java.util.List;
+import java.util.Arrays;
+import java.util.regex.Pattern;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class RegexRouterUnitTest extends TestCase {
+
+ public void test_rulefile_load_classpath() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ test("1");
+ }
+
+ public void test_rulefile_load_filesys() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ String cwd = new File(".").getAbsolutePath().replace("\\", "/");
+ if(!cwd.endsWith("product/.")) {
+ throw new IllegalStateException("Invalid working directory for test. Must be the 'product/rosetta/tests' dir. Current working directory is '" + cwd + "'.");
+ }
+
+ test("2");
+ }
+
+ public void test_inlineRules() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ test("3");
+ }
+
+ private void test(String configName) throws MessageRouterException, IOException, SAXException, ConfigurationException {
+ ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
+ ConfigTree configTree = esbConfig.getActionConfig("null-listener", configName);
+ RegexRouter router = new RegexRouter();
+
+ router.setConfigTree(configTree);
+
+ Map<String, RoutingRule> map = router.getRoutingMap();
+ assertEquals(3, map.size());
+ assertNotNull(map.get("scat-red"));
+ assertNotNull(map.get("scat-green"));
+ assertNotNull(map.get("scat-blue"));
+ }
+
+ public static final String GREEN_MESSAGE = "#############333#############";
+
+ public void test_routing_String() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ Message message = MessageFactory.getInstance().getMessage();
+
+ message.getBody().add(GREEN_MESSAGE);
+ test_routing(message, null);
+ }
+
+ public void test_routing_ObjectList() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ Message message = MessageFactory.getInstance().getMessage();
+
+ message.getBody().add("x", "<x/>");
+ message.getBody().add("y", GREEN_MESSAGE);
+ test_routing(message, Arrays.asList("y"));
+ test_routing(message, Arrays.asList("body.y"));
+ }
+
+ public void test_routing(Message message, List objectLists) throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
+ ConfigTree configTree = esbConfig.getActionConfig("null-listener", "3");
+ RegexRouter router = new RegexRouter();
+
+ router.setConfigTree(configTree);
+
+ List<String> destinations = router.route(null, false, message, objectLists);
+ assertEquals("[scat-green]", destinations.toString());
+ }
+}
\ No newline at end of file
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,35 +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">
-
- <providers>
- <bus-provider name="null"><bus busid="null"/></bus-provider>
- </providers>
-
- <services>
- <service category="scat" name="sname" description="boo">
-
- <listeners>
- <listener name="null-listener" busidref="null" />
- </listeners>
-
- <actions mep="OneWay">
- <action name="1" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="ruleSet" value="/org/jboss/soa/esb/actions/cbr/regex/rules.properties"/>
- </action>
-
- <action name="2" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="ruleSet" value="rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties"/>
- </action>
-
- <action name="3" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="destinations">
- <route-to service-category="scat" service-name="blue" expression="#*111#*" />
- <route-to service-category="scat" service-name="red" expression="#*222#*" />
- <route-to service-category="scat" service-name="green" expression="#*333#*" />
- </property>
- </action>
-
- </actions>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/config.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,35 @@
+<?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">
+
+ <providers>
+ <bus-provider name="null"><bus busid="null"/></bus-provider>
+ </providers>
+
+ <services>
+ <service category="scat" name="sname" description="boo">
+
+ <listeners>
+ <listener name="null-listener" busidref="null" />
+ </listeners>
+
+ <actions mep="OneWay">
+ <action name="1" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="ruleSet" value="/org/jboss/soa/esb/actions/cbr/regex/rules.properties"/>
+ </action>
+
+ <action name="2" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="ruleSet" value="rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties"/>
+ </action>
+
+ <action name="3" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="destinations">
+ <route-to service-category="scat" service-name="blue" expression="#*111#*" />
+ <route-to service-category="scat" service-name="red" expression="#*222#*" />
+ <route-to service-category="scat" service-name="green" expression="#*333#*" />
+ </property>
+ </action>
+
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,3 +0,0 @@
-scat-blue=#*111#*
-scat-red=#*222#*
-scat-green=#*333#*
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/regex/rules.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,3 @@
+scat-blue=#*111#*
+scat-red=#*222#*
+scat-green=#*333#*
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,138 +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, JBoss Inc.
- */
-package org.jboss.soa.esb.actions.cbr.xpath;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.testutils.ESBConfigUtil;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.actions.cbr.XPathRouter;
-import org.jboss.soa.esb.actions.cbr.RoutingRule;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.NamespaceContext;
-import java.io.IOException;
-import java.io.File;
-import java.io.ByteArrayInputStream;
-import java.util.Map;
-import java.util.List;
-import java.util.Arrays;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class XPathRouterUnitTest extends TestCase {
-
- public void test_rulefile_load_classpath() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- test("1");
- }
-
- public void test_rulefile_load_filesys() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- String cwd = new File(".").getAbsolutePath().replace("\\", "/");
- if(!cwd.endsWith("product/.")) {
- throw new IllegalStateException("Invalid working directory for test. Must be the 'product/rosetta/tests' dir. Current working directory is '" + cwd + "'.");
- }
-
- test("2");
- }
-
- public void test_inlineRules() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- test("3");
- }
-
- public void test_namespaces_undefined() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- try {
- test("4");
- fail("Expected MessageRouterException");
- } catch (MessageRouterException e) {
- assertEquals("Error compiling XPath expression '/a:order/b:header[@cat='blue']'.", e.getMessage());
- }
- }
-
- public void test_namespaces_defined() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- NamespaceContext nsContext = test("5");
-
- assertEquals("http://a", nsContext.getNamespaceURI("a"));
- assertEquals("http://b", nsContext.getNamespaceURI("b"));
- }
-
- private NamespaceContext test(String configName) throws MessageRouterException, IOException, SAXException, ConfigurationException {
- ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
- ConfigTree configTree = esbConfig.getActionConfig("null-listener", configName);
- XPathRouter router = new XPathRouter();
-
- router.setConfigTree(configTree);
-
- Map<String, RoutingRule> map = router.getRoutingMap();
- assertEquals(3, map.size());
- assertNotNull(map.get("scat-red"));
- assertNotNull(map.get("scat-green"));
- assertNotNull(map.get("scat-blue"));
-
- return router.getNamespaceContext();
- }
-
- public static final String GREEN_MESSAGE = "<order xmlns='http://a' xmlns:bbbb='http://b'><bbbb:header cat='green'/></order>";
-
- public void test_routing_String() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- Message message = MessageFactory.getInstance().getMessage();
-
- message.getBody().add(GREEN_MESSAGE);
- test_routing(message, null);
- }
-
- public void test_routing_bytes() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- Message message = MessageFactory.getInstance().getMessage();
-
- message.getBody().add(GREEN_MESSAGE.getBytes());
- test_routing(message, null);
- }
-
- public void test_routing_dom() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- Message message = MessageFactory.getInstance().getMessage();
-
- message.getBody().add(YADOMUtil.parseStream(new ByteArrayInputStream(GREEN_MESSAGE.getBytes()), true, true, true));
- test_routing(message, null);
- }
-
- public void test_routing_ObjectList() throws IOException, SAXException, ConfigurationException, MessageRouterException {
- Message message = MessageFactory.getInstance().getMessage();
-
- message.getBody().add("x", "<x/>");
- message.getBody().add("y", GREEN_MESSAGE);
- test_routing(message, Arrays.asList("y"));
- test_routing(message, Arrays.asList("body.y"));
- }
-
- public void test_routing(Message message, List objectLists) throws IOException, SAXException, ConfigurationException, MessageRouterException {
- ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
- ConfigTree configTree = esbConfig.getActionConfig("null-listener", "5");
- XPathRouter router = new XPathRouter();
-
- router.setConfigTree(configTree);
-
- List<String> destinations = router.route(null, false, message, objectLists);
- assertEquals("[scat-green]", destinations.toString());
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/XPathRouterUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,138 @@
+/*
+ * 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.actions.cbr.xpath;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.testutils.ESBConfigUtil;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.actions.cbr.XPathRouter;
+import org.jboss.soa.esb.actions.cbr.RoutingRule;
+import org.xml.sax.SAXException;
+
+import javax.xml.namespace.NamespaceContext;
+import java.io.IOException;
+import java.io.File;
+import java.io.ByteArrayInputStream;
+import java.util.Map;
+import java.util.List;
+import java.util.Arrays;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class XPathRouterUnitTest extends TestCase {
+
+ public void test_rulefile_load_classpath() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ test("1");
+ }
+
+ public void test_rulefile_load_filesys() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ String cwd = new File(".").getAbsolutePath().replace("\\", "/");
+ if(!cwd.endsWith("product/.")) {
+ throw new IllegalStateException("Invalid working directory for test. Must be the 'product/rosetta/tests' dir. Current working directory is '" + cwd + "'.");
+ }
+
+ test("2");
+ }
+
+ public void test_inlineRules() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ test("3");
+ }
+
+ public void test_namespaces_undefined() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ try {
+ test("4");
+ fail("Expected MessageRouterException");
+ } catch (MessageRouterException e) {
+ assertEquals("Error compiling XPath expression '/a:order/b:header[@cat='blue']'.", e.getMessage());
+ }
+ }
+
+ public void test_namespaces_defined() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ NamespaceContext nsContext = test("5");
+
+ assertEquals("http://a", nsContext.getNamespaceURI("a"));
+ assertEquals("http://b", nsContext.getNamespaceURI("b"));
+ }
+
+ private NamespaceContext test(String configName) throws MessageRouterException, IOException, SAXException, ConfigurationException {
+ ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
+ ConfigTree configTree = esbConfig.getActionConfig("null-listener", configName);
+ XPathRouter router = new XPathRouter();
+
+ router.setConfigTree(configTree);
+
+ Map<String, RoutingRule> map = router.getRoutingMap();
+ assertEquals(3, map.size());
+ assertNotNull(map.get("scat-red"));
+ assertNotNull(map.get("scat-green"));
+ assertNotNull(map.get("scat-blue"));
+
+ return router.getNamespaceContext();
+ }
+
+ public static final String GREEN_MESSAGE = "<order xmlns='http://a' xmlns:bbbb='http://b'><bbbb:header cat='green'/></order>";
+
+ public void test_routing_String() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ Message message = MessageFactory.getInstance().getMessage();
+
+ message.getBody().add(GREEN_MESSAGE);
+ test_routing(message, null);
+ }
+
+ public void test_routing_bytes() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ Message message = MessageFactory.getInstance().getMessage();
+
+ message.getBody().add(GREEN_MESSAGE.getBytes());
+ test_routing(message, null);
+ }
+
+ public void test_routing_dom() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ Message message = MessageFactory.getInstance().getMessage();
+
+ message.getBody().add(YADOMUtil.parseStream(new ByteArrayInputStream(GREEN_MESSAGE.getBytes()), true, true, true));
+ test_routing(message, null);
+ }
+
+ public void test_routing_ObjectList() throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ Message message = MessageFactory.getInstance().getMessage();
+
+ message.getBody().add("x", "<x/>");
+ message.getBody().add("y", GREEN_MESSAGE);
+ test_routing(message, Arrays.asList("y"));
+ test_routing(message, Arrays.asList("body.y"));
+ }
+
+ public void test_routing(Message message, List objectLists) throws IOException, SAXException, ConfigurationException, MessageRouterException {
+ ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
+ ConfigTree configTree = esbConfig.getActionConfig("null-listener", "5");
+ XPathRouter router = new XPathRouter();
+
+ router.setConfigTree(configTree);
+
+ List<String> destinations = router.route(null, false, message, objectLists);
+ assertEquals("[scat-green]", destinations.toString());
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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">
-
- <providers>
- <bus-provider name="null"><bus busid="null"/></bus-provider>
- </providers>
-
- <services>
- <service category="scat" name="sname" description="boo">
-
- <listeners>
- <listener name="null-listener" busidref="null" />
- </listeners>
-
- <actions mep="OneWay">
- <action name="1" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="ruleSet" value="/org/jboss/soa/esb/actions/cbr/xpath/rules.properties"/>
- </action>
-
- <action name="2" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="ruleSet" value="rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties"/>
- </action>
-
- <action name="3" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="destinations">
- <route-to service-category="scat" service-name="blue" expression="/order/header[@cat='blue']" />
- <route-to service-category="scat" service-name="red" expression="/order/header[@cat='red']" />
- <route-to service-category="scat" service-name="green" expression="/order/header[@cat='green']" />
- </property>
- </action>
-
- <!-- Undefined namespaces.. should get an error... -->
- <action name="4" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="destinations">
- <route-to service-category="scat" service-name="blue" expression="/a:order/b:header[@cat='blue']" />
- </property>
- </action>
-
- <action name="5" class="org.jboss.soa.esb.actions.ContentBasedRouter">
- <property name="destinations">
- <route-to service-category="scat" service-name="blue" expression="/a:order/b:header[@cat='blue']" />
- <route-to service-category="scat" service-name="red" expression="/a:order/b:header[@cat='red']" />
- <route-to service-category="scat" service-name="green" expression="/a:order/b:header[@cat='green']" />
- </property>
- <property name="namespaces">
- <namespace prefix="a" uri="http://a" />
- <namespace prefix="b" uri="http://b" />
- </property>
- </action>
-
- </actions>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/config.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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">
+
+ <providers>
+ <bus-provider name="null"><bus busid="null"/></bus-provider>
+ </providers>
+
+ <services>
+ <service category="scat" name="sname" description="boo">
+
+ <listeners>
+ <listener name="null-listener" busidref="null" />
+ </listeners>
+
+ <actions mep="OneWay">
+ <action name="1" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="ruleSet" value="/org/jboss/soa/esb/actions/cbr/xpath/rules.properties"/>
+ </action>
+
+ <action name="2" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="ruleSet" value="rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties"/>
+ </action>
+
+ <action name="3" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="destinations">
+ <route-to service-category="scat" service-name="blue" expression="/order/header[@cat='blue']" />
+ <route-to service-category="scat" service-name="red" expression="/order/header[@cat='red']" />
+ <route-to service-category="scat" service-name="green" expression="/order/header[@cat='green']" />
+ </property>
+ </action>
+
+ <!-- Undefined namespaces.. should get an error... -->
+ <action name="4" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="destinations">
+ <route-to service-category="scat" service-name="blue" expression="/a:order/b:header[@cat='blue']" />
+ </property>
+ </action>
+
+ <action name="5" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="destinations">
+ <route-to service-category="scat" service-name="blue" expression="/a:order/b:header[@cat='blue']" />
+ <route-to service-category="scat" service-name="red" expression="/a:order/b:header[@cat='red']" />
+ <route-to service-category="scat" service-name="green" expression="/a:order/b:header[@cat='green']" />
+ </property>
+ <property name="namespaces">
+ <namespace prefix="a" uri="http://a" />
+ <namespace prefix="b" uri="http://b" />
+ </property>
+ </action>
+
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,3 +0,0 @@
-scat-blue=/order/header[@cat='blue']
-scat-red=/order/header[@cat='red']
-scat-green=/order/header[@cat='green']
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/cbr/xpath/rules.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,3 @@
+scat-blue=/order/header[@cat='blue']
+scat-red=/order/header[@cat='red']
+scat-green=/order/header[@cat='green']
\ No newline at end of file
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/security/JBossSTSActionUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/security/JBossSTSActionUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/security/JBossSTSActionUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -20,18 +20,16 @@
*/
package org.jboss.soa.esb.actions.security;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import junit.framework.JUnit4TestAdapter;
-import org.jboss.identity.federation.api.wstrust.WSTrustClient;
import org.jboss.identity.federation.core.wstrust.STSClient;
import org.jboss.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
import org.jboss.identity.federation.saml.v2.assertion.AssertionType;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.ActionProcessingException;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
@@ -55,7 +53,8 @@
{
STSClient mockWSTrustclient = mock(STSClient.class);
Element securityToken = SAMLUtil.toElement(new AssertionType());
- when(mockWSTrustclient.issueToken((any(String.class)))).thenReturn(securityToken);
+ System.out.println(securityToken);
+ when(mockWSTrustclient.issueToken((any(String.class)), any(String.class))).thenReturn(securityToken);
ConfigTree config = new ConfigBuilder().configFile(configFile).tokenType("dummy").build();
JBossSTSAction stsAction = new MockSTSAction(config, mockWSTrustclient);
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -44,47 +44,29 @@
@Test
public void readAndGenerateConfig() throws Exception
{
- String configFileName = TestEnvironmentUtil.getUserDir("product")
- + "rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml";
- //Make sure this file exists
- File configFile = new File(configFileName);
- assertTrue("File '" + configFile + "' doesn't exist.", configFile.exists());
- //Remove the listener and gateway configuration files if they exist
- File currentDir = configFile.getParentFile();
- if (null==currentDir)
- currentDir=new File("");
- File listenerFile = new File(currentDir + File.separator + "jbossesb-listener.xml");
- if (listenerFile.exists()) {
- listenerFile.delete();
- }
- File gatewayFile = new File(currentDir + File.separator + "jbossesb-gateway.xml");
- if (gatewayFile.exists()) {
- gatewayFile.delete();
- }
- String validationFileName = TestEnvironmentUtil.getUserDir("product")
- + "etc/schemas/xml/jbossesb-1.0.1.xsd";
-// Make sure this file exists
- File validationFile = new File(validationFileName);
- assertTrue("File '" + validationFile + "' doesn't exist.", validationFile.exists());
-
- ConfigurationController controller = new ConfigurationController(configFileName, validationFileName);
- for (int i=0; i<currentDir.listFiles().length;i++){
- logger.info(currentDir.listFiles()[i].getName());
- }
-
- assertTrue("file=" + listenerFile.getAbsolutePath() + " does not exist, while it should have. Actually exists in " + controller.getListenerConfigFile(), listenerFile.exists());
- listenerFile.delete();
-
- assertTrue("file=" + gatewayFile.getAbsolutePath() + " does not exist, while it should have. Actually exists in " + controller.getGatewayConfigFile(), gatewayFile.exists());
- gatewayFile.delete();
+ executeTest("rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml",
+ "etc/schemas/xml/jbossesb-1.0.1.xsd");
}
@Test
public void readAndGenerateConfig110() throws Exception
{
- String configFileName = TestEnvironmentUtil.getUserDir("product")
- + "rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml";
+ executeTest("rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml",
+ "etc/schemas/xml/jbossesb-1.1.0.xsd");
+ }
+
+ @Test
+ public void readAndGenerateConfig120() throws Exception
+ {
+ executeTest("rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.120.xml",
+ "etc/schemas/xml/jbossesb-1.2.0.xsd");
+ }
+
+ private void executeTest(final String config, final String schema)
+ throws Exception
+ {
+ String configFileName = TestEnvironmentUtil.getUserDir("product") + config;
//Make sure this file exists
File configFile = new File(configFileName);
assertTrue("File '" + configFile + "' doesn't exist.", configFile.exists());
@@ -100,8 +82,7 @@
if (gatewayFile.exists()) {
gatewayFile.delete();
}
- String validationFileName = TestEnvironmentUtil.getUserDir("product")
- + "etc/schemas/xml/jbossesb-1.1.0.xsd";
+ String validationFileName = TestEnvironmentUtil.getUserDir("product") + schema;
// Make sure this file exists
File validationFile = new File(validationFileName);
assertTrue("File '" + validationFile + "' doesn't exist.", validationFile.exists());
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator120ModelUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator120ModelUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator120ModelUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator120ModelUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,98 @@
+/*
+ * 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.listeners.config;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.listeners.config.mappers120.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.DualListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.ServiceDocument.Service;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+
+/**
+ * Model specific unit tests extracted from GeneratorUnitTest.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Generator120ModelUnitTest extends TestCase {
+
+ public void test_model() throws Exception {
+ final InputStream is = getClass().getResourceAsStream("jbossesb_config_01.120.xml");
+ final Reader reader = new InputStreamReader(is) ;
+ XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+
+ JmsBus bus = (JmsBus)model.getBus("server1-jms");
+ JmsProviderType provider = (JmsProviderType) model.getProvider(bus);
+ assertEquals("server1-jms", bus.getBusid());
+ assertEquals("com.xyz.provider.XYZConnectionFactory", provider.getConnectionFactory());
+ assertEquals("com.xyz.provider.NamingContextFactory", provider.getJndiContextFactory());
+ assertEquals("xyz://server1:9876", provider.getJndiURL());
+ assertEquals("com.xyz", provider.getJndiPkgPrefix());
+ JmsMessageFilter busDestination = bus.getJmsMessageFilter();
+ assertEquals("queue/A", busDestination.getDestName());
+ assertEquals(JmsMessageFilter.DestType.QUEUE, busDestination.getDestType());
+ assertEquals("service='Reconciliation'", busDestination.getSelector());
+
+ List<Listener> gateways = model.getGatewayListeners();
+ assertEquals(2, gateways.size());
+ JmsListener gatewayListener = (JmsListener)gateways.get(0);
+ assertEquals("Bank-JMS-Gateway", gatewayListener.getName());
+ assertEquals("server1-jms", gatewayListener.getBusidref());
+ assertTrue(gatewayListener.getIsGateway());
+ assertEquals(1, gatewayListener.getMaxThreads());
+
+ List<Listener> awareListeners = model.getESBAwareListeners();
+ assertEquals(4, awareListeners.size());
+ JmsListener awareListener = (JmsListener)awareListeners.get(0);
+ assertEquals("Bank-Listener", awareListener.getName());
+ assertEquals("local-jms", awareListener.getBusidref());
+ assertTrue(!awareListener.getIsGateway());
+ assertEquals(2, awareListener.getMaxThreads());
+ JmsMessageFilter listenerDestination = awareListener.getJmsMessageFilter();
+ assertEquals("queue/B", listenerDestination.getDestName());
+ assertEquals(JmsMessageFilter.DestType.TOPIC, listenerDestination.getDestType());
+ assertEquals("service='Reconciliation'", listenerDestination.getSelector());
+
+ Listener untypedAwareListener = awareListeners.get(1);
+ assertEquals("Bank-Listener-Generic", untypedAwareListener.getName());
+ assertEquals("my-generic-bus", untypedAwareListener.getBusidref());
+ assertTrue("Type is Dual Listener", untypedAwareListener instanceof DualListener);
+ final DualListener dualListener = (DualListener)untypedAwareListener;
+ assertTrue(!dualListener.getIsGateway());
+
+ Service gatewayService = model.getService(gatewayListener);
+ Service awareService = model.getService(awareListener);
+ assertSame(gatewayService, awareService);
+ assertEquals("Bank", awareService.getCategory());
+ assertEquals("Reconciliation", awareService.getName());
+ assertEquals("Bank Reconciliation Service", awareService.getDescription());
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -24,8 +24,8 @@
import junit.framework.TestCase;
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.testutils.FileUtil;
import java.io.File;
@@ -62,27 +62,42 @@
test_generate_badargs(new File("build.xml"), "'outdir' exists, but is not a directory", "jbossesb_config_01.110.xml");
}
- public void test_generate_files() throws ConfigurationException, IOException {
+ public void test_generate_badargs_120() throws ConfigurationException, IOException {
+ test_generate_badargs(null, "null 'outdir' arg in method call", "jbossesb_config_01.120.xml");
+ test_generate_badargs(new File("build.xml"), "'outdir' exists, but is not a directory", "jbossesb_config_01.120.xml");
+ }
+
+ public void test_generate_files() throws Exception {
System.setProperty("jboss.esb.invm.scope.default", "NONE");
- test_generate_files("jbossesb_config_01.xml");
- test_generate_files("jbossesb_config_02.xml");
+ execute_test_generate_files("jbossesb_config_01.xml");
+ execute_test_generate_files("jbossesb_config_02.xml");
}
- public void test_generate_files110() throws ConfigurationException, IOException {
+ public void test_generate_files110() throws Exception {
System.setProperty("jboss.esb.invm.scope.default", "NONE");
- test_generate_files110("jbossesb_config_01.110.xml");
- test_generate_files110("jbossesb_config_02.110.xml");
+ execute_test_generate_files110("jbossesb_config_01.110.xml");
+ execute_test_generate_files110("jbossesb_config_02.110.xml");
}
+
+ public void test_generate_files120() throws Exception {
+ System.setProperty("jboss.esb.invm.scope.default", "NONE");
+ execute_test_generate_files120("jbossesb_config_01.120.xml");
+ execute_test_generate_files120("jbossesb_config_02.120.xml");
+ }
- public void test_generate_files(String filename) throws ConfigurationException, IOException {
- test_generate_files(filename, "jbossesb_config_01_gateways.xml", "jbossesb_config_01_esbaware.xml");
+ private void execute_test_generate_files(String filename) throws Exception {
+ execute_test_generate_files(filename, "jbossesb_config_01_gateways.xml", "jbossesb_config_01_esbaware.xml");
}
- public void test_generate_files110(String filename) throws ConfigurationException, IOException {
- test_generate_files(filename, "jbossesb_config_110_gateways.xml", "jbossesb_config_110_esbaware.xml");
+ private void execute_test_generate_files110(String filename) throws Exception {
+ execute_test_generate_files(filename, "jbossesb_config_110_gateways.xml", "jbossesb_config_110_esbaware.xml");
}
+
+ private void execute_test_generate_files120(String filename) throws Exception {
+ execute_test_generate_files(filename, "jbossesb_config_120_gateways.xml", "jbossesb_config_120_esbaware.xml");
+ }
- public void test_generate_files(String filename, String esbGatewayConfig, String esbAwareConfig) throws ConfigurationException, IOException {
+ private void execute_test_generate_files(String filename, String esbGatewayConfig, String esbAwareConfig) throws Exception {
Generator generator = new Generator(getClass().getResourceAsStream(filename));
String expectedGatewayConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream(esbGatewayConfig))).trim();
String expectedESBAwareConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream(esbAwareConfig))).trim();
@@ -99,7 +114,7 @@
actualGatewayConfig = FileUtil.readTextFile(gatewayConfig);
log.debug("actual [" + removeEOL(actualGatewayConfig) + "]");
log.debug("expected[" + expectedGatewayConfig + "]");
- assertEquals(expectedGatewayConfig, removeEOL(actualGatewayConfig));
+ assertTrue("Gateway Configuration", XMLHelper.compareXMLContent(expectedGatewayConfig, actualGatewayConfig));
awareConfig = new File(outdir, Generator.ESB_CONFIG_XML_FILE);
assertTrue(awareConfig.exists());
@@ -108,7 +123,7 @@
actualESBAwareConfig = removeEOL(actualESBAwareConfig);
boolean isIndentical = expectedESBAwareConfig.equals(actualESBAwareConfig);
log.debug("Strings identical=" + isIndentical);
- assertEquals(expectedESBAwareConfig, actualESBAwareConfig);
+ assertTrue("ESBAware Configuration", XMLHelper.compareXMLContent(expectedESBAwareConfig, actualESBAwareConfig));
}
@@ -138,6 +153,19 @@
}
}
+ public void test_bad_base_listener_busref_120() throws ConfigurationException, IOException {
+ Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_03.120.xml"));
+
+ try {
+ generator.generate(outdir);
+ fail("Expected ConfigurationException");
+ } catch(ConfigurationException e) {
+ if(!e.getMessage().equals("The base Listener config [JMS-ESBListener] must reference a base Bus config type (<bus>).")) {
+ fail("Wrong exception");
+ }
+ }
+ }
+
public static String removeEOL(String string) {
StringBuffer stringBuf = new StringBuffer(string.length());
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -18,77 +18,25 @@
public class ServicePublisherUnitTest extends TestCase {
public void test_101() throws ConfigurationException, IOException {
- Generator generator;
- ManagedLifecycleController controller1 = new ManagedLifecycleController(null);
- ManagedLifecycleController controller2 = new ManagedLifecycleController(null);
+ executeTest("jbossesb_config_04.xml", "jbossesb_config_05.xml");
+ }
- assertEquals("Service count", 0, ServicePublisher.getServices().size());
-
- generator = new Generator(getClass().getResourceAsStream("jbossesb_config_04.xml"));
- ServicePublisher.addServicePublishers(controller1, generator.getModel().getServicePublishers());
- List<ServicePublisher> publishers = ServicePublisher.getServicePublishers();
- assertEquals(2, publishers.size());
- assertEquals("A1", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
- assertEquals(null, publishers.get(0).getContractPublisher());
- assertEquals("B2", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
- assertEquals(null, publishers.get(1).getContractPublisher());
+ public void test_110() throws ConfigurationException, IOException {
+ executeTest("jbossesb_config_04.110.xml", "jbossesb_config_05.110.xml");
+ }
- assertEquals("Service count", 2, ServicePublisher.getServices().size());
-
- generator = new Generator(getClass().getResourceAsStream("jbossesb_config_05.xml"));
- ServicePublisher.addServicePublishers(controller2, generator.getModel().getServicePublishers());
- publishers = ServicePublisher.getServicePublishers();
- assertEquals(4, publishers.size());
- assertEquals("A1", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
- assertEquals(null, publishers.get(0).getContractPublisher());
- assertEquals("B2", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
- assertEquals(null, publishers.get(1).getContractPublisher());
- assertEquals("C3", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
- assertEquals(null, publishers.get(2).getContractPublisher());
- assertEquals("D4", publishers.get(3).getCategory() + publishers.get(3).getServiceName());
- assertTrue(publishers.get(3).getContractPublisher() instanceof MockContractPublisher);
-
- assertEquals("A1", 1, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
- assertEquals("B2", 1, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
- assertEquals("C3", 1, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
- assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
-
- assertEquals("Service count", 4, ServicePublisher.getServices().size());
-
- final ESBServiceContractPublisher publisher = new ESBServiceContractPublisher(new Service("C", "3"), "test", "endpoint") ;
- ServicePublisher.addContractReferencePublishers(controller2, Arrays.asList(publisher)) ;
- assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
-
- assertEquals("Service count", 4, ServicePublisher.getServices().size());
-
- ServicePublisher.removeServicePublishers(controller1);
- publishers = ServicePublisher.getServicePublishers();
- assertEquals(3, publishers.size());
- assertEquals("C3", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
- assertEquals(null, publishers.get(0).getContractPublisher());
- assertEquals("C3", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
- assertTrue("ContractReferencePublisher", publishers.get(1).getPublisher() instanceof ContractReferencePublisher);
- assertEquals("D4", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
- assertTrue(publishers.get(2).getContractPublisher() instanceof MockContractPublisher);
-
- assertEquals("Service count", 2, ServicePublisher.getServices().size());
-
- assertEquals("A1", 0, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
- assertEquals("B2", 0, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
- assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
- assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
-
- ServicePublisher.removeServicePublishers(controller2) ;
+ public void test_120() throws ConfigurationException, IOException {
+ executeTest("jbossesb_config_04.120.xml", "jbossesb_config_05.120.xml");
}
- public void test_110() throws ConfigurationException, IOException {
+ private void executeTest(final String resource1, final String resource2) throws ConfigurationException, IOException {
Generator generator;
ManagedLifecycleController controller1 = new ManagedLifecycleController(null);
ManagedLifecycleController controller2 = new ManagedLifecycleController(null);
assertEquals("Service count", 0, ServicePublisher.getServices().size());
- generator = new Generator(getClass().getResourceAsStream("jbossesb_config_04.110.xml"));
+ generator = new Generator(getClass().getResourceAsStream(resource1));
ServicePublisher.addServicePublishers(controller1, generator.getModel().getServicePublishers());
List<ServicePublisher> publishers = ServicePublisher.getServicePublishers();
assertEquals(2, publishers.size());
@@ -99,7 +47,7 @@
assertEquals("Service count", 2, ServicePublisher.getServices().size());
- generator = new Generator(getClass().getResourceAsStream("jbossesb_config_05.110.xml"));
+ generator = new Generator(getClass().getResourceAsStream(resource2));
ServicePublisher.addServicePublishers(controller2, generator.getModel().getServicePublishers());
publishers = ServicePublisher.getServicePublishers();
assertEquals(4, publishers.size());
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,113 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-URL="jnp://localhost:1099">
+ <jms-bus busid="local-jms" />
+ </jms-provider>
+
+ <jms-provider name="JBossMessaging" connection-factory="com.xyz.provider.XYZConnectionFactory"
+ jndi-context-factory="com.xyz.provider.NamingContextFactory"
+ jndi-URL="xyz://server1:9876"
+ jndi-pkg-prefix="com.xyz">
+ <jms-bus busid="server1-jms">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/A" selector="service='Reconciliation'" />
+ </jms-bus>
+ </jms-provider>
+
+ <ftp-provider name="FTP" hostname="localhost:21">
+ <ftp-bus busid="Ftp-ServerTest">
+ <ftp-message-filter directory="/Temp" input-suffix=".txt" username="joe" password="secret" post-rename="true"/>
+ </ftp-bus>
+ </ftp-provider>
+
+ <sql-provider name="HSQLDB" url="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" username="joe" password="secret">
+ <sql-bus busid="SQL-Test">
+ <sql-message-filter tablename="testtable" message-id-column="message_id" message-column="message" status-column="status" insert-timestamp-column="insert_timestamp"/>
+ </sql-bus>
+ </sql-provider>
+
+ <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+ <jbr-bus busid="HTTP-1" port="8765" />
+ <jbr-bus busid="HTTP-2" port="8766" />
+ </jbr-provider>
+
+ <bus-provider name="JBossAS">
+ <property name="my-generic-provider" value="my-generic-provider#someattribvalue" />
+
+ <bus busid="my-generic-bus">
+ <property name="my-generic-bus" value="my-generic-bus#someattribvalue" />
+ </bus>
+ </bus-provider>
+
+
+
+ </providers>
+ <services>
+ <service category="Bank" name="Reconciliation" description="Bank Reconciliation Service">
+
+ <listeners>
+ <jms-listener name="Bank-JMS-Gateway"
+ busidref="server1-jms"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jbr-listener name="Bank-HTTP-Gateway"
+ busidref="HTTP-1"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jms-listener name="Bank-Listener"
+ busidref="local-jms"
+ maxThreads="2">
+ <jms-message-filter dest-type="TOPIC" dest-name="queue/B" selector="service='Reconciliation'" />
+ </jms-listener>
+ <listener name="Bank-Listener-Generic"
+ busidref="my-generic-bus"
+ maxThreads="2">
+ <property name="my-generic-listener" value="my-generic-listener#someattribvalue" />
+ </listener>
+ </listeners>
+
+ <actions>
+ <action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="propName" value="propValue" />
+ <property name="propName">
+ This is some complex..
+ <!-- property -->
+ value.
+ <xxxx>
+ boooo
+ <yyyy/>
+ </xxxx>
+ <![CDATA[ Some CDATA data...]]>
+ </property>
+ </action>
+ </actions>
+
+ </service>
+ <service category="Test2" name="FTPTest" description="FTP server Test">
+
+ <listeners>
+ <ftp-listener name="test-ftp-listener"
+ busidref="Ftp-ServerTest"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action name="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ </actions>
+
+ </service>
+ <service category="Test3" name="SQLTest" description="SQL server Test">
+
+ <listeners>
+ <sql-listener name="test-sql-listener"
+ busidref="SQL-Test"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action name="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ </actions>
+
+ </service>
+ </services>
+
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,164 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+ <bus-provider name="JBossMQ">
+ <property name="connection-factory" value="ConnectionFactory" />
+ <property name="jndi-URL" value="jnp://localhost:1099" />
+ <property name="protocol" value="jms" />
+
+ <bus busid="local-jms">
+ <property name="destination-type" value="topic" />
+ <property name="destination-name" value="queue/B" />
+ <property name="message-selector" value="service='Reconciliation'"/>
+ <property name="persistent" value="true" />
+ <property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+ <property name="transacted" value="false" />
+ </bus>
+ </bus-provider>
+
+ <bus-provider name="JBossMessaging">
+ <property name="connection-factory" value="com.xyz.provider.XYZConnectionFactory" />
+ <property name="jndi-context-factory" value="com.xyz.provider.NamingContextFactory" />
+ <property name="jndi-URL" value="xyz://server1:9876" />
+ <property name="jndi-pkg-prefix" value="com.xyz" />
+ <property name="protocol" value="jms" />
+
+ <bus busid="server1-jms">
+ <property name="destination-type" value="queue" />
+ <property name="destination-name" value="queue/A" />
+ <property name="message-selector" value="service='Reconciliation'" />
+ <property name="persistent" value="true" />
+ <property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+ <property name="transacted" value="false" />
+ </bus>
+ </bus-provider>
+
+ <bus-provider name="FTP">
+ <property name="URL" value="ftp://joe:secret@localhost:21/Temp" />
+
+ <bus busid="Ftp-ServerTest">
+ <property name="inputSuffix" value=".txt" />
+ <property name="errorDelete" value="true" />
+ <property name="postDelete" value="true" />
+ <property name="postRename" value="true" />
+ <property name="passive" value="false" />
+ <property name="workSuffix" value=".esbInProcess" />
+ </bus>
+ </bus-provider>
+
+ <bus-provider name="HSQLDB">
+ <property name="URL" value="jdbc:postgresql://myhost:5432/testDB" />
+ <property name="driver" value="org.postgresql.Driver" />
+ <property name="username" value="joe" />
+ <property name="password" value="secret" />
+
+ <bus busid="SQL-Test">
+ <property name="tablename" value="testtable" />
+
+ <property name="tablename" value="testtable" />
+ <property name="message_column" value="message" />
+ <property name="message_id_column" value="message_id" />
+ <property name="status_column" value="status" />
+ <property name="errorDelete" value="true" />
+ <property name="insert_timestamp_column" value="insert_timestamp" />
+ <property name="postDelete" value="true" />
+ </bus>
+ </bus-provider>
+
+ <bus-provider name="JBR">
+ <property name="jbr-serverBindAddress" value="192.168.1.111" />
+ <property name="jbr-serverProtocol" value="http" />
+
+ <bus busid="HTTP-1">
+ <property name="jbr-serverBindPort" value="8765" />
+ </bus>
+ <bus busid="HTTP-2">
+ <property name="jbr-serverBindPort" value="8766" />
+ </bus>
+ </bus-provider>
+
+ <bus-provider name="JBossAS">
+ <property name="my-generic-provider" value="my-generic-provider#someattribvalue" />
+
+ <bus busid="my-generic-bus">
+ <property name="my-generic-bus" value="my-generic-bus#someattribvalue" />
+ </bus>
+ </bus-provider>
+
+ </providers>
+ <services>
+ <service category="Bank" name="Reconciliation" description="Bank Reconciliation Service">
+
+ <listeners>
+ <listener name="Bank-JMS-Gateway"
+ busidref="server1-jms"
+ maxThreads="1"
+ is-gateway="true">
+ <property name="gatewayClass" value="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" />
+ </listener>
+ <listener name="Bank-HTTP-Gateway"
+ busidref="HTTP-1"
+ maxThreads="1"
+ is-gateway="true">
+ <property name="gatewayClass" value="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" />
+ </listener>
+ <listener name="Bank-Listener"
+ busidref="local-jms"
+ maxThreads="2">
+ </listener>
+ <listener name="Bank-Listener-Generic"
+ busidref="my-generic-bus"
+ maxThreads="2">
+ <property name="my-generic-listener" value="my-generic-listener#someattribvalue" />
+ </listener>
+ </listeners>
+
+ <actions>
+ <action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+ <property name="propName" value="propValue" />
+ <property name="propName">
+ This is some complex..
+ <!-- property -->
+ value.
+ <xxxx>
+ boooo
+ <yyyy/>
+ </xxxx>
+ <![CDATA[ Some CDATA data...]]>
+ </property>
+ </action>
+ </actions>
+
+ </service>
+ <service category="Test2" name="FTPTest" description="FTP server Test">
+
+ <listeners>
+ <listener name="test-ftp-listener"
+ busidref="Ftp-ServerTest"
+ maxThreads="1">
+ <property name="schedule-frequency" value="10" />
+ </listener>
+ </listeners>
+ <actions mep="OneWay">
+ <action name="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ </actions>
+
+ </service>
+ <service category="Test3" name="SQLTest" description="SQL server Test">
+
+ <listeners>
+ <listener name="test-sql-listener"
+ busidref="SQL-Test"
+ maxThreads="1">
+ <property name="pollLatencySeconds" value="10" />
+ </listener>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action name="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ </actions>
+
+ </service>
+ </services>
+
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,43 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" >
+
+ <!--
+ This is a bad configuration. The listener below is of the base listener type, yet it references a non-base type bus (jms-bus).
+ Should generate an error.
+ -->
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory "
+ jndi-URL="localhost" >
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/B"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+
+ <service category="HelloWorld_ActionESB" name="SimpleListener" description="Hello World">
+ <listeners>
+ <listener name="JMS-ESBListener"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="displayAction"
+ class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"
+ process="displayMessage">
+ <property name="exceptionMethod" value="exceptionHandler"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,47 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+
+ <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+ <jbr-bus busid="HTTP-1" port="8765" />
+ <jbr-bus busid="HTTP-2" port="8766" />
+ </jbr-provider>
+
+ </providers>
+ <services>
+
+ <service category="A" name="1" description="A1">
+ <listeners>
+ <jbr-listener name="A1-HTTP"
+ busidref="HTTP-1"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jbr-listener name="A2-HTTP"
+ busidref="HTTP-2"
+ maxThreads="1" />
+ </listeners>
+
+ <actions>
+ <action name="a1" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+ </actions>
+ </service>
+ <service category="B" name="2" description="A1">
+ <listeners>
+ <jbr-listener name="A1-HTTP"
+ busidref="HTTP-1"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jbr-listener name="A2-HTTP"
+ busidref="HTTP-2"
+ maxThreads="1" />
+ </listeners>
+
+ <actions>
+ <action name="a1" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,47 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+
+ <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+ <jbr-bus busid="HTTP-1" port="8765" />
+ <jbr-bus busid="HTTP-2" port="8766" />
+ </jbr-provider>
+
+ </providers>
+ <services>
+
+ <service category="C" name="3" description="A1">
+ <listeners>
+ <jbr-listener name="A1-HTTP"
+ busidref="HTTP-1"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jbr-listener name="A2-HTTP"
+ busidref="HTTP-2"
+ maxThreads="1" />
+ </listeners>
+
+ <actions>
+ <action name="a1" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+ </actions>
+ </service>
+ <service category="D" name="4" description="A1">
+ <listeners>
+ <jbr-listener name="A1-HTTP"
+ busidref="HTTP-1"
+ maxThreads="1"
+ is-gateway="true"/>
+ <jbr-listener name="A2-HTTP"
+ busidref="HTTP-2"
+ maxThreads="1" />
+ </listeners>
+
+ <actions>
+ <action name="a1" class="org.jboss.soa.esb.listeners.config.MyPublishedAction" />
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_esbaware.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_esbaware.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_esbaware.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_esbaware.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- NOTE: DO NOT MODIFY This file was auto-generated.--><jbossesb-listeners parameterReloadSecs="180"><listener busIdRef="local-jms" listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" name="Bank-Listener" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms" transacted="false"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue"> This is some complex.. <!-- property --> value. <xxxx> boooo <yyyy/> </xxxx> Some CDATA data... </action></listener><listener busIdRef="my-generic-bus" listenerClass="org.jboss.soa!
.esb.listeners.message.MessageAwareListener" maxThreads="2" my-generic-listener="my-generic-listener#someattribvalue" name="Bank-Listener-Generic" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue"> This is some complex.. <!-- property --> value. <xxxx> boooo <yyyy/> </xxxx> Some CDATA data... </action></listener><listener busIdRef="Ftp-ServerTest" listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="OneWay" name="test-ftp-listener" schedule-frequency="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest"><EPR URL="ftp://joe:secret@localhost:21/Temp" errorDelete="true" inputSuffi!
x=".txt" passive="false" postDelete="true" postRename="true" w!
orkSuffi
x=".esbInProcess"/><action action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></listener><listener busIdRef="SQL-Test" listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="RequestResponse" name="test-sql-listener" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest"><EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/><action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></listener></jbossesb-listeners>
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_gateways.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_gateways.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_gateways.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_120_gateways.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- NOTE: DO NOT MODIFY This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><listener acknowledge-mode="AUTO_ACKNOWLEDGE" busIdRef="server1-jms" connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" is-gateway="true" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" name="Bank-JMS-Gateway" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation" transacted="false"/><listener busIdRef="HTTP-1" gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" is-gateway="true" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol=!
"http" maxThreads="1" name="Bank-HTTP-Gateway" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>
\ No newline at end of file
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,358 +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.listeners.config.mappers;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.Queue;
-import javax.jms.Topic;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.jca.ActivationMapper;
-import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
-import org.jboss.soa.esb.listeners.jca.JcaConstants;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.arjuna.common.util.propertyservice.PropertyManager;
-
-/**
- * Tests the JCA activation mapping of the JmsListenerMapper
- *
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JmsListenerMapperJCAActivationTest
-{
- private static final String TEST_DESTINATION = "TestDestination" ;
- private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
- private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
- private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
- private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
-
- private static final String TEST_QUEUE = "TestQueue" ;
- private static final String TEST_TOPIC = "TestTopic" ;
- private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
- private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
- private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
-
- @BeforeClass
- public static void setUp () throws Exception
- {
- final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
- propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
- propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
- }
-
- @Test
- public void testDefaultAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put("destination", "DestName") ;
- expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
- expected.put("destinationType", Queue.class.getName()) ;
- expected.put("messageSelector", "selector") ;
- expected.put("maxSession", "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testDefaultMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put("destination", "DestName") ;
- expected.put("destinationType", Topic.class.getName()) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testAdapterAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testAdapterMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testListenerPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testListenerPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testBusPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testBusPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testProviderPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testProviderPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- private Map<String, String> generateConfig(final String config)
- throws Exception
- {
- final InputStream is = getClass().getResourceAsStream(config) ;
- assertNotNull("Configuration " + config, is) ;
- final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
-
- final List<Listener> awareListeners = model.getESBAwareListeners() ;
- assertEquals("Listener count", 1, awareListeners.size()) ;
-
- final Listener listener = awareListeners.get(0) ;
- assertTrue("JmsListener", listener instanceof JmsListener) ;
-
- final Document doc = YADOMUtil.createDocument() ;
- final Element root = doc.createElement("root") ;
- final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
- assertNotNull("Listener Element", listenerElement) ;
-
- final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
- final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
- assertEquals("Activation node count", 1, numActivationNodes) ;
-
- final Element activationConfig = (Element)activationNodes.item(0) ;
- final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
-
- final Map<String, String> properties = new HashMap<String, String>() ;
- final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
- for(int count = 0 ; count < numProperties ; count++)
- {
- final Node node = propertyNodes.item(count) ;
- if (node instanceof Element)
- {
- final Element element = (Element)node ;
- final String name = element.getAttribute("name") ;
- final String value = element.getAttribute("value") ;
- properties.put(name, value) ;
- }
- }
- return properties ;
- }
-
- private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
- {
- assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
-
- for(Map.Entry<String, String> entry: expected.entrySet())
- {
- final String name = entry.getKey() ;
- assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
- }
- }
-
- public static class TestActivationMapper implements ActivationMapper
- {
- public void setDestination(final Map<String, String> activationConfig, final String name)
- throws ConfigurationException
- {
- activationConfig.put(TEST_DESTINATION, name) ;
- }
-
- public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
- throws ConfigurationException
- {
- if (providerAdapterJNDI != null)
- {
- activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
- }
- else
- {
- activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- }
- }
-
- public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
- throws ConfigurationException
- {
- if (queue)
- {
- activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- }
- else
- {
- activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- }
- }
-
- public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
- throws ConfigurationException
- {
- if (messageSelector != null)
- {
- activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
- }
- else
- {
- activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- }
- }
-
- public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
- throws ConfigurationException
- {
- if (maxThreads != null)
- {
- activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
- }
- else
- {
- activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
- }
- }
- }
-
- public static junit.framework.Test suite ()
- {
- return new JUnit4TestAdapter(JmsListenerMapperJCAActivationTest.class);
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperJCAActivationUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,358 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.config.mappers;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.jca.ActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JcaConstants;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+/**
+ * Tests the JCA activation mapping of the JmsListenerMapper
+ *
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsListenerMapperJCAActivationUnitTest
+{
+ private static final String TEST_DESTINATION = "TestDestination" ;
+ private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
+ private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
+ private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
+ private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
+
+ private static final String TEST_QUEUE = "TestQueue" ;
+ private static final String TEST_TOPIC = "TestTopic" ;
+ private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
+ private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
+ private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
+
+ @BeforeClass
+ public static void setUp () throws Exception
+ {
+ final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
+ propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
+ propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
+ }
+
+ @Test
+ public void testDefaultAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put("destination", "DestName") ;
+ expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
+ expected.put("destinationType", Queue.class.getName()) ;
+ expected.put("messageSelector", "selector") ;
+ expected.put("maxSession", "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testDefaultMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put("destination", "DestName") ;
+ expected.put("destinationType", Topic.class.getName()) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testAdapterAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testAdapterMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testListenerPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testListenerPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testBusPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testBusPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testProviderPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testProviderPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ private Map<String, String> generateConfig(final String config)
+ throws Exception
+ {
+ final InputStream is = getClass().getResourceAsStream(config) ;
+ assertNotNull("Configuration " + config, is) ;
+ final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
+
+ final List<Listener> awareListeners = model.getESBAwareListeners() ;
+ assertEquals("Listener count", 1, awareListeners.size()) ;
+
+ final Listener listener = awareListeners.get(0) ;
+ assertTrue("JmsListener", listener instanceof JmsListener) ;
+
+ final Document doc = YADOMUtil.createDocument() ;
+ final Element root = doc.createElement("root") ;
+ final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
+ assertNotNull("Listener Element", listenerElement) ;
+
+ final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+ final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
+ assertEquals("Activation node count", 1, numActivationNodes) ;
+
+ final Element activationConfig = (Element)activationNodes.item(0) ;
+ final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
+
+ final Map<String, String> properties = new HashMap<String, String>() ;
+ final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
+ for(int count = 0 ; count < numProperties ; count++)
+ {
+ final Node node = propertyNodes.item(count) ;
+ if (node instanceof Element)
+ {
+ final Element element = (Element)node ;
+ final String name = element.getAttribute("name") ;
+ final String value = element.getAttribute("value") ;
+ properties.put(name, value) ;
+ }
+ }
+ return properties ;
+ }
+
+ private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
+ {
+ assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
+
+ for(Map.Entry<String, String> entry: expected.entrySet())
+ {
+ final String name = entry.getKey() ;
+ assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
+ }
+ }
+
+ public static class TestActivationMapper implements ActivationMapper
+ {
+ public void setDestination(final Map<String, String> activationConfig, final String name)
+ throws ConfigurationException
+ {
+ activationConfig.put(TEST_DESTINATION, name) ;
+ }
+
+ public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+ throws ConfigurationException
+ {
+ if (providerAdapterJNDI != null)
+ {
+ activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ }
+ }
+
+ public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+ throws ConfigurationException
+ {
+ if (queue)
+ {
+ activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ }
+ }
+
+ public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+ throws ConfigurationException
+ {
+ if (messageSelector != null)
+ {
+ activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ }
+ }
+
+ public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+ throws ConfigurationException
+ {
+ if (maxThreads != null)
+ {
+ activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+ }
+ }
+ }
+
+ public static junit.framework.Test suite ()
+ {
+ return new JUnit4TestAdapter(JmsListenerMapperJCAActivationUnitTest.class);
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_05.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -15,7 +15,7 @@
<listeners>
<!-- maxThreads -->
<jms-listener name="listener" busidref="bus" maxThreads="100">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
</jms-listener>
<actions mep="OneWay">
<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_06.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -13,7 +13,7 @@
<service category="category" name="name" description="description">
<listeners>
<jms-listener name="listener" busidref="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
</jms-listener>
<actions mep="OneWay">
<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_07.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -4,7 +4,7 @@
<jms-jca-provider name="provider" connection-factory="ConnectionFactory"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
<jms-bus busid="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<!-- destinationType, destination and selector -->
<jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
</jms-bus>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_08.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -3,7 +3,7 @@
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory">
<jms-bus busid="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<!-- destinationType and destination-->
<jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
</jms-bus>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_09.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -3,7 +3,7 @@
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<jms-bus busid="bus">
<!-- destinationType, destination and selector -->
<jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_jca_config_10.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -2,7 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<jms-bus busid="bus">
<!-- destinationType and destination-->
<jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,358 +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.listeners.config.mappers110;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.Queue;
-import javax.jms.Topic;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.jca.ActivationMapper;
-import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
-import org.jboss.soa.esb.listeners.jca.JcaConstants;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.arjuna.common.util.propertyservice.PropertyManager;
-
-/**
- * Tests the JCA activation mapping of the JmsListenerMapper
- *
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JmsListenerMapperJCAActivationTest
-{
- private static final String TEST_DESTINATION = "TestDestination" ;
- private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
- private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
- private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
- private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
-
- private static final String TEST_QUEUE = "TestQueue" ;
- private static final String TEST_TOPIC = "TestTopic" ;
- private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
- private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
- private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
-
- @BeforeClass
- public static void setUp () throws Exception
- {
- final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
- propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
- propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
- }
-
- @Test
- public void testDefaultAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put("destination", "DestName") ;
- expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
- expected.put("destinationType", Queue.class.getName()) ;
- expected.put("messageSelector", "selector") ;
- expected.put("maxSession", "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testDefaultMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put("destination", "DestName") ;
- expected.put("destinationType", Topic.class.getName()) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testAdapterAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testAdapterMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testListenerPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testListenerPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testBusPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testBusPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testProviderPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testProviderPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- private Map<String, String> generateConfig(final String config)
- throws Exception
- {
- final InputStream is = getClass().getResourceAsStream(config) ;
- assertNotNull("Configuration " + config, is) ;
- final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
-
- final List<Listener> awareListeners = model.getESBAwareListeners() ;
- assertEquals("Listener count", 1, awareListeners.size()) ;
-
- final Listener listener = awareListeners.get(0) ;
- assertTrue("JmsListener", listener instanceof JmsListener) ;
-
- final Document doc = YADOMUtil.createDocument() ;
- final Element root = doc.createElement("root") ;
- final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
- assertNotNull("Listener Element", listenerElement) ;
-
- final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
- final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
- assertEquals("Activation node count", 1, numActivationNodes) ;
-
- final Element activationConfig = (Element)activationNodes.item(0) ;
- final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
-
- final Map<String, String> properties = new HashMap<String, String>() ;
- final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
- for(int count = 0 ; count < numProperties ; count++)
- {
- final Node node = propertyNodes.item(count) ;
- if (node instanceof Element)
- {
- final Element element = (Element)node ;
- final String name = element.getAttribute("name") ;
- final String value = element.getAttribute("value") ;
- properties.put(name, value) ;
- }
- }
- return properties ;
- }
-
- private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
- {
- assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
-
- for(Map.Entry<String, String> entry: expected.entrySet())
- {
- final String name = entry.getKey() ;
- assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
- }
- }
-
- public static class TestActivationMapper implements ActivationMapper
- {
- public void setDestination(final Map<String, String> activationConfig, final String name)
- throws ConfigurationException
- {
- activationConfig.put(TEST_DESTINATION, name) ;
- }
-
- public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
- throws ConfigurationException
- {
- if (providerAdapterJNDI != null)
- {
- activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
- }
- else
- {
- activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- }
- }
-
- public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
- throws ConfigurationException
- {
- if (queue)
- {
- activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- }
- else
- {
- activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- }
- }
-
- public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
- throws ConfigurationException
- {
- if (messageSelector != null)
- {
- activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
- }
- else
- {
- activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- }
- }
-
- public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
- throws ConfigurationException
- {
- if (maxThreads != null)
- {
- activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
- }
- else
- {
- activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
- }
- }
- }
-
- public static junit.framework.Test suite ()
- {
- return new JUnit4TestAdapter(JmsListenerMapperJCAActivationTest.class);
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperJCAActivationUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,358 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.jca.ActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JcaConstants;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+/**
+ * Tests the JCA activation mapping of the JmsListenerMapper
+ *
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsListenerMapperJCAActivationUnitTest
+{
+ private static final String TEST_DESTINATION = "TestDestination" ;
+ private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
+ private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
+ private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
+ private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
+
+ private static final String TEST_QUEUE = "TestQueue" ;
+ private static final String TEST_TOPIC = "TestTopic" ;
+ private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
+ private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
+ private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
+
+ @BeforeClass
+ public static void setUp () throws Exception
+ {
+ final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
+ propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
+ propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
+ }
+
+ @Test
+ public void testDefaultAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put("destination", "DestName") ;
+ expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
+ expected.put("destinationType", Queue.class.getName()) ;
+ expected.put("messageSelector", "selector") ;
+ expected.put("maxSession", "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testDefaultMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put("destination", "DestName") ;
+ expected.put("destinationType", Topic.class.getName()) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testAdapterAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testAdapterMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testListenerPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testListenerPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testBusPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testBusPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testProviderPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testProviderPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ private Map<String, String> generateConfig(final String config)
+ throws Exception
+ {
+ final InputStream is = getClass().getResourceAsStream(config) ;
+ assertNotNull("Configuration " + config, is) ;
+ final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
+
+ final List<Listener> awareListeners = model.getESBAwareListeners() ;
+ assertEquals("Listener count", 1, awareListeners.size()) ;
+
+ final Listener listener = awareListeners.get(0) ;
+ assertTrue("JmsListener", listener instanceof JmsListener) ;
+
+ final Document doc = YADOMUtil.createDocument() ;
+ final Element root = doc.createElement("root") ;
+ final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
+ assertNotNull("Listener Element", listenerElement) ;
+
+ final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+ final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
+ assertEquals("Activation node count", 1, numActivationNodes) ;
+
+ final Element activationConfig = (Element)activationNodes.item(0) ;
+ final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
+
+ final Map<String, String> properties = new HashMap<String, String>() ;
+ final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
+ for(int count = 0 ; count < numProperties ; count++)
+ {
+ final Node node = propertyNodes.item(count) ;
+ if (node instanceof Element)
+ {
+ final Element element = (Element)node ;
+ final String name = element.getAttribute("name") ;
+ final String value = element.getAttribute("value") ;
+ properties.put(name, value) ;
+ }
+ }
+ return properties ;
+ }
+
+ private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
+ {
+ assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
+
+ for(Map.Entry<String, String> entry: expected.entrySet())
+ {
+ final String name = entry.getKey() ;
+ assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
+ }
+ }
+
+ public static class TestActivationMapper implements ActivationMapper
+ {
+ public void setDestination(final Map<String, String> activationConfig, final String name)
+ throws ConfigurationException
+ {
+ activationConfig.put(TEST_DESTINATION, name) ;
+ }
+
+ public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+ throws ConfigurationException
+ {
+ if (providerAdapterJNDI != null)
+ {
+ activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ }
+ }
+
+ public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+ throws ConfigurationException
+ {
+ if (queue)
+ {
+ activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ }
+ }
+
+ public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+ throws ConfigurationException
+ {
+ if (messageSelector != null)
+ {
+ activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ }
+ }
+
+ public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+ throws ConfigurationException
+ {
+ if (maxThreads != null)
+ {
+ activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+ }
+ }
+ }
+
+ public static junit.framework.Test suite ()
+ {
+ return new JUnit4TestAdapter(JmsListenerMapperJCAActivationUnitTest.class);
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_01.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_01.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_01.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,5 +1,5 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="jms-ra.rar"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_02.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_02.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_02.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,5 +1,5 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory">
<jms-bus busid="bus">
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_03.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_03.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_03.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,5 +1,5 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_04.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_04.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_04.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,5 +1,5 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar">
<jms-bus busid="bus">
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_05.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_05.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_05.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,5 +1,5 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
@@ -15,7 +15,7 @@
<listeners>
<!-- maxThreads -->
<jms-listener name="listener" busidref="bus" maxThreads="100">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
</jms-listener>
<actions mep="OneWay">
<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_06.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_06.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_06.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,5 +1,5 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory">
<jms-bus busid="bus">
@@ -13,7 +13,7 @@
<service category="category" name="name" description="description">
<listeners>
<jms-listener name="listener" busidref="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
</jms-listener>
<actions mep="OneWay">
<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_07.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_07.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_07.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,10 +1,10 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
<jms-bus busid="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<!-- destinationType, destination and selector -->
<jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
</jms-bus>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_08.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_08.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_08.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,9 +1,9 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory">
<jms-bus busid="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<!-- destinationType and destination-->
<jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
</jms-bus>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_09.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_09.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_09.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,9 +1,9 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory"
providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<jms-bus busid="bus">
<!-- destinationType, destination and selector -->
<jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_10.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_10.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_jca_config_10.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,8 +1,8 @@
<?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
<providers>
<jms-jca-provider name="provider" connection-factory="ConnectionFactory">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationTest$TestActivationMapper"/>
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
<jms-bus busid="bus">
<!-- destinationType and destination-->
<jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120 (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,128 +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.listeners.config.mappers120;
-
-import junit.framework.TestCase;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URI;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpBusDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Tests the class FtpListenerMapper
- *
- * @author Daniel Bevenius
- *
- */
-public class FtpListenerMapperUnitTest extends TestCase
-{
- @SuppressWarnings("unused")
- private Logger log = Logger.getLogger(FtpListenerMapperUnitTest.class);
-
- private static final String ESB_CONFIG_READ_ONLY = "jbossesb_config_readonly.xml";
- private static final String ESB_CONFIG_ESCAPING = "jbossesb_config_escaping.xml";
-
- private static final String GATEWAY_CLASS_ATTRIBUTE = "gatewayClass";
-
- @Test
- public void testReadOnlyConfiguration() throws Exception
- {
- Element root = createRootElement();
- XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_READ_ONLY );
-
- List<Listener> gateways = model.getGatewayListeners();
- FtpListenerDocument.FtpListener ftpListener = (FtpListenerDocument.FtpListener) gateways.get(0);
- assertEquals ( true, ftpListener.getIsGateway() );
-
- FtpBusDocument.FtpBus ftpBus = (FtpBusDocument.FtpBus) model.getBus( ftpListener.getBusidref() );
- assertNotNull( "FtpBus element should exist", ftpBus );
- assertEquals ( "read-only attribute should be true", true, ftpBus.getFtpMessageFilter().getReadOnly() );
-
- FtpListenerMapper.map( root , ftpListener, model );
-
- Node ftpMapperListener = root.getFirstChild();
- assertNotNull ("ftpMapperListener should not be null", ftpMapperListener );
-
- NamedNodeMap attributes = ftpMapperListener.getAttributes();
- Node gatewayClass = attributes.getNamedItem( GATEWAY_CLASS_ATTRIBUTE );
- assertNotNull( "gatewayClass should have been set", gatewayClass );
- assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
- }
-
- @Test
- public void testEscaping() throws Exception
- {
- final XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_ESCAPING );
- final GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
- final Document gatewayConfig = gatewayGenerator.generate();
- final Element root = gatewayConfig.getDocumentElement() ;
- final NodeList listenerList = root.getElementsByTagName("listener") ;
- assertEquals("Listener count", 1, listenerList.getLength()) ;
- final Node listener = listenerList.item(0) ;
- final NamedNodeMap attributes = listener.getAttributes() ;
- final Node urlNode = attributes.getNamedItem(ListenerTagNames.URL_TAG) ;
- assertNotNull("URL node", urlNode) ;
- final String urlValue = urlNode.getNodeValue() ;
- assertNotNull("URL value", urlValue) ;
- final URI uri = new URI(urlValue) ;
- assertEquals("host", "localhost", uri.getHost()) ;
- assertEquals("port", 21, uri.getPort()) ;
- assertEquals("path", "/directory/####", uri.getPath()) ;
- assertEquals("userInfo", "user%3A##user:password:##password", uri.getUserInfo()) ;
- }
-
- private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
- {
- InputStream inputStream = getClass().getResourceAsStream( fileName );
- final Reader reader = new InputStreamReader(inputStream);
- XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
- return model;
- }
-
- private Element createRootElement() throws ConfigurationException
- {
- Document doc = YADOMUtil.createDocument();
- Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
- root.setAttribute("parameterReloadSecs", "1000" );
- return root;
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapperUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.config.mappers120;
+
+import junit.framework.TestCase;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URI;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.FtpBusDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Tests the class FtpListenerMapper
+ *
+ * @author Daniel Bevenius
+ *
+ */
+public class FtpListenerMapperUnitTest extends TestCase
+{
+ @SuppressWarnings("unused")
+ private Logger log = Logger.getLogger(FtpListenerMapperUnitTest.class);
+
+ private static final String ESB_CONFIG_READ_ONLY = "jbossesb_config_readonly.xml";
+ private static final String ESB_CONFIG_ESCAPING = "jbossesb_config_escaping.xml";
+
+ private static final String GATEWAY_CLASS_ATTRIBUTE = "gatewayClass";
+
+ @Test
+ public void testReadOnlyConfiguration() throws Exception
+ {
+ Element root = createRootElement();
+ XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_READ_ONLY );
+
+ List<Listener> gateways = model.getGatewayListeners();
+ FtpListenerDocument.FtpListener ftpListener = (FtpListenerDocument.FtpListener) gateways.get(0);
+ assertEquals ( true, ftpListener.getIsGateway() );
+
+ FtpBusDocument.FtpBus ftpBus = (FtpBusDocument.FtpBus) model.getBus( ftpListener.getBusidref() );
+ assertNotNull( "FtpBus element should exist", ftpBus );
+ assertEquals ( "read-only attribute should be true", true, ftpBus.getFtpMessageFilter().getReadOnly() );
+
+ FtpListenerMapper.map( root , ftpListener, model );
+
+ Node ftpMapperListener = root.getFirstChild();
+ assertNotNull ("ftpMapperListener should not be null", ftpMapperListener );
+
+ NamedNodeMap attributes = ftpMapperListener.getAttributes();
+ Node gatewayClass = attributes.getNamedItem( GATEWAY_CLASS_ATTRIBUTE );
+ assertNotNull( "gatewayClass should have been set", gatewayClass );
+ assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
+ }
+
+ @Test
+ public void testEscaping() throws Exception
+ {
+ final XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_ESCAPING );
+ final GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
+ final Document gatewayConfig = gatewayGenerator.generate();
+ final Element root = gatewayConfig.getDocumentElement() ;
+ final NodeList listenerList = root.getElementsByTagName("listener") ;
+ assertEquals("Listener count", 1, listenerList.getLength()) ;
+ final Node listener = listenerList.item(0) ;
+ final NamedNodeMap attributes = listener.getAttributes() ;
+ final Node urlNode = attributes.getNamedItem(ListenerTagNames.URL_TAG) ;
+ assertNotNull("URL node", urlNode) ;
+ final String urlValue = urlNode.getNodeValue() ;
+ assertNotNull("URL value", urlValue) ;
+ final URI uri = new URI(urlValue) ;
+ assertEquals("host", "localhost", uri.getHost()) ;
+ assertEquals("port", 21, uri.getPort()) ;
+ assertEquals("path", "/directory/####", uri.getPath()) ;
+ assertEquals("userInfo", "user%3A##user:password:##password", uri.getUserInfo()) ;
+ }
+
+ private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
+ {
+ InputStream inputStream = getClass().getResourceAsStream( fileName );
+ final Reader reader = new InputStreamReader(inputStream);
+ XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+ return model;
+ }
+
+ private Element createRootElement() throws ConfigurationException
+ {
+ Document doc = YADOMUtil.createDocument();
+ Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+ root.setAttribute("parameterReloadSecs", "1000" );
+ return root;
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,358 +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.listeners.config.mappers120;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.Queue;
-import javax.jms.Topic;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.jca.ActivationMapper;
-import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
-import org.jboss.soa.esb.listeners.jca.JcaConstants;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.arjuna.common.util.propertyservice.PropertyManager;
-
-/**
- * Tests the JCA activation mapping of the JmsListenerMapper
- *
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JmsListenerMapperJCAActivationUnitTest
-{
- private static final String TEST_DESTINATION = "TestDestination" ;
- private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
- private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
- private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
- private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
-
- private static final String TEST_QUEUE = "TestQueue" ;
- private static final String TEST_TOPIC = "TestTopic" ;
- private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
- private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
- private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
-
- @BeforeClass
- public static void setUp () throws Exception
- {
- final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
- propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
- propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
- }
-
- @Test
- public void testDefaultAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put("destination", "DestName") ;
- expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
- expected.put("destinationType", Queue.class.getName()) ;
- expected.put("messageSelector", "selector") ;
- expected.put("maxSession", "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testDefaultMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put("destination", "DestName") ;
- expected.put("destinationType", Topic.class.getName()) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testAdapterAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testAdapterMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testListenerPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testListenerPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testBusPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testBusPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testProviderPropertyAllValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
- expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
- expected.put(TEST_MAX_THREADS, "100") ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- @Test
- public void testProviderPropertyMandatoryValues()
- throws Exception
- {
- final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
-
- final Map<String, String> expected = new HashMap<String, String>() ;
- expected.put(TEST_DESTINATION, "DestName") ;
- expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
-
- verifyConfiguration(expected, activationConfig) ;
- }
-
- private Map<String, String> generateConfig(final String config)
- throws Exception
- {
- final InputStream is = getClass().getResourceAsStream(config) ;
- assertNotNull("Configuration " + config, is) ;
- final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
-
- final List<Listener> awareListeners = model.getESBAwareListeners() ;
- assertEquals("Listener count", 1, awareListeners.size()) ;
-
- final Listener listener = awareListeners.get(0) ;
- assertTrue("JmsListener", listener instanceof JmsListener) ;
-
- final Document doc = YADOMUtil.createDocument() ;
- final Element root = doc.createElement("root") ;
- final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
- assertNotNull("Listener Element", listenerElement) ;
-
- final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
- final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
- assertEquals("Activation node count", 1, numActivationNodes) ;
-
- final Element activationConfig = (Element)activationNodes.item(0) ;
- final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
-
- final Map<String, String> properties = new HashMap<String, String>() ;
- final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
- for(int count = 0 ; count < numProperties ; count++)
- {
- final Node node = propertyNodes.item(count) ;
- if (node instanceof Element)
- {
- final Element element = (Element)node ;
- final String name = element.getAttribute("name") ;
- final String value = element.getAttribute("value") ;
- properties.put(name, value) ;
- }
- }
- return properties ;
- }
-
- private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
- {
- assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
-
- for(Map.Entry<String, String> entry: expected.entrySet())
- {
- final String name = entry.getKey() ;
- assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
- }
- }
-
- public static class TestActivationMapper implements ActivationMapper
- {
- public void setDestination(final Map<String, String> activationConfig, final String name)
- throws ConfigurationException
- {
- activationConfig.put(TEST_DESTINATION, name) ;
- }
-
- public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
- throws ConfigurationException
- {
- if (providerAdapterJNDI != null)
- {
- activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
- }
- else
- {
- activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
- }
- }
-
- public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
- throws ConfigurationException
- {
- if (queue)
- {
- activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
- }
- else
- {
- activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
- }
- }
-
- public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
- throws ConfigurationException
- {
- if (messageSelector != null)
- {
- activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
- }
- else
- {
- activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
- }
- }
-
- public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
- throws ConfigurationException
- {
- if (maxThreads != null)
- {
- activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
- }
- else
- {
- activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
- }
- }
- }
-
- public static junit.framework.Test suite ()
- {
- return new JUnit4TestAdapter(JmsListenerMapperJCAActivationUnitTest.class);
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperJCAActivationUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,358 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.config.mappers120;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.jca.ActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JBossActivationMapper;
+import org.jboss.soa.esb.listeners.jca.JcaConstants;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+/**
+ * Tests the JCA activation mapping of the JmsListenerMapper
+ *
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JmsListenerMapperJCAActivationUnitTest
+{
+ private static final String TEST_DESTINATION = "TestDestination" ;
+ private static final String TEST_PROVIDER_ADAPTER_JNDI = "TestProviderAdapterJNDI" ;
+ private static final String TEST_DESTINATION_TYPE = "TestDestinationType" ;
+ private static final String TEST_MESSAGE_SELECTOR = "TestMessageSelector" ;
+ private static final String TEST_MAX_THREADS = "TestMaxThreads" ;
+
+ private static final String TEST_QUEUE = "TestQueue" ;
+ private static final String TEST_TOPIC = "TestTopic" ;
+ private static final String DEFAULT_TEST_PROVIDER_ADAPTER_JNDI = "DefaultTestProviderAdapterJNDI" ;
+ private static final String DEFAULT_TEST_MESSAGE_SELECTOR = "DefaultTestMessageSelector" ;
+ private static final String DEFAULT_TEST_MAX_THREADS = "DefaultTestMaxThreads" ;
+
+ @BeforeClass
+ public static void setUp () throws Exception
+ {
+ final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.JCA_MODULE) ;
+ propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".jms-ra.rar", JBossActivationMapper.class.getName()) ;
+ propertyManager.setProperty(Environment.JCA_ACTIVATION_MAPPER + ".test-ra.rar", TestActivationMapper.class.getName()) ;
+ }
+
+ @Test
+ public void testDefaultAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_01.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put("destination", "DestName") ;
+ expected.put("providerAdapterJNDI", "ProviderAdapterJNDI") ;
+ expected.put("destinationType", Queue.class.getName()) ;
+ expected.put("messageSelector", "selector") ;
+ expected.put("maxSession", "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testDefaultMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_02.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put("destination", "DestName") ;
+ expected.put("destinationType", Topic.class.getName()) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testAdapterAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_03.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testAdapterMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_04.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testListenerPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_05.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testListenerPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_06.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testBusPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_07.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testBusPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_08.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testProviderPropertyAllValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_09.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, "ProviderAdapterJNDI") ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ expected.put(TEST_MESSAGE_SELECTOR, "selector") ;
+ expected.put(TEST_MAX_THREADS, "100") ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ @Test
+ public void testProviderPropertyMandatoryValues()
+ throws Exception
+ {
+ final Map<String, String> activationConfig = generateConfig("jbossesb_jca_config_10.xml") ;
+
+ final Map<String, String> expected = new HashMap<String, String>() ;
+ expected.put(TEST_DESTINATION, "DestName") ;
+ expected.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ expected.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ expected.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ expected.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+
+ verifyConfiguration(expected, activationConfig) ;
+ }
+
+ private Map<String, String> generateConfig(final String config)
+ throws Exception
+ {
+ final InputStream is = getClass().getResourceAsStream(config) ;
+ assertNotNull("Configuration " + config, is) ;
+ final XMLBeansModel model = new XMLBeansModel(Factory.parse(is).getJbossesb());
+
+ final List<Listener> awareListeners = model.getESBAwareListeners() ;
+ assertEquals("Listener count", 1, awareListeners.size()) ;
+
+ final Listener listener = awareListeners.get(0) ;
+ assertTrue("JmsListener", listener instanceof JmsListener) ;
+
+ final Document doc = YADOMUtil.createDocument() ;
+ final Element root = doc.createElement("root") ;
+ final Element listenerElement = JmsListenerMapper.map(root, (JmsListener)listener, model) ;
+ assertNotNull("Listener Element", listenerElement) ;
+
+ final NodeList activationNodes = listenerElement.getElementsByTagName(JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+ final int numActivationNodes = (activationNodes == null ? 0 : activationNodes.getLength()) ;
+ assertEquals("Activation node count", 1, numActivationNodes) ;
+
+ final Element activationConfig = (Element)activationNodes.item(0) ;
+ final NodeList propertyNodes = activationConfig.getElementsByTagName(JcaConstants.ELEMENT_PROPERTY) ;
+
+ final Map<String, String> properties = new HashMap<String, String>() ;
+ final int numProperties = (propertyNodes == null ? 0 : propertyNodes.getLength()) ;
+ for(int count = 0 ; count < numProperties ; count++)
+ {
+ final Node node = propertyNodes.item(count) ;
+ if (node instanceof Element)
+ {
+ final Element element = (Element)node ;
+ final String name = element.getAttribute("name") ;
+ final String value = element.getAttribute("value") ;
+ properties.put(name, value) ;
+ }
+ }
+ return properties ;
+ }
+
+ private static void verifyConfiguration(final Map<String, String> expected, final Map<String, String> activationConfig)
+ {
+ assertEquals("Number of activation properties", expected.size(), activationConfig.size()) ;
+
+ for(Map.Entry<String, String> entry: expected.entrySet())
+ {
+ final String name = entry.getKey() ;
+ assertEquals("Value of " + name, expected.get(name), activationConfig.get(name)) ;
+ }
+ }
+
+ public static class TestActivationMapper implements ActivationMapper
+ {
+ public void setDestination(final Map<String, String> activationConfig, final String name)
+ throws ConfigurationException
+ {
+ activationConfig.put(TEST_DESTINATION, name) ;
+ }
+
+ public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+ throws ConfigurationException
+ {
+ if (providerAdapterJNDI != null)
+ {
+ activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, providerAdapterJNDI) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_PROVIDER_ADAPTER_JNDI, DEFAULT_TEST_PROVIDER_ADAPTER_JNDI) ;
+ }
+ }
+
+ public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+ throws ConfigurationException
+ {
+ if (queue)
+ {
+ activationConfig.put(TEST_DESTINATION_TYPE, TEST_QUEUE) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_DESTINATION_TYPE, TEST_TOPIC) ;
+ }
+ }
+
+ public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+ throws ConfigurationException
+ {
+ if (messageSelector != null)
+ {
+ activationConfig.put(TEST_MESSAGE_SELECTOR, messageSelector) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_MESSAGE_SELECTOR, DEFAULT_TEST_MESSAGE_SELECTOR) ;
+ }
+ }
+
+ public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+ throws ConfigurationException
+ {
+ if (maxThreads != null)
+ {
+ activationConfig.put(TEST_MAX_THREADS, maxThreads.toString()) ;
+ }
+ else
+ {
+ activationConfig.put(TEST_MAX_THREADS, DEFAULT_TEST_MAX_THREADS) ;
+ }
+ }
+ }
+
+ public static junit.framework.Test suite ()
+ {
+ return new JUnit4TestAdapter(JmsListenerMapperJCAActivationUnitTest.class);
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,166 +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.listeners.config.mappers120;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.List;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsBusDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.ActivationConfigDocument.ActivationConfig;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsJcaProviderDocument.JmsJcaProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.PropertyDocument.Property;
-import org.junit.Before;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Unit test for JmsListenerMapper
- *
- * @author Daniel Bevenius
- *
- */
-public class JmsListenerMapperUnitTest
-{
- private static final String ESB_CONFIG = "jbossesb_config_jms_jca.xml";
-
- private Element root;
- private XMLBeansModel model;
- private JmsListenerDocument.JmsListener jmsListener;
- private JmsJcaProvider jmsJcaProvider;
-
- @Test ( expected = ConfigurationException.class )
- public void tryToOverrideDestinationActivationConfigProperty() throws ConfigurationException, IOException
- {
- callJmsListenerMap( "destination", "/queue/dummyQueue" );
- }
-
- @Test ( expected = ConfigurationException.class )
- public void tryToOverride_DestinationType_ActivationConfigProperty() throws ConfigurationException, IOException
- {
- callJmsListenerMap( "destinationType", "Topic" );
- }
-
- @Test ( expected = ConfigurationException.class )
- public void tryToOverrideMessageSelectorActivationConfigProperty() throws ConfigurationException, IOException
- {
- callJmsListenerMap( "messageSelector", "dummyselector" );
- }
-
- @Test ( expected = ConfigurationException.class )
- public void tryToOverrideMaxMessagesActivationConfigProperty() throws ConfigurationException, IOException
- {
- callJmsListenerMap( "maxMessages", "300" );
- }
-
- // setup methods
-
- @Before
- public void setup() throws ConfigurationException, IOException, XmlException
- {
- root = createRootElement();
- model = getXmlBeanModel( ESB_CONFIG );
- jmsListener = getListener( model );
- jmsJcaProvider = getJmsJcaProvider( model );
- }
-
- // helper methods
-
- private void callJmsListenerMap(
- String activationConfigPropertyName,
- String activationConfigPropertyValue
- ) throws ConfigurationException
- {
- ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
- createActivationProperty( activationConfig, activationConfigPropertyName, activationConfigPropertyValue );
-
- JmsListenerMapper.map( root , jmsListener, model );
- }
-
- private Property createActivationProperty(
- final ActivationConfig activationConfig,
- final String name,
- final String value )
- {
- Property property = activationConfig.addNewProperty();
- property.setName( name );
- property.setValue( value );
- return property;
- }
-
- private JmsListener getListener( final XMLBeansModel model ) throws ConfigurationException
- {
- List<Listener> listeners = model.getESBAwareListeners();
- return (JmsListener) listeners.get(0);
- }
-
- private JmsJcaProvider getJmsJcaProvider( final XMLBeansModel model ) throws ConfigurationException, IOException
- {
- List<Listener> listeners = model.getESBAwareListeners();
- JmsListenerDocument.JmsListener jmsListener = (JmsListener) listeners.get(0);
- assertEquals ( false, jmsListener.getIsGateway() );
-
- JmsBusDocument.JmsBus jmsBus = (JmsBusDocument.JmsBus) model.getBus( jmsListener.getBusidref() );
- assertNotNull( "JmsBus element should exist", jmsBus );
- Provider provider = model.getProvider( jmsBus );
- assertTrue( provider instanceof JmsJcaProvider );
- return (JmsJcaProvider) provider;
- }
-
- private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
- {
- InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
- final Reader reader = new InputStreamReader(inputStream);
- XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
- return model;
- }
-
- private Element createRootElement() throws ConfigurationException
- {
- Document doc = YADOMUtil.createDocument();
- Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
- root.setAttribute("parameterReloadSecs", "1000" );
- return root;
- }
-
- public static junit.framework.Test suite()
- {
- return new JUnit4TestAdapter( JmsListenerMapperUnitTest.class );
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/JmsListenerMapperUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.config.mappers120;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsBusDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.ActivationConfigDocument.ActivationConfig;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.PropertyDocument.Property;
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Unit test for JmsListenerMapper
+ *
+ * @author Daniel Bevenius
+ *
+ */
+public class JmsListenerMapperUnitTest
+{
+ private static final String ESB_CONFIG = "jbossesb_config_jms_jca.xml";
+
+ private Element root;
+ private XMLBeansModel model;
+ private JmsListenerDocument.JmsListener jmsListener;
+ private JmsJcaProvider jmsJcaProvider;
+
+ @Test ( expected = ConfigurationException.class )
+ public void tryToOverrideDestinationActivationConfigProperty() throws ConfigurationException, IOException
+ {
+ callJmsListenerMap( "destination", "/queue/dummyQueue" );
+ }
+
+ @Test ( expected = ConfigurationException.class )
+ public void tryToOverride_DestinationType_ActivationConfigProperty() throws ConfigurationException, IOException
+ {
+ callJmsListenerMap( "destinationType", "Topic" );
+ }
+
+ @Test ( expected = ConfigurationException.class )
+ public void tryToOverrideMessageSelectorActivationConfigProperty() throws ConfigurationException, IOException
+ {
+ callJmsListenerMap( "messageSelector", "dummyselector" );
+ }
+
+ @Test ( expected = ConfigurationException.class )
+ public void tryToOverrideMaxMessagesActivationConfigProperty() throws ConfigurationException, IOException
+ {
+ callJmsListenerMap( "maxMessages", "300" );
+ }
+
+ // setup methods
+
+ @Before
+ public void setup() throws ConfigurationException, IOException, XmlException
+ {
+ root = createRootElement();
+ model = getXmlBeanModel( ESB_CONFIG );
+ jmsListener = getListener( model );
+ jmsJcaProvider = getJmsJcaProvider( model );
+ }
+
+ // helper methods
+
+ private void callJmsListenerMap(
+ String activationConfigPropertyName,
+ String activationConfigPropertyValue
+ ) throws ConfigurationException
+ {
+ ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
+ createActivationProperty( activationConfig, activationConfigPropertyName, activationConfigPropertyValue );
+
+ JmsListenerMapper.map( root , jmsListener, model );
+ }
+
+ private Property createActivationProperty(
+ final ActivationConfig activationConfig,
+ final String name,
+ final String value )
+ {
+ Property property = activationConfig.addNewProperty();
+ property.setName( name );
+ property.setValue( value );
+ return property;
+ }
+
+ private JmsListener getListener( final XMLBeansModel model ) throws ConfigurationException
+ {
+ List<Listener> listeners = model.getESBAwareListeners();
+ return (JmsListener) listeners.get(0);
+ }
+
+ private JmsJcaProvider getJmsJcaProvider( final XMLBeansModel model ) throws ConfigurationException, IOException
+ {
+ List<Listener> listeners = model.getESBAwareListeners();
+ JmsListenerDocument.JmsListener jmsListener = (JmsListener) listeners.get(0);
+ assertEquals ( false, jmsListener.getIsGateway() );
+
+ JmsBusDocument.JmsBus jmsBus = (JmsBusDocument.JmsBus) model.getBus( jmsListener.getBusidref() );
+ assertNotNull( "JmsBus element should exist", jmsBus );
+ Provider provider = model.getProvider( jmsBus );
+ assertTrue( provider instanceof JmsJcaProvider );
+ return (JmsJcaProvider) provider;
+ }
+
+ private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
+ {
+ InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
+ final Reader reader = new InputStreamReader(inputStream);
+ XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+ return model;
+ }
+
+ private Element createRootElement() throws ConfigurationException
+ {
+ Document doc = YADOMUtil.createDocument();
+ Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+ root.setAttribute("parameterReloadSecs", "1000" );
+ return root;
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new JUnit4TestAdapter( JmsListenerMapperUnitTest.class );
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,121 +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.listeners.config.mappers120;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel120.ServiceDocument.Service;
-import org.junit.Before;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Unit test for {@link SecurityMapper}
- * <p/>
- *
- * @author Daniel Bevenius
- *
- */
-public class SecurityMapperUnitTest
-{
- private static final String ESB_CONFIG = "jbossesb_config_security.xml";
-
- private Element root;
- private XMLBeansModel model;
-
- private Service service;
-
- private Node securityNode;
-
- @Test
- public void mapRunAs() throws ConfigurationException
- {
- Node runAsNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.RUN_AS_TAG );
- assertNotNull( runAsNode.getNodeName() );
- assertEquals( "MrPoon", runAsNode.getNodeValue() );
- }
-
- @Test
- public void mapModuleName() throws ConfigurationException
- {
- Node moduleNameNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.MODULE_NAME_TAG );
- assertNotNull( moduleNameNode.getNodeName() );
- assertEquals( "mod1", moduleNameNode.getNodeValue());
- }
-
- @Test
- public void mapUseCallersIdentity() throws ConfigurationException
- {
- Node userIdentityNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.USE_CALLERS_IDENTIDY_TAG );
- assertNotNull( userIdentityNode.getNodeName() );
- assertEquals( "user1", userIdentityNode.getNodeValue());
- }
-
- // setup methods
-
- @Before
- public void setup() throws ConfigurationException, IOException, XmlException
- {
- root = createRootElement();
- model = getXmlBeanModel( ESB_CONFIG );
- service = model.getServices().get( 0 );
-
- SecurityMapper.map( root, service );
- securityNode = root.getFirstChild();
- }
-
- private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
- {
- InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
- final Reader reader = new InputStreamReader(inputStream);
- XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
- return model;
- }
-
- private Element createRootElement() throws ConfigurationException
- {
- Document doc = YADOMUtil.createDocument();
- Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
- root.setAttribute("parameterReloadSecs", "1000" );
- return root;
- }
-
- public static junit.framework.Test suite()
- {
- return new JUnit4TestAdapter( SecurityMapperUnitTest.class );
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/SecurityMapperUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.config.mappers120;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel120.ServiceDocument.Service;
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Unit test for {@link SecurityMapper}
+ * <p/>
+ *
+ * @author Daniel Bevenius
+ *
+ */
+public class SecurityMapperUnitTest
+{
+ private static final String ESB_CONFIG = "jbossesb_config_security.xml";
+
+ private Element root;
+ private XMLBeansModel model;
+
+ private Service service;
+
+ private Node securityNode;
+
+ @Test
+ public void mapRunAs() throws ConfigurationException
+ {
+ Node runAsNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.RUN_AS_TAG );
+ assertNotNull( runAsNode.getNodeName() );
+ assertEquals( "MrPoon", runAsNode.getNodeValue() );
+ }
+
+ @Test
+ public void mapModuleName() throws ConfigurationException
+ {
+ Node moduleNameNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.MODULE_NAME_TAG );
+ assertNotNull( moduleNameNode.getNodeName() );
+ assertEquals( "mod1", moduleNameNode.getNodeValue());
+ }
+
+ @Test
+ public void mapUseCallersIdentity() throws ConfigurationException
+ {
+ Node userIdentityNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.USE_CALLERS_IDENTIDY_TAG );
+ assertNotNull( userIdentityNode.getNodeName() );
+ assertEquals( "user1", userIdentityNode.getNodeValue());
+ }
+
+ // setup methods
+
+ @Before
+ public void setup() throws ConfigurationException, IOException, XmlException
+ {
+ root = createRootElement();
+ model = getXmlBeanModel( ESB_CONFIG );
+ service = model.getServices().get( 0 );
+
+ SecurityMapper.map( root, service );
+ securityNode = root.getFirstChild();
+ }
+
+ private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
+ {
+ InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
+ final Reader reader = new InputStreamReader(inputStream);
+ XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+ return model;
+ }
+
+ private Element createRootElement() throws ConfigurationException
+ {
+ Document doc = YADOMUtil.createDocument();
+ Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+ root.setAttribute("parameterReloadSecs", "1000" );
+ return root;
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new JUnit4TestAdapter( SecurityMapperUnitTest.class );
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,18 +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.2.0.xsd">
- <providers>
- <ftp-provider name="FTP" hostname="localhost:21">
- <ftp-bus busid="FTPbus">
- <ftp-message-filter directory="/directory/####" username="user:##user" password="password:##password"/>
- </ftp-bus>
- </ftp-provider>
- </providers>
-
- <services>
- <service category="Test" name="FTPTest" description="FTP escaping Test">
- <listeners>
- <ftp-listener name="FtpMapperListener" busidref="FTPbus" is-gateway="true"/>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_escaping.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,18 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+ <providers>
+ <ftp-provider name="FTP" hostname="localhost:21">
+ <ftp-bus busid="FTPbus">
+ <ftp-message-filter directory="/directory/####" username="user:##user" password="password:##password"/>
+ </ftp-bus>
+ </ftp-provider>
+ </providers>
+
+ <services>
+ <service category="Test" name="FTPTest" description="FTP escaping Test">
+ <listeners>
+ <ftp-listener name="FtpMapperListener" busidref="FTPbus" is-gateway="true"/>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,38 +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.2.0.xsd">
-
- <providers>
-
- <jms-jca-provider
- name="JBossMessaging"
- connection-factory="XAConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099"
- transacted="true"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_jms_transacted_Request_esb"
- selector="CorrelationID = '13'"
- transacted="true" />
- </jms-bus>
- <activation-config>
- <property name="dLQMaxResent" value="12"/>
- <property name="dLQJNDIName" value="/queue/quickstart_jms_transacted_error"/>
- <property name="reconnectInterval" value="1000"/>
- </activation-config>
- </jms-jca-provider>
-
- </providers>
- <services>
- <service category="Test2" name="JMSJCATest" description="JMS JCA Test">
-
- <listeners>
- <jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
- </listeners>
- </service>
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_jms_jca.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,38 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+
+ <jms-jca-provider
+ name="JBossMessaging"
+ connection-factory="XAConnectionFactory"
+ jndi-URL="jnp://127.0.0.1:1099"
+ transacted="true"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_jms_transacted_Request_esb"
+ selector="CorrelationID = '13'"
+ transacted="true" />
+ </jms-bus>
+ <activation-config>
+ <property name="dLQMaxResent" value="12"/>
+ <property name="dLQJNDIName" value="/queue/quickstart_jms_transacted_error"/>
+ <property name="reconnectInterval" value="1000"/>
+ </activation-config>
+ </jms-jca-provider>
+
+ </providers>
+ <services>
+ <service category="Test2" name="JMSJCATest" description="JMS JCA Test">
+
+ <listeners>
+ <jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+ </listeners>
+ </service>
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,32 +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.2.0.xsd">
-
- <providers>
-
- <ftp-provider name="FTP" hostname="localhost:21">
- <ftp-bus busid="FtpMapperTest">
- <ftp-message-filter directory="/Temp" read-only="true" input-suffix=".txt" username="joe" password="secret"/>
- </ftp-bus>
- </ftp-provider>
-
- <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
- <jbr-bus busid="HTTP-2" port="8766" />
- </jbr-provider>
-
- </providers>
- <services>
- <service category="Test2" name="FTPTest" description="FTP server Test">
-
- <listeners>
- <ftp-listener name="FtpMapperListener"
- busidref="FtpMapperTest"
- is-gateway="true"
- maxThreads="1"/>
- <jbr-listener name="A2-HTTP"
- busidref="HTTP-2"
- maxThreads="1" />
- </listeners>
- </service>
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_readonly.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,32 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+
+ <ftp-provider name="FTP" hostname="localhost:21">
+ <ftp-bus busid="FtpMapperTest">
+ <ftp-message-filter directory="/Temp" read-only="true" input-suffix=".txt" username="joe" password="secret"/>
+ </ftp-bus>
+ </ftp-provider>
+
+ <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+ <jbr-bus busid="HTTP-2" port="8766" />
+ </jbr-provider>
+
+ </providers>
+ <services>
+ <service category="Test2" name="FTPTest" description="FTP server Test">
+
+ <listeners>
+ <ftp-listener name="FtpMapperListener"
+ busidref="FtpMapperTest"
+ is-gateway="true"
+ maxThreads="1"/>
+ <jbr-listener name="A2-HTTP"
+ busidref="HTTP-2"
+ maxThreads="1" />
+ </listeners>
+ </service>
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,34 +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.2.0.xsd">
-
- <providers>
-
- <jms-provider
- name="JBossMessaging"
- connection-factory="XAConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_jms_transacted_Request_esb"
- selector="CorrelationID = '13'"/>
- </jms-bus>
- </jms-provider>
-
- </providers>
- <services>
- <service category="Test2" name="JMSJCATest" description="JMS JCA Test">
- <security runAs="MrPoon" moduleName="mod1" useCallersIdentity="user1"/>
- <listeners>
- <jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
- </listeners>
- <actions>
- <action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
- </actions>
- </service>
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_config_security.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,34 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
+
+ <providers>
+
+ <jms-provider
+ name="JBossMessaging"
+ connection-factory="XAConnectionFactory"
+ jndi-URL="jnp://127.0.0.1:1099"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_jms_transacted_Request_esb"
+ selector="CorrelationID = '13'"/>
+ </jms-bus>
+ </jms-provider>
+
+ </providers>
+ <services>
+ <service category="Test2" name="JMSJCATest" description="JMS JCA Test">
+ <security runAs="MrPoon" moduleName="mod1" useCallersIdentity="user1"/>
+ <listeners>
+ <jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+ </listeners>
+ <actions>
+ <action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,24 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="jms-ra.rar"
- providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <jms-bus busid="bus">
- <!-- destinationType, destination and selector -->
- <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <!-- maxThreads -->
- <jms-listener name="listener" busidref="bus" maxThreads="100"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_01.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,24 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="jms-ra.rar"
+ providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
+ <jms-bus busid="bus">
+ <!-- destinationType, destination and selector -->
+ <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <!-- maxThreads -->
+ <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,22 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
- <jms-bus busid="bus">
- <!-- destinationType and destination-->
- <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <jms-listener name="listener" busidref="bus"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_02.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,22 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
+ <jms-bus busid="bus">
+ <!-- destinationType and destination-->
+ <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <jms-listener name="listener" busidref="bus"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,24 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar"
- providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <jms-bus busid="bus">
- <!-- destinationType, destination and selector -->
- <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <!-- maxThreads -->
- <jms-listener name="listener" busidref="bus" maxThreads="100"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_03.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,24 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar"
+ providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
+ <jms-bus busid="bus">
+ <!-- destinationType, destination and selector -->
+ <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <!-- maxThreads -->
+ <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,22 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar">
- <jms-bus busid="bus">
- <!-- destinationType and destination-->
- <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <jms-listener name="listener" busidref="bus"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_04.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,22 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory" adapter="test-ra.rar">
+ <jms-bus busid="bus">
+ <!-- destinationType and destination-->
+ <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <jms-listener name="listener" busidref="bus"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,26 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory"
- providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <jms-bus busid="bus">
- <!-- destinationType, destination and selector -->
- <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <!-- maxThreads -->
- <jms-listener name="listener" busidref="bus" maxThreads="100">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
- </jms-listener>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_05.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,26 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory"
+ providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
+ <jms-bus busid="bus">
+ <!-- destinationType, destination and selector -->
+ <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <!-- maxThreads -->
+ <jms-listener name="listener" busidref="bus" maxThreads="100">
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
+ </jms-listener>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,24 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
- <jms-bus busid="bus">
- <!-- destinationType and destination-->
- <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <jms-listener name="listener" busidref="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
- </jms-listener>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_06.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,24 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
+ <jms-bus busid="bus">
+ <!-- destinationType and destination-->
+ <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <jms-listener name="listener" busidref="bus">
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
+ </jms-listener>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,25 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory"
- providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <jms-bus busid="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
- <!-- destinationType, destination and selector -->
- <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <!-- maxThreads -->
- <jms-listener name="listener" busidref="bus" maxThreads="100"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_07.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,25 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory"
+ providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
+ <jms-bus busid="bus">
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
+ <!-- destinationType, destination and selector -->
+ <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <!-- maxThreads -->
+ <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,23 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
- <jms-bus busid="bus">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
- <!-- destinationType and destination-->
- <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <jms-listener name="listener" busidref="bus"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_08.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,23 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
+ <jms-bus busid="bus">
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
+ <!-- destinationType and destination-->
+ <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <jms-listener name="listener" busidref="bus"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,25 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory"
- providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
- <jms-bus busid="bus">
- <!-- destinationType, destination and selector -->
- <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <!-- maxThreads -->
- <jms-listener name="listener" busidref="bus" maxThreads="100"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_09.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,25 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory"
+ providerAdapterJNDI="ProviderAdapterJNDI"> <!-- providerAdapterJNDI -->
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
+ <jms-bus busid="bus">
+ <!-- destinationType, destination and selector -->
+ <jms-message-filter dest-type="QUEUE" dest-name="DestName" selector="selector"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <!-- maxThreads -->
+ <jms-listener name="listener" busidref="bus" maxThreads="100"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,23 +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.2.0.xsd" parameterReloadSecs="5">
- <providers>
- <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
- <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
- <jms-bus busid="bus">
- <!-- destinationType and destination-->
- <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
- </jms-bus>
- </jms-jca-provider>
- </providers>
-
- <services>
- <service category="category" name="name" description="description">
- <listeners>
- <jms-listener name="listener" busidref="bus"/>
- <actions mep="OneWay">
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
- </actions>
- </listeners>
- </service>
- </services>
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers120/jbossesb_jca_config_10.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,23 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <providers>
+ <jms-jca-provider name="provider" connection-factory="ConnectionFactory">
+ <property name="jcaActivationMapper" value="org.jboss.soa.esb.listeners.config.mappers.JmsListenerMapperJCAActivationUnitTest$TestActivationMapper"/>
+ <jms-bus busid="bus">
+ <!-- destinationType and destination-->
+ <jms-message-filter dest-type="TOPIC" dest-name="DestName"/>
+ </jms-bus>
+ </jms-jca-provider>
+ </providers>
+
+ <services>
+ <service category="category" name="name" description="description">
+ <listeners>
+ <jms-listener name="listener" busidref="bus"/>
+ <actions mep="OneWay">
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+ </actions>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -69,7 +69,7 @@
@Test
public void getAttributesMissingKey() throws LifecycleResourceException, AttributeNotFoundException, MBeanException, ReflectionException
{
- counter.update(new ActionStatusBean(100l, 0, MessageFactory.getInstance().getMessage(), ActionStatusBean.ACTION_SENT));
+ counter.update(new ActionStatusBean(100l, 0, MessageFactory.getInstance().getMessage(), ActionStatusBean.ACTION_SENT, ""));
try
{
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -14,20 +14,22 @@
public class ESBConfigUtilUnitTest extends TestCase {
public void test() throws ConfigurationException, IOException, SAXException {
- ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("jboss-esb.xml"));
+ executeTest("jboss-esb.xml");
+ }
- assertTrue(configUtil.getListenerConfig("JMS-ESBListener").toString().startsWith("<listener busIdRef=\"OrderManagerService\" listenerClass=\"org.jboss.soa.esb.listeners.message.MessageAwareListener\" maxThreads=\"1\" name=\"JMS-ESBListener\" service-category=\"ABI_OrderManager\" service-description=\"ABI OrderManager Service\" service-name=\"ABI_OrderManager\">"));
- assertTrue(configUtil.getGatewayConfig("FileGateway").toString().startsWith("<listener"));
- assertTrue(configUtil.getActionConfig("OrderNotificationService", "print-after-transform").toString().startsWith("<action action=\"print-after-transform\""));
+ public void test110() throws ConfigurationException, IOException, SAXException {
+ executeTest("jboss-esb.110.xml");
}
+ public void test120() throws ConfigurationException, IOException, SAXException {
+ executeTest("jboss-esb.120.xml");
+ }
- public void test110() throws ConfigurationException, IOException, SAXException {
- ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("jboss-esb.110.xml"));
+ private void executeTest(final String config) throws ConfigurationException, IOException, SAXException {
+ ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream(config));
assertTrue(configUtil.getListenerConfig("JMS-ESBListener").toString().startsWith("<listener busIdRef=\"OrderManagerService\" listenerClass=\"org.jboss.soa.esb.listeners.message.MessageAwareListener\" maxThreads=\"1\" name=\"JMS-ESBListener\" service-category=\"ABI_OrderManager\" service-description=\"ABI OrderManager Service\" service-name=\"ABI_OrderManager\">"));
assertTrue(configUtil.getGatewayConfig("FileGateway").toString().startsWith("<listener"));
assertTrue(configUtil.getActionConfig("OrderNotificationService", "print-after-transform").toString().startsWith("<action action=\"print-after-transform\""));
}
-
}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.120.xml (from rev 29539, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.120.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.120.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.120.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,142 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
+ parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost">
+
+ <jms-bus busid="OrderManagerGateway">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_gw"/>
+ </jms-bus>
+ <jms-bus busid="OrderManagerService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+ selector="service='ordermanager'"/>
+ </jms-bus>
+ <jms-bus busid="ShipperService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+ selector="service='shipper'"/>
+ </jms-bus>
+ <jms-bus busid="OrderNotificationService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+ selector="service='orderNotifier'"/>
+ </jms-bus>
+ </jms-provider>
+
+ <jbr-provider name="JBR-Http-1" protocol="http" host="localhost">
+ <jbr-bus busid="Http-1" port="8865"/>
+ </jbr-provider>
+
+ <jbr-provider name="JBR-Http-2" protocol="http" host="localhost">
+ <jbr-bus busid="Http-2" port="8866"/>
+ </jbr-provider>
+
+ <jbr-provider name="JBR-Socket" protocol="socket" host="localhost">
+ <jbr-bus busid="Socket-1" port="8988"/>
+ </jbr-provider>
+
+ <fs-provider name="File Sys Provider">
+ <fs-bus busid="notificationChannel">
+ <fs-message-filter
+ directory="/ae-demo/orders"
+ input-suffix=".in.csv"
+ work-suffix=".esbWorking"
+ post-delete="false"
+ post-directory="/ae-demo/orders"
+ post-suffix=".done.csv"
+ error-delete="false"
+ error-directory="/ae-demo/orders"
+ error-suffix=".IN_ERROR.csv"
+ />
+ </fs-bus>
+ </fs-provider>
+
+ </providers>
+
+ <services>
+
+ <service category="ABI_OrderManager" name="ABI_OrderManager" description="ABI OrderManager Service">
+
+ <listeners>
+ <jms-listener name="JMS-Gateway" busidref="OrderManagerGateway" is-gateway="true" maxThreads="1"/>
+ <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" maxThreads="1"/>
+ <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true" maxThreads="1"/>
+
+ <jms-listener name="JMS-ESBListener" busidref="OrderManagerService" maxThreads="1"/>
+ </listeners>
+ <actions>
+ <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_bpel] Message before invoking 'ABI_OrderManager' endpoint"/>
+ </action>
+ <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
+ <property name="jbossws-endpoint" value="ABI_OrderManager"/>
+ </action>
+ <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_bpel] Message after invoking 'ABI_OrderManager' endpoint"/>
+ </action>
+ </actions>
+ </service>
+
+ <service category="ABI_Shipper" name="ABI_Shipper" description="ABI Shipper Service">
+
+ <listeners>
+ <jbr-listener name="Http-Gateway" busidref="Http-2" is-gateway="true" maxThreads="1"/>
+
+ <jms-listener name="JMS-ESBListener" busidref="ShipperService" maxThreads="1"/>
+ </listeners>
+ <actions>
+ <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_bpel] Message before invoking 'ABI_Shipping' endpoint"/>
+ </action>
+ <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
+ <property name="jbossws-endpoint" value="ABI_Shipping"/>
+ </action>
+ <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_bpel] Message after invoking 'ABI_Shipping' endpoint"/>
+ </action>
+ </actions>
+ </service>
+
+ <service category="OrderNotificationService" name="OrderNotificationService"
+ description="Order Notification Service">
+ <listeners>
+ <fs-listener name="FileGateway" busidref="notificationChannel" is-gateway="true"
+ poll-frequency-seconds="10"/>
+ <jms-listener name="OrderNotificationService" busidref="OrderNotificationService"/>
+ </listeners>
+ <actions>
+ <!-- Transform the incoming CSV order approval record into a populated
+ com.activebpel.ordermanagement.SalesOrderNotification instance. -->
+ <action name="message-populator" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
+ <property name="from" value="OrderManager"/>
+ <property name="from-type" value="text/csv:orderApproval"/>
+ <property name="to" value="RetailerCallback"/>
+ <property name="to-type" value="text/xml:SendSalesOrderNotification"/>
+ </action>
+ <action name="print-after-transform" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message" value="[Quickstart_webservice_bpel] Message after transform and before SOAPClient"/>
+ </action>
+ <!-- Inject the com.activebpel.ordermanagement.SalesOrderNotification instance
+ into the SOAPClient. SOAPClient will use SOAPUI to construct a soap request
+ template and will then use OGNL to populate the values (from the Smooks
+ EXTRACTED_BEANS_HASH) into the soap message. -->
+ <action name="soapui-client" class="org.jboss.soa.esb.actions.soap.SOAPClient">
+ <property name="wsdl" value="http://localhost:18080/active-bpel/services/RetailerCallback?wsdl"/>
+ <property name="operation" value="SendSalesOrderNotification"/>
+ <property name="paramsLocation" value="EXTRACTED_BEANS_HASH"/>
+ <property name="responseXStreamConfig">
+ <alias name="customerOrderAck" class="java.lang.Boolean" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/SampleOrder.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/SampleOrder.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/SampleOrder.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,4 +1,4 @@
-<Order xmlns="http://org.jboss.soa.esb/Order" orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="2"
+<Order xmlns="http://org.jboss.soa.esb/Order" orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0"
netAmount="59.97" totalAmount="64.92" tax="4.95">
<Customer userName="user1" firstName="Harry" lastName="Fletcher" state="SD"/>
<OrderLines>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/build.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/build.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -5,21 +5,39 @@
${line.separator}
</description>
- <property name="additional.deploys" value="FunCBRRules-XPath.drl,smooks-res.xml"/>
+ <property name="additional.deploys" value="FunCBRRules-XPath.drl,regex-rules.properties,smooks-res.xml"/>
<property name="deploy.exploded" value="true"/>
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
- <target name="runtest" depends="compile"
- description="willl receive JMS message to tigger the actions in the ESB">
- <echo>Runs Test JMS Sender</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.funcbr.test.SendJMSMessage" failonerror="true">
- <classpath refid="exec-classpath" />
- </java>
- </target>
-
+ <target name="runtest" depends="runtestXPath" description="Send JMS message to tigger the actions in the ESB" />
+
+ <target name="runtestXPath" depends="compile" description="Send JMS message to tigger the actions in the ESB">
+ <echo>Runs XPath Example</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.funcbr.test.SendJMSMessage" failonerror="true">
+ <classpath refid="exec-classpath" />
+ <arg value="quickstart_Fun_XPathCBR_Request_GW" />
+ </java>
+ </target>
+
+ <target name="runtestRegex" depends="compile" description="Send JMS message to tigger the actions in the ESB">
+ <echo>Runs Regex Example</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.funcbr.test.SendJMSMessage" failonerror="true">
+ <classpath refid="exec-classpath" />
+ <arg value="quickstart_Fun_RegexCBR_Request_GW" />
+ </java>
+ </target>
+
+ <target name="runtestDrools" depends="compile" description="Send JMS message to tigger the actions in the ESB">
+ <echo>Runs Drools Example</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.funcbr.test.SendJMSMessage" failonerror="true">
+ <classpath refid="exec-classpath" />
+ <arg value="quickstart_Fun_DroolsCBR_Request_GW" />
+ </java>
+ </target>
+
<target name="receiveBlue" depends="compile"
description="willl receive a message from the quickstart_FunCBR_Green_Blue queue">
<echo>Runs Test JMS Receiver</echo>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/deployment.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/deployment.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/deployment.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -2,8 +2,9 @@
<jbossesb-deployment>
<depends>jboss.esb:deployment=smooks.esb</depends>
<depends>jboss.esb:deployment=jbrules.esb</depends>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_Request_GW</depends>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_Request_ESB</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_XPathCBR_Request_GW</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_RegexCBR_Request_GW</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_DroolsCBR_Request_GW</depends>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_ToBlue</depends>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_Blue_Alert</depends>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_ToRed</depends>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -3,18 +3,24 @@
<!-- Fun CBR Demo -->
<mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_Request_GW"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_XPathCBR_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>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_RegexCBR_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>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_DroolsCBR_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>
<mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_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_Fun_CBR_ToBlue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbmq-queue-service.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jbmq-queue-service.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -3,18 +3,24 @@
<!-- Fun CBR Demo -->
<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_CBR_Request_GW">
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_Fun_XPathCBR_Request_GW">
<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_Fun_RegexCBR_Request_GW">
+ <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_Fun_DroolsCBR_Request_GW">
+ <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_Fun_CBR_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_Fun_CBR_ToBlue">
<depends optional-attribute-name="DestinationManager">
jboss.mq:service=DestinationManager
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jboss-esb.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/jboss-esb.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -3,12 +3,15 @@
<providers>
<jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
- <jms-bus busid="quickstartGwChannel">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_GW"/>
+ <jms-bus busid="xpathQuickstartGwChannel">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_XPathCBR_Request_GW"/>
</jms-bus>
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_ESB"/>
+ <jms-bus busid="regexQuickstartGwChannel">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_RegexCBR_Request_GW"/>
</jms-bus>
+ <jms-bus busid="droolsQuickstartGwChannel">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_DroolsCBR_Request_GW"/>
+ </jms-bus>
<jms-bus busid="Fun_CBR_ToBlue">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToBlue"/>
</jms-bus>
@@ -25,35 +28,66 @@
</providers>
<services>
- <!-- ESB CBR Service -->
- <service
- category="Fun_CBRServices_ESB"
- name="FunCBRService_ESB"
- description="ESB Listener - for the native clients">
- <listeners>
- <!-- Gateway -->
- <jms-listener name="TheGateway"
- busidref="quickstartGwChannel"
- is-gateway="true"
- />
- <jms-listener name="XPathContentBasedRouter"
- busidref="quickstartEsbChannel">
- </jms-listener>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
- <property name="ruleSet" value="FunCBRRules-XPath.drl"/>
- <property name="ruleLanguage" value="XPathLanguage.dsl"/>
- <property name="ruleReload" value="true"/>
- <property name="destinations">
- <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
- <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
- <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
- </property>
- </action>
- </actions>
- </service>
-
+ <!-- ESB XPath CBR Service -->
+ <service category="Fun_CBRServices_ESB" name="XPath_FunCBRService_ESB" description="ESB Listener - for the native clients" invmScope="GLOBAL">
+ <listeners>
+ <!-- Gateway -->
+ <jms-listener name="TheGateway" busidref="xpathQuickstartGwChannel" is-gateway="true" />
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
+ <property name="cbrAlias" value="XPath"/>
+ <property name="destinations">
+ <namespace prefix="ord" uri="http://org.jboss.soa.esb/Order" />
+
+ <route-to service-category="BlueTeam" service-name="GoBlue" expression="/ord:Order[@statusCode='0']" />
+ <route-to service-category="RedTeam" service-name="GoRed" expression="/ord:Order[@statusCode='1']" />
+ <route-to service-category="GreenTeam" service-name="GoGreen" expression="/ord:Order[@statusCode='2']" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <!-- ESB Regex CBR Service -->
+ <service category="Fun_CBRServices_ESB" name="Regex_FunCBRService_ESB" description="ESB Listener - for the native clients" invmScope="GLOBAL">
+ <listeners>
+ <!-- Gateway -->
+ <jms-listener name="TheGateway" busidref="regexQuickstartGwChannel" is-gateway="true" />
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
+ <property name="cbrAlias" value="Regex"/>
+ <property name="ruleSet" value="/regex-rules.properties"/>
+ <property name="ruleReload" value="true"/>
+ <property name="destinations">
+ <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
+ <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
+ <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <!-- ESB Drools CBR Service -->
+ <service category="Fun_CBRServices_ESB" name="Drools_FunCBRService_ESB" description="ESB Listener - for the native clients" invmScope="GLOBAL">
+ <listeners>
+ <!-- Gateway -->
+ <jms-listener name="TheGateway" busidref="droolsQuickstartGwChannel" is-gateway="true" />
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
+ <property name="ruleSet" value="FunCBRRules-XPath.drl"/>
+ <property name="ruleLanguage" value="XPathLanguage.dsl"/>
+ <property name="ruleReload" value="true"/>
+ <property name="destinations">
+ <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
+ <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
+ <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
<!-- Blue -->
<service
category="BlueTeam"
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/readme.txt
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/readme.txt 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/readme.txt 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,13 +1,14 @@
Overview:
=========
This example has three "teams" of order processors. All new orders that flow
- into the system are evaluated via the rules engine. These routing rules will
- determine which team receives the order for actually processing. In the case
- of the green team, the order is first transformed to a different format prior
- to routing.
- This quickstart also show how namepaces can be used with xpath expressions.
-
+ into the system can be evaluated via the XPath or Drools rule processors.
+ These routing rules will determine which team receives the order for actually
+ processing. In the case of the green team, the order is first transformed to a
+ different format prior to routing.
+
+ This quickstart also show how namepaces can be used with xpath expressions.
+
Running this quickstart:
========================
Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
@@ -22,7 +23,8 @@
'ant receiveRed'.
4. In a command terminal window in this folder ("Window4"), type
'ant receiveGreen'.
- 5. In "Window1", type 'ant runtest'.
+ 5. In "Window1", type 'ant runtestXPath' (or 'ant runtestDrools'). See the build.xml
+ and jboss-esb.xml files.
6. Switch back to the Application Server console, "Window2", "Window3" and
"Window4" to see the output from the ESB
7. When finished, interrupt the receivers using Ctrl-C.
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/regex-rules.properties (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/regex-rules.properties)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/regex-rules.properties (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/regex-rules.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,3 @@
+blue=.* statusCode="0".*
+red=.* statusCode="1".*
+green=.* statusCode="2".*
\ No newline at end of file
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/samples/quickstart/funcbr/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/samples/quickstart/funcbr/test/SendJMSMessage.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/samples/quickstart/funcbr/test/SendJMSMessage.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -45,7 +45,7 @@
Queue que;
- public void setupConnection() throws JMSException, NamingException
+ public void setupConnection(String queueName) throws JMSException, NamingException
{
Properties properties1 = new Properties();
properties1.put(Context.INITIAL_CONTEXT_FACTORY,
@@ -58,7 +58,7 @@
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_Fun_CBR_Request_GW");
+ que = (Queue) iniCtx.lookup("queue/" + queueName);
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
System.out.println("Connection Started");
@@ -110,7 +110,7 @@
public static void main(String args[]) throws Exception
{
SendJMSMessage sm = new SendJMSMessage();
- sm.setupConnection();
+ sm.setupConnection(args[0]);
String fileContent = sm.readAsciiFile("SampleOrder.xml");
System.out.println("---------------------------------------------");
System.out.println(fileContent);
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/build.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/build.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -14,7 +14,15 @@
<echo>Http Client</echo>
<java fork="yes" classname="org.jboss.soa.esb.actions.routing.http.HttpRouter" failonerror="true">
<arg value="endpointUrl=http://localhost:8080/Quickstart_http_gateway/http/soap/"/>
+
+ <!-- The EBWS is secured with container level security -->
+ <arg value="configurators=HttpProtocol,AuthBASIC"/>
<arg value="method=POST"/>
+ <arg value="auth-username=kermit"/>
+ <arg value="auth-password=thefrog"/>
+ <arg value="authscope-host=localhost"/>
+ <arg value="authscope-port=8080"/>
+ <!-- The actual payload to POST -->
<arg value="payload=soap-login.xml"/>
<classpath refid="exec-classpath"/>
</java>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/jboss-esb.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/jboss-esb.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,7 +1,11 @@
<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
- parameterReloadSecs="5">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+ <globals>
+ <!-- Security setting for all http-providers and all EBWSs in this jboss-esb.xml file.-->
+ <war-security method="BASIC" domain="JBossWS" /> <!-- uname: "kermit" pw: "thefrog" -->
+ </globals>
+
<providers>
<http-provider name="http">
<http-bus busid="secureFriends">
@@ -13,11 +17,10 @@
</allowed-roles>
<protected-methods>
<method name="GET" />
+ <method name="POST" />
</protected-methods>
</http-bus>
- <auth method="BASIC" domain="JBossWS" /> <!-- uname: "kermit" pw: "thefrog" -->
-
<!-- Global exception mappings file... -->
<exception mappingsFile="/http-exception-mappings.properties" />
</http-provider>
@@ -26,7 +29,6 @@
<services>
<service category="Sales" name="List" description="" invmScope="GLOBAL">
- <security moduleName="JBossWS" />
<listeners>
<!-- Receives: http://<host>:<port>/Quickstart_http_gateway/http/sales/* but will be forced to
authenticate because the "sales" bus has basic auth configured (above)... -->
@@ -38,11 +40,12 @@
</service>
<service category="Soap" name="List" description="" invmScope="GLOBAL">
- <security moduleName="JBossWS" />
<listeners>
- <!-- Receives: http://<host>:<port>/Quickstart_http_gateway/http/soap/*
- Execute "ant soap" on command line.... -->
- <http-gateway name="soap" urlPattern="soap/*">
+ <!--
+ Receives: http://<host>:<port>/Quickstart_http_gateway/http/soap/*
+ Execute "ant soap" on command line....
+ -->
+ <http-gateway name="soap" busidref="secureFriends" urlPattern="soap/*">
<exception>
<mapping class="org.jboss.soa.esb.services.security.SecurityServiceException" status="401" />
</exception>
@@ -106,4 +109,4 @@
</services>
-</jbossesb>
\ No newline at end of file
+</jbossesb>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/soap-login.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/soap-login.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/http_gateway/soap-login.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -3,15 +3,9 @@
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
- <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
- <wsse:UsernameToken>
- <wsse:Username>kermit</wsse:Username>
- <wsse:Password>thefrog</wsse:Password>
- </wsse:UsernameToken>
- </wsse:Security>
</soap:Header>
<soap:Body>
</soap:Body>
-</soap:Envelope>
\ No newline at end of file
+</soap:Envelope>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/META-INF (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/META-INF)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts/test (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build/classes/org/jboss/soa/esb/samples/quickstart/messagealerts/test)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,31 +0,0 @@
-<project name="Quickstart_messagealerts" default="run" basedir=".">
-
- <description>
- ${ant.project.name}
- ${line.separator}
- </description>
-
- <!-- Import the base Ant build script... -->
- <import file="../conf/base-build.xml"/>
-
- <target name="runtest" depends="compile"
- description="sends a JMS message to queue/quickstart_messagealerts_Request_gw">
- <echo>Runs Test JMS Sender</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.messagealerts.test.SendJMSMessage" failonerror="true">
- <arg value="Message Alerts"/>
- <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.messagealerts.test.SendEsbMessage" failonerror="true">
- <arg value="FirstServiceESB"/> <!-- service category -->
- <arg value="SimpleListener"/> <!-- service name -->
- <arg value="Message Alerts - Straight to ESB listener - no Gateway"/> <!-- Message text -->
- <classpath refid="exec-classpath"/>
- </java>
- </target>
-
-</project>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/build.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/build.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,31 @@
+<project name="Quickstart_messagealerts" default="run" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <!-- Import the base Ant build script... -->
+ <import file="../conf/base-build.xml"/>
+
+ <target name="runtest" depends="compile"
+ description="sends a JMS message to queue/quickstart_messagealerts_Request_gw">
+ <echo>Runs Test JMS Sender</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.messagealerts.test.SendJMSMessage" failonerror="true">
+ <arg value="Message Alerts"/>
+ <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.messagealerts.test.SendEsbMessage" failonerror="true">
+ <arg value="FirstServiceESB"/> <!-- service category -->
+ <arg value="SimpleListener"/> <!-- service name -->
+ <arg value="Message Alerts - Straight to ESB listener - no Gateway"/> <!-- Message text -->
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+</project>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/deployment.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,4 +0,0 @@
-<jbossesb-deployment>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagealerts_Request_esb</depends>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagealerts_Request_gw</depends>
-</jbossesb-deployment>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/deployment.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagealerts_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagealerts_Request_gw</depends>
+</jbossesb-deployment>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jbm-queue-service.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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_messagealerts_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_messagealerts_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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbm-queue-service.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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_messagealerts_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_messagealerts_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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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_messagealerts_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_messagealerts_Request_gw">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
- </mbean>
-</server>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbmq-queue-service.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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_messagealerts_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_messagealerts_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+</server>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jboss-esb.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,58 +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.2.0.xsd" parameterReloadSecs="5">
-
- <providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
- <jms-bus busid="quickstartGwChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_messagealerts_Request_gw"
- />
- </jms-bus>
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/quickstart_messagealerts_Request_esb"
- />
- </jms-bus>
-
- </jms-provider>
- </providers>
-
- <services>
- <service
- category="FirstServiceESB"
- name="SimpleListener"
- description="Hello World"
- alertTimeThreshold="420"
- alertLengthThreshold="10"
- >
- <listeners>
- <jms-listener name="JMS-Gateway"
- busidref="quickstartGwChannel"
- is-gateway="true"
- />
- <jms-listener name="helloWorld"
- busidref="quickstartEsbChannel"
- />
- </listeners>
- <actions mep="OneWay">
- <action name="action1"
- class="org.jboss.soa.esb.samples.quickstart.messagealerts.MyJMSListenerAction"
- process="displayMessage"
- />
- <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="printfull" value="false"/>
- </action>
- <action name="action3" class="org.jboss.soa.esb.samples.quickstart.messagealerts.DelayAction"
- process="delayMessage"
- alertTimeThreshold="30"
- alertLengthThreshold="50">
- </action>
- <!-- The next action is for Continuous Integration testing -->
- <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
- </actions>
- </service>
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jboss-esb.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jboss-esb.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,58 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_messagealerts_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_messagealerts_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="FirstServiceESB"
+ name="SimpleListener"
+ description="Hello World"
+ alertTimeThreshold="420"
+ alertLengthThreshold="10"
+ >
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ is-gateway="true"
+ />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="action1"
+ class="org.jboss.soa.esb.samples.quickstart.messagealerts.MyJMSListenerAction"
+ process="displayMessage"
+ />
+ <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="false"/>
+ </action>
+ <action name="action3" class="org.jboss.soa.esb.samples.quickstart.messagealerts.DelayAction"
+ process="delayMessage"
+ alertTimeThreshold="30"
+ alertLengthThreshold="50">
+ </action>
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jbossesb-properties.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,86 +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"/>
- <property name="jboss.esb.invm.scope.default" value="NONE"/>
- </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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jbossesb-properties.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,86 @@
+<?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"/>
+ <property name="jboss.esb.invm.scope.default" value="NONE"/>
+ </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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jndi.properties 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/jndi.properties)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/jndi.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/juddi.properties 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/juddi.properties)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/juddi.properties 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/lib (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/lib)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/listener.log
===================================================================
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/listener.log (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/listener.log)
===================================================================
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/log4j.xml 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/log4j.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/log4j.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/readme.txt 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,22 +0,0 @@
-Overview:
-=========
- The purpose of the messagealert quickstart sample is to show how the ESB is
- can set off warnings when a message exceeds size or processing time limits.
- The ESB can monitor either services or actions for these message attributes.
-
- The threshold can be set on the jboss-esb.xml and can be changed later
- within the jmx-console.
-
-
-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:
-===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
- 2. Open another command terminal window in this folder ("Window2"), type
- 'ant runtest'.
- 3. Switch back to Application Server console to see the output from the ESB
- 4. In this folder ("Window1"), type 'ant undeploy'.
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/readme.txt)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/readme.txt 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,22 @@
+Overview:
+=========
+ The purpose of the messagealert quickstart sample is to show how the ESB is
+ can set off warnings when a message exceeds size or processing time limits.
+ The ESB can monitor either services or actions for these message attributes.
+
+ The threshold can be set on the jboss-esb.xml and can be changed later
+ within the jmx-console.
+
+
+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:
+===========================
+ 1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+ 2. Open another command terminal window in this folder ("Window2"), type
+ 'ant runtest'.
+ 3. Switch back to Application Server console to see the output from the ESB
+ 4. In this folder ("Window1"), type 'ant undeploy'.
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart)
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,39 +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.messagealerts;
-
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class DelayAction extends AbstractActionLifecycle
-{
-
- protected ConfigTree _config;
-
- public DelayAction(ConfigTree config) { _config = config; }
-
- public Message delayMessage(Message message) throws Exception {
- Thread.sleep(3000);
- return message;
-
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/DelayAction.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,39 @@
+/*
+ * 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.messagealerts;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class DelayAction extends AbstractActionLifecycle
+{
+
+ protected ConfigTree _config;
+
+ public DelayAction(ConfigTree config) { _config = config; }
+
+ public Message delayMessage(Message message) throws Exception {
+ Thread.sleep(3000);
+ return message;
+
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.messagealerts;
-
-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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/MyJMSListenerAction.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.messagealerts;
+
+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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test)
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.messagealerts.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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendEsbMessage.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.messagealerts.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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java 2009-10-06 15:32:25 UTC (rev 29539)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.messagealerts.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:1099");
- InitialContext iniCtx = new InitialContext(properties1);
-
- Object tmp = iniCtx.lookup("ConnectionFactory");
- QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
- conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_messagealerts_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/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java (from rev 29539, labs/jbossesb/trunk/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/messagealerts/src/org/jboss/soa/esb/samples/quickstart/messagealerts/test/SendJMSMessage.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -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.messagealerts.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:1099");
+ InitialContext iniCtx = new InitialContext(properties1);
+
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup("queue/quickstart_messagealerts_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/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/error-soap-message.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/error-soap-message.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/error-soap-message.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -6,6 +6,15 @@
xmlns:cust="http://www.jboss.org/custom-request"
xmlns:sub="http://www.jboss.org/custom-subtype"
xmlns:t="http://www.jboss.org/type2">
+ <soap:Header>
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
+ <wsse:UsernameToken>
+ <wsse:Username>kermit</wsse:Username>
+ <wsse:Password>thefrog</wsse:Password>
+ </wsse:UsernameToken>
+ </wsse:Security>
+ </soap:Header>
+
<soap:Body>
<say:sayHi>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -19,6 +19,7 @@
category="ESBServiceSample"
name="HelloWorldPubService"
description="Hello world ESB Service">
+ <security moduleName="JBossWS"/>
<listeners>
<jms-listener name="helloWorld"
busidref="quickstartEsbChannel"
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml 2009-10-08 08:08:59 UTC (rev 29552)
@@ -6,6 +6,15 @@
xmlns:cust="http://www.jboss.org/custom-request"
xmlns:sub="http://www.jboss.org/custom-subtype"
xmlns:t="http://www.jboss.org/type2">
+ <soap:Header>
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
+ <wsse:UsernameToken>
+ <wsse:Username>kermit</wsse:Username>
+ <wsse:Password>thefrog</wsse:Password>
+ </wsse:UsernameToken>
+ </wsse:Security>
+ </soap:Header>
+
<soap:Body>
<say:sayHi>
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,73 +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.actions;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-/**
- * ContentBasedRouter implements the Content Based Routing pattern.
- * It routes a message to one or more destination services based on the message content
- * and the rule set it is evaluating it against.
- * <p/>
- * For configuration details see
- *
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @author kstam at jboss.com
- *
- * @see ContentBasedWiretap
- *
- */
-public class ContentBasedRouter extends ContentBasedWiretap
-{
- public ContentBasedRouter(ConfigTree config) throws ConfigurationException, RegistryException, MessageRouterException
- {
- super(config) ;
- }
- /** Route the message to one or more destinations, using the ContentBasedRouter to figure out
- * to which destinations it is going to be routed too.
- *
- * @param message
- * @return Message
- * @throws ActionProcessingException
- */
- public Message process(Message message) throws ActionProcessingException
- {
- super.process(message) ;
- return null ;
- }
-
- /**
- * @deprecated no longer needed, leaving this in here for backwards compatibility,
- * use the default "process".
- * */
- public Message split(Message message) throws ActionProcessingException
- {
- _logger.warn("Depricated, please use the default 'process' method in your configuration");
- return process(message);
- }
-
- protected static Logger _logger = Logger.getLogger(ContentBasedRouter.class);
-}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -1,300 +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.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.services.rules.RuleInfoBuilder;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.Service;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.client.MessageMulticaster;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.mapping.ObjectMapper;
-import org.jboss.soa.esb.message.mapping.ObjectMappingException;
-import org.jboss.soa.esb.services.registry.Registry;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.registry.RegistryFactory;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
-
-/**
- * ContentBasedWirtap implements the WireTap pattern.
- * The WireTap is an Enterprise Integration Pattern (EIP) where a copy of the message is
- * sent to a control channel.
- * <br>
- * The CBRWT is identical in functionality to the ContentBasedRouter,
- * however it does not terminate the pipeline which makes it suitable to be used as a WireTap.
- * <p/>
- *
- * Configuration Example:
- *<pre>{@code
- *
- *<action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="OrderDiscountBasedOnCustomerHistory">
- * <property name="ruleSet" value="OrderDiscountOnMultipleOrders.drl" />
- * <property name="ruleReload" value="false" />
- * <property name="stateful" value="true" />
- * <property name="object-paths">
- * <object-path esb="body.TheOrderHeader" />
- * <object-path esb="body.TheCustomer" />
- * </property>
- * <property name="destinations">
- * <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
- * <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
- * <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
- * </property>
- *</action>
- *
- * }</pre>
- * Property description:
- * <lu>
- * <li> <i>class</i> action class, one of : org.jboss.soa.esb.actions.ContentBasedRouter, org.jboss.soa.esb.actions.ContentBasedWireTap,<br>
- * or org.jboss.soa.esb.actions.MessageFilter
- * <li> <i>ruleSet</i> Name of the filename containing the Drools ruleSet.
- * <li> <i>ruleLanguage</i> Optional reference to a file containing the definition of a Domain Specific Language to be used for evaluating
- * the rule set.
- * <li> <i>ruleReload</i> Optional property which can be to true to enable 'hot' redeployment of rule sets.
- * <li> <i>stateful</i> Optional property which tells the RuleService to use a stateful session where facts will be
- * remembered between invokations.
- * <li> <i>object-paths</i> Optional property to pass Message objects into Rule Services WorkingMemory.
- * <li> <i>destinations</i> A set of route-to properties each containing the logical name
- * of the destination along with the Service category and name
- * as referenced in the registry.<br> The logical name is the name
- * which should be used in the rule set.
- * </lu>
- * </br>
- *
- *
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @author kstam at jboss.com
- * @author kevin.conner at jboss.com
- * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
- */
-public class ContentBasedWiretap extends AbstractActionPipelineProcessor {
-
- public static final String ROUTE_TO_TAG = "route-to";
-
- public static final String OBJECT_PATH_TAG = "object-path";
-
- public static final String OBJECT_PATH = "esb";
-
- public static final String ENTRY_POINT = "entry-point";
-
- public static final String DEFAULT_CBR_CLASS = "org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter";
-
- ServiceInvoker dlQueueInvoker;
-
- public ContentBasedWiretap(ConfigTree config)
- throws ConfigurationException, RegistryException,
- MessageRouterException {
- _config = config;
- checkMyParms();
- _registry = RegistryFactory.getRegistry();
- _cbr = ContentBasedRouterFactory.getRouter(_cbrClass);
- _cbr.setConfigTree(config);
- _mapper = new ObjectMapper(config);
- try {
- dlQueueInvoker = new ServiceInvoker(ServiceInvoker.INTERNAL_SERVICE_CATEGORY, ServiceInvoker.DEAD_LETTER_SERVICE_NAME);
- } catch (MessageDeliverException e) {
- throw new MessageRouterException(e);
- }
- }
-
- public void initialise() { }
-
- /**
- * Router the message to one or more destinations, using the
- * ContentBasedRouter to figure out to which destinations it is going to
- * be routed too.
- *
- * @param message
- * @return Message
- * @throws ActionProcessingException
- */
- public Message process(Message message) throws ActionProcessingException
- {
- try {
- List<Service> outgoingDestinations = executeRules(message);
- if (outgoingDestinations.size()==0) {
- String error = "No rule destination(s) "+ _destinations.keySet() + " were matched, "
- + ". Please fix your configuration and/or routing rules.";
- _logger.error(error);
- try {
- _logger.debug("Sending message to the DeadLetterService");
- dlQueueInvoker.deliverAsync(message);
- throw new ActionProcessingException(error);
- } catch (MessageDeliverException e) {
- throw new MessageRouterException("Failed to deliver message to Dead Letter Channel.", e);
- }
- } else {
- routeMessage(message, outgoingDestinations);
- }
- } catch (MessageRouterException e) {
- throw new ActionProcessingException(e);
- }
- return message;
- }
-
- protected List<Service> executeRules(Message message)
- throws MessageRouterException
- {
- List<Service> outgoingDestinations = new ArrayList<Service>();
- try {
- List<Object> objectList = _mapper.createObjectList(message,
- _messagePathList);
- List<String> destinations = _cbr.route(_ruleSet, _ruleLanguage,
- _ruleReload, message, objectList);
- for (String destination : destinations) {
- if (_destinations.containsKey(destination)) {
- outgoingDestinations.add(_destinations.get(destination));
- } else {
- throw new MessageRouterException("Destination " + destination + " does not exist your configuration");
- }
- }
- } catch (ObjectMappingException ome) {
- throw new MessageRouterException(ome);
- }
- return outgoingDestinations;
- }
-
- protected final void routeMessage(Message message, List<Service> outgoingDestinations)
- throws MessageRouterException
- {
- try {
- messageMulticaster.sendToSubset(message, outgoingDestinations);
- } catch (RegistryException e) {
- throw new MessageRouterException(e);
- } catch (MessageDeliverException e) {
- throw new MessageRouterException(e);
- }
- }
-
- /**
- * Reading the piece of configTree specific to the CBR, and setting the
- * configuration.
- *
- * @throws ConfigurationException
- */
- protected void checkMyParms() throws ConfigurationException {
- _ruleSet = _config.getAttribute(ListenerTagNames.RULE_SET_TAG);
- _ruleLanguage = _config.getAttribute(ListenerTagNames.RULE_LANGUAGE_TAG);
- String ruleReload = _config.getAttribute(ListenerTagNames.RULE_RELOAD_TAG);
- if (ruleReload != null && "true".equals(ruleReload)) {
- _ruleReload = true;
- }
-
- if (_config.getAttribute(ListenerTagNames.CBR_CLASS) != null) {
- _cbrClass = _config.getAttribute(ListenerTagNames.CBR_CLASS);
- } else {
- _cbrClass = DEFAULT_CBR_CLASS;
- }
-
- _destinations = new HashMap<String, Service>();
- ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
- if (destList != null) {
- for (ConfigTree curr : destList) {
- try {
- String key = curr
- .getRequiredAttribute(ListenerTagNames.DESTINATION_NAME_TAG);
- String category = curr.getAttribute(
- ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
- String name = curr
- .getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
- Service service = new Service(category, name);
- _destinations.put(key, service);
- messageMulticaster.addRecipient(service);
- }
- catch (Exception e) {
- throw new ConfigurationException(
- "Problems with destination list", e);
- }
- }
- }
- _messagePathList = new ArrayList<String>();
- entryPointMap = new HashMap<String, List<String>>();
- ConfigTree[] objectList = _config.getChildren(OBJECT_PATH_TAG);
- if (objectList != null) {
- for (ConfigTree curr : objectList) {
- try {
- final String objectPath = curr.getRequiredAttribute(OBJECT_PATH);
- final String entryPoint = curr.getAttribute(ENTRY_POINT);
- if (entryPoint != null)
- {
- List<String> list = entryPointMap.get(entryPoint);
- if (list == null)
- {
- list = new ArrayList<String>();
- // Add the list to the entrypoint map indexed by the entry-point name.
- entryPointMap.put(entryPoint, list);
- }
- // Add the object path to the entry-point list.
- list.add(objectPath);
- }
- else
- {
- _messagePathList.add(objectPath);
- }
- }
- catch (Exception e) {
- throw new ConfigurationException( "Problems with object path list", e);
- }
- }
- }
-
-
- }
-
- protected ConfigTree _config;
-
- protected Map<String, Service> _destinations;
-
- protected MessageMulticaster messageMulticaster = new MessageMulticaster();
-
- protected String _cbrClass;
-
- protected String _ruleSet;
-
- protected String _ruleLanguage;
-
- protected boolean _ruleReload;
-
- protected List<String> _messagePathList;
-
- protected Map<String, List<String>> entryPointMap;
-
- protected ObjectMapper _mapper;
-
- protected Registry _registry;
-
- protected org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter _cbr;
-
- protected static Logger _logger = Logger
- .getLogger(ContentBasedWiretap.class);
-
-}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AuthBASICWsdlContractPublisher.java (from rev 29539, labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AuthBASICWsdlContractPublisher.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AuthBASICWsdlContractPublisher.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AuthBASICWsdlContractPublisher.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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-2008, JBoss Inc.
+ */
+package org.jboss.soa.esb.actions.soap;
+
+import java.util.Properties;
+
+/**
+ * AuthBASIC WSDL contract publisher.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class AuthBASICWsdlContractPublisher extends WsdlContractPublisher {
+
+ public Properties getHttpClientProperties() {
+ Properties httpClientProperties = (Properties) getActionProperties().clone();
+ String configurators = httpClientProperties.getProperty("configurators");
+
+ // Handle potential Http BASIC Auth....
+ if(httpClientProperties.containsKey("username")) {
+ httpClientProperties.setProperty("auth-username", httpClientProperties.getProperty("username"));
+ if(httpClientProperties.containsKey("password")) {
+ httpClientProperties.setProperty("auth-password", httpClientProperties.getProperty("password"));
+ }
+
+ // Only auto-configure the configurators if they're not already configured.
+ // If they're configured in any way at all, we don't modify that. If they're
+ // not configured and a username/password is supplied, we assume BASIC Auth...
+ if(configurators == null) {
+ configurators = "AuthBASIC";
+ }
+ }
+
+ if(configurators != null) {
+ httpClientProperties.setProperty("configurators", configurators);
+ }
+
+ return httpClientProperties;
+ }
+
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -20,10 +20,8 @@
package org.jboss.soa.esb.actions.soap.proxy;
import java.io.ByteArrayInputStream;
-import java.io.File;
import java.io.IOException;
import java.io.StringReader;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -47,7 +45,6 @@
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -68,7 +65,15 @@
* <ol>
* <li><b>wsdl</b> (required): The original wsdl {@link URL url} whose WS endpoint will get re-written and exposed as new wsdl from
* the ESB. Depending upon the <definitions><service><port><soap:address location attribute's protocol (for
- * example "http"), a protocol-specific {@link SOAPProxyTransport} implementation is used.</li>
+ * example "http"), a protocol-specific {@link SOAPProxyTransport} implementation is used. The value can reference a location based on
+ * five different schemes: http, https, file, classpath or internal (JBossWS). Here are some examples:<br/>
+ * <ul>
+ * <li>http://localhost:8080/Quickstart_webservice_proxy_basic/HelloWorldWS?wsdl</li>
+ * <li>https://localhost:8443/webservice_proxy_security/HelloWorldWS?wsdl</li>
+ * <li>file:///tmp/HelloWorldWS.wsdl</li>
+ * <li>classpath://META-INF/HelloWorldWS.wsdl</li>
+ * <li>internal://jboss.ws:context=Quickstart_webservice_proxy_basic_ws,endpoint=HelloWorldWS</li>
+ * </ul></li>
* <li><b>wsdlTransform</b> (optional): A <smooks-resource-list> xml config file allowing for flexible wsdl transformation.</li>
* <li><b>*</b> (optional): Any of the HttpRouter properties can be applied, if the wsdl specifies an http transport.</li>
* <li><b>endpointUrl</b> (optional): Example of an HttpRouter property, but useful when domain name matching is important for SSL certs.</li>
@@ -111,21 +116,15 @@
public SOAPProxy(ConfigTree config) throws ConfigurationException
{
payloadProxy = new MessagePayloadProxy(config);
- WSDLDefinitionsFactory wsdl_def_fact = WSDLDefinitionsFactory.newInstance();
- File wsdl_file = SOAPProxyWsdlContractPublisher.createLocalWsdlFile(config);
WSDLDefinitions wsdl_def;
try
{
- wsdl_def = wsdl_def_fact.parse( wsdl_file.toURL() );
+ wsdl_def = SOAPProxyWsdlLoader.loadDefinitions(config);
}
- catch (MalformedURLException mue)
+ catch (IOException ioe)
{
- throw new ConfigurationException(mue);
+ throw new ConfigurationException(ioe);
}
- finally
- {
- wsdl_file.delete();
- }
for ( WSDLBinding wsdl_bind : wsdl_def.getBindings() )
{
for ( WSDLBindingOperation wsdl_bind_oper : wsdl_bind.getOperations() )
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlContractPublisher.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlContractPublisher.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -19,74 +19,46 @@
*/
package org.jboss.soa.esb.actions.soap.proxy;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
+import java.io.BufferedInputStream;
import java.io.IOException;
-import java.io.Writer;
+import java.io.InputStream;
import java.util.Properties;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.soap.wise.WiseWsdlContractPublisher;
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.actions.soap.AuthBASICWsdlContractPublisher;
import org.jboss.soa.esb.helpers.ConfigTree;
/**
- * Provides convenience method to load the remote wsdl respecting all configured HttpClient properties.
+ * SOAPProxy wsdl contract publisher.
*
* @author dward at jboss.org
*/
-public class SOAPProxyWsdlContractPublisher extends WiseWsdlContractPublisher
+public class SOAPProxyWsdlContractPublisher extends AuthBASICWsdlContractPublisher
{
- static File createLocalWsdlFile(ConfigTree config) throws ConfigurationException
+ @Override
+ public String getWsdl(String wsdlAddress) throws IOException
{
- File wsdl_file;
- Writer writer = null;
- try
+ ConfigTree config = new ConfigTree("config");
+ Properties props = getActionProperties();
+ for ( Object key : props.keySet() )
{
- WsdlLoader loader = new WsdlLoader(config);
- String wsdl_attr = config.getRequiredAttribute("wsdl");
- String wsdl_data = loader.getWsdl(wsdl_attr);
- wsdl_file = File.createTempFile(SOAPProxyWsdlContractPublisher.class.getName() + "-", ".wsdl");
- writer = new BufferedWriter( new FileWriter(wsdl_file) );
- writer.write(wsdl_data);
- writer.flush();
+ String name = (String)key;
+ String value = props.getProperty(name);
+ config.setAttribute(name, value);
}
- catch (IOException ioe)
+ SOAPProxyWsdlLoader loader = SOAPProxyWsdlLoader.newLoader(config);
+ InputStream is = null;
+ try
{
- throw new ConfigurationException(ioe);
+ is = new BufferedInputStream( loader.getURL().openStream() );
+ return StreamUtils.readStreamString(is, "UTF-8");
}
finally
{
- try { if (writer != null) writer.close(); } catch (Throwable t) {}
+ try { if (is != null) is.close(); } catch (Throwable t) {}
+ loader.cleanup();
}
- return wsdl_file;
}
- private static class WsdlLoader extends SOAPProxyWsdlContractPublisher
- {
-
- private ConfigTree config;
-
- private WsdlLoader(ConfigTree config)
- {
- this.config = config;
- }
-
- public Properties getActionProperties()
- {
- Properties props = new Properties();
- for ( String key : config.getAttributeNames() )
- {
- String value = config.getAttribute(key);
- if (value != null)
- {
- props.setProperty(key, value);
- }
- }
- return props;
- }
-
- }
-
}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlLoader.java (from rev 29539, labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlLoader.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlLoader.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxyWsdlLoader.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -0,0 +1,258 @@
+/*
+ * 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-2009
+ */
+package org.jboss.soa.esb.actions.soap.proxy;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.management.ObjectName;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.soap.AuthBASICWsdlContractPublisher;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+
+/**
+ * SOAPProxy WSDL loader.
+ *
+ * @author dward at jboss.org
+ */
+public abstract class SOAPProxyWsdlLoader
+{
+
+ public abstract URL getURL() throws MalformedURLException;
+
+ public void cleanup() {}
+
+ public File createTempFile() throws IOException
+ {
+ return File.createTempFile(SOAPProxyWsdlLoader.class.getName() + "-", ".wsdl");
+ }
+
+ public static WSDLDefinitions loadDefinitions(ConfigTree config) throws IOException
+ {
+ SOAPProxyWsdlLoader loader = newLoader(config);
+ WSDLDefinitions definitions;
+ try
+ {
+ URL url = loader.getURL();
+ definitions = WSDLDefinitionsFactory.newInstance().parse(url);
+ }
+ finally
+ {
+ loader.cleanup();
+ }
+ return definitions;
+ }
+
+ public static SOAPProxyWsdlLoader newLoader(ConfigTree config) throws IOException
+ {
+ String address;
+ try
+ {
+ address = config.getRequiredAttribute("wsdl");
+ }
+ catch (ConfigurationException ce)
+ {
+ throw new IOException( ce.getMessage() );
+ }
+ if ( address.startsWith("http://") || address.startsWith("https://") )
+ {
+ return new HttpSOAPProxyWsdlLoader(address, config);
+ }
+ else if ( address.startsWith("file://") )
+ {
+ return new FileSOAPProxyWsdlLoader( address.substring(7, address.length()) );
+ }
+ else if ( address.startsWith("classpath://") )
+ {
+ return new ClasspathSOAPProxyWsdlLoader( address.substring(12, address.length()) );
+ }
+ else if ( address.startsWith("internal://") )
+ {
+ return new InternalSOAPProxyWsdlLoader( address.substring(11, address.length()) );
+ }
+ throw new IOException("unrecognized wsdl location: " + address);
+ }
+
+ private static class HttpSOAPProxyWsdlLoader extends SOAPProxyWsdlLoader
+ {
+
+ private File wsdl_temp_file;
+
+ public HttpSOAPProxyWsdlLoader(String url, final ConfigTree config) throws IOException
+ {
+ // re-using the HTTPClient and AuthBASIC stuff...
+ AuthBASICWsdlContractPublisher wsdl_helper = new AuthBASICWsdlContractPublisher()
+ {
+ @Override
+ public Properties getActionProperties()
+ {
+ Properties props = new Properties();
+ for ( String key : config.getAttributeNames() )
+ {
+ String value = config.getAttribute(key);
+ if (value != null)
+ {
+ props.setProperty(key, value);
+ }
+ }
+ return props;
+ }
+ };
+ BufferedInputStream bis = null;
+ BufferedOutputStream bos = null;
+ try
+ {
+ String wsdl_string = wsdl_helper.getWsdl(url);
+ bis = new BufferedInputStream( new ByteArrayInputStream(wsdl_string.getBytes()) );
+ wsdl_temp_file = createTempFile();
+ bos = new BufferedOutputStream( new FileOutputStream(wsdl_temp_file) );
+ byte[] buf = new byte[1024];
+ int read = 0;
+ while ( (read = bis.read(buf)) != -1 )
+ {
+ bos.write(buf, 0, read);
+ }
+ bos.flush();
+ }
+ finally
+ {
+ try { if (bos != null) bos.close(); } catch (Throwable t) {}
+ try { if (bis != null) bis.close(); } catch (Throwable t) {}
+ }
+ }
+
+ public URL getURL() throws MalformedURLException
+ {
+ return wsdl_temp_file.toURL();
+ }
+
+ @Override
+ public void cleanup()
+ {
+ wsdl_temp_file.delete();
+ }
+
+ }
+
+ private static class FileSOAPProxyWsdlLoader extends SOAPProxyWsdlLoader
+ {
+
+ private File wsdl_orig_file;
+
+ public FileSOAPProxyWsdlLoader(String path)
+ {
+ wsdl_orig_file = new File(path);
+ }
+
+ public URL getURL() throws MalformedURLException
+ {
+ return wsdl_orig_file.toURL();
+ }
+
+ }
+
+ private static class ClasspathSOAPProxyWsdlLoader extends SOAPProxyWsdlLoader
+ {
+
+ private URL wsdl_url;
+
+ public ClasspathSOAPProxyWsdlLoader(String resource)
+ {
+ wsdl_url = ClassUtil.getResource(resource, SOAPProxyWsdlLoader.class);
+ }
+
+ public URL getURL() throws MalformedURLException
+ {
+ return wsdl_url;
+ }
+
+ }
+
+ private static class InternalSOAPProxyWsdlLoader extends SOAPProxyWsdlLoader
+ {
+
+ private File wsdl_temp_file;
+
+ public InternalSOAPProxyWsdlLoader(String end_name) throws IOException
+ {
+ SPIProvider spi_prov = SPIProviderResolver.getInstance().getProvider();
+ EndpointRegistryFactory end_reg_fact = spi_prov.getSPI(EndpointRegistryFactory.class);
+ EndpointRegistry end_reg = end_reg_fact.getEndpointRegistry();
+ Endpoint end = null;
+ for ( ObjectName obj_name : end_reg.getEndpoints() )
+ {
+ //if ( end_name.equals(obj_name.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT)) )
+ if ( obj_name.toString().equals(end_name) )
+ {
+ end = end_reg.getEndpoint(obj_name);
+ break;
+ }
+ }
+ if (end != null)
+ {
+ BufferedOutputStream bos = null;
+ try
+ {
+ wsdl_temp_file = createTempFile();
+ bos = new BufferedOutputStream( new FileOutputStream(wsdl_temp_file) );
+ end.getRequestHandler().handleWSDLRequest(end, bos, null);
+ bos.flush();
+ }
+ finally
+ {
+ try { if (bos != null) bos.close(); } catch (Throwable t) {}
+ }
+ }
+ else
+ {
+ throw new IOException("unrecognized internal endpoint: " + end_name);
+ }
+ }
+
+ public URL getURL() throws MalformedURLException
+ {
+ return wsdl_temp_file.toURL();
+ }
+
+ @Override
+ public void cleanup()
+ {
+ wsdl_temp_file.delete();
+ }
+
+ }
+
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -19,41 +19,11 @@
*/
package org.jboss.soa.esb.actions.soap.wise;
-import java.util.Properties;
+import org.jboss.soa.esb.actions.soap.AuthBASICWsdlContractPublisher;
-import org.jboss.soa.esb.actions.soap.WsdlContractPublisher;
-
/**
- * WSDL contract publisher.
+ * Wise WSDL contract publisher.
*
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
-public class WiseWsdlContractPublisher extends WsdlContractPublisher {
-
- public Properties getHttpClientProperties() {
- Properties httpClientProperties = (Properties) getActionProperties().clone();
- String configurators = httpClientProperties.getProperty("configurators");
-
- // Handle potential Http BASIC Auth....
- if(httpClientProperties.containsKey("username")) {
- httpClientProperties.setProperty("auth-username", httpClientProperties.getProperty("username"));
- if(httpClientProperties.containsKey("password")) {
- httpClientProperties.setProperty("auth-password", httpClientProperties.getProperty("password"));
- }
-
- // Only auto-configure the configurators if they're not already configured.
- // If they're configured in any way at all, we don't modify that. If they're
- // not configured and a username/password is supplied, we assume BASIC Auth...
- if(configurators == null) {
- configurators = "AuthBASIC";
- }
- }
-
- if(configurators != null) {
- httpClientProperties.setProperty("configurators", configurators);
- }
-
- return httpClientProperties;
- }
-
-}
+public class WiseWsdlContractPublisher extends AuthBASICWsdlContractPublisher {}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java 2009-10-08 07:49:27 UTC (rev 29551)
+++ labs/jbossesb/workspace/dbevenius/saml_support/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java 2009-10-08 08:08:59 UTC (rev 29552)
@@ -54,7 +54,7 @@
public void sendMessage() throws Exception {
SendJMSMessage sm = new SendJMSMessage();
- sm.setupConnection();
+ sm.setupConnection("quickstart_Fun_DroolsCBR_Request_GW");
sm.sendAMessage(theXML);
sm.stop();
} /* method */
More information about the jboss-svn-commits
mailing list