[jboss-svn-commits] JBL Code SVN: r23058 - in labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA: product/docs and 91 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Sep 24 18:31:57 EDT 2008
Author: kevin.conner at jboss.com
Date: 2008-09-24 18:31:56 -0400 (Wed, 24 Sep 2008)
New Revision: 23058
Added:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/privateKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/publicKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtil.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleAdapter.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterLifecycleResource.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/PublicCryptoUtil.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtilUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/privateKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/no-security-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/publicKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/security-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/MockSecuredActionProcessor.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/privateKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/PublicCryptoUtilUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/privateKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/publicKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/db-service.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/publicKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/lib/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/publicKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/TestJBPMVariable.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/DeploymentComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ListenerComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/SOADiscoveryComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceDiscoveryComponent.java
Removed:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/lib/ext/jgroups-all.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/processDefinition/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/lib/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/publicKeyStore
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/asm.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/asm.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/activation.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/activation.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/antlr-2.7.6.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/antlr-2.7.6.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/bsh.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/bsh.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/cglib.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/cglib.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-backport-concurrent.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-backport-concurrent.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-j2ee.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-j2ee.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jbossretro-rt.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jbossretro-rt.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jcr-1.0.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jcr-1.0.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/servlet-api.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/servlet-api.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/dom4j.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/dom4j.jar.license.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/lib/ext/mvel-1.3.1-java1.4.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/lib/ext/stax-api-1.0.1.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/lib/ext/xstream-1.2.2.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/antlr-2.7.2.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/groovy-all-1.0.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/mvel-1.3.3-java1.5.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/xalan-2.7.0.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/xbean-2.2.0.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/xml-apis-1.0.b2.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/activation.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/commons-logging-1.0.4.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossall-client.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossts-common.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossws-core.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossws-jboss421.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossws-spi.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/junit-4.1.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/log4j.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/servlet-api-2.3.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/commons-httpclient-3.0.1.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/commons-ssl-0.3.4.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxb-api.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxb-impl.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxb-xjc.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxws-rt.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxws-tools.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jboss-jaxws.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jboss-saaj.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jboss-system.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jbossall-client.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jbossws-common.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jbossws-spi.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-codec-1.2.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-httpclient-3.0.1.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-logging-1.0.4.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-ssl-0.3.4.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/asm.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/cglib-2.1_3.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/commons-logging-1.0.4.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/junit-4.1.jar
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/log4j.jar
Modified:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/AdministrationGuide.odt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ServicesGuide.odt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ServicesGuide.pdf
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/schemas/xml/jbossesb-1.0.1.xsd
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/bindings.xslt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivysettings.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/lib/ext/jms/oracleaq/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/JaasSecurityService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/FtpImpl.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/scripting/ScriptingAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/http/HttpClientFactory.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/quartz.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfig.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfigUtil.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityContext.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagator.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestImpl.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/HttpSecurityInfoExtractor.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/JbrHttpSecurityInfoExtractor.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityToken.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractor.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/JaasSecurityServiceUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/BaseWebServiceUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityConfigUtilUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityContextUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagatorUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityTokenTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/oracle-aq/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/deployment.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/log4j.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyRequestAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyResponseAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/test/SendJMSMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/smooks-response-config.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/MyRequestAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/test/SendJMSMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/war/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/PingWS.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise3/test/SendJMSMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise4/test/SendJMSMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/jboss-esb.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/readme.txt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/PrintSubjectAction.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/SendMessage.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/soap_message_01.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapper.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapperUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/JBpmObjectMapperCallbackUnitTest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/resources/JBpmObjectMapperTestProcessDefinition.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/slsb/src/main/java/org/jboss/soa/esb/actions/EJBProcessor.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletRequest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletResponse.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/install.sh
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/pom.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/base-cp.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebServiceProducerTest.java
Log:
Pull over IR5 release of JBESB_4_4_GA_CP1
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -81,6 +81,8 @@
<include name="esb.juddi.xml"/>
<include name="actionArtifactMap.properties"/>
<include name="jaas.login"/>
+ <include name="privateKeyStore"/>
+ <include name="publicKeyStore"/>
</fileset>
<fileset dir="${installation.files.dir}/jUDDI-registry">
<include name="juddi-ds.xml"/>
@@ -107,7 +109,7 @@
<fileset dir="${aoplib.dir}" includes="scout-*.jar"/>
<!-- xbean for reading/marchalling xml for configuration, and scout -->
<fileset dir="${lib.dir}" includes="xbean*.jar"/>
- <fileset dir="${lib.dir}" includes="xmlpublic-*.jar,stax-api-*.jar"/>
+ <fileset dir="${lib.dir}" includes="stax-api-*.jar"/>
<!-- jUDDI Registry, we're one -->
<fileset dir="${lib.dir}" includes="juddi-*.jar"/>
<!-- ftp -->
@@ -119,15 +121,14 @@
<fileset dir="${lib.dir}" includes="xstream-*.jar"/>
<!-- woodstox for the StaxDriver -->
<fileset dir="${lib.dir}" includes="wstx-*.jar"/>
- <!-- JBossCache jars - including jgroups -->
- <fileset dir="${lib.dir}" includes="jboss-cache-*.jar"/>
- <fileset dir="${lib.ext.dir}" includes="jgroups-all.jar"/>
<!-- MVEL -->
<fileset dir="${lib.dir}" includes="mvel*.jar"/>
<!-- Quartz -->
<fileset dir="${lib.ext.dir}" includes="quartz*.jar"/>
<!-- Commons SSL -->
<fileset dir="${lib.ext.dir}" includes="commons-ssl-*.jar"/>
+ <!-- groovy -->
+ <fileset dir="${lib.dir}" includes="groovy-*.jar"/>
</copy>
<copy todir="${build.dir}/jbossesb.sar">
<fileset dir="${installation.files.dir}/jUDDI-registry" includes="juddi.war"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -244,6 +244,7 @@
<fileset dir="lib/ext" includes="*.jar" />
<fileset dir="lib/ext/standalone" includes="*.jar" />
<fileset dir="services/" includes="**/*.jar" />
+ <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="*.jar"/>
</classpath>
</javadoc>
</target>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/AdministrationGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ServicesGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/docs/ServicesGuide.pdf
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/schemas/xml/jbossesb-1.0.1.xsd 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/etc/schemas/xml/jbossesb-1.0.1.xsd 2008-09-24 22:31:56 UTC (rev 23058)
@@ -269,7 +269,7 @@
<xsd:element maxOccurs="1" minOccurs="0"
ref="jesb:actions" />
</xsd:sequence>
- <xsd:attribute name="category" type="xsd:string"
+ <xsd:attribute name="category"
use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
@@ -277,8 +277,13 @@
a reference to this service in the registry.
</xsd:documentation>
</xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="255"/>
+ </xsd:restriction>
+ </xsd:simpleType>
</xsd:attribute>
- <xsd:attribute name="name" type="xsd:string"
+ <xsd:attribute name="name"
use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
@@ -286,8 +291,13 @@
reference to this service in the registry.
</xsd:documentation>
</xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="255"/>
+ </xsd:restriction>
+ </xsd:simpleType>
</xsd:attribute>
- <xsd:attribute name="description" type="xsd:string"
+ <xsd:attribute name="description"
use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
@@ -296,6 +306,11 @@
this service can be understood by a human.
</xsd:documentation>
</xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="255"/>
+ </xsd:restriction>
+ </xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="invmScope" type="jesb:invmScope" use="optional">
<xsd:annotation>
@@ -426,6 +441,13 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
+ <xsd:attribute name="rolesAllowed" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ Specifies one or more logical roles that are allowed to acccess the service.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
<xsd:attribute name="moduleName" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/bindings.xslt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/bindings.xslt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/bindings.xslt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -52,7 +52,7 @@
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:output method="xml"/>
- <xsl:param name="host"/>
+ <xsl:param name="esbHost"/>
<xsl:param name="port"/>
<xsl:template match="/">
@@ -62,7 +62,7 @@
<xsl:template match="property[@name='org.jboss.soa.esb.jndi.server.url']">
<xsl:element name="property">
<xsl:attribute name="name">org.jboss.soa.esb.jndi.server.url</xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></xsl:attribute>
+ <xsl:attribute name="value"><xsl:value-of select='$esbHost'/>:<xsl:value-of select='$port'/></xsl:attribute>
</xsl:element>
</xsl:template>
@@ -74,7 +74,8 @@
</xsl:stylesheet>
]]>
</xslt-config>
- <binding host="${{jboss.esb.bind.address}}" port="{$jndiPort}" />
+ <binding host="${{jboss.bind.address}}" port="{$jndiPort}" />
+ <xslt-param name="esbHost">${jboss.esb.bind.address}</xslt-param>
</delegate-config>
</service-config><xsl:text>
</xsl:text>
@@ -89,7 +90,7 @@
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:output method="xml"/>
- <xsl:param name="host"/>
+ <xsl:param name="esbHost"/>
<xsl:param name="port"/>
<xsl:param name="webPort"/>
@@ -98,23 +99,23 @@
</xsl:template>
<xsl:template match="entry[@key='java.naming.provider.url']">
- <entry key="java.naming.provider.url">jnp://<xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></entry>
+ <entry key="java.naming.provider.url">jnp://<xsl:value-of select='$esbHost'/>:<xsl:value-of select='$port'/></entry>
</xsl:template>
<xsl:template match="entry[@key='juddi.discoveryURL']">
- <entry key="juddi.discoveryURL">http://<xsl:value-of select="$host"/>:<xsl:value-of select="$webPort"/>/juddi/uddiget.jsp?</entry>
+ <entry key="juddi.discoveryURL">http://<xsl:value-of select="$esbHost"/>:<xsl:value-of select="$webPort"/>/juddi/uddiget.jsp?</entry>
</xsl:template>
<xsl:template match="entry[@key='juddi.proxy.adminURL']">
- <entry key="juddi.proxy.adminURL">http://<xsl:value-of select="$host"/>:<xsl:value-of select="$webPort"/>/juddi/admin</entry>
+ <entry key="juddi.proxy.adminURL">http://<xsl:value-of select="$esbHost"/>:<xsl:value-of select="$webPort"/>/juddi/admin</entry>
</xsl:template>
<xsl:template match="entry[@key='juddi.proxy.inquiryURL']">
- <entry key="juddi.proxy.inquiryURL">http://<xsl:value-of select="$host"/>:<xsl:value-of select="$webPort"/>/juddi/inquiry</entry>
+ <entry key="juddi.proxy.inquiryURL">http://<xsl:value-of select="$esbHost"/>:<xsl:value-of select="$webPort"/>/juddi/inquiry</entry>
</xsl:template>
<xsl:template match="entry[@key='juddi.proxy.publishURL']">
- <entry key="juddi.proxy.publishURL">http://<xsl:value-of select="$host"/>:<xsl:value-of select="$webPort"/>/juddi/publish</entry>
+ <entry key="juddi.proxy.publishURL">http://<xsl:value-of select="$esbHost"/>:<xsl:value-of select="$webPort"/>/juddi/publish</entry>
</xsl:template>
<xsl:template match="*|@*">
@@ -125,7 +126,8 @@
</xsl:stylesheet>
]]>
</xslt-config>
- <binding host="${{jboss.esb.bind.address}}" port="{$jndiPort}" />
+ <binding host="${{jboss.bind.address}}" port="{$jndiPort}" />
+ <xslt-param name="esbHost">${jboss.esb.bind.address}</xslt-param>
<xslt-param name="webPort"><xsl:value-of select="$webPort"/></xslt-param>
</delegate-config>
</service-config><xsl:text>
@@ -143,7 +145,7 @@
<xsl:output method="xml"/>
- <xsl:param name="host"/>
+ <xsl:param name="esbHost"/>
<xsl:param name="port"/>
<xsl:template match="/">
@@ -151,7 +153,7 @@
</xsl:template>
<xsl:template match="entry[@key='java.naming.provider.url']">
- <entry key="java.naming.provider.url">jnp://<xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></entry>
+ <entry key="java.naming.provider.url">jnp://<xsl:value-of select='$esbHost'/>:<xsl:value-of select='$port'/></entry>
</xsl:template>
<xsl:template match="*|@*">
@@ -162,7 +164,8 @@
</xsl:stylesheet>
]]>
</xslt-config>
- <binding host="${{jboss.esb.bind.address}}" port="{$jndiPort}" />
+ <binding host="${{jboss.bind.address}}" port="{$jndiPort}" />
+ <xslt-param name="esbHost">${jboss.esb.bind.address}</xslt-param>
</delegate-config>
</service-config><xsl:text>
</xsl:text>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/jbossesb-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -41,6 +41,19 @@
<property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.JaasSecurityService"/>
<property name="org.jboss.soa.esb.services.security.callbackHandler" value="org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler"/>
<property name="org.jboss.soa.esb.services.security.configUrl" value="/jaas.login"/>
+
+ <property name="org.jboss.soa.esb.services.security.privateKeystore" value="/privateKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
+
+ <property name="org.jboss.soa.esb.services.security.publicKeystore" value="/publicKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
+
</properties>
<properties name="registry">
<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
@@ -51,9 +64,14 @@
<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.LocalTransport"/>
+
<!-- specify the interceptors, in order -->
+ <property name="org.jboss.soa.esb.registry.interceptors" value="org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor"/>
+ <!-- Example of specifying multiple registry interceptors
<property name="org.jboss.soa.esb.registry.interceptors"
value="org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor, org.jboss.internal.soa.esb.services.registry.CachingRegistryInterceptor"/>
+ -->
+
<!-- The following properties modify the cache interceptor behaviour -->
<property name="org.jboss.soa.esb.registry.cache.maxSize" value="100"/>
<property name="org.jboss.soa.esb.registry.cache.validityPeriod" value="600000"/>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/privateKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/install/conf/privateKeyStore)
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/install/conf/publicKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/install/conf/publicKeyStore)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -16,6 +16,7 @@
<dependency org="com.h2database" name="h2" rev="1.0.68"/>
<dependency org="hibernate" name="hibernate3" rev="3.2.4.SP1"/>
<dependency org="jboss" name="jboss-cache" rev="1.2.4.SP2"/>
+ <dependency org="jgroups" name="jgroups" rev="2.4.1"/>
<dependency org="javassist" name="javassist" rev="3.6.0.GA"/>
@@ -37,14 +38,13 @@
<dependency org="jboss" name="jboss" rev="4.2.2.GA"/>
<dependency org="jboss" name="jbossall-client" rev="4.2.2.GA"/>
<!-- dependency org="jboss" name="jbossts.jbossts-common" rev="4.2.2.GA"/ -->
- <!-- dependency org="jgroups" name="jgroups" rev="2.4.1-SP3"/ -->
<dependency org="com.jcraft" name="jsch" rev="0.1.38"/>
<dependency org="org.apache.juddi" name="juddi" rev="2.0rc5">
<exclude org="axis" module="axis"/>
</dependency>
<dependency org="org.apache.juddi" name="juddi-client" rev="2.0rc5"/>
<dependency org="log4j" name="log4j" rev="1.2.14"/>
- <dependency org="org.mvel" name="mvel" rev="1.3.1-java1.4"/>
+ <dependency org="org.codehaus.mvel" name="mvel" rev="1.3.3-java1.5"/>
<dependency org="ognl" name="ognl" rev="2.6.9"/>
<dependency org="quartz" name="quartz" rev="1.5.2">
@@ -65,5 +65,7 @@
<dependency org="milyn" name="milyn-smooks-core" rev="1.0.1"/>
<dependency org="milyn" name="milyn-commons" rev="1.0"/>
<dependency org="milyn" name="milyn-smooks-javabean" rev="1.0.1"/>
+
+ <dependency org="javax.jcr" name="jcr" rev="1.0"/>
</dependencies>
</ivy-module>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivysettings.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivysettings.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivysettings.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -5,10 +5,16 @@
<url name="jboss" m2compatible="true">
<artifact pattern="http://repository.jboss.org/maven2/[organisation]/[artifact]/[revision]/[artifact]-[revision].[ext]"/>
</url>
- <ibiblio name="ibiblio" m2compatible="true" />
+ <ibiblio name="ibiblio" m2compatible="true"/>
<url name="milyn" m2compatible="true">
<artifact pattern="http://dist.codehaus.org/[organisation]/[artifact]/[revision]/[artifact]-[revision].[ext]"/>
</url>
</chain>
+ <url name="mvel" m2compatible="true">
+ <artifact pattern="http://repo1.maven.org/maven2/org/mvel/[artifact]/[revision]/[artifact]-[revision].[ext]"/>
+ </url>
</resolvers>
+ <modules>
+ <module organisation="org.codehaus.mvel" name="mvel" resolver="mvel"/>
+ </modules>
</ivysettings>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/lib/ext/jgroups-all.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/lib/ext/jms/oracleaq/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/lib/ext/jms/oracleaq/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/lib/ext/jms/oracleaq/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -8,9 +8,10 @@
From lib/ext obtain
asm.jar
-cglib-2.1_2jboss.jar
mockejb.jar
+From maven obtain cglib-2.1_2jboss.jar (maven)
+
In plugins/org.jboss.soa.esb.oracle.aq run the package target and obtain
org.jboss.soa.esb.oracle.aq.<version>.jar.
@@ -35,10 +36,7 @@
2. Oracle AQ does not have a JNDI provider and it is common to register
Queues in an LDAP. Here we chose to register the Queues to MockContext
which is why you need the mockejb.jar, as well as the asm and cglib jars
- that it depends on. The org.jboss.soa.esb.oracle.aq-4.2.MR2.jar plugin
+ that it depends on. The org.jboss.soa.esb.oracle.aq.<version>.jar plugin
does the actual work of registering. Registering to JNP proved not
possible because of code in the Oracle API to support option 1, the LDAP
registration.
-
-
-
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/couriers/InVMCourier.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -153,14 +153,23 @@
}
else
{
+ Object addedObject;
+
+ if (passByValue) {
+ try {
+ addedObject = MessageSerializer.serialize(message);
+ } catch (IOException ex) {
+ logger.warn("Could not serialize message to pass by value.", ex);
+ return false;
+ }
+ } else {
+ addedObject = message;
+ }
+
synchronized (messageQueue) {
- Object addedObject = addMessageToQueue(message);
+ messageQueue.add(addedObject);
- if (addedObject == null) {
- return false;
- }
-
// Notify 1 waiting pickup thread of the delivery...
messageQueue.notify();
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/JaasSecurityService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/JaasSecurityService.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/JaasSecurityService.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -23,6 +23,7 @@
import java.net.URL;
import java.security.Principal;
import java.security.Security;
+import java.util.List;
import java.util.Properties;
import java.util.Set;
@@ -61,8 +62,8 @@
* <property name="org.jboss.soa.esb.services.security.callbackHandler" value="org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler"/>
* <property name="org.jboss.soa.esb.services.security.configUrl" value="/jaas.login"/>
* </properties>
- * </pre>}
- *
+ * </pre>}
+ *
* @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
* @Since 4.4
*/
@@ -72,47 +73,46 @@
* Property name for login config urls.
*/
private static final String LOGIN_CONFIG_URL_PREFIX = "login.config.url.";
-
+
/*
* Callback handler implementation name
*/
private String callbackHandlerClassName;
- /*
- * Original login configuration e.g JBoss AS login configuration
+ /*
+ * Original login configuration e.g JBoss AS login configuration
*/
private javax.security.auth.login.Configuration containerConfig;
-
+
/*
* Custom login configuration
*/
private javax.security.auth.login.Configuration configuration;
-
+
private final Logger log = Logger.getLogger(JaasSecurityService.class);
/**
* Performs authentication of the passed in SecurityContext.
* </p>
- *
+ *
* This method will first try to authenticate the authRequest by using a custom <br>
* javax.security.auth.login.Configuration, which would be the case where the <br>
- * login module name specified exists in a jaas.login file.
+ * login module name specified exists in a jaas.login file.
* <br>
* If the login module name cannot be found in jaas.login then this method will <br>
* fall back and try to authenticate using a an underlying Configuration. This would <br>
* be the case when running in an appserver for instance.
- *
+ *
* @param config - the security configuration. Properties from jboss-esb.xml
* @param securityContext - the security context to be used.
* @param authRequest - the authentication request to be processed.
- * @throws SecurityServiceException
+ * @throws SecurityServiceException
* @throws LoginException if the authentication fails
*/
public void authenticate(final SecurityConfig config, SecurityContext securityContext, final AuthenticationRequest authRequest) throws SecurityServiceException
{
- AssertArgument.isNotNull(securityContext, "securityContext");
AssertArgument.isNotNull(config, "config");
-
+
LoginContext loginContext;
final String runAs = config.getRunAs();
try
@@ -128,30 +128,52 @@
// fall back and try using the orginal configuration(for example jboss login-config.xml)
loginContext = new LoginContext(config.getModuleName(), securityContext.getSubject(), callbackHandler, containerConfig);
}
-
- // invoke the login process
+
+ // invoke the login process
loginContext.login();
-
+
+ final Subject subject = securityContext.getSubject();
+
// add a runAs group if specified
- addRunAs(runAs, securityContext.getSubject());
- }
+ addRunAs(runAs, subject);
+
+ final Principal principal = getPrincipal(subject);
+
+ // associate the subject with jboss security
+ SecurityAssociation.pushSubjectContext(subject, principal, subject.getPublicCredentials());
+
+ if ( runAs != null )
+ {
+ // associate the runAs role with jboss security
+ SecurityAssociation.pushRunAsIdentity(new RunAsIdentity(runAs, principal.getName()));
+ }
+
+ }
catch (final LoginException e)
{
throw new SecurityServiceException("Exception while trying to login:", e);
- }
-
- final Subject subject = securityContext.getSubject();
- final Principal principal = getPrincipal(subject);
- // associate the subject with jboss security
- SecurityAssociation.pushSubjectContext(subject, principal, subject.getPublicCredentials());
-
- // associate the runAs role with jboss security
- if ( runAs != null )
- {
- SecurityAssociation.pushRunAsIdentity(new RunAsIdentity(runAs, principal.getName()));
}
+
}
-
+
+ public boolean checkRolesAllowed(final List<String> rolesAllowed, SecurityContext securityContext)
+ {
+ if (rolesAllowed.isEmpty())
+ {
+ return true;
+ }
+
+ for (String roleName : rolesAllowed)
+ {
+ boolean isInRole = securityContext.isCallerInRole(roleName);
+ if (isInRole)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
/**
* Determines if the passed in Subject has the role specified in the context.
* @return true - if the callers has the role
@@ -166,7 +188,7 @@
}
return false;
}
-
+
/**
* Configures by reading the value of the property 'org.jboss.soa.esb.services.security.configUrl'
* from jbossesb-properties, is one exists.
@@ -181,7 +203,7 @@
{
log.warn("Could not locate a security configuration");
}
-
+
final Properties securityProperties = Configuration.getSecurityServiceProperies();
final String loginConfigUrl = securityProperties.getProperty(Environment.SECURITY_SERVICE_CONFIG_URL);
if ( loginConfigUrl != null )
@@ -195,11 +217,11 @@
}
addLoginConfig(loginUrl);
}
-
+
// get a EsbCallbackHandler if one is configured in jbossesb-properties.xml
callbackHandlerClassName = securityProperties.getProperty(Environment.SECURITY_SERVICE_CALLBACK_HANLDER_CLASS);
}
-
+
public void logout(SecurityConfig config)
{
// NoOp
@@ -236,16 +258,16 @@
* }</pre><br>
* After an instance has been created its {@link EsbCallbackHandler#setAuthenticationRequest(AuthenticationRequest)} method is called
* which gives the callback handler access to the authentication information.
- *
+ *
* @param config - the security configuration information(from jboss-esb.xml)
* @param authRequest - the authentication request information
* @return EsbCallbackHandler - new instance with authReqeust set or null if no callback handler has been specified in either jboss-esb.xml or jbossesb-properties.xml
* @throws SecurityServiceException - if an EsbCallbackHandler has specified in the configuration but the implementation cannot be created.
*/
- private EsbCallbackHandler createCallbackHandler( final SecurityConfig config, final AuthenticationRequest authRequest ) throws SecurityServiceException
+ private EsbCallbackHandler createCallbackHandler( final SecurityConfig config, final AuthenticationRequest authRequest ) throws SecurityServiceException
{
EsbCallbackHandler callbackHandler = null;
-
+
// check if a callbackhandler was specified in jboss-esb.xml
String callbackImpl = config.getCallbackHandler();
if ( callbackImpl == null )
@@ -253,7 +275,7 @@
// use the global callbackhandler that can be specified in jbossesb-properties.xml(optional)
callbackImpl = callbackHandlerClassName;
}
-
+
if ( callbackImpl != null )
{
callbackHandler = createNewInstance(callbackImpl);
@@ -271,7 +293,7 @@
{
throw new ConfigurationException("Could not locate the login config file at Url [" + loginConfigUrl + "]");
}
-
+
int urlIndex = 1;
boolean loginUrlRegistered = false;
String registeredLoginUrl;
@@ -287,7 +309,7 @@
urlIndex++;
}
}
-
+
if (!loginUrlRegistered)
{
log.info("Adding file [ " + loginConfigUrl + "] as [" + LOGIN_CONFIG_URL_PREFIX + urlIndex + "]");
@@ -295,12 +317,12 @@
setConfiguration(new ConfigFile());
}
}
-
+
private synchronized javax.security.auth.login.Configuration getConfiguration()
{
return configuration;
}
-
+
private synchronized void setConfiguration(final javax.security.auth.login.Configuration configuration)
{
this.configuration = configuration;
@@ -331,26 +353,26 @@
}
}
- private <T extends EsbCallbackHandler> T createNewInstance( final String className ) throws SecurityServiceException
+ private <T extends EsbCallbackHandler> T createNewInstance( final String className ) throws SecurityServiceException
{
try
{
@SuppressWarnings("unchecked")
Class<T> forName = ClassUtil.forName(className, getClass());
return forName.newInstance();
- }
+ }
catch (final ClassNotFoundException e)
{
throw new SecurityServiceException("ClassNotFoundException while trying to create an impl of [" + className + "]", e);
- }
+ }
catch (final InstantiationException e)
{
throw new SecurityServiceException("InstantiationException while trying to create an impl of [" + className + "]", e);
- }
+ }
catch (final IllegalAccessException e)
{
throw new SecurityServiceException("IllegalAccess while trying to create an impl of [" + className + "]", e);
}
}
-
+
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtil.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtil.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtil.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtil.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,259 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.services.security;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.security.Key;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.services.security.SecurityServiceException;
+import org.jboss.soa.esb.services.security.util.CryptoUtil;
+import org.jboss.soa.esb.util.ClassUtil;
+
+/**
+ *
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public enum PrivateCryptoUtil
+{
+ INSTANCE;
+
+ private Logger log;
+ private Key key;
+ private PublicKey publicKey;
+ private String transformation;
+
+ private PrivateCryptoUtil()
+ {
+ try
+ {
+ log = getLogger();
+ init();
+ }
+ catch (final Exception e)
+ {
+ throw new IllegalStateException(e.getMessage(), e);
+ }
+ }
+
+ private void init() throws SecurityServiceException
+ {
+ String keystorePath = Configuration.getSecurityServicePrivateKeystore();
+ if (keystorePath == null)
+ {
+ log.info("No private keystore was specified in jbossesb-properites.xml. Add '" + Environment.SECURITY_SERVICE_PUBLIC_KEYSTORE + "'");
+ }
+ else
+ {
+ try
+ {
+ String keystoreType = Configuration.getSecurityServicePrivateKeystoreType();
+ if (keystoreType == null)
+ {
+ keystoreType = KeyStore.getDefaultType();
+ }
+ String keystorePassword = Configuration.getSecurityServicePrivateKeystorePassword();
+ String privateKeyAlias = Configuration.getSecurityServicePrivateKeyAlias();
+ String privateKeyPass = Configuration.getSecurityServicePrivateKeyPassword();
+
+ try
+ {
+ KeyStore keystore = KeyStore.getInstance(keystoreType);
+ InputStream in = ClassUtil.getResourceAsStream(keystorePath, this.getClass());
+ if (in == null)
+ {
+ throw new SecurityServiceException("Could not locate public keystore using '" + keystorePath + "'");
+ }
+
+ // load the keystore contents
+ keystore.load(in, keystorePassword.toCharArray());
+ key = keystore.getKey(privateKeyAlias, privateKeyPass.toCharArray());
+ Certificate certificate = keystore.getCertificate(privateKeyAlias);
+ publicKey = certificate.getPublicKey();
+
+ // "algorithm/mode/padding" or defaults to "algorithm"
+ transformation = Configuration.getSecurityServicePrivateKeyTransformation();
+ if (transformation == null)
+ {
+ this.transformation = key.getAlgorithm();
+ }
+ }
+ finally
+ {
+ keystorePassword = null;
+ privateKeyAlias = null;
+ privateKeyPass = null;
+ }
+ }
+ catch (final KeyStoreException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final NoSuchAlgorithmException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final CertificateException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final UnrecoverableKeyException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ }
+ }
+
+ private static byte[] getBytes(final Serializable ser) throws IOException
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectOutputStream oout = new ObjectOutputStream(bout);
+ oout.writeObject(ser);
+ return bout.toByteArray();
+ }
+
+ public byte[] encrypt(final Serializable object) throws SecurityServiceException
+ {
+ ByteArrayInputStream plainInStream;
+ try
+ {
+ plainInStream = new ByteArrayInputStream(getBytes(object));
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+
+ ByteArrayOutputStream encryptedOutStream = new ByteArrayOutputStream();
+
+ try
+ {
+ byte[] buf = new byte[100];
+ int bufLength;
+ while ( (bufLength = plainInStream.read(buf)) != -1)
+ {
+ byte[] tmp = CryptoUtil.encrypt(copyBytes(buf,bufLength),publicKey, transformation);
+ encryptedOutStream.write(tmp);
+ encryptedOutStream.flush();
+ }
+ return encryptedOutStream.toByteArray();
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ }
+
+ public Serializable decrypt(final byte[] bytes) throws SecurityServiceException
+ {
+ ByteArrayInputStream encryptedBytesInStream = new ByteArrayInputStream(bytes);
+
+ ByteArrayOutputStream decryptedBytesOutStream = new ByteArrayOutputStream();
+
+ byte[] decryptBytes = null;
+ try
+ {
+ byte[] buf = new byte[128];
+ int bufLenth;
+ while ( (bufLenth = encryptedBytesInStream.read(buf)) != -1)
+ {
+ byte[] tmp = CryptoUtil.decrypt( copyBytes(buf,bufLenth),(PrivateKey)key, transformation);
+ decryptedBytesOutStream.write(tmp);
+ decryptedBytesOutStream.flush();
+ decryptBytes = decryptedBytesOutStream.toByteArray();
+ }
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ finally
+ {
+ try { decryptedBytesOutStream.close(); } catch (IOException ignore) { log.error(ignore.getMessage(),ignore); }
+ }
+
+ return toSerializable(decryptBytes);
+ }
+
+ private Serializable toSerializable(final byte[] decryptBytes) throws SecurityServiceException
+ {
+ ObjectInputStream inputStream = null;
+ try
+ {
+ inputStream = new ObjectInputStream(new ByteArrayInputStream(decryptBytes));
+ return (Serializable) inputStream.readObject();
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final ClassNotFoundException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ finally
+ {
+ try { inputStream.close(); } catch (IOException ignore) { log.error(ignore.getMessage(), ignore); }
+ }
+ }
+
+ private static byte[] copyBytes(byte[] bytes, int length)
+ {
+ if (bytes.length == length)
+ {
+ return bytes;
+ }
+
+ byte[] newBytes = new byte[length];
+ for (int i = 0; i < length; i++)
+ {
+ newBytes[i] = bytes[i];
+ }
+ return newBytes;
+ }
+
+ private static Logger getLogger()
+ {
+ return Logger.getLogger(PrivateCryptoUtil.class);
+ }
+
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/FtpImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/FtpImpl.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/util/FtpImpl.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -78,6 +78,8 @@
private String m_sFtpServer, m_sUser, m_sPasswd;
private String m_sRemoteDir, m_sLocalDir;
+
+ private int renameRetry;
/**
* Checks validity and completeness of parameters, and keeps the info
@@ -235,8 +237,27 @@
m_bPassive = false;
sAux = m_oParms.getAttribute(PARMS_PASSIVE);
m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
+
+ String renameRetryString = ModulePropertyManager.getPropertyManager(
+ ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
+ Environment.FTP_RENAME_RETRY, null);
- return;
+ if (renameRetryString != null)
+ {
+ try
+ {
+ renameRetry = Integer.parseInt(renameRetryString);
+ }
+ catch (Exception ex)
+ {
+ throw new ConfigurationException("Invalid rename retry limit: "+renameRetryString);
+ }
+ }
+ else
+ renameRetry = DEFAULT_RENAME_RETRY_NUMBER;
+
+ if (renameRetry < 1)
+ renameRetry = 1;
}
protected void configTreeFromEpr () throws RemoteFileSystemException
@@ -586,10 +607,34 @@
{
throw new RemoteFileSystemException("Failed to upload contents: " + m_oConn.getReplyString()) ;
}
- if (!m_oConn.rename(sRemoteTmp, p_sRemoteName))
+
+ boolean retryProblem = true; // https://jira.jboss.org/jira/browse/JBESB-1995
+
+ for (int i = 0; i < renameRetry; i++)
{
+ if (m_oConn.rename(sRemoteTmp, p_sRemoteName))
+ {
+ retryProblem = false;
+
+ break;
+ }
+ else
+ {
+ if (i+1 < renameRetry)
+ {
+ try
+ {
+ Thread.sleep(DEFAULT_RENAME_RETRY_TIMEOUT);
+ }
+ catch (final Exception ex)
+ {
+ }
+ }
+ }
+ }
+
+ if (retryProblem)
throw new RemoteFileSystemException("Failed to rename file: " + m_oConn.getReplyString());
- }
}
catch (final IOException ioe)
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -24,6 +24,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
+import java.io.Serializable;
import java.io.StringWriter;
import java.util.Iterator;
@@ -36,6 +37,8 @@
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.stream.StreamResult;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceException;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.client.ServiceInvoker;
@@ -48,7 +51,9 @@
import org.jboss.soa.esb.message.Fault;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
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.ws.WSSecuritySoapExtractor;
import org.w3c.dom.Document;
@@ -60,35 +65,33 @@
* This is the abstract base class for a SOAP messages
* @author kevin
*/
-public abstract class BaseWebService
+public abstract class BaseWebService implements Provider<SOAPMessage>
{
private static final QName SERVER_FAULT_QN = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Server") ;
-
+
private static final boolean RETURN_STACK_TRACES ;
private static final Logger LOGGER = Logger.getLogger(BaseWebService.class);
-
+
protected final ServiceInvoker serviceInvoker ;
-
- private WSSecuritySoapExtractor securityExtractor;
-
+
+ private final WSSecuritySoapExtractor securityExtractor;
+
protected BaseWebService(final String category, final String name)
throws MessageDeliverException
{
serviceInvoker = new ServiceInvoker(category, name) ;
securityExtractor = new WSSecuritySoapExtractor();
}
-
- public Object invoke(final Object obj)
- throws SOAPException
+
+ public SOAPMessage invoke(final SOAPMessage request)
{
- final SOAPMessage request = (SOAPMessage)obj;
final Message esbReq = MessageFactory.getInstance().getMessage() ;
try
{
final SOAPBody soapBody = request.getSOAPBody() ;
if (soapBody == null)
{
- throw new SOAPException("Missing SOAP body from request") ;
+ throw new WebServiceException("Missing SOAP body from request") ;
}
// There is a bug in JBossWS extractContentAsDocument so we do this ourselves
final Iterator children = soapBody.getChildElements() ;
@@ -109,15 +112,15 @@
found = true ;
}
}
-
+
if (!found)
{
throw new SOAPException("Could not find SOAPElement in SOAPBody") ;
}
-
+
// extract security information from SOAP and set on esb message
- extractSecurityInfo(request, esbReq);
-
+ addAuthRequestToMessage(request, esbReq);
+
final Message esbRes = deliverMessage(esbReq) ;
if (esbRes != null)
{
@@ -127,7 +130,7 @@
throw new SOAPException("Null response from service") ;
}
final String soapRes = input.toString();
-
+
final Document respDoc = YADOMUtil.parseStream(new ByteArrayInputStream(soapRes.getBytes()),
false, false, true);
final SOAPMessage response = javax.xml.soap.MessageFactory.newInstance().createMessage();
@@ -136,58 +139,70 @@
}
else
{
- return null ;
+ // We should be able to return null here but this causes JBossWS to NPE.
+ return javax.xml.soap.MessageFactory.newInstance().createMessage();
}
- }
+ }
+ catch (final WebServiceException wse)
+ {
+ throw wse ;
+ }
catch (final Exception ex)
{
- SOAPMessage faultMsg = null;
- if (ex instanceof FaultMessageException)
+ try
{
- final FaultMessageException fme = (FaultMessageException) ex ;
- final Message faultMessage = fme.getReturnedMessage() ;
- if (faultMessage != null)
+ SOAPMessage faultMsg = null;
+ if (ex instanceof FaultMessageException)
{
- final Body body = faultMessage.getBody() ;
- final QName faultCode = (QName)body.get(Fault.DETAIL_CODE_CONTENT) ;
- final String faultDescription = (String)body.get(Fault.DETAIL_DESCRIPTION_CONTENT) ;
- final String faultDetail = (String)body.get(Fault.DETAIL_DETAIL_CONTENT) ;
-
- if (faultCode != null)
+ final FaultMessageException fme = (FaultMessageException) ex ;
+ final Message faultMessage = fme.getReturnedMessage() ;
+ if (faultMessage != null)
{
- faultMsg = javax.xml.soap.MessageFactory.newInstance().createMessage() ;
- final SOAPFault fault = faultMsg.getSOAPBody().addFault(faultCode, faultDescription) ;
- if (faultDetail != null)
+ final Body body = faultMessage.getBody() ;
+ final QName faultCode = (QName)body.get(Fault.DETAIL_CODE_CONTENT) ;
+ final String faultDescription = (String)body.get(Fault.DETAIL_DESCRIPTION_CONTENT) ;
+ final String faultDetail = (String)body.get(Fault.DETAIL_DETAIL_CONTENT) ;
+
+ if (faultCode != null)
{
- try
+ faultMsg = javax.xml.soap.MessageFactory.newInstance().createMessage() ;
+ final SOAPFault fault = faultMsg.getSOAPBody().addFault(faultCode, faultDescription) ;
+ if (faultDetail != null)
{
- final Document detailDoc = YADOMUtil.parseStream(new ByteArrayInputStream(faultDetail.getBytes()),
- false, false, true);
- final Detail detail = fault.addDetail() ;
- detail.appendChild(detailDoc.getDocumentElement()) ;
+ try
+ {
+ final Document detailDoc = YADOMUtil.parseStream(new ByteArrayInputStream(faultDetail.getBytes()),
+ false, false, true);
+ final Detail detail = fault.addDetail() ;
+ detail.appendChild(detailDoc.getDocumentElement()) ;
+ }
+ catch (final Exception ex2)
+ {
+ LOGGER.warn("Failed to parse fault detail", ex2) ;
+ }
}
- catch (final Exception ex2)
- {
- LOGGER.warn("Failed to parse fault detail", ex2) ;
- }
}
+ else
+ {
+ final Throwable cause = fme.getCause() ;
+ faultMsg = (cause != null) ? generateFault(cause) : generateFault(ex) ;
+ }
}
- else
- {
- final Throwable cause = fme.getCause() ;
- faultMsg = (cause != null) ? generateFault(cause) : generateFault(ex) ;
- }
}
+
+ if (faultMsg == null)
+ {
+ faultMsg = generateFault(ex) ;
+ }
+ return faultMsg ;
}
-
- if (faultMsg == null)
+ catch (final SOAPException soape)
{
- faultMsg = generateFault(ex) ;
+ throw new WebServiceException("Unexpected exception generating fault response", soape) ;
}
- return faultMsg ;
}
}
-
+
private SOAPMessage generateFault(final Throwable th)
throws SOAPException
{
@@ -207,19 +222,27 @@
}
return faultMsg ;
}
-
- private void extractSecurityInfo(final SOAPMessage from, final Message to)
+
+ private void addAuthRequestToMessage(final SOAPMessage from, final Message to) throws SecurityServiceException
{
final AuthenticationRequest authRequest = securityExtractor.extractSecurityInfo(from);
- if ( authRequest != null )
+ if (authRequest != null)
{
- to.getProperties().setProperty( SecurityService.AUTH_REQUEST, authRequest );
+ byte[] encrypted = PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest);
+ if (encrypted != null)
+ {
+ to.getProperties().setProperty(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.");
+ }
}
}
-
+
protected abstract Message deliverMessage(final Message request)
throws Exception ;
-
+
static
{
final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE) ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -43,6 +43,7 @@
import javax.wsdl.PortType;
import javax.wsdl.Types;
import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.soap.SOAPOperation;
import javax.wsdl.factory.WSDLFactory;
import javax.xml.namespace.QName;
@@ -60,6 +61,7 @@
import com.ibm.wsdl.extensions.soap.SOAPBindingImpl;
import com.ibm.wsdl.extensions.soap.SOAPBodyImpl;
import com.ibm.wsdl.extensions.soap.SOAPFaultImpl;
+import com.ibm.wsdl.extensions.soap.SOAPOperationImpl;
public class ESBContractGenerator {
private static final QName XSD_QN = new QName("http://www.w3.org/2001/XMLSchema", "schema");
@@ -141,7 +143,7 @@
try {
getWSDLFactory().newWSDLWriter().writeWSDL(def, sw);
} catch (WSDLException e) {
- new ConfigurationException("Failed to generate wsdl for service:" + serviceConfig.getCategory() + "/" + serviceConfig.getName() , e);
+ throw new ConfigurationException("Failed to generate wsdl for service:" + serviceConfig.getCategory() + "/" + serviceConfig.getName() , e);
}
return sw.toString();
}
@@ -252,13 +254,19 @@
BindingOperation bop = def.createBindingOperation();
bop.setName(serviceInfo.getOperationName());
+
Operation op = (Operation) portType.getOperations().get(0);
bop.setOperation(op);
+ SOAPOperation soapOperation = new SOAPOperationImpl() ;
+ soapOperation.setSoapActionURI(serviceInfo.getAction()) ;
+ bop.addExtensibilityElement(soapOperation) ;
+
if (op.getInput() != null) {
BindingInput binput = def.createBindingInput();
bop.setBindingInput(binput);
SOAPBodyImpl soapBody = new SOAPBodyImpl();
soapBody.setUse("literal");
+ binput.setName(serviceInfo.getRequestName()) ;
binput.addExtensibilityElement(soapBody);
}
if (op.getOutput() != null) {
@@ -266,6 +274,7 @@
bop.setBindingOutput(boutput);
SOAPBodyImpl soapBody = new SOAPBodyImpl();
soapBody.setUse("literal");
+ boutput.setName(serviceInfo.getResponseName()) ;
boutput.addExtensibilityElement(soapBody);
}
final Map faults = op.getFaults() ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -35,7 +35,7 @@
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
public class ESBServiceContractPublisher implements ContractReferencePublisher {
- private static String address;
+ private String address;
private final String endpointName;
private final Service service ;
private final String description ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -48,6 +48,7 @@
private final String className ;
private final String namespace ;
private final boolean isOneWay ;
+ private final String action ;
public ESBServiceEndpointInfo(final Service service)
throws UnsupportedEncodingException {
@@ -60,29 +61,35 @@
portName = name + "PortType" ;
operationName = name + "Op" ;
final String serviceCategory = service.getCategory().replace('/', '_') ;
- final String serviceCategoryLower = serviceCategory.toLowerCase() ;
final String serviceName = service.getName().replace('/', '_') ;
- final String serviceNameLower = serviceName.toLowerCase() ;
servletName = serviceCategory + "_" + serviceName ;
servletPath = "/" + serviceCategory + "/" + serviceName ;
- wsdlFileName = "WEB-INF/wsdl/" + serviceCategoryLower + "_" + serviceNameLower + ".wsdl" ;
- packageName = "esb.ws." + serviceNameLower ;
+ wsdlFileName = "WEB-INF/wsdl/" + serviceCategory + "/" + serviceName + ".wsdl" ;
+ packageName = "esb.ws." + serviceCategory + "." + serviceName ;
className = packageName + ".Implementation" ;
namespace = "http://soa.jboss.org/" + URLEncoder.encode(service.getCategory(), DEFAULT_ENCODING) ;
+ action = namespace + "/" + operationName ;
final Actions actions = service.getActions() ;
if (actions != null)
{
- isOneWay = MepType.ONE_WAY.equals(actions.getMep()) ;
+ isOneWay = (actions.getOutXsd() == null) ;
+ if (isOneWay)
+ {
+ if (actions.getFaultXsd() != null)
+ {
+ LOGGER.warn("Fault schemas ignored for OneWay service " + serviceCategory + ":" + serviceName) ;
+ }
+ if (MepType.REQUEST_RESPONSE.equals(actions.getMep()))
+ {
+ LOGGER.warn("No response specified for RequestResponse service " + serviceCategory + ":" + serviceName) ;
+ }
+ }
}
else
{
isOneWay = false ;
}
- if (isOneWay && (actions.getFaultXsd() != null))
- {
- LOGGER.warn("Fault schemas ignored for OneWay service " + serviceCategory + ":" + serviceName) ;
- }
}
public String getRequestName() {
@@ -137,6 +144,10 @@
return namespace ;
}
+ public String getAction() {
+ return action ;
+ }
+
public boolean isOneWay() {
return isOneWay ;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -26,7 +26,6 @@
import javassist.NotFoundException;
import javassist.bytecode.AnnotationsAttribute;
import javassist.bytecode.ConstPool;
-import javassist.bytecode.SignatureAttribute;
import javassist.bytecode.annotation.Annotation;
import javassist.bytecode.annotation.EnumMemberValue;
import javassist.bytecode.annotation.StringMemberValue;
@@ -71,9 +70,6 @@
{
seiClass.setSuperclass(requestResponseSuperClass) ;
}
-
- CtClass providerClass = pool.get("javax.xml.ws.Provider");
- seiClass.setInterfaces(new CtClass[] { providerClass });
ConstPool constantPool = seiClass.getClassFile().getConstPool();
AnnotationsAttribute attribute = new AnnotationsAttribute(
@@ -120,12 +116,6 @@
defaultConstructor.setBody(constructorStr) ;
seiClass.addConstructor(defaultConstructor) ;
- // add generics for class
- SignatureAttribute signatureAttribute = new SignatureAttribute(
- seiClass.getClassFile().getConstPool(),
- "Ljava/lang/Object;Ljavax/xml/ws/Provider<Ljavax/xml/soap/SOAPMessage;>;");
- seiClass.getClassFile().addAttribute(signatureAttribute);
-
return seiClass.toBytecode();
} catch (Exception e) {
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/scripting/ScriptingAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/scripting/ScriptingAction.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/actions/scripting/ScriptingAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -139,8 +139,9 @@
private ConfigTree config;
private MessagePayloadProxy payloadProxy;
- private String script = null;
- private String language = null;
+ private String script ;
+ private String source ;
+ private String language ;
public ScriptingAction(ConfigTree config)
{
@@ -152,6 +153,7 @@
{
// attempt to get the script
String scriptPath = getAttribute("script");
+ final String source ;
if (scriptPath == null)
{
boolean supportMessageBasedScripting = config.getBooleanAttribute("supportMessageBasedScripting", false);
@@ -162,6 +164,7 @@
logger.debug("No script specified on action config " + config.getAttribute("name")
+ ". Expecting script to be in message.");
}
+ source = "Embedded script in message" ;
}
else
{
@@ -192,7 +195,9 @@
{
try { if (scriptStream != null) scriptStream.close(); } catch (Throwable t) {}
}
+ source = scriptPath ;
}
+ this.source = source ;
// attempt to get the language
language = getAttribute("language");
if (language == null && script != null)
@@ -237,11 +242,16 @@
bsf.declareBean( "payloadProxy", payloadProxy, payloadProxy.getClass() );
bsf.declareBean( "logger", logger, logger.getClass() );
// NOTE: cannot use eval here since it does not work for all engines (jython in particular)
- bsf.exec( language, null, 0, 0, getScript(message) );
+ bsf.exec( language, source, 0, 0, getScript(message) );
}
catch (BSFException bsfe)
{
- throw new ActionProcessingException(bsfe);
+ final String error = "Exception caught while processing script: '" + source + "'" ;
+ if (logger.isDebugEnabled())
+ {
+ logger.debug(error, bsfe) ;
+ }
+ throw new ActionProcessingException(error, bsfe);
}
finally
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -19,13 +19,18 @@
*/
package org.jboss.soa.esb.client;
+import java.security.AccessController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import javax.crypto.SealedObject;
+import javax.security.auth.Subject;
+
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.internal.soa.esb.services.security.PrivateCryptoUtil;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.Service;
import org.jboss.soa.esb.addressing.EPR;
@@ -56,6 +61,9 @@
import org.jboss.soa.esb.services.persistence.RedeliverStore;
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.services.registry.ServiceNotFoundException;
+import org.jboss.soa.esb.services.security.SecurityContext;
+import org.jboss.soa.esb.services.security.SecurityService;
+import org.jboss.soa.esb.services.security.SecurityServiceException;
import org.jboss.soa.esb.util.ClassUtil;
/**
@@ -64,10 +72,10 @@
* Manages loading of {@link EPR EPRs}, {@link Courier} selection and
* message delivery. Provides a unified/simplified interface for message
* delivery.
- *
+ *
* The ServiceInvoker will cache entries from the registry for the relevant
* service. This cache will be refreshed under the following conditions:
- *
+ *
* (i) all of the entries fail on a delivery attempt.
* (ii) the cache times out (see property org.jboss.soa.esb.registry.cache.life): default is
* 60 seconds.
@@ -79,19 +87,19 @@
public static final String INTERNAL_SERVICE_CATEGORY = "JBossESB-Internal";
public static final String DEAD_LETTER_SERVICE_NAME = "DeadLetterService";
public static final String DELIVER_TO = "org.jboss.soa.esb.deliver.to";
-
+
/*
* Remove (suspected) dead EPRs.
*/
-
+
private static boolean removeDeadEprs;
-
+
/*
* Throw an exception on delivery failure rather than retry?
*/
-
+
private static boolean exceptionOnDeliveryFailure;
-
+
/**
* Class logger.
*/
@@ -113,13 +121,13 @@
*/
private ServiceClusterInfo serviceClusterInfo;
/**
- *
+ *
*/
private Date expirationDate;
/**
- *
+ *
*/
- private long registryCacheLife;
+ private final long registryCacheLife;
/**
* Dead letter channel Service invoker.
*/
@@ -137,7 +145,7 @@
public ServiceInvoker(Service service) throws MessageDeliverException {
this(service, null) ;
}
-
+
/**
* Public constructor.
*
@@ -201,9 +209,9 @@
&& !service.equals(dlqService)) {
//Send a copy to the DLQ, no retries for syncDeliveries
message.getProperties().setProperty(DELIVER_TO, service);
-
+
logger.info("Delivering message ["+message.getHeader()+"] to DLQ.");
-
+
deliverToDeadLetterService(message);
}
throw mde;
@@ -219,7 +227,7 @@
* @param message The message to be delivered.
* @throws MessageDeliverException Failed to deliver message, after trying all available EPRs.
*/
- public void deliverAsync(Message message) throws MessageDeliverException
+ public void deliverAsync(Message message) throws MessageDeliverException
{
AssertArgument.isNotNull(message, "message");
// Not interested in a reply
@@ -233,7 +241,7 @@
message.getProperties().setProperty(DELIVER_TO, service);
try {
logger.info("Delivering message ["+message.getHeader()+"] to RDLVRQ.");
-
+
deliverToDeadLetterService(message);
} finally {
message.getProperties().remove(MessageStore.CLASSIFICATION);
@@ -265,7 +273,7 @@
if (dlQueueInvoker == null) {
dlQueueInvoker = new ServiceInvoker(dlqService);
}
-
+
dlQueueInvoker.deliverAsync(message);
}
}
@@ -292,14 +300,14 @@
while (staleEPRCache) {
if ((serviceClusterInfo.getEPRs().size() == 0) || (new Date().after(expirationDate))) {
loadServiceClusterInfo();
-
+
if (initialPass && (serviceClusterInfo.getEPRs().size() == 0)) // zero from a previous send
{
/*
* We need to check to see if this instance used up all of it's attempts to deliver
* in a previous deliver or we'll only refresh the cache once per subsequent send
* because we will have exhausted the EPRs in the cache, i.e., size==0.
- *
+ *
* When the instance is originally created we do an initial cache fetch. Until this
* check, that cache fetch was not being done again after a complete failure. Unlikely
* to cause problems anyway, but possible.
@@ -315,6 +323,21 @@
while ((epr = loadBalancer.chooseEPR(serviceClusterInfo)) != null) {
try
{
+ final Subject subject = Subject.getSubject(AccessController.getContext());
+ if (subject != null)
+ {
+ logger.info("Subject in ServiceInvoker " + subject);
+ try
+ {
+ byte[] encrypted = PrivateCryptoUtil.INSTANCE.encrypt(new SecurityContext(subject));
+ message.getProperties().setProperty(SecurityService.CONTEXT, encrypted);
+ }
+ catch (final SecurityServiceException e)
+ {
+ logger.error("Could not encrypt the security conext. Will not be added to the outgoing message", e);
+ }
+ }
+
replyMessage = eprInvoker.attemptDelivery(message, epr);
if (replyMessage != null) {
if (Type.isFaultMessage(replyMessage)) {
@@ -324,22 +347,22 @@
return replyMessage;
} else {
logger.info("Unresponsive EPR: " + epr+" for message: "+message.getHeader());
-
+
serviceClusterInfo.removeDeadEPR(epr);
-
+
/*
* So far we've only removed the EPR from the cache. Should we
* also remove it from the registry?
*/
-
+
if (removeDeadEprs)
RegistryUtil.unregister(service.getCategory(), service.getName(), epr);
-
+
/*
* If the message property is set to fail immediately, or the global property is set,
* then don't do retries even if there are other EPRs in the list.
*/
-
+
if (("true".equals(message.getProperties().getProperty(Environment.EXCEPTION_ON_DELIVERY_FAILURE, "false")) || exceptionOnDeliveryFailure))
throw new MessageDeliverException("Failed to deliver message ["+message.getHeader()+"] to Service [" + service + "]. Told not to retry.");
}
@@ -347,9 +370,9 @@
catch (MalformedEPRException ex) // so we can differentiate failure modes, since returning null is limiting
{
logger.info("Invalid EPR for service (probably ESB-unaware): ignoring for message: "+message.getHeader());
-
+
serviceClusterInfo.removeDeadEPR(epr);
-
+
/*
* DO NOT remove from the registry - it is not dead!!
*/
@@ -497,9 +520,9 @@
logger.debug("Courier lookup failed for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", e);
} catch (MalformedEPRException e) {
// probably an ESB-unaware EPR in the registry!!
-
+
logger.info("Badly formed EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]." + e.getMessage());
-
+
throw e;
} catch (Throwable t) {
logger.warn("Unexpected exception during Courier lookup for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", t);
@@ -544,32 +567,32 @@
throw e;
} catch (final CourierServiceBindException e) {
// meant to be masked by the SI fail-over
-
+
logger.debug("Caught service lookup exception for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
-
+
// could be stale EPR, so move on to next entry in registry.
} catch (final CourierMarshalUnmarshalException e) {
logger.warn("Courier indicated (un)marshal related error "+e+" during delivery to EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
-
+
throw new MessageDeliverException("Caught (un)marshal related exception during attempted send/receive.", e);
} catch (final CourierTransportException e) {
// meant to be masked by the SI fail-over
-
+
logger.debug("Courier indicated transport related error "+e+" during send/receive with EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
} catch (CourierException e) {
// probable config error. Log it and move on to next EPR/service entry.
-
+
logger.warn("Possible configuration error while using Courier for EPR [" + targetEPR + "] and Service [" + service + "] and Message ["+message.getHeader()+"]. " + e.getMessage());
} catch (MalformedEPRException e) {
// Hmmmm???... Can this really happen? The Courier has already been created. Haven't we already validated the EPR during the Courier lookup (above)??
logger.error("Unexpected error. Badly formed EPR [" + targetEPR + "] for Service [" + service + "]. But the EPR has already been validated!!");
-
+
throw e;
} catch (Throwable t) {
logger.error("Unexpected throwable during attempted message delivery using Courier for EPR [" + targetEPR + "] for Service [" + service + "] and Message ["+message.getHeader()+"].", t);
-
+
// we don't know what state we're in so better to bail-out now!
-
+
throw new MessageDeliverException("Caught unexpected throwable during send. Bailing-out!", t);
} finally {
CourierUtil.cleanCourier(courier);
@@ -584,11 +607,11 @@
return null;
}
}
-
+
static
{
String pruneDead = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.REMOVE_DEAD_EPR, "false");
-
+
if ("true".equalsIgnoreCase(pruneDead))
{
removeDeadEprs = true;
@@ -597,9 +620,9 @@
{
removeDeadEprs = false;
}
-
+
String exceptionOnFailure = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.EXCEPTION_ON_DELIVERY_FAILURE, "false");
-
+
if ("true".equalsIgnoreCase(exceptionOnFailure))
{
exceptionOnDeliveryFailure = true;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -41,7 +41,7 @@
public class Configuration
{
private static Logger _logger = Logger.getLogger(Configuration.class);
-
+
private static KeyValuePair[] s_oaKV = new KeyValuePair[]
{
new KeyValuePair(Environment.SMTP_HOST, getSmtpHost()),
@@ -130,31 +130,31 @@
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_URL,
Environment.DEFAULT_HOST);
}
-
+
public static String getJndiServerContextFactory()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY,
Environment.DEFAULT_JNDI_CONTEXT_FACTORY);
}
-
+
public static String getJndiServerPkgPrefix()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_PKG_PREFIX,
Environment.DEFAULT_JNDI_PKG_PREFIX);
}
-
+
public static String getLoadBalancerPolicy()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.LOAD_BALANCER_POLICY,
Environment.DEFAULT_LOAD_BALANCER_POLICY);
}
-
+
public static String getRedeliveryDlsOn()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.REDELIVER_DLS_SERVICE_ON,
Environment.DEFAULT_REDELIVER_DLS_ON);
}
-
+
public static String getRegistryCacheLife()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.REGISTRY_CACHE_LIFE_MILLIS,
@@ -217,27 +217,27 @@
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_PASSWORD);
}
-
+
public static String getRegistrySemanticEquivalences()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_SEMANTIC_EQUIVALENCES);
}
-
+
public static String getRegistryPostalAddressScheme()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_POSTAL_ADDRESS_SCHEME);
}
-
+
public static String getRegistrySecurityAuthenticationMethod()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_SECURITY_AUTHENTICATION_METHOD);
}
-
+
public static String getRegistryUDDIMaxRows()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_UDDI_MAX_ROWS);
}
-
+
public static String getParamRepositoryImplClass()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.PARAMS_REPOS_IMPL_CLASS);
@@ -255,93 +255,93 @@
org.jboss.soa.esb.services.DefaultEncryptionFactory.class
.getName());
}
-
+
public static String getStoreUrl()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_URL);
return property;
}
-
+
public static String getStoreDriver()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_JDBC_DRIVER);
return property;
- }
-
+ }
+
public static String getStorePwd()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_PWD);
return property;
}
-
+
public static String getStoreUser()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_USER);
return property;
}
-
+
public static String getStorePoolInitialSize()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_INITIAL_SIZE);
return property;
}
-
+
public static String getStorePoolMinSize()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_MIN_SIZE);
return property;
}
-
+
public static String getStorePoolMaxSize()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_MAX_SIZE);
return property;
}
-
+
public static String getStorePoolTestTable()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_TEST_TABLE);
return property;
}
-
+
public static String getStorePoolTimeoutMillis()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_TIMEOUT_MILLIS);
return property;
}
-
+
public static String getStoreDBConnectionManager()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONN_MANAGER);
return property;
}
-
+
public static String getStoreDBDatasourceName()
{
String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_DATASOURCE_NAME);
return property;
}
-
+
public static String getJcrStoreJNDIPath()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_JCR_JNDI_PATH);
}
-
+
public static String getJcrStoreUsername()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_JCR_USERNAME);
}
-
+
public static String getJcrStorePassword()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_JCR_PASSWORD);
}
-
+
public static String getJcrStoreRootNodePath()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_JCR_ROOT_NODE_PATH);
}
-
+
/**
* Get the registry interceptor class names
* @return Registry interceptor Class names.
@@ -352,7 +352,7 @@
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_INTERCEPTORS,
InVMRegistryInterceptor.class.getName());
}
-
+
/**
* Get the maximum cache size for the caching registry.
* @return The maximum cache size.
@@ -361,7 +361,7 @@
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_CACHE_MAX_SIZE) ;
}
-
+
/**
* Get the validity period for the caching registry.
* @return The cache validity period.
@@ -370,7 +370,7 @@
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_CACHE_VALIDITY_PERIOD) ;
}
-
+
/**
* Construct a naming context based on the connection details outlined
* in the named configuration module/section.
@@ -381,23 +381,24 @@
* <li><b>{@link Context#INITIAL_CONTEXT_FACTORY}</b>: Value defaults to "{@link Environment#JBOSS_INITIAL_CONTEXT_FACTORY}".</li>
* <li><b>{@link Context#URL_PKG_PREFIXES}</b>: Value defaults to "{@link Environment#JBOSS_URL_PKG_PREFIX}".</li>
* </ol>
- *
+ *
* @param contextModuleName Conficuration module/section name.
* @return The context instance.
* @throws ConfigurationException Unable to connect to context.
- *
+ *
* @deprecated {@link org.jboss.soa.esb.helpers.NamingContextPool}
*/
- public static Context getNamingContext(String contextModuleName) throws ConfigurationException {
+ @Deprecated
+ public static Context getNamingContext(String contextModuleName) throws ConfigurationException {
final Properties environment = getProperties(contextModuleName) ;
-
+
try {
return new InitialContext(environment) ;
} catch (final NamingException ne) {
throw new ConfigurationException("Failed to create JNDI context [" + contextModuleName + "].");
}
}
-
+
private static Properties getProperties(final String contextModuleName)
{
final String providerUrl = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.PROVIDER_URL, Environment.JBOSS_PROVIDER_URL);
@@ -409,7 +410,7 @@
environment.setProperty(Context.URL_PKG_PREFIXES, urlPackagePrefix);
return environment ;
}
-
+
/**
* Lookup the JMS Connection Factory based on the connection details outlined
* in the named configuration module/section.
@@ -421,10 +422,10 @@
* <li><b>{@link Context#URL_PKG_PREFIXES}</b>: Value defaults to "{@link Environment#JBOSS_URL_PKG_PREFIX}".</li>
* <li><b>javax.jms.ConnectionFactory</b>: Value defaults to "".</li>
* </ol>
- *
+ *
* @param jmsConnectionFactoryModuleName Configuration module/section name.
* @return The JMS ConnectionFactory instance.
- * @throws ConfigurationException Lookup failed either because it was unable to
+ * @throws ConfigurationException Lookup failed either because it was unable to
* lookup the context, or the ConnectionFactory lookup failed.
*/
public static ConnectionFactory getJmsConnectionFactory(String jmsConnectionFactoryModuleName) throws ConfigurationException {
@@ -434,7 +435,7 @@
try {
String connectionFactoryRuntime = ModulePropertyManager.getPropertyManager(jmsConnectionFactoryModuleName).getProperty(ConnectionFactory.class.getName(), "ConnectionFactory");
ConnectionFactory factory = null;
-
+
try {
factory = (ConnectionFactory) context.lookup(connectionFactoryRuntime);
} catch (NamingException e) {
@@ -450,27 +451,94 @@
throw new ConfigurationException("Unexpected exception while accessing naming context pool", nce) ;
}
}
-
+
/**
- * The SecurityService Implememtation Class
- *
+ * The SecurityService Implememtation Class
+ *
* @return String the fully qualified name of the ServiceService implementation class
*/
public static String getSecurityServiceImplementationClass()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_IMPEMENTATION_CLASS);
}
-
+
public static String getSecurityServiceConfigUrl()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_CONFIG_URL);
}
-
+
+ /*
+ * Private Keystore getters
+ */
+ public static String getSecurityServicePrivateKeystore()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PRIVATE_KEYSTORE);
+ }
+
+ public static String getSecurityServicePrivateKeyAlias()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PRIVATE_KEY_ALIAS);
+ }
+
+ public static String getSecurityServicePrivateKeyPassword()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PRIVATE_KEY_PASS);
+ }
+
+ public static String getSecurityServicePrivateKeystorePassword()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PRIVATE_KEYSTORE_PASS);
+ }
+
+ public static String getSecurityServicePrivateKeystoreType()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PRIVATE_KEYSTORE_TYPE);
+ }
+
+ public static String getSecurityServicePrivateKeyTransformation()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PRIVATE_KEY_TRANSFORMATION);
+ }
+
+ /*
+ * Public Keystore getters
+ */
+
+ public static String getSecurityServicePublicKeystore()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PUBLIC_KEYSTORE);
+ }
+
+ public static String getSecurityServicePublicKeyAlias()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PUBLIC_KEY_ALIAS);
+ }
+
+ public static String getSecurityServicePublicKeyPassword()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PUBLIC_KEY_PASS);
+ }
+
+ public static String getSecurityServicePublicKeyTransformation()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PUBLIC_KEY_TRANSFORMATION);
+ }
+
+ public static String getSecurityServicePublicKeystorePassword()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PUBLIC_KEYSTORE_PASS);
+ }
+
+ public static String getSecurityServicePublicKeystoreType()
+ {
+ return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_PUBLIC_KEYSTORE_TYPE);
+ }
+
public static String getSecurityServiceCallbackHandlerImplClass()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperty(Environment.SECURITY_SERVICE_CALLBACK_HANLDER_CLASS);
}
-
+
public static Properties getSecurityServiceProperies()
{
return ModulePropertyManager.getPropertyManager(ModulePropertyManager.SECURITY_MODULE).getProperties();
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -28,9 +28,9 @@
{
File, FTP, JMS, SQL, Hibernate;
}
-
+
public static final String PROPERTIES_FILE = "org.jboss.soa.esb.propertyFile";
-
+
/**
* Binding properties
*/
@@ -47,14 +47,15 @@
public static final String SMTP_PORT = "org.jboss.soa.esb.mail.smtp.port";
public static final String SMTP_FROM = "org.jboss.soa.esb.mail.smtp.from";
public static final String SMTP_AUTH = "org.jboss.soa.esb.mail.smtp.auth";
-
+
public static final String FTP_LOCALDIR = "org.jboss.soa.esb.ftp.localdir";
public static final String FTP_REMOTEDIR = "org.jboss.soa.esb.ftp.remotedir";
public static final String FTP_SOCKET_TIMEOUT = "org.jboss.soa.esb.ftp.timeout";
-
+ public static final String FTP_RENAME_RETRY = "org.jboss.soa.esb.ftp.renameretry";
+
public static final String JMS_CONNECTION_POOL_SIZE = "org.jboss.soa.esb.jms.connectionPool";
public static final String JMS_SESSION_SLEEP = "org.jboss.soa.esb.jms.sessionSleep";
-
+
public static final String WS_RETURN_STACK_TRACE = "org.jboss.soa.esb.ws.returnStackTrace";
public static final String WS_TIMEOUT = "org.jboss.soa.esb.ws.timeout" ;
/*
@@ -72,12 +73,12 @@
public static final String REGISTRY_CACHE_LIFE_MILLIS = "org.jboss.soa.esb.registry.cache.life";
public static final String REMOVE_DEAD_EPR = "org.jboss.soa.esb.failure.detect.removeDeadEPR";
public static final String EXCEPTION_ON_DELIVERY_FAILURE = "org.jboss.soa.esb.exceptionOnDeliverFailure";
-
- /**
- * The Registry Query Manager URI defines the endPoint where registry queries can be made.
+
+ /**
+ * The Registry Query Manager URI defines the endPoint where registry queries can be made.
*/
public static final String REGISTRY_QUERY_MANAGER_URI = "org.jboss.soa.esb.registry.queryManagerURI";
- /**
+ /**
* The Registry Lifecycle Manager URI defines the endPoint where service information can be published to.
*/
public static final String REGISTRY_LIFECYCLE_MANAGER_URI = "org.jboss.soa.esb.registry.lifeCycleManagerURI";
@@ -85,7 +86,7 @@
* The Registry Implementation class, a light wrapper class.
*/
public static final String REGISTRY_IMPEMENTATION_CLASS = "org.jboss.soa.esb.registry.implementationClass";
- /**
+ /**
* The Registry Factory Class setting specifies which JAXR implementation should be used.
*/
public static final String REGISTRY_FACTORY_CLASS = "org.jboss.soa.esb.registry.factoryClass";
@@ -97,12 +98,12 @@
* The password for the registry user.
*/
public static final String REGISTRY_PASSWORD = "org.jboss.soa.esb.registry.password";
- /**
+ /**
* The Registry Scout Transport Class property defines which communication protocol Scout should use to communicate
* with the UDDI registry. Note that this parameter is Scout specific.
*/
public static final String REGISTRY_SCOUT_TRANSPORT_CLASS = "org.jboss.soa.esb.scout.proxy.transportClass";
- /**
+ /**
* Property that holds directory to use with the helper EPRManager class.
*/
public static final String REGISTRY_FILE_HELPER_DIR = "org.jboss.soa.esb.registry.file.directory";
@@ -122,7 +123,7 @@
* Property that holds the max number of rows the UDDI should return on searches.
*/
public static final String REGISTRY_UDDI_MAX_ROWS = "org.jboss.soa.esb.registry.uddi.maxRows";
-
+
/**
* The Registry interceptor class names.
*/
@@ -163,63 +164,63 @@
public static final String MSG_STORE_DB_POOL_TIMEOUT_MILLIS = "org.jboss.soa.esb.persistence.db.pool.timeout.millis";
public static final String MSG_STORE_DB_CONN_MANAGER = "org.jboss.soa.esb.persistence.db.conn.manager";
public static final String MSG_STORE_DB_DATASOURCE_NAME = "org.jboss.soa.esb.persistence.db.datasource.name";
-
+
/*
* JcrMessageStore Persistence Store properties.
*/
- public static final String MSG_STORE_JCR_JNDI_PATH = "org.jboss.soa.esb.persistence.jcr.jndi.path";
- public static final String MSG_STORE_JCR_USERNAME = "org.jboss.soa.esb.persistence.jcr.username";
- public static final String MSG_STORE_JCR_PASSWORD = "org.jboss.soa.esb.persistence.jcr.password";
- public static final String MSG_STORE_JCR_ROOT_NODE_PATH = "org.jboss.soa.esb.persistence.jcr.root.node.path";
-
+ public static final String MSG_STORE_JCR_JNDI_PATH = "org.jboss.soa.esb.persistence.jcr.jndi.path";
+ public static final String MSG_STORE_JCR_USERNAME = "org.jboss.soa.esb.persistence.jcr.username";
+ public static final String MSG_STORE_JCR_PASSWORD = "org.jboss.soa.esb.persistence.jcr.password";
+ public static final String MSG_STORE_JCR_ROOT_NODE_PATH = "org.jboss.soa.esb.persistence.jcr.root.node.path";
+
/*
* Some message metadata properties.
*/
-
+
public static final String TRANSPORT_TYPE = "org.jboss.soa.esb.message.transport.type";
public static final String MESSAGE_SOURCE = "org.jboss.soa.esb.message.source";
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
-
+
/** Message property name for original filename */
-
+
public static final String ORIGINAL_FILE_NAME_MSG_PROP = "org.jboss.soa.esb.gateway.original.file.name";
public static final String ORIGINAL_QUEUE_NAME_MSG_PROP = "org.jboss.soa.esb.gateway.original.queue.name";
public static final String ORIGINAL_URL_PROP = "org.jboss.soa.esb.gateway.original.url";
-
+
/*
* Some gateway attachment names.
*/
-
+
public static final String ORIGINAL_FILE = "org.jboss.soa.esb.gateway.file";
public static final String GATEWAY_CONFIG = "org.jboss.soa.esb.gateway.config";
-
+
/*
* Some JMS specific message element names.
*/
-
+
public static final String JMS_MESSAGE_ID = "org.jboss.soa.esb.message.transport.jms.messageID";
public static final String JMS_NATIVE_MESSAGE_TYPE = "org.jboss.soa.esb.message.transport.jms.nativeMessageType"; // Text or Object
-
+
/*
* Filter properties should be identified by:
- *
+ *
* org.jboss.soa.esb.filter.<number>
- *
+ *
* and will be called in increasing order of <number>. Same <number> may be
* called arbitrarily.
*/
public static final String FILTER_NAME = "org.jboss.soa.esb.filter";
-
+
/*
* Some specific out-of-the-box filter configuration options.
*/
-
+
public static final String MESSAGE_TRACE = "org.jboss.soa.esb.messagetrace"; // on or off
public static final String PER_MESSAGE_TRACE = "org.jboss.soa.esb.permessagetrace"; // on or off
-
+
/**
* The SecurityService Implementation class
*/
@@ -227,7 +228,23 @@
public static final String SECURITY_SERVICE_CALLBACK_HANLDER_CLASS = "org.jboss.soa.esb.services.security.callbackHandler";
public static final String SECURITY_SERVICE_CALLBACK = "org.jboss.soa.esb.services.security.callback_";
public static final String SECURITY_SERVICE_CONFIG_URL = "org.jboss.soa.esb.services.security.configUrl";
-
+ public static final String SECURITY_SERVICE_SEAL_ALGORITHM = "org.jboss.soa.esb.services.security.sealAlgorithm";
+ public static final String SECURITY_SERVICE_SEAL_KEYSIZE = "org.jboss.soa.esb.services.security.sealKeySize";
+
+ public static final String SECURITY_SERVICE_PRIVATE_KEYSTORE = "org.jboss.soa.esb.services.security.privateKeystore";
+ public static final String SECURITY_SERVICE_PRIVATE_KEYSTORE_TYPE = "org.jboss.soa.esb.services.security.privateKeystoreType";
+ public static final String SECURITY_SERVICE_PRIVATE_KEYSTORE_PASS = "org.jboss.soa.esb.services.security.privateKeystorePassword";
+ public static final String SECURITY_SERVICE_PRIVATE_KEY_ALIAS = "org.jboss.soa.esb.services.security.privateKeyAlias";
+ public static final String SECURITY_SERVICE_PRIVATE_KEY_PASS = "org.jboss.soa.esb.services.security.privateKeyPassword";
+ public static final String SECURITY_SERVICE_PRIVATE_KEY_TRANSFORMATION = "org.jboss.soa.esb.services.security.privateKeyTransformation";
+
+ public static final String SECURITY_SERVICE_PUBLIC_KEYSTORE = "org.jboss.soa.esb.services.security.publicKeystore";
+ public static final String SECURITY_SERVICE_PUBLIC_KEYSTORE_TYPE = "org.jboss.soa.esb.services.security.publicKeystoreType";
+ public static final String SECURITY_SERVICE_PUBLIC_KEYSTORE_PASS = "org.jboss.soa.esb.services.security.publicKeystorePassword";
+ public static final String SECURITY_SERVICE_PUBLIC_KEY_ALIAS = "org.jboss.soa.esb.services.security.publicKeyAlias";
+ public static final String SECURITY_SERVICE_PUBLIC_KEY_PASS = "org.jboss.soa.esb.services.security.publicKeyPassword";
+ public static final String SECURITY_SERVICE_PUBLIC_KEY_TRANSFORMATION = "org.jboss.soa.esb.services.security.publicKeyTransformation";
+
// Configuration options for the Naming Context pooling.
/**
* The maximum pool size.
@@ -242,15 +259,15 @@
*/
public static final String NAMING_CONTEXT_RETRY_COUNT = "org.jboss.soa.esb.namingcontext.retrycount" ;
/**
- * The JBoss JNDI provider URL.
+ * The JBoss JNDI provider URL.
*/
public static final String JBOSS_PROVIDER_URL = "localhost";
/**
- * The JBoss JNDI initial context factory.
+ * The JBoss JNDI initial context factory.
*/
public static final String JBOSS_INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
/**
- * The JBoss JNDI URL package prefix.
+ * The JBoss JNDI URL package prefix.
*/
public static final String JBOSS_URL_PKG_PREFIX = ""; //"org.jboss.naming:org.jnp.interfaces"
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/http/HttpClientFactory.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/http/HttpClientFactory.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/http/HttpClientFactory.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -68,6 +68,7 @@
} catch (final NumberFormatException nfe) {
throw new ConfigurationException("Invalid " + MAX_TOTAL_CONNECTIONS + " property: " + maxTotalConnections) ;
}
+ connectionManager.setParams(params) ;
}
HttpClient httpClient = new HttpClient(connectionManager);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -37,6 +37,11 @@
public static final int RULE_BASE_PRIORITY = 50000;
/**
+ * The service message counter priority.
+ */
+ public static final int SERVICE_MESSAGE_COUNTER_PRIORITY = 75000 ;
+
+ /**
* The courier priority.
*/
public static final int COURIER_PRIORITY = 100000 ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -145,6 +145,33 @@
logger.debug("Associating deploymentName " + deploymentName + " with identity: " + identity) ;
}
}
+
+ /**
+ * Get the list of deployments associated with the context classloader.
+ * @return The list of associated deployments or null if no association exists.
+ */
+ public String[] getAssociatedDeployments()
+ {
+ final ClassLoader classLoader = Thread.currentThread().getContextClassLoader() ;
+ final Lock readLock = deploymentLock.readLock() ;
+ readLock.lock() ;
+ try
+ {
+ final Set<String> currentAssociations = associatedDeployments.get(classLoader) ;
+ if (currentAssociations != null)
+ {
+ return (String[])currentAssociations.toArray(new String[currentAssociations.size()]) ;
+ }
+ else
+ {
+ return null ;
+ }
+ }
+ finally
+ {
+ readLock.unlock() ;
+ }
+ }
/**
* Disassociate the current thread with a specified deployment.
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -21,13 +21,13 @@
*/
/**
* Contains tag names as they can be used in the configuration.
- *
+ *
*/
package org.jboss.soa.esb.listeners;
import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-public class ListenerTagNames
+public class ListenerTagNames
{
/** EPRs */
public static final String EPR_TAG = "EPR";
@@ -35,6 +35,8 @@
public static final String URL_TAG = JDBCEpr.URL_TAG; // change only in one place // TODO huh?!
public static final String PROTOCOL_TAG = "protocol";
+ public static final String NAME_TAG = "name";
+
/** Threading */
public static final String MAX_THREADS_TAG = "maxThreads";
@@ -54,15 +56,15 @@
public static final String TARGET_SERVICE_NAME_TAG = "target-service-name";
public static final String GATEWAY_CLASS_TAG = "gatewayClass";
public static final String IS_GATEWAY_TAG = "is-gateway";
-
+
/** Listeners */
public static final String LISTENER_CLASS_TAG = "listenerClass";
public static final String TRANSACTED_TAG = "transacted";
public static final String ROLLBACK_ON_PIPELINE_FAULTS = "rollbackOnPipelineFaults";
-
+
/** Deployment */
public static final String DEPLOYMENT_NAME_TAG = "deployment";
-
+
/** ActionProcessingPipeline */
public static final String MEP_ATTRIBUTE_TAG = "mep";
public static final String IN_XSD_ATTRIBUTE_TAG = "inXsd";
@@ -84,10 +86,11 @@
public static final String CONFIG_POLICY_FILE_TAG = "file";
public static final String RUN_AS_TAG = "runAs";
public static final String USE_CALLERS_IDENTIDY_TAG = "useCallersIdentity";
+ public static final String ROLES_ALLOWED = "rolesAllowed";
public static final String MODULE_NAME_TAG = "moduleName";
public static final String CALLBACK_HANDLER_TAG = "callbackHandler";
-
-
+
+
public static final String MEP_ONE_WAY = "OneWay" ;
public static final String MEP_REQUEST_RESPONSE = "RequestResponse" ;
@@ -108,7 +111,7 @@
/** Poller tagnames */
public static final String POLL_LATENCY_SECS_TAG = "pollLatencySeconds";
-
+
/** File Actions */
public static final String FILE_INPUT_DIR_TAG = "inputDir";
public static final String FILE_INPUT_SFX_TAG = "inputSuffix";
@@ -119,17 +122,17 @@
public static final String FILE_POST_SFX_TAG = "postSuffix";
public static final String FILE_POST_DEL_TAG = "postDelete";
public static final String FILE_POST_RENAME_TAG = "postRename";
-
+
/** Hibernate related */
public static final String HIBERNATE_OBJECT_DATA_TAG = "hibernateObject";
-
+
public static final String HIBERNATE_INTERCEPTOR_STATE = "hibernateInterceptorState";
public static final String HIBERNATE_INTERCEPTOR_ID = "hibernateInterceptorId";
public static final String HIBERNATE_INTERCEPTOR_TYPES = "hibernateInterceptorTypes";
public static final String HIBERNATE_INTERCEPTOR_NEWVALUES = "hibernateInterceptorNewValues";
public static final String HIBERNATE_INTERCEPTOR_OLDVALUES = "hibernateInterceptorOldValues";
public static final String HIBERNATE_INTERCEPTOR_PROPERTYNAMES = "hibernateInterceptorPropertyNames";
-
+
/** SQL related */
public static final String SQL_ROW_DATA_TAG = "sqlRowData";
public static final String SQL_TABLE_NAME_TAG = "tableName";
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -192,7 +192,7 @@
if(listener instanceof JmsListener) {
listenerConfigTree = JmsListenerMapper.map(root, (JmsListener)listener, model);
} else if (listener instanceof ScheduledListener) {
- listenerConfigTree = ScheduledListenerMapper.map(root, (ScheduledListener) listener);
+ listenerConfigTree = ScheduledListenerMapper.map(root, (ScheduledListener) listener, model);
} else if(listener instanceof FsListener) {
listenerConfigTree = FsListenerMapper.map(root, (FsListener)listener, model);
} else if (listener instanceof FtpListener) {
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -57,7 +57,6 @@
/**
* XMLBeans based configuration model instance.
*/
- @SuppressWarnings("unused")
private XMLBeansModel model;
/**
@@ -83,28 +82,24 @@
root = YADOMUtil.addElement(doc, "jbossesb-gateways");
root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
- try {
- List<Service> services = model.getServices();
- HashMap<String, HashMap> hm = new HashMap<String, HashMap>();
- for (Service service : services) {
- if (hm.containsKey(service.getCategory())) {
- HashMap<String, String> hc = hm.get(service.getCategory());
-
- if (hc.containsKey(service.getName())) {
- throw new ConfigurationException("Service names must be unique within a category. "
- + "The service name " + service.getName()
- + " is already defined within the " + service.getCategory() + " category.");
- } else {
- hc.put(service.getName(), service.getName());
- }
- } else {
- HashMap <String,String> hc = new HashMap<String,String>();
- hc.put(service.getName(), service.getName());
- hm.put(service.getCategory(), hc);
- }
- }
- } catch (ConfigurationException ce) {
- logger.error("", ce);
+ List<Service> services = model.getServices();
+ HashMap<String, HashMap<String, String>> hm = new HashMap<String, HashMap<String, String>>();
+ for (Service service : services) {
+ if (hm.containsKey(service.getCategory())) {
+ HashMap<String, String> hc = hm.get(service.getCategory());
+
+ if (hc.containsKey(service.getName())) {
+ throw new ConfigurationException("Service names must be unique within a category. "
+ + "The service name " + service.getName()
+ + " is already defined within the " + service.getCategory() + " category.");
+ } else {
+ hc.put(service.getName(), service.getName());
+ }
+ } else {
+ HashMap <String,String> hc = new HashMap<String,String>();
+ hc.put(service.getName(), service.getName());
+ hm.put(service.getCategory(), hc);
+ }
}
// Iterate over all the gateway configs and map them to the gateway configuration...
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -284,8 +284,8 @@
addActionDependencies(di.shortName, jbossEsb, deps) ;
JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml, di.shortName);
-
- final String deploymentName = getDeploymentName(deployment) ;
+ initialiseDeploymentName(deployment) ;
+ final String deploymentName = deployment.getDeploymentName() ;
di.context.put(JBoss4ESBDeploymentMetaData.class, new JBoss4ESBDeploymentMetaData(deployment, deploymentName, deps)) ;
// invoke super-class initialization
super.init(di);
@@ -684,14 +684,13 @@
return new File(esbDir, warFileName) ;
}
- private synchronized String getDeploymentName(final JBoss4ESBDeployment deployment)
+ private synchronized void initialiseDeploymentName(final JBoss4ESBDeployment deployment)
{
final String deploymentName = deployment.getDeploymentName() ;
- if (esbNames.add(deploymentName))
+ if (!esbNames.add(deploymentName))
{
- return deploymentName ;
+ deployment.setDeploymentName(deploymentName + ",uid=" + System.identityHashCode(deployment)) ;
}
- return deploymentName + ",uid=" + System.identityHashCode(deployment) ;
}
private synchronized void removeDeploymentName(final String deploymentName)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -37,7 +37,7 @@
public class JBoss4ESBDeployment extends ServiceMBeanSupport implements JBoss4ESBDeploymentMBean
{
private final String jbossEsbXml;
- private final String deploymentName ;
+ private String deploymentName ;
private List<ContractReferencePublisher> publishers ;
private ManagedLifecycleController controller;
private ClassLoader classloader;
@@ -78,6 +78,11 @@
return deploymentName ;
}
+ public void setDeploymentName(final String deploymentName)
+ {
+ this.deploymentName = deploymentName ;
+ }
+
public List<ContractReferencePublisher> getPublishers()
{
return publishers ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -20,7 +20,9 @@
package org.jboss.soa.esb.listeners.config.mappers;
import org.w3c.dom.Element;
+import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
import org.jboss.soa.esb.listeners.config.xbeanmodel.ScheduledListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.ScheduleListener;
import org.jboss.soa.esb.dom.YADOMUtil;
@@ -30,7 +32,9 @@
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
public class ScheduledListenerMapper {
- public static Element map(Element root, ScheduledListenerDocument.ScheduledListener listener) {
+ public static Element map(Element root, ScheduledListenerDocument.ScheduledListener listener, XMLBeansModel model) {
+ Service service = model.getService(listener);
+ boolean isGateway = listener.getIsGateway();
Element listenerNode = YADOMUtil.addElement(root, "listener");
listenerNode.setAttribute("name", listener.getName());
@@ -41,6 +45,7 @@
listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(listener.getTransacted()));
}
+ MapperUtil.mapListenerServiceAttributes(listenerNode, service, isGateway) ;
// Map the <property> elements targeted at the listener - from the listener itself.
MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -49,13 +49,17 @@
import org.jboss.soa.esb.message.body.content.BytesBody;
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.services.registry.RegistryFactory;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
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.http.JbrHttpSecurityInfoExtractor;
import org.jboss.soa.esb.services.security.auth.ws.WSSecurityInfoExtractor;
import org.jboss.soa.esb.util.ClassUtil;
import javax.management.MBeanServer;
+
+import java.io.Serializable;
import java.net.InetAddress;
import java.net.URI;
import java.net.URISyntaxException;
@@ -118,7 +122,7 @@
/**
* Connector configuration.
*/
- private Map<String, String> connectorConfig = new HashMap<String, String>();
+ private final Map<String, String> connectorConfig = new HashMap<String, String>();
/**
* Server URI.
*/
@@ -134,11 +138,11 @@
/**
* Service category to which this listener is associated.
*/
- private String serviceCategory;
+ private final String serviceCategory;
/**
* Service name to which this listener is associated.
*/
- private String serviceName;
+ private final String serviceName;
/**
* Listener endpoint EPR.
*/
@@ -150,7 +154,7 @@
/**
* Asynchronous response.
*/
- private String asyncResponse;
+ private final String asyncResponse;
/**
* Install our own marshaller/unmarshaller for HTTP.
@@ -206,10 +210,11 @@
* ***************************************************************************
*
* AbstractManagedLifecycle methods...
- *
+ *
* ****************************************************************************
*/
+ @Override
protected void doInitialise() throws ManagedLifecycleException {
if (isInitialised()) {
throw new ManagedLifecycleException("Unexpected request to initialise JBoss Remoting Gateway listener '" + getConfig().getName() + "'. Gateway already initialised.");
@@ -226,6 +231,7 @@
initialised = true;
}
+ @Override
protected void doStart() throws ManagedLifecycleException {
if (!isInitialised()) {
throw new ManagedLifecycleException("Unexpected request to start JBoss Remoting Gateway listener '" + getConfig().getName() + "'. Gateway not initialised.");
@@ -247,6 +253,7 @@
}
}
+ @Override
protected void doStop() throws ManagedLifecycleException {
if (!isStarted()) {
throw new ManagedLifecycleException("Unexpected request to stop JBoss Remoting Gateway listener '" + getConfig().getName() + "'. Gateway not running.");
@@ -302,6 +309,7 @@
}
}
+ @Override
protected void doDestroy() throws ManagedLifecycleException {
}
@@ -479,7 +487,8 @@
public static class JBossRemotingMessageComposer<T extends InvocationRequest> extends AbstractMessageComposer<T> {
private MessagePayloadProxy payloadProxy;
-
+
+ @Override
public void setConfiguration(ConfigTree config) {
super.setConfiguration(config);
payloadProxy = new MessagePayloadProxy(config,
@@ -489,10 +498,12 @@
payloadProxy.setNullSetPayloadHandling(NullPayloadHandling.LOG);
}
+ @Override
protected MessagePayloadProxy getPayloadProxy() {
return payloadProxy;
}
+ @Override
@SuppressWarnings("unchecked")
protected void populateMessage(Message message, T invocationRequest) throws MessageDeliverException {
@@ -501,22 +512,31 @@
// Copy the request properties onto the message...
Map properties = invocationRequest.getRequestPayload();
-
-
+
+
if (properties != null) {
// Extract any jbr http security information that may exist
AuthenticationRequest authRequest = new JbrHttpSecurityInfoExtractor().extractSecurityInfo(properties);
-
+
// Extract any ws security information that may exist
if ( authRequest == null ) {
authRequest = new WSSecurityInfoExtractor().extractSecurityInfo((String) invocationRequest.getParameter());
}
-
+
if ( authRequest != null ) {
- message.getProperties().setProperty(SecurityService.AUTH_REQUEST, authRequest);
+ try {
+ byte[] encrypted = PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest);
+ if (encrypted != null) {
+ message.getProperties().setProperty(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);
+ }
}
-
-
+
+
// Purposely not iterating over the Map.Entry Set because there's
// a bug in the Map impl used by JBossRemoting. Not all the
// "values" are actually in the Map.Entry set. Some of them are handled
@@ -531,6 +551,7 @@
}
}
+ @Override
public Object decompose(Message message, T invocationRequest) throws MessageDeliverException {
Properties properties = message.getProperties();
String propertyNames[] = properties.getNames();
@@ -549,7 +570,7 @@
responseMap.put(header.getName(), header.getValue());
}
}
-
+
return super.decompose(message, invocationRequest);
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -112,8 +112,7 @@
this.config = config;
- lifecycleController = new LifecycleController(this, config);
- lifecycleController.registerMBean();
+ lifecycleController = new LifecycleController(new LifecycleControllerAdapter());
}
/**
@@ -127,23 +126,27 @@
public final void initialise()
throws ManagedLifecycleException
{
- changeState(ManagedLifecycleState.INITIALISING) ;
- try
+ if (!ManagedLifecycleState.INITIALISED.equals(getState()))
{
- doInitialise() ;
- changeState(ManagedLifecycleState.INITIALISED) ;
+ changeState(ManagedLifecycleState.INITIALISING) ;
+ try
+ {
+ doInitialise() ;
+ changeState(ManagedLifecycleState.INITIALISED) ;
+ lifecycleController.registerMBean();
+ }
+ catch (final ManagedLifecycleException mle)
+ {
+ changeState(ManagedLifecycleState.DESTROYED) ;
+ throw mle ;
+ }
+ catch (final Exception ex)
+ {
+ logger.warn("Unexpected exception caught while initialisation", ex) ;
+ changeState(ManagedLifecycleState.DESTROYED) ;
+ throw new ManagedLifecycleException(ex) ;
+ }
}
- catch (final ManagedLifecycleException mle)
- {
- changeState(ManagedLifecycleState.DESTROYED) ;
- throw mle ;
- }
- catch (final Exception ex)
- {
- logger.warn("Unexpected exception caught while initialisation", ex) ;
- changeState(ManagedLifecycleState.DESTROYED) ;
- throw new ManagedLifecycleException(ex) ;
- }
}
/**
@@ -163,25 +166,27 @@
public final void start()
throws ManagedLifecycleException
{
- changeState(ManagedLifecycleState.STARTING) ;
- try
+ if (!ManagedLifecycleState.STARTED.equals(getState()))
{
- doStart() ;
- changeState(ManagedLifecycleState.STARTED) ;
- lifecycleController.setStartTime(System.currentTimeMillis());
+ changeState(ManagedLifecycleState.STARTING) ;
+ try
+ {
+ doStart() ;
+ changeState(ManagedLifecycleState.STARTED) ;
+ lifecycleController.setStartTime(System.currentTimeMillis());
+ }
+ catch (final ManagedLifecycleException mle)
+ {
+ changeState(ManagedLifecycleState.STOPPED);
+ throw mle ;
+ }
+ catch (final Exception ex)
+ {
+ logger.warn("Unexpected exception caught while starting", ex) ;
+ changeState(ManagedLifecycleState.STOPPED) ;
+ throw new ManagedLifecycleException(ex) ;
+ }
}
- catch (final ManagedLifecycleException mle)
- {
- changeState(ManagedLifecycleState.STOPPED);
- lifecycleController.unsetStartTime();
- throw mle ;
- }
- catch (final Exception ex)
- {
- logger.warn("Unexpected exception caught while starting", ex) ;
- changeState(ManagedLifecycleState.STOPPED) ;
- throw new ManagedLifecycleException(ex) ;
- }
}
/**
@@ -204,25 +209,28 @@
public final void stop()
throws ManagedLifecycleException
{
- changeState(ManagedLifecycleState.STOPPING) ;
- try
+ if (!ManagedLifecycleState.STOPPED.equals(getState()))
{
- doStop() ;
+ changeState(ManagedLifecycleState.STOPPING) ;
+ try
+ {
+ doStop() ;
+ }
+ catch (final ManagedLifecycleException mle)
+ {
+ throw mle ;
+ }
+ catch (final Exception ex)
+ {
+ logger.warn("Unexpected exception caught while stopping", ex) ;
+ throw new ManagedLifecycleException(ex) ;
+ }
+ finally
+ {
+ changeState(ManagedLifecycleState.STOPPED) ;
+ lifecycleController.unsetStartTime();
+ }
}
- catch (final ManagedLifecycleException mle)
- {
- throw mle ;
- }
- catch (final Exception ex)
- {
- logger.warn("Unexpected exception caught while stopping", ex) ;
- throw new ManagedLifecycleException(ex) ;
- }
- finally
- {
- changeState(ManagedLifecycleState.STOPPED) ;
- lifecycleController.unsetStartTime();
- }
}
/**
@@ -243,25 +251,28 @@
public final void destroy()
throws ManagedLifecycleException
{
- changeState(ManagedLifecycleState.DESTROYING) ;
- try
+ if (!ManagedLifecycleState.DESTROYED.equals(getState()))
{
- doDestroy() ;
+ changeState(ManagedLifecycleState.DESTROYING) ;
+ lifecycleController.unregisterMBean();
+ try
+ {
+ doDestroy() ;
+ }
+ catch (final ManagedLifecycleException mle)
+ {
+ throw mle ;
+ }
+ catch (final Exception ex)
+ {
+ logger.warn("Unexpected exception caught while destroying", ex) ;
+ throw new ManagedLifecycleException(ex) ;
+ }
+ finally
+ {
+ changeState(ManagedLifecycleState.DESTROYED) ;
+ }
}
- catch (final ManagedLifecycleException mle)
- {
- throw mle ;
- }
- catch (final Exception ex)
- {
- logger.warn("Unexpected exception caught while destroying", ex) ;
- throw new ManagedLifecycleException(ex) ;
- }
- finally
- {
- changeState(ManagedLifecycleState.DESTROYED) ;
- lifecycleController.unsetStartTime();
- }
}
/**
@@ -477,4 +488,52 @@
{
return config;
}
+
+ private final class LifecycleControllerAdapter implements ManagedLifecycleAdapter
+ {
+ /**
+ * Start the managed instance.
+ * <p/>
+ * This method is called to inform the managed instance that it can initialise
+ * resources prior to enabling the service.
+ */
+ public void start()
+ throws ManagedLifecycleException
+ {
+ AbstractManagedLifecycle.this.start() ;
+ }
+
+ /**
+ * Stop the managed instance.
+ * <p/>
+ * This method is called to inform the managed instance that it must disable
+ * resources associated with the running service. The service may choose to
+ * disable the resources asynchronously provided that any subsequent call to
+ * {@link #start()} or {@link #destroy()} blocks until these resources have been
+ * disabled.
+ */
+ public void stop()
+ throws ManagedLifecycleException
+ {
+ AbstractManagedLifecycle.this.stop() ;
+ }
+
+ /**
+ * Get the state of the managed instance.
+ * @return The managed instance state.
+ */
+ public ManagedLifecycleState getState()
+ {
+ return AbstractManagedLifecycle.this.getState() ;
+ }
+
+ /**
+ * Get the configuration assoicated with the ManagedLifecycle.
+ * @return Configuration.
+ */
+ public ConfigTree getConfig()
+ {
+ return AbstractManagedLifecycle.this.getConfig() ;
+ }
+ }
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -48,6 +48,7 @@
import org.apache.log4j.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
import org.jboss.soa.esb.listeners.ListenerTagNames;
/**
@@ -56,9 +57,9 @@
* @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
*/
public class LifecycleController implements DynamicMBean {
- private ManagedLifecycle m_lifecycle;
- private ConfigTree m_config;
+ private ManagedLifecycleAdapter m_lifecycle;
private String m_startTime;
+ private final ObjectName listObjectName ;
private static final Logger logger = Logger.getLogger(LifecycleController.class);
@@ -66,20 +67,18 @@
public static final String STARTTIME_ATTRIB = "StartDate";
public static final String XML_ATTRIB = "ListenerXMLAsHtml";
- public static final String INIT_ACTION = "initialise";
public static final String START_ACTION = "start";
public static final String STOP_ACTION = "stop";
- public static final String DESTROY_ACTION = "destroy";
/**
* Constructor using lifecycle and config tree.
* @param f_lifecycle lifecycle
* @param f_configtree config tree
*/
- public LifecycleController(ManagedLifecycle f_lifecycle, ConfigTree f_configtree) {
+ public LifecycleController(ManagedLifecycleAdapter f_lifecycle) {
m_lifecycle = f_lifecycle;
- m_config = f_configtree;
m_startTime = "";
+ listObjectName = getObjectName() ;
}
/**
@@ -102,7 +101,7 @@
* Lifecycle mutator.
* @param f_aml lifecycle
*/
- public void setLifecycle(ManagedLifecycle f_aml) {
+ public void setLifecycle(ManagedLifecycleAdapter f_aml) {
m_lifecycle = f_aml;
}
@@ -111,32 +110,10 @@
* @return configtree XML
*/
public String getListenerXMLAsHtml() {
- return m_config.toXml().replace("<", "<").replace(">", ">");
+ return m_lifecycle.getConfig().toXml().replace("<", "<").replace(">", ">");
}
/**
- * ConfigTree mutator.
- * @param f_ct config tree
- */
- public void setConfigTree(ConfigTree f_ct) {
- m_config = f_ct;
- }
-
- /**
- * Calls destroy on the lifecycle.
- */
- public void destroy() throws ManagedLifecycleException {
- m_lifecycle.destroy();
- }
-
- /**
- * Calls initialise on the lifecycle.
- */
- public void initialise() throws ManagedLifecycleException {
- m_lifecycle.initialise();
- }
-
- /**
* Calls start on the lifecycle.
*/
public void start() throws ManagedLifecycleException {
@@ -154,6 +131,9 @@
* Register this MBean with JBoss.
*/
protected void registerMBean() {
+ if (listObjectName == null) {
+ return ;
+ }
MBeanServer mbeanServer = null;
try {
mbeanServer = MBeanServerLocator.locateJBoss();
@@ -163,55 +143,8 @@
return;
}
- ObjectName listObjectName = null;
try {
- String categoryName = m_config.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
- String serviceName = m_config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
- String listenerName = m_config.getName();
-
- StringBuffer objectName = new StringBuffer();
- if (categoryName != null) {
- objectName.append(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG + "=" + categoryName);
- }
-
- if (serviceName != null) {
- if (objectName.length() > 0) {
- objectName.append(",");
- }
- objectName.append(ListenerTagNames.SERVICE_NAME_TAG + "=" + serviceName);
- }
-
- if (listenerName != null) {
- if (objectName.length() > 0) {
- objectName.append(",");
- }
- if ("true".equals(m_config.getAttribute(ListenerTagNames.IS_GATEWAY_TAG))) {
- objectName.append("gateway-name=" + listenerName);
- } else {
- objectName.append("listener-name=" + listenerName);
- }
-
- }
-
- listObjectName = new ObjectName("jboss.esb:" + objectName.toString());
- } catch (MalformedObjectNameException e1) {
- logger.error("", e1);
- } catch (NullPointerException e1) {
- logger.error("", e1);
- }
-
- if (mbeanServer.isRegistered(listObjectName)) {
- try {
- mbeanServer.unregisterMBean(listObjectName);
- } catch (InstanceNotFoundException e) {
- logger.error("", e);
- } catch (MBeanRegistrationException e) {
- logger.error("", e);
- }
- }
-
- try {
- mbeanServer.registerMBean(this, listObjectName);
+ mbeanServer.registerMBean(this, listObjectName);
} catch (InstanceAlreadyExistsException e) {
logger.error("", e);
} catch (MBeanRegistrationException e) {
@@ -222,15 +155,41 @@
}
/**
+ * Unregister this MBean with JBoss.
+ */
+ protected void unregisterMBean() {
+ if (listObjectName == null) {
+ return ;
+ }
+ MBeanServer mbeanServer = null;
+ try {
+ mbeanServer = MBeanServerLocator.locateJBoss();
+ } catch (IllegalStateException ise) {
+ // If we can't find a JBoss MBeanServer, just return
+ // Needed for unit tests
+ return;
+ }
+
+ try {
+ mbeanServer.unregisterMBean(listObjectName);
+ } catch (InstanceNotFoundException e) {
+ logger.error("", e);
+ } catch (MBeanRegistrationException e) {
+ logger.error("", e);
+ }
+ }
+
+ /**
* Gets the list of attributes. We return all Lifecycle attributes from the ConfigTree,
* and the start time, configtree XML, and the lifecycle state.
*/
public AttributeList getAttributes(String[] arg0) {
+ final ConfigTree config = m_lifecycle.getConfig() ;
AttributeList attributeList = new AttributeList();
- Set<String> set = m_config.getAttributeNames();
+ Set<String> set = config.getAttributeNames();
String[] attribs = (String[])set.toArray(new String[set.size()]);
for (int i = 0; i < attribs.length; i++) {
- Attribute at = new Attribute(attribs[i], m_config.getAttribute(attribs[i]));
+ Attribute at = new Attribute(attribs[i], config.getAttribute(attribs[i]));
attributeList.add(at);
}
@@ -259,7 +218,7 @@
} else if (name.equals(XML_ATTRIB)) {
value = getListenerXMLAsHtml();
} else {
- value = m_config.getAttribute(name);
+ value = m_lifecycle.getConfig().getAttribute(name);
}
if (value != null)
return value;
@@ -275,7 +234,7 @@
*/
public MBeanInfo getMBeanInfo() {
SortedSet<String> names = new TreeSet<String>();
- for (Object name : m_config.getAttributeNames())
+ for (Object name : m_lifecycle.getConfig().getAttributeNames())
names.add((String) name);
names.add(LIFECYCLESTATE_ATTRIB);
names.add(STARTTIME_ATTRIB);
@@ -288,9 +247,6 @@
name, "java.lang.String", "Property " + name, true, false, false);
}
MBeanOperationInfo[] opers = {
- new MBeanOperationInfo(
- INIT_ACTION, "Initialise the lifecycle",
- null, "void", MBeanOperationInfo.ACTION),
new MBeanOperationInfo(
START_ACTION, "Start the lifecycle",
null, "void", MBeanOperationInfo.ACTION),
@@ -298,9 +254,6 @@
new MBeanOperationInfo(
STOP_ACTION, "Stop the lifecycle",
null, "void", MBeanOperationInfo.ACTION),
- new MBeanOperationInfo(
- DESTROY_ACTION, "Destroy the lifecycle",
- null, "void", MBeanOperationInfo.ACTION),
};
return new MBeanInfo(
this.getClass().getName(), "Lifecycle Controller MBean",
@@ -322,14 +275,6 @@
return "Error invoking " + method + ": " + e.toString();
}
return "Invoking the " + method + " on the lifecycle.";
- } else if (method.equalsIgnoreCase(INIT_ACTION)) {
- try {
- initialise();
- } catch (ManagedLifecycleException e) {
- logger.error("", e);
- return "Error invoking " + method + ": " + e.toString();
- }
- return "Invoking the " + method + " on the lifecycle.";
} else if (method.equalsIgnoreCase(STOP_ACTION)) {
try {
stop();
@@ -338,14 +283,6 @@
return "Error invoking " + method + ": " + e.toString();
}
return "Invoking the " + method + " on the lifecycle.";
- } else if (method.equalsIgnoreCase(DESTROY_ACTION)) {
- try {
- destroy();
- } catch (ManagedLifecycleException e) {
- logger.error("", e);
- return "Error invoking " + method + ": " + e.toString();
- }
- return "Invoking the " + method + " on the lifecycle.";
} else {
throw new ReflectionException(new NoSuchMethodException(method));
}
@@ -364,5 +301,59 @@
*/
public AttributeList setAttributes(AttributeList arg0) {
return null;
- }
+ }
+
+ protected ObjectName getObjectName()
+ {
+ ObjectName listObjectName = null;
+ try {
+ final ConfigTree config = m_lifecycle.getConfig() ;
+ String categoryName = config.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+ String serviceName = config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+ String targetCategoryName = config.getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
+ String targetServiceName = config.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
+ String listenerName = config.getAttribute(ListenerTagNames.NAME_TAG);
+ final LifecycleResourceManager lifecycleResourceManager = LifecycleResourceManager.getSingleton() ;
+ final String[] associatedDeployments = lifecycleResourceManager.getAssociatedDeployments() ;
+ final String deployment ;
+ if ((associatedDeployments != null) && (associatedDeployments.length == 1))
+ {
+ deployment = associatedDeployments[0] ;
+ }
+ else
+ {
+ deployment = lifecycleResourceManager.getIdentity() ;
+ }
+
+ StringBuffer objectName = new StringBuffer();
+ append(objectName, "deployment", deployment) ;
+ append(objectName, ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, categoryName) ;
+ append(objectName, ListenerTagNames.SERVICE_NAME_TAG, serviceName);
+ append(objectName, ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, targetCategoryName);
+ append(objectName, ListenerTagNames.TARGET_SERVICE_NAME_TAG, targetServiceName);
+
+ if ("true".equals(config.getAttribute(ListenerTagNames.IS_GATEWAY_TAG))) {
+ append(objectName, "gateway-name", listenerName) ;
+ } else {
+ append(objectName, "listener-name", listenerName) ;
+ }
+
+ listObjectName = new ObjectName("jboss.esb:" + objectName.toString());
+ } catch (MalformedObjectNameException e1) {
+ logger.error("", e1);
+ } catch (NullPointerException e1) {
+ logger.error("", e1);
+ }
+ return listObjectName ;
+ }
+
+ private void append(final StringBuffer objectName, final String name, final String value)
+ {
+ if ((value != null) && (value.length() > 0)) {
+ if (objectName.length() > 0) {
+ objectName.append(",") ;
+ }
+ objectName.append(name).append("=").append(value) ;
+ }
+ }
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -28,8 +28,6 @@
* @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
*/
public interface LifecycleControllerMBean {
- public void initialise() throws ManagedLifecycleException;
public void start() throws ManagedLifecycleException;
public void stop() throws ManagedLifecycleException;
- public void destroy() throws ManagedLifecycleException;
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleAdapter.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleAdapter.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleAdapter.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleAdapter.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,63 @@
+/*
+ * 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.lifecycle;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Adapter interface used for management through lifecycle MBean
+ */
+public interface ManagedLifecycleAdapter
+{
+ /**
+ * Start the managed instance.
+ * <p/>
+ * This method is called to inform the managed instance that it can initialise
+ * resources prior to enabling the service.
+ */
+ public void start()
+ throws ManagedLifecycleException ;
+
+ /**
+ * Stop the managed instance.
+ * <p/>
+ * This method is called to inform the managed instance that it must disable
+ * resources associated with the running service. The service may choose to
+ * disable the resources asynchronously provided that any subsequent call to
+ * {@link #start()} or {@link #destroy()} blocks until these resources have been
+ * disabled.
+ */
+ public void stop()
+ throws ManagedLifecycleException ;
+
+ /**
+ * Get the state of the managed instance.
+ * @return The managed instance state.
+ */
+ public ManagedLifecycleState getState() ;
+
+ /**
+ * Get the configuration assoicated with the ManagedLifecycle.
+ * @return Configuration.
+ */
+ public ConfigTree getConfig();
+}
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -90,7 +90,7 @@
try
{
if(scheduleProvider != null) {
- scheduleProvider.standby();
+ scheduleProvider.stop();
}
} catch (SchedulingException e) {
stopAndDestroy(false);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -22,11 +22,13 @@
package org.jboss.soa.esb.listeners.message;
+import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.security.auth.Subject;
+import javax.xml.validation.Schema;
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.XMLHelper;
@@ -47,11 +49,13 @@
import org.jboss.soa.esb.couriers.CourierFactory;
import org.jboss.soa.esb.couriers.CourierUtil;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.message.errors.Factory;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.Properties;
import org.jboss.soa.esb.services.persistence.MessageStore;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
import org.jboss.soa.esb.services.security.SecurityConfig;
import org.jboss.soa.esb.services.security.SecurityConfigUtil;
import org.jboss.soa.esb.services.security.SecurityContext;
@@ -62,11 +66,9 @@
import org.jboss.soa.esb.util.ClassUtil;
import org.xml.sax.SAXException;
-import javax.xml.validation.Schema;
-
/**
* Action Processing Pipeline. <p/> Runs a list of action classes on a message
- *
+ *
* @author <a
* href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
* @author kevin
@@ -89,7 +91,7 @@
* The active flag.
*/
private final AtomicBoolean active = new AtomicBoolean(false);
-
+
/**
* The request XSD.
*/
@@ -100,30 +102,33 @@
private final Schema responseSchema ;
/**
- *
+ *
*/
- private ServiceMessageCounter serviceMessageCounter;
-
+ private final ServiceMessageCounter serviceMessageCounter;
+
/**
* The transactional flag.
*/
private boolean transactional ;
-
+
/**
* The flag indicating an action pipeline for a one way MEP.
*/
- private boolean oneWay ;
-
+ private final boolean oneWay ;
+
/**
* The flag indicating whether we are using implicit or explicit processing.
*/
- private boolean defaultProcessing ;
+ private final boolean defaultProcessing ;
+ /**
+ * ESB Service Security configuration information.
+ */
private SecurityConfig securityConf;
-
+
/**
* public constructor
- *
+ *
* @param config
* The pipeline configuration.
*/
@@ -158,7 +163,7 @@
{
throw new ConfigurationException("Unrecognised action MEP: " + mep) ;
}
-
+
final boolean validate = config.getBooleanAttribute(ListenerTagNames.VALIDATE_ATTRIBUTE_TAG, false) ;
if (validate)
{
@@ -192,7 +197,7 @@
}
this.oneWay = oneWay ;
this.defaultProcessing = defaultProcessing ;
-
+
final ConfigTree[] actionList = config
.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
@@ -203,9 +208,15 @@
final ArrayList<ActionPipelineProcessor> processorList = new ArrayList<ActionPipelineProcessor>();
- serviceMessageCounter = new ServiceMessageCounter(config);
- serviceMessageCounter.registerMBean();
-
+ try
+ {
+ serviceMessageCounter = ServiceMessageCounterLifecycleResource.getServiceMessageCounter(config);
+ }
+ catch (final LifecycleResourceException lre)
+ {
+ throw new ConfigurationException("Failed to obtain the service message counter", lre);
+ }
+
for (final ConfigTree actionConfig : actionList)
{
final String actionClassTag = actionConfig
@@ -292,12 +303,12 @@
}
processors = processorList
.toArray(new ActionPipelineProcessor[processorList.size()]);
-
+
ConfigTree[] securityConfigs = config.getChildren( ListenerTagNames.SECURITY_TAG );
if (securityConfigs.length > 0)
{
securityConf = SecurityConfigUtil.createSecurityConfig(securityConfigs[0]);
- LOGGER.info(securityConf);
+ LOGGER.debug(securityConf);
final SecurityService securitySerivce = SecurityServiceFactory.getSecurityService();
securitySerivce.configure();
securitySerivce.refreshSecurityConfig();
@@ -306,7 +317,7 @@
/**
* Handle the initialisation of the pipeline
- *
+ *
* @throws ConfigurationException
* For errors during initialisation.
*/
@@ -329,7 +340,7 @@
}
}
active.set(true);
-
+
}
/**
@@ -343,7 +354,7 @@
/**
* Process the specified message.
- *
+ *
* @param message
* The current message.
* @return true if the processing was successful, false otherwise.
@@ -360,9 +371,22 @@
LOGGER.debug("pipeline process for message: "+message.getHeader());
}
- if (securityConf != null)
+ SecurityContext securityContext = null;
+ try
+ {
+ // Check if a encrypted SecurityContext was passed with the Message to this service.
+ securityContext = SecurityContext.decryptContext((byte[])message.getProperties().getProperty(SecurityService.CONTEXT));
+ }
+ catch (final SecurityServiceException e)
+ {
+ LOGGER.error("Security exception: ", e);
+ // just make sure the securityContext is null. This will trigger a new auth if security is enabled.
+ securityContext = null;
+ }
+
+ if (securityConf != null || securityContext != null)
{
- return processPipelineSecured(message);
+ return processPipelineSecured(message, securityContext);
}
else
{
@@ -377,74 +401,81 @@
faultTo(callDetails, Factory.createErrorMessage(Factory.NOT_ENABLED, message, null));
long procTime = System.nanoTime() - start;
- DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
+ DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
MessageStatusBean.MESSAGE_FAILED));
-
+
return false;
}
}
-
- private boolean processPipelineSecured(final Message message)
+
+ private boolean processPipelineSecured(final Message message, SecurityContext securityContext)
{
final Call callDetails = new Call() ;
callDetails.copy(message.getHeader().getCall()) ;
-
- /*
- * If the gateway or another service passed a security context, use that context for authentication.
- * A SecurityContext's subject will only contain Principal(given that they are serializable), but a Principal
- * might represent an id or a SSO Token that can be used for authentication.
- * If a SubjectContext does not exist then create one to drive the authentication.
- */
- SecurityContext securityContext = SecurityContext.getContext(message);
- LOGGER.debug("Security Context before authentication : " + securityContext);
-
- if ( securityContext == null )
+
+ try
{
- securityContext = new SecurityContext();
+ // always perform authentication if the service is security enabled.
+ if (securityConf != null )
+ {
+ if (securityContext == null)
+ {
+ // no existing security context exist. Create one to drive the autentication.
+ securityContext = new SecurityContext();
+
+ // get the authentication request from the message
+ byte[] encrypted = (byte[]) message.getProperties().getProperty(SecurityService.AUTH_REQUEST);
+ AuthenticationRequest authRequest = (AuthenticationRequest) PublicCryptoUtil.INSTANCE.decrypt(encrypted);
+
+ // authenticate the caller
+ SecurityServiceFactory.getSecurityService().authenticate(securityConf, securityContext, authRequest);
+ }
+ /*
+ * The SecurityContext was not null so we were able to decrypt the security context
+ * and this is a valid authenticated request and re-authentication is not done.
+ */
+
+ // check the allowed roles if configured.
+ boolean checkRolesAllowed = SecurityServiceFactory.getSecurityService().checkRolesAllowed(securityConf.getRolesAllowed(), securityContext);
+ if (!checkRolesAllowed)
+ {
+ throw new SecurityServiceException("Caller did not belong to any of the rolesAllowed " + securityConf.getRolesAllowed());
+ }
+ }
}
-
- try
- {
- // get the authentication request if one exists.
- AuthenticationRequest authRequest = (AuthenticationRequest) message.getProperties().getProperty( SecurityService.AUTH_REQUEST );
-
- // perform the authentication
- SecurityServiceFactory.getSecurityService().authenticate(securityConf, securityContext, authRequest);
-
- // add the security context to the message
- message.getProperties().setProperty( SecurityService.CONTEXT, securityContext );
-
- }
catch (final SecurityServiceException e)
{
- LOGGER.error( "Authentication exception : ", e);
+ LOGGER.error( "SecurityService exception : ", e);
faultTo(callDetails, Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, e));
return false;
- }
+ }
catch (final ConfigurationException e)
{
- LOGGER.error( "Authentication exception : ", e);
+ LOGGER.error( "SecurityService exception : ", e);
faultTo(callDetails, Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, e));
return false;
}
finally
{
- // always remove the authentication request as it contains sensitive information
- message.getProperties().remove( SecurityService.AUTH_REQUEST );
+ // always remove the security context
+ message.getProperties().remove(SecurityService.CONTEXT);
+ message.getProperties().remove(SecurityService.AUTH_REQUEST);
}
-
- PrivilegedAction<Boolean> action = new PrivilegedAction<Boolean>()
+
+ // the work to be performed in the context of the authenticated caller
+ PrivilegedAction<Boolean> action = new PrivilegedAction<Boolean>()
{
public Boolean run()
{
return processPipeline(message);
}
};
-
- Boolean processResult = (Boolean) Subject.doAsPrivileged(securityContext.getSubject(), action, null);
+
+ Boolean processResult = (Boolean)Subject.doAsPrivileged(securityContext.getSubject(), action, null);
+
return processResult.booleanValue();
}
-
+
private boolean processPipeline(final Message message)
{
long start = System.nanoTime();
@@ -472,7 +503,7 @@
final Message[] messages = new Message[numProcessors];
Message currentMessage = message;
-
+
for (int count = 0; count < numProcessors; count++)
{
final ActionPipelineProcessor processor = processors[count];
@@ -481,7 +512,7 @@
try
{
LOGGER.debug("executing processor " + count+ " "+processor+" "+message.getHeader());
-
+
currentMessage = processor.process(currentMessage);
if (currentMessage == null)
@@ -502,9 +533,9 @@
* Is this an application specific error? If so, try to return
* the error message to the identified recipient.
*/
-
+
final boolean throwRuntime = transactional && (ex instanceof RuntimeException) ;
-
+
if (ex instanceof ActionProcessingFaultException)
{
ActionProcessingFaultException fault = (ActionProcessingFaultException) ex;
@@ -524,9 +555,9 @@
long procTime = System.nanoTime() - start;
serviceMessageCounter.update(new ActionStatusBean(procTime, count, message,
ActionStatusBean.ACTION_FAILED));
- DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
+ DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
MessageStatusBean.MESSAGE_FAILED));
-
+
if (throwRuntime)
{
throw (RuntimeException)ex ;
@@ -565,23 +596,23 @@
{
notifySuccess(messages);
long procTime = System.nanoTime() - start;
- DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
+ DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
MessageStatusBean.MESSAGE_SENT));
result = true;
}
}
-
+
if (validationFailure != null)
{
final MessageValidationException mve = new MessageValidationException(validationFailure) ;
faultTo(callDetails, Factory.createErrorMessage(Factory.VALIDATION_FAILURE, message, mve));
long procTime = System.nanoTime() - start;
- DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
+ DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message,
MessageStatusBean.MESSAGE_FAILED));
}
return result ;
}
-
+
/**
* Set the transactional flag for this pipeline.
* @param transactional true if running within a transaction, false otherwise.
@@ -590,7 +621,7 @@
{
this.transactional = transactional ;
}
-
+
/**
* Get the transactional flag for this pipeline.
* @return true if running within a transaction, false otherwise.
@@ -602,7 +633,7 @@
/**
* Send the reply.
- *
+ *
* @param callDetails
* the call details for the original request.
* @param message
@@ -628,7 +659,7 @@
/**
* Send the fault message to the EPR.
- *
+ *
* @param callDetails
* the call details for the original request.
* @param faultToAddress
@@ -653,7 +684,7 @@
messageTo(faultToEPR, message, MessageType.fault);
}
}
-
+
/**
* Sent the message to the DLQ service.
* @param callDetails The original call details.
@@ -671,7 +702,7 @@
try
{
final ServiceInvoker serviceInvoker = new ServiceInvoker(ServiceInvoker.dlqService) ;
-
+
serviceInvoker.deliverAsync(message) ;
}
catch (final MessageDeliverException mde)
@@ -720,7 +751,7 @@
/**
* Handle the destruction of the pipeline from the specified position.
- *
+ *
* @param initialPosition
* The initial position to begin destruction.
*/
@@ -745,7 +776,7 @@
/**
* Notify the processors of an error during processing.
- *
+ *
* @param initialPosition
* The position of the first processor to notify.
* @param ex
@@ -775,7 +806,7 @@
/**
* Notify the processors of a successful pipeline process.
- *
+ *
* @param messages
* The messages associated with the processors.
*/
@@ -801,5 +832,5 @@
}
}
}
-
+
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -255,6 +255,18 @@
+ " finished on thread " + Thread.currentThread().getName());
}
}
+
+ /**
+ * Handle the stop of the managed instance.
+ *
+ * @throws ManagedLifecycleException for errors while stopping.
+ */
+ protected void doStop()
+ throws ManagedLifecycleException
+ {
+ super.doStop();
+ _execService.shutdown() ;
+ }
/**
* We have JMS transactional delivery/work semantics: before pulling a unit of work
@@ -361,22 +373,18 @@
protected void doThreadedDestroy()
throws ManagedLifecycleException
{
- if (_execService != null)
+ try
{
- try
- {
- _execService.shutdown() ;
- checkExecutorTermination() ;
- }
- catch (final ManagedLifecycleException ex)
- {
- throw ex;
- }
- catch (final Throwable ex)
- {
- _logger.warn("Caught throwable during shutdown: "+ex);
- }
+ checkExecutorTermination() ;
}
+ catch (final ManagedLifecycleException ex)
+ {
+ throw ex;
+ }
+ catch (final Throwable ex)
+ {
+ _logger.warn("Caught throwable during shutdown: "+ex);
+ }
pipeline.destroy() ;
pipeline = null ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -23,6 +23,7 @@
package org.jboss.soa.esb.listeners.message;
import java.util.Hashtable;
+
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;
@@ -36,11 +37,11 @@
import javax.management.MBeanOperationInfo;
import javax.management.MBeanRegistrationException;
import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
import javax.management.NotCompliantMBeanException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
+import org.apache.log4j.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.ListenerTagNames;
@@ -60,8 +61,8 @@
private Hashtable<String, Integer> actionBytesProcessedHash;
private Hashtable<String, Integer> actionBytesFailedHash;
- private ConfigTree m_config;
- private ConfigTree[] actionArray;
+ private String[] actionNames;
+ private final ObjectName listObjectName ;
private Integer serviceCount;
private Integer bytesFailed;
@@ -78,11 +79,15 @@
private static final String OVERALL_BYTES_PROCESSED = "overall processedbytes";
private static final String OVERALL_BYTES_FAILED = "overall failed bytes";
+ private static final Logger logger = Logger.getLogger(ServiceMessageCounter.class);
+
+
/**
* Constructor
* @param f_config config tree
+ * @param objectName The name to use as the MBean.
*/
- public ServiceMessageCounter(ConfigTree f_config) {
+ public ServiceMessageCounter(ConfigTree f_config, final String objectName) {
actionCounterHash = new Hashtable<String, Integer>();
actionFailedCounterHash = new Hashtable<String, Integer>();
actionProcessTimeHash = new Hashtable<String, Long>();
@@ -93,10 +98,17 @@
bytesProcessed = new Integer(0);
bytesFailed = new Integer(0);
- m_config = f_config;
- actionArray = m_config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
-
- initHashes();
+ init(f_config);
+ ObjectName listObjectName = null ;
+ try
+ {
+ listObjectName = new ObjectName("jboss.esb:" + objectName);
+ }
+ catch (final Exception ex)
+ {
+ logger.error("Unexpected exception creating MBean object name, counter will be unregistered", ex);
+ }
+ this.listObjectName = listObjectName ;
}
/**
@@ -105,7 +117,7 @@
* @param ct config tree
* @return action id
*/
- public String getActionId(ConfigTree ct) {
+ private String getActionId(ConfigTree ct) {
if (ct.getAttribute("name") != null) {
return ct.getAttribute("name");
} else if (ct.getAttribute("action") != null) {
@@ -117,24 +129,29 @@
/**
* Increment the total message count of this service.
*/
- public void incrementTotalCount() {
+ public synchronized void incrementTotalCount() {
serviceCount = new Integer(serviceCount.intValue() + 1);
}
/**
- * Initialize the hashes by setting the counts and the processing time to an initial value of 0.
+ * Initialize the bean.
+ * @param configTree The current configuration.
*/
- public void initHashes() {
- ConfigTree[] actionList = m_config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
+ private void init(final ConfigTree configTree) {
+ ConfigTree[] actionList = configTree.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
+ final int numActions = actionList.length ;
+ actionNames = new String[numActions] ;
- for (ConfigTree actionConfig : actionList) {
+ for (int count = 0 ; count < numActions ; count++) {
+ final ConfigTree actionConfig = actionList[count] ;
String actionId = getActionId(actionConfig);
- actionCounterHash.put(actionId + " " + MESSAGE_COUNTER, new Integer(0));
+ actionCounterHash.put(actionId + " " + MESSAGE_COUNTER, new Integer(0));
actionFailedCounterHash.put(actionId + " " + FAILED_MESSAGE_COUNTER, new Integer(0));
actionProcessTimeHash.put(actionId + " " + PROCESSING_TIME, new Long(0));
actionBytesFailedHash.put(actionId + " " + BYTES_FAILED, new Integer(0));
actionBytesProcessedHash.put(actionId + " " + BYTES_PROCESSED, new Integer(0));
- }
+ actionNames[count] = actionId ;
+ }
serviceCount = new Integer(0);
bytesProcessed = new Integer(0);
bytesFailed = new Integer(0);
@@ -144,7 +161,7 @@
* Reset the counters - set all the entries in the action counter hash
* and in the action process time hash to zero.
*/
- public void resetCounter() {
+ public synchronized void resetCounter() {
serviceCount = new Integer(0);
bytesProcessed = new Integer(0);
bytesFailed = new Integer(0);
@@ -176,7 +193,7 @@
* attribute), all of the attributes are read-only, and we provide four
* invocation methods - start/stop/initialise/destroy on the Lifecycle.
*/
- public MBeanInfo getMBeanInfo() {
+ public synchronized MBeanInfo getMBeanInfo() {
int count = actionCounterHash.size() + actionProcessTimeHash.size()
+ actionFailedCounterHash.size() + actionBytesProcessedHash.size()
@@ -243,7 +260,7 @@
/* (non-Javadoc)
* @see javax.management.DynamicMBean#getAttribute(java.lang.String)
*/
- public Object getAttribute(String key) throws AttributeNotFoundException, MBeanException, ReflectionException {
+ public synchronized Object getAttribute(String key) throws AttributeNotFoundException, MBeanException, ReflectionException {
if (actionCounterHash.containsKey(key)) {
Integer value = null;
value = actionCounterHash.get(key);
@@ -282,7 +299,7 @@
/* (non-Javadoc)
* @see javax.management.DynamicMBean#getAttributes(java.lang.String[])
*/
- public AttributeList getAttributes(String[] arg0) {
+ public synchronized AttributeList getAttributes(String[] arg0) {
AttributeList attributeList = new AttributeList();
for (String key : actionCounterHash.keySet()) {
Attribute at = new Attribute(key, actionCounterHash.get(key).toString());
@@ -351,6 +368,9 @@
* Register this MBean with JBoss.
*/
protected void registerMBean() {
+ if (listObjectName == null) {
+ return ;
+ }
MBeanServer mbeanServer = null;
try {
mbeanServer = MBeanServerLocator.locateJBoss();
@@ -360,35 +380,48 @@
return;
}
- ObjectName listObjectName = getObjectName();
-
- if (mbeanServer.isRegistered(listObjectName)) {
- try {
- mbeanServer.unregisterMBean(listObjectName);
- } catch (InstanceNotFoundException e) {
- e.printStackTrace();
- } catch (MBeanRegistrationException e) {
- e.printStackTrace();
- }
- }
-
- try {
- mbeanServer.registerMBean(this, listObjectName);
+ try {
+ mbeanServer.registerMBean(this, listObjectName);
} catch (InstanceAlreadyExistsException e) {
- e.printStackTrace();
+ logger.warn("", e);
} catch (MBeanRegistrationException e) {
- e.printStackTrace();
+ logger.warn("", e);
} catch (NotCompliantMBeanException e) {
- e.printStackTrace();
+ logger.warn("", e);
}
}
/**
+ * Unregister this MBean with JBoss.
+ */
+ protected void unregisterMBean() {
+ if (listObjectName == null) {
+ return ;
+ }
+ MBeanServer mbeanServer = null;
+ try {
+ mbeanServer = MBeanServerLocator.locateJBoss();
+ } catch (IllegalStateException ise) {
+ // If we can't find a JBoss MBeanServer, just return
+ // Needed for unit tests
+ return;
+ }
+
+ try {
+ mbeanServer.unregisterMBean(listObjectName);
+ } catch (InstanceNotFoundException e) {
+ logger.warn("", e);
+ } catch (MBeanRegistrationException e) {
+ logger.warn("", e);
+ }
+ }
+
+ /**
* Update the ServiceMessageCounter
* @param asb ActionStatusBean
*/
- public void update(ActionStatusBean asb) {
- String actionName = getActionId(actionArray[asb.getProcCount()]);
+ public synchronized void update(ActionStatusBean asb) {
+ String actionName = actionNames[asb.getProcCount()];
if (ActionStatusBean.ACTION_SENT.equals(asb.getStatus())) {
Integer count = actionCounterHash.get(actionName + " " + MESSAGE_COUNTER);
@@ -414,29 +447,6 @@
protected ObjectName getObjectName()
{
- ObjectName listObjectName = null;
- try {
- String deploymentName = m_config.getParent().getAttribute(ListenerTagNames.DEPLOYMENT_NAME_TAG);
- String serviceName = m_config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-
- StringBuffer objectName = new StringBuffer("category=MessageCounter");
- if (deploymentName != null) {
- objectName.append(",").append(ListenerTagNames.DEPLOYMENT_NAME_TAG).append("=").append(deploymentName);
- }
-
- if (serviceName != null) {
- if (objectName.length() > 0) {
- objectName.append(",");
- }
- objectName.append(ListenerTagNames.SERVICE_NAME_TAG).append("=").append(serviceName);
- }
-
- listObjectName = new ObjectName("jboss.esb:" + objectName.toString());
- } catch (MalformedObjectNameException e1) {
- e1.printStackTrace();
- } catch (NullPointerException e1) {
- e1.printStackTrace();
- }
return listObjectName;
}
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterLifecycleResource.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterLifecycleResource.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterLifecycleResource.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterLifecycleResource.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,167 @@
+/*
+ * 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.message;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.lifecycle.LifecyclePriorities;
+import org.jboss.soa.esb.lifecycle.LifecycleResource;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceFactory;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+
+/**
+ */
+public class ServiceMessageCounterLifecycleResource
+{
+ /**
+ * The lifecycle resource factory for service message counters.
+ */
+ private static final LifecycleResourceFactory<Map<String, ServiceMessageCounter>> lifecycleServiceMessageCounterFactory = new LifecycleServiceMessageCounterFactory();
+ /**
+ * The lifecycle resources for service message counters.
+ */
+ private static final LifecycleResource<Map<String, ServiceMessageCounter>> lifecycleServiceMessageCounters =
+ new LifecycleResource<Map<String, ServiceMessageCounter>>(lifecycleServiceMessageCounterFactory, LifecyclePriorities.SERVICE_MESSAGE_COUNTER_PRIORITY);
+
+ /**
+ * The logger for the service message counter lifecycle resource.
+ */
+ private static final Logger LOGGER = Logger.getLogger(ServiceMessageCounterLifecycleResource.class) ;
+
+ /**
+ * Get the service message counter for the specified config tree.
+ * @param configTree The configTree
+ * @return The service message counter.
+ * throws LifecycleResourceException for errors accessing the lifecycle context.
+ */
+ public static ServiceMessageCounter getServiceMessageCounter(final ConfigTree configTree)
+ throws LifecycleResourceException
+ {
+ final String objectName = getObjectName(configTree) ;
+ final Map<String, ServiceMessageCounter> contextCounters = lifecycleServiceMessageCounters.getLifecycleResource() ;
+
+ synchronized(contextCounters)
+ {
+ final ServiceMessageCounter serviceMessageCounter = contextCounters.get(objectName) ;
+ if (serviceMessageCounter != null)
+ {
+ return serviceMessageCounter ;
+ }
+ final ServiceMessageCounter newServiceMessageCounter = new ServiceMessageCounter(configTree, objectName) ;
+ newServiceMessageCounter.registerMBean() ;
+ contextCounters.put(objectName, newServiceMessageCounter) ;
+ return newServiceMessageCounter ;
+ }
+ }
+
+ /**
+ * Create the object name associated with the configuration.
+ * @param configTree The current configuration.
+ * @return The object name.
+ */
+ private static String getObjectName(final ConfigTree configTree)
+ {
+ final String categoryName = configTree.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+ final String serviceName = configTree.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+ final String targetCategoryName = configTree.getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
+ final String targetServiceName = configTree.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
+ final LifecycleResourceManager lifecycleResourceManager = LifecycleResourceManager.getSingleton() ;
+ final String[] associatedDeployments = lifecycleResourceManager.getAssociatedDeployments() ;
+ final String deployment ;
+ if ((associatedDeployments != null) && (associatedDeployments.length == 1))
+ {
+ deployment = associatedDeployments[0] ;
+ }
+ else
+ {
+ deployment = lifecycleResourceManager.getIdentity() ;
+ }
+
+ final StringBuffer objectName = new StringBuffer("category=MessageCounter");
+ append(objectName, "deployment", deployment) ;
+ append(objectName, ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, categoryName) ;
+ append(objectName, ListenerTagNames.SERVICE_NAME_TAG, serviceName);
+ append(objectName, ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, targetCategoryName);
+ append(objectName, ListenerTagNames.TARGET_SERVICE_NAME_TAG, targetServiceName);
+
+ return objectName.toString();
+ }
+
+ /**
+ * Append the name/value to the object name.
+ * @param objectName The current object name.
+ * @param name The property name.
+ * @param value The property value.
+ */
+ private static void append(final StringBuffer objectName, final String name, final String value)
+ {
+ if ((value != null) && (value.length() > 0)) {
+ objectName.append(",").append(name).append("=").append(value) ;
+ }
+ }
+
+ /**
+ * The lifecycle resource factory
+ * @author kevin
+ */
+ private static class LifecycleServiceMessageCounterFactory implements LifecycleResourceFactory<Map<String, ServiceMessageCounter>>
+ {
+ /**
+ * Create a resource object which will be associated with the specified lifecycle identity.
+ * @param lifecycleIdentity The associated lifecycle identity.
+ * @return The lifecycle resource
+ * @throws LifecycleResourceException for errors during construction.
+ */
+ public Map<String, ServiceMessageCounter> createLifecycleResource(final String lifecycleIdentity)
+ throws LifecycleResourceException
+ {
+ return new HashMap<String, ServiceMessageCounter>() ;
+ }
+
+ /**
+ * Destroy a resource object which is associated with the specified lifecycle identity.
+ * @param resource The lifecycle resource.
+ * @param lifecycleIdentity The associated lifecycle identity.
+ * @return The lifecycle resource.
+ * @throws LifecycleResourceException for errors during destroy.
+ */
+ public void destroyLifecycleResource(final Map<String, ServiceMessageCounter> resource,
+ final String lifecycleIdentity)
+ throws LifecycleResourceException
+ {
+ if (resource.size() > 0)
+ {
+ LOGGER.warn("Calling cleanup on existing service message counters for identity " + lifecycleIdentity) ;
+ for (final ServiceMessageCounter counter: resource.values())
+ {
+ counter.unregisterMBean() ;
+ }
+ }
+ }
+ }
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/ScheduleProvider.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -28,9 +28,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
-import java.util.ArrayList;
import java.util.Date;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
/**
@@ -47,8 +48,9 @@
/* Quartz scheduler instance */
private Scheduler scheduler;
- private List<String> scheduledJobs = new ArrayList<String>();
+ private Map<JobDetail, Trigger> scheduledJobs = new HashMap<JobDetail, Trigger>();
private List<Schedule> schedules;
+ private boolean active ;
private final ClassLoader tcc ;
private static final String JBOSS_ESB = "JBossESB";
@@ -70,6 +72,7 @@
} else {
scheduler = new StdSchedulerFactory().getScheduler();
}
+ scheduler.start() ;
tcc = Thread.currentThread().getContextClassLoader() ;
} catch (SchedulerException e) {
throw new ConfigurationException("Unable to create Scheduler instance.", e);
@@ -136,27 +139,32 @@
private static volatile int nameDelta = 1;
private void addListener(ScheduledEventListener listener, Trigger trigger) throws SchedulingException {
+ final int id ;
synchronized (ScheduleProvider.class) {
- JobDataMap jobDataMap = new JobDataMap();
- JobDetail jobDetail;
+ id = nameDelta++ ;
+ }
+ JobDataMap jobDataMap = new JobDataMap();
+ JobDetail jobDetail;
- String name = trigger.getName();
+ String name = trigger.getName();
- // this is just to make sure they're unique - i.e. so as 1+
- // "things" can listen to the same schedule...
- // This is not thread safe!
- name += ("-" + nameDelta++);
- trigger.setName(name);
+ name += "-" + id;
+ trigger.setName(name);
- jobDetail = new JobDetail(name, JBOSS_ESB, ScheduleProvider.ESBScheduledJob.class);
- jobDataMap.put(ScheduledEventListener.class.getName(), listener);
- jobDataMap.put(ClassLoader.class.getName(), tcc);
- jobDetail.setJobDataMap(jobDataMap);
- try {
- scheduler.scheduleJob(jobDetail, trigger);
- scheduledJobs.add(name);
- } catch (SchedulerException e) {
- throw new SchedulingException("Failed to schedule job.", e);
+ jobDetail = new JobDetail(name, JBOSS_ESB, ScheduleProvider.ESBScheduledJob.class);
+ jobDataMap.put(ScheduledEventListener.class.getName(), listener);
+ jobDataMap.put(ClassLoader.class.getName(), tcc);
+ jobDetail.setJobDataMap(jobDataMap);
+ synchronized(this)
+ {
+ scheduledJobs.put(jobDetail, trigger);
+ if (active)
+ {
+ try {
+ scheduler.scheduleJob(jobDetail, trigger);
+ } catch (SchedulerException e) {
+ throw new SchedulingException("Failed to schedule job.", e);
+ }
}
}
}
@@ -175,42 +183,36 @@
* Start the scheduler.
* @throws SchedulingException Start failed.
*/
- public void start() throws SchedulingException {
- try {
- scheduler.start();
- } catch (SchedulerException e) {
- throw new SchedulingException("Failed to start scheduling.", e);
+ public synchronized void start() throws SchedulingException {
+ if (!active) {
+ try {
+ for (Map.Entry<JobDetail, Trigger> entry: scheduledJobs.entrySet()) {
+ scheduler.scheduleJob(entry.getKey(), entry.getValue());
+ }
+ } catch (SchedulerException e) {
+ throw new SchedulingException("Failed to start scheduling.", e);
+ }
+ active = true ;
}
}
/**
- * Standby the scheduler.
- * <p/>
- * Restart the scheduler through the {@link #start()} method.
- *
- * @throws SchedulingException Standby failed.
- */
- public void standby() throws SchedulingException {
- try {
- scheduler.standby();
- } catch (SchedulerException e) {
- throw new SchedulingException("Failed to standby scheduling.", e);
- }
- }
-
- /**
* Stop the scheduler.
* @throws SchedulingException Stop failed.
*/
- public void stop() throws SchedulingException {
- try {
- for(String jobName : scheduledJobs) {
- if(!scheduler.deleteJob(jobName, JBOSS_ESB)) {
- logger.info("Failed to delete scheduled Job '" + jobName + "' from job group '" + JBOSS_ESB + "'. Job run may have already completed.");
+ public synchronized void stop() throws SchedulingException {
+ if (active) {
+ try {
+ for(Trigger trigger: scheduledJobs.values()) {
+ final String jobName = trigger.getName() ;
+ if(!scheduler.deleteJob(jobName, JBOSS_ESB)) {
+ logger.info("Failed to delete scheduled Job '" + jobName + "' from job group '" + JBOSS_ESB + "'. Job run may have already completed.");
+ }
}
+ } catch (SchedulerException e) {
+ throw new SchedulingException("Failed to shutdown scheduling.", e);
}
- } catch (SchedulerException e) {
- throw new SchedulingException("Failed to shutdown scheduling.", e);
+ active = false ;
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/quartz.properties
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/quartz.properties 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/schedule/quartz.properties 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,13 +1,13 @@
# Default ESB Quartz Properties file.
#
-org.quartz.scheduler.instanceName = DefaultQuartzScheduler
+org.quartz.scheduler.instanceName = ScheduleProviderScheduler
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.wrapJobExecutionInUserTransaction = false
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
-org.quartz.threadPool.threadCount = 2
+org.quartz.threadPool.threadCount = 20
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/PublicCryptoUtil.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/soa/esb/services/security/PublicCryptoUtil.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/PublicCryptoUtil.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/PublicCryptoUtil.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,269 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.security;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.security.Key;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.services.security.util.CryptoUtil;
+import org.jboss.soa.esb.util.ClassUtil;
+
+/**
+ *
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public enum PublicCryptoUtil
+{
+ INSTANCE;
+
+ private Logger log;
+ private Key key;
+ private PublicKey publicKey;
+ private String transformation;
+ private boolean isSecurityConfigured;
+
+ private PublicCryptoUtil()
+ {
+ try
+ {
+ log = getLogger();
+ init();
+ }
+ catch (final Exception e)
+ {
+ throw new IllegalStateException("Unknown algorithm:", e);
+ }
+ }
+
+ private void init() throws SecurityServiceException
+ {
+ String keystorePath = Configuration.getSecurityServicePublicKeystore();
+ if (keystorePath == null)
+ {
+ log.info("No public keystore was specified in jbossesb-properites.xml. Add '" + Environment.SECURITY_SERVICE_PUBLIC_KEYSTORE + "'");
+ }
+ else
+ {
+ isSecurityConfigured = true;
+ try
+ {
+ String keystoreType = Configuration.getSecurityServicePublicKeystoreType();
+ if (keystoreType == null)
+ {
+ keystoreType = KeyStore.getDefaultType();
+ }
+ String keystorePassword = Configuration.getSecurityServicePublicKeystorePassword();
+ String privateKeyAlias = Configuration.getSecurityServicePublicKeyAlias();
+ String privateKeyPass = Configuration.getSecurityServicePublicKeyPassword();
+
+ try
+ {
+ KeyStore keystore = KeyStore.getInstance(keystoreType);
+ InputStream in = ClassUtil.getResourceAsStream(keystorePath, this.getClass());
+ if (in == null)
+ {
+ throw new SecurityServiceException("Could not locate public keystore using '" + keystorePath + "'");
+ }
+
+ // load the keystore contents
+ keystore.load(in, keystorePassword.toCharArray());
+ key = keystore.getKey(privateKeyAlias, privateKeyPass.toCharArray());
+ Certificate certificate = keystore.getCertificate(privateKeyAlias);
+ publicKey = certificate.getPublicKey();
+
+ // "algorithm/mode/padding" or defaults to "algorithm"
+ transformation = Configuration.getSecurityServicePublicKeyTransformation();
+ if (transformation == null)
+ {
+ this.transformation = key.getAlgorithm();
+ }
+ }
+ finally
+ {
+ keystorePassword = null;
+ privateKeyAlias = null;
+ privateKeyPass = null;
+ }
+ }
+ catch (final KeyStoreException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final NoSuchAlgorithmException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final CertificateException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final UnrecoverableKeyException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ }
+ }
+
+ private static byte[] getBytes(final Serializable ser) throws IOException
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectOutputStream oout = new ObjectOutputStream(bout);
+ oout.writeObject(ser);
+ return bout.toByteArray();
+ }
+
+ public byte[] encrypt(final Serializable object) throws SecurityServiceException
+ {
+ if (!isSecurityConfigured)
+ {
+ return null;
+ }
+
+ ByteArrayInputStream plainInStream;
+ try
+ {
+ plainInStream = new ByteArrayInputStream(getBytes(object));
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+
+ ByteArrayOutputStream encryptedOutStream = new ByteArrayOutputStream();
+
+ try
+ {
+ byte[] buf = new byte[100];
+ int bufLength;
+ while ( (bufLength = plainInStream.read(buf)) != -1)
+ {
+ byte[] tmp = CryptoUtil.encrypt(copyBytes(buf,bufLength),publicKey, transformation);
+ encryptedOutStream.write(tmp);
+ encryptedOutStream.flush();
+ }
+ return encryptedOutStream.toByteArray();
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ }
+
+ public Serializable decrypt(final byte[] bytes) throws SecurityServiceException
+ {
+ if (!isSecurityConfigured)
+ {
+ return null;
+ }
+ ByteArrayInputStream encryptedBytesInStream = new ByteArrayInputStream(bytes);
+
+ ByteArrayOutputStream decryptedBytesOutStream = new ByteArrayOutputStream();
+
+ byte[] decryptBytes = null;
+ try
+ {
+ byte[] buf = new byte[128];
+ int bufLenth;
+ while ( (bufLenth = encryptedBytesInStream.read(buf)) != -1)
+ {
+ byte[] tmp = CryptoUtil.decrypt( copyBytes(buf,bufLenth),(PrivateKey)key, transformation);
+ decryptedBytesOutStream.write(tmp);
+ decryptedBytesOutStream.flush();
+ decryptBytes = decryptedBytesOutStream.toByteArray();
+ }
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ finally
+ {
+ try { decryptedBytesOutStream.close(); } catch (IOException ignore) { log.error(ignore.getMessage(),ignore); }
+ }
+
+ return toSerializable(decryptBytes);
+ }
+
+ private Serializable toSerializable(final byte[] decryptBytes) throws SecurityServiceException
+ {
+ ObjectInputStream inputStream = null;
+ try
+ {
+ inputStream = new ObjectInputStream(new ByteArrayInputStream(decryptBytes));
+ return (Serializable) inputStream.readObject();
+ }
+ catch (final IOException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final ClassNotFoundException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ finally
+ {
+ try { inputStream.close(); } catch (IOException ignore) { log.error(ignore.getMessage(), ignore); }
+ }
+ }
+
+ private static byte[] copyBytes(byte[] bytes, int length)
+ {
+ if (bytes.length == length)
+ {
+ return bytes;
+ }
+
+ byte[] newBytes = new byte[length];
+ for (int i = 0; i < length; i++)
+ {
+ newBytes[i] = bytes[i];
+ }
+ return newBytes;
+ }
+
+ private static Logger getLogger()
+ {
+ return Logger.getLogger(PublicCryptoUtil.class);
+ }
+
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfig.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfig.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfig.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -20,55 +20,45 @@
*/
package org.jboss.soa.esb.services.security;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
* This class is indended to security related configuration properties.
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @since 4.4
*/
public class SecurityConfig
{
- private String runAs;
- private String useCallerIdentity;
- private String moduleName;
+ private final String runAs;
+ private final List<String> rolesAllowed;
+ private final String useCallerIdentity;
+ private final String moduleName;
private final String callbackHandler;
private Map<String,String> properties = new HashMap<String,String>();
-
+
private SecurityConfig(
- final String runAs,
- final String useCallerIdentity,
+ final String runAs,
+ final List<String> rolesAllowed,
+ final String useCallerIdentity,
final String moduleName,
final String callbackHandler,
final Map<String,String> properties)
- {
+ {
this.runAs = runAs;
+ this.rolesAllowed = rolesAllowed;
this.useCallerIdentity = useCallerIdentity;
this.moduleName = moduleName;
this.callbackHandler= callbackHandler;
this.properties = properties;
}
-
- /**
- *
- * @param runAs - run as the specified role
- * @param useCallerIdentity - use the callers identity
- * @param moduleName - index into the jaas configuration policy file
- * @return <code>SecurityConfigInfo</code>
- */
- public static SecurityConfig createSecurityInfo(
- final String runAs,
- final String useCallerIdentity,
- final String moduleName,
- final String callbackHandler,
- final Map<String,String> properties)
- {
- return new SecurityConfig(runAs, useCallerIdentity, moduleName, callbackHandler, properties);
- }
-
+
public String getCallbackHandler()
{
return callbackHandler;
@@ -82,18 +72,12 @@
{
return useCallerIdentity;
}
-
+
public String getModuleName()
{
return moduleName;
}
- @Override
- public String toString()
- {
- return "[SecurityConfigInfo : runAs=" + runAs + ", useCallerIdentity=" + useCallerIdentity + ", moduleName=" + moduleName + ", callbackHandler=" + callbackHandler +", properties=" + properties +"]";
- }
-
public boolean hasRunAs()
{
return runAs != null;
@@ -103,5 +87,89 @@
{
return properties;
}
-
+
+ public List<String> getRolesAllowed()
+ {
+ return rolesAllowed;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "[SecurityConfigInfo : runAs=" + runAs + ", useCallerIdentity=" + useCallerIdentity + ", moduleName=" + moduleName + ", callbackHandler=" + callbackHandler +", properties=" + properties +", rolesAllowed=" + rolesAllowed + "]";
+ }
+
+ public static class Builder
+ {
+ private String runAs;
+ private String rolesAllowed;
+ private String useCallerIdentity;
+ private final String moduleName;
+ private String callbackHandler;
+ private final Map<String,String> properties = new HashMap<String,String>();
+
+ public Builder(final String moduleName)
+ {
+ this.moduleName = moduleName;
+ }
+
+ public Builder runAs(final String runAs)
+ {
+ this.runAs = runAs;
+ return this;
+ }
+
+ public Builder rolesAllowed(final String rolesAllowed)
+ {
+ this.rolesAllowed = rolesAllowed;
+ return this;
+ }
+
+ public Builder useCallerIdentity(final String useCallerIdentity)
+ {
+ this.useCallerIdentity = useCallerIdentity;
+ return this;
+ }
+
+ public Builder callBackhandler(final String callbackHandler)
+ {
+ this.callbackHandler = callbackHandler;
+ return this;
+ }
+
+ public Builder property(final String name, final String value)
+ {
+ properties.put(name, value);
+ return this;
+ }
+
+ public SecurityConfig build()
+ {
+ final List<String> rolesAllowedList = new ArrayList<String>();
+ if ( rolesAllowed != null )
+ {
+ String[] split = rolesAllowed.split(",");
+ List<String> asList = Arrays.asList(split);
+ for (String roleName : asList)
+ {
+ if ( !"".equals(roleName))
+ rolesAllowedList.add(roleName.trim());
+ }
+ }
+
+ final List<String> unmodifiableRoles = Collections.unmodifiableList(rolesAllowedList);
+ final Map<String,String> unmodifiableProperties = Collections.unmodifiableMap(properties);
+ SecurityConfig securityConfig = new SecurityConfig(
+ runAs,
+ unmodifiableRoles,
+ useCallerIdentity,
+ moduleName,
+ callbackHandler,
+ unmodifiableProperties);
+
+ return securityConfig;
+ }
+
+ }
+
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfigUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfigUtil.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityConfigUtil.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -25,14 +25,15 @@
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.services.security.SecurityConfig.Builder;
/**
* This util class provides methods to extract information from a security
* configuration. <p/>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @since 4.4.
- *
+ *
*/
public class SecurityConfigUtil
{
@@ -40,19 +41,23 @@
public static SecurityConfig createSecurityConfig(final ConfigTree securityFragment)
{
- final String runAs = securityFragment.getAttribute(ListenerTagNames.RUN_AS_TAG);
- final String useCallersIdentity = securityFragment.getAttribute(ListenerTagNames.USE_CALLERS_IDENTIDY_TAG);
final String moduleName = securityFragment.getAttribute(ListenerTagNames.MODULE_NAME_TAG);
- final String callbackHandler = securityFragment.getAttribute(ListenerTagNames.CALLBACK_HANDLER_TAG);
+
+ Builder builder = new SecurityConfig.Builder(moduleName);
+ builder.runAs(securityFragment.getAttribute(ListenerTagNames.RUN_AS_TAG));
+ builder.useCallerIdentity(securityFragment.getAttribute(ListenerTagNames.USE_CALLERS_IDENTIDY_TAG));
+ builder.rolesAllowed(securityFragment.getAttribute(ListenerTagNames.ROLES_ALLOWED));
+ builder.callBackhandler(securityFragment.getAttribute(ListenerTagNames.CALLBACK_HANDLER_TAG));
+
final Map<String,String> properties = new HashMap<String, String>();
ConfigTree[] children = securityFragment.getChildren("property");
for (ConfigTree configTree : children)
{
String propertyName = configTree.getAttribute("name");
String propertyValue = configTree.getAttribute("value");
- properties.put(propertyName, propertyValue);
+ System.out.println(propertyName + " " + propertyValue);
+ builder.property(propertyName, propertyValue);
}
-
- return SecurityConfig.createSecurityInfo(runAs, useCallersIdentity, moduleName, callbackHandler, properties);
+ return builder.build();
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityContext.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityContext.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityContext.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -21,26 +21,32 @@
package org.jboss.soa.esb.services.security;
import static org.jboss.soa.esb.services.security.principals.Group.ROLES_GROUP_NAME;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.security.Principal;
import java.security.acl.Group;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.Set;
-
import javax.security.auth.Subject;
-import org.jboss.soa.esb.message.Message;
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.internal.soa.esb.services.security.PrivateCryptoUtil;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
+import org.mvel.ast.AssertNode;
/**
- * Security Context contains security related information that
- * is not sensitive.
+ * Security Context contains security related information.
* <p/>
* Note that even though a Subject object instance is serialiable,
* its private and public credentials are not(they are transient).
- * Also not that the Principal interface is not serializable but
+ * Also not that the Principal interface is not serializable but
* all implemenations should be.
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @since 4.4
*
@@ -48,29 +54,35 @@
public final class SecurityContext implements Serializable
{
private static final long serialVersionUID = 1L;
-
- private Subject subject;
-
+
+ private final Subject subject;
+
+ private Set<?> pubCredentials;
+
+ private Set<?> privCredentials;
+
public SecurityContext()
{
subject = new Subject();
}
-
+
public SecurityContext(Subject subject)
{
+ AssertArgument.isNotNull(subject, "subject");
this.subject = subject;
}
-
+
public Subject getSubject()
{
return subject;
}
-
- public String toString()
+
+ @Override
+ public String toString()
{
return "SecurityContext [" + subject + "]";
}
-
+
public boolean isCallerInRole( final String roleName )
{
Set<Principal> principals = subject.getPrincipals();
@@ -89,26 +101,113 @@
{
return true;
}
- }
+ }
}
}
}
return false;
}
-
- public Set<? extends Principal> getPrincipals()
+
+ private void writeObject(final ObjectOutputStream out) throws IOException
{
- return subject.getPrincipals();
+ out.defaultWriteObject();
+ out.writeObject(subject.getPrivateCredentials());
+ out.writeObject(subject.getPublicCredentials());
}
-
- /**
- * Will retrieve the SecurityContext from the passed in Message.
- * @param message - the message from which the SecurityContext should be retreieved
- * @return SecuirtyContext - the currently set SecurityContext or null if none has been set.
- */
- public static SecurityContext getContext( final Message message )
+
+ private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException
{
- return (SecurityContext) message.getProperties().getProperty( SecurityService.CONTEXT );
+ in.defaultReadObject();
+ privCredentials = (Set<?>) in.readObject();
+ pubCredentials = (Set<?>) in.readObject();
}
-
+
+ final Set<? extends Principal> getPrincipals()
+ {
+ return Collections.unmodifiableSet(subject.getPrincipals());
+ }
+
+ final Set<?> getPubCredentials()
+ {
+ return Collections.unmodifiableSet(pubCredentials);
+ }
+
+ public Set<?> getPrivCredentials()
+ {
+ return Collections.unmodifiableSet(privCredentials);
+ }
+
+ /**
+ * Will check if the passed in {@link AuthenticationRequest} contains the
+ * same security information (Principal and credentials) as the this context.
+ *
+ * @param authrequest - the authentication request to compare
+ * @return true - if this security context has the same principal and credentials as the passed in authentication request.
+ */
+ public boolean compareTo(final AuthenticationRequest authrequest)
+ {
+ if ( authrequest == null )
+ {
+ return false;
+ }
+
+ final Principal authPrincipal = authrequest.getPrincipal();
+ if (subject.getPrincipals().contains(authPrincipal))
+ {
+ final Set<?> authCredentials = authrequest.getCredentials();
+
+ // check if the auth request credentials exist as a public credential
+ final Set<Object> publicCredentials = subject.getPublicCredentials();
+ for (final Object object : authCredentials)
+ {
+ if (publicCredentials.contains(object))
+ {
+ return true;
+ }
+ }
+
+ // check if the auth request credentials exist as a public credential
+ final Set<Object> privateCredentials = subject.getPrivateCredentials();
+ for (final Object object : authCredentials)
+ {
+ if (privateCredentials.contains(object))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public static SecurityContext decryptContext(final byte[] encrypt) throws SecurityServiceException
+ {
+ SecurityContext context = null;
+ if (encrypt == null)
+ return context;
+
+ Serializable decrypted = PrivateCryptoUtil.INSTANCE.decrypt(encrypt);
+ if (decrypted instanceof SecurityContext)
+ {
+ context = (SecurityContext) decrypted;
+ final Subject subject = context.getSubject();
+ final Set<?> publCreds = context.getPubCredentials();
+ if (publCreds != null )
+ {
+ subject.getPublicCredentials().addAll(publCreds);
+ }
+ final Set<?> privCreds = context.getPrivCredentials();
+ if (privCreds != null)
+ {
+ subject.getPrivateCredentials().addAll(privCreds);
+ }
+ }
+ return context;
+ }
+
+ public static byte[] encryptContext(final SecurityContext context) throws SecurityServiceException
+ {
+ return PrivateCryptoUtil.INSTANCE.encrypt(context);
+ }
+
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityService.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/SecurityService.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -21,6 +21,7 @@
package org.jboss.soa.esb.services.security;
import java.security.Principal;
+import java.util.List;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginException;
@@ -31,10 +32,10 @@
/**
* This interface represents a Security service.
* <p/>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @since 4.4
- *
+ *
*/
public interface SecurityService
{
@@ -42,42 +43,53 @@
* Constant intended for usage as a key in different types of maps.
*/
String CONTEXT = "org.jboss.soa.esb.services.security.context";
+
String AUTH_REQUEST = "org.jboss.soa.esb.services.security.authRequest";
-
+
/**
* Configure the security serivce for usage. This should take care of
* reading any needed configurations required by the security system.
- *
+ *
* @throws ConfigurationException
*/
void configure() throws ConfigurationException;
-
+
/**
* Authenticates a subject.
- *
+ *
* @param securityContext - the security context to authenticate
* @throws LoginException - if the authentication was not sucessful
*/
void authenticate(final SecurityConfig securityConfig, final SecurityContext securityContext, final AuthenticationRequest authRequest) throws SecurityServiceException;
-
+
/**
+ * Check if the the SecurityContext has a principal that is a member of one
+ * of the passed in rolesAllowed list.
+ *
+ * @param rolesAllowed - list or allowed roles
+ * @param securityContext - the security context
+ * @return true - if the SecurityContext has a principal that is a member of one the roles.
+ */
+ boolean checkRolesAllowed(final List<String> rolesAllowed, SecurityContext securityContext);
+
+ /**
* Determines if the subject contains the passed in role in it's
* set of Principals.
- *
+ *
* @param subject - the Subject instance belonging to the caller.
* @param context - the principal instance representing the role to check for.
- * @return true - if the caller has the role of
+ * @return true - if the caller has the role of
*/
boolean isCallerInRole(final Subject subject, final Principal role);
-
+
/**
* Logout and clean up of any security state.
- *
+ *
* @param securityContext
* @throws LoginException
*/
void logout(final SecurityConfig securityConfig);
-
+
/**
* Refresh the security configuration
*/
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagator.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagator.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagator.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -20,6 +20,7 @@
*/
package org.jboss.soa.esb.services.security.actions;
+import java.security.AccessController;
import java.security.Principal;
import javax.security.auth.Subject;
@@ -28,51 +29,48 @@
import org.jboss.security.SecurityAssociation;
import org.jboss.soa.esb.actions.BeanConfiguredAction;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.security.SecurityContext;
-import org.jboss.soa.esb.services.security.SecurityService;
/**
- * JBossSecurityPropagator is an ESB action that can be used to
+ * JBossSecurityPropagator is an ESB action that can be used to
* propagate security information to JBoss Application Server(JBossAS).
* </p>
- * This action can be placed before an action that calls out the a
+ * This action can be placed before an action that calls out the a
* JBossAS instance, for example an EJB call.
- *
+ *
* Example config:
* <pre>{@code
* <action name="propagate" class="org.jboss.soa.esb.services.security.actions.JBossSecurityPropagator">
* <property name="runAs" value="adminRole"/>
* </action>
* }</pre>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
public class JBossSecurityPropagator implements BeanConfiguredAction
{
private String runAs;
-
+
public Message process(final Message message)
{
- final SecurityContext securityContext = (SecurityContext) message.getProperties().getProperty( SecurityService.CONTEXT );
- if ( securityContext != null )
+ final Subject subject = Subject.getSubject(AccessController.getContext());
+ if(subject != null )
{
- final Subject subject = securityContext.getSubject();
final Principal principal = getPrincipal(subject);
-
+
// associate the subject with jboss security
SecurityAssociation.pushSubjectContext(subject, principal, subject.getPublicCredentials());
-
+
if ( runAs != null )
{
// associate the runAs role with jboss security
SecurityAssociation.pushRunAsIdentity(new RunAsIdentity(runAs, principal.getName()));
}
-
+
}
return message;
}
-
+
public void setRunAs(String runAs)
{
this.runAs = runAs;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -29,7 +29,7 @@
* information between gateways and ESB services.
* The information will be extracted from the specific transport that
* the gateway uses.
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @since 4.4
*
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestImpl.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestImpl.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -33,18 +33,18 @@
* AuthenticationRequestImpl is indended to transport security related information
* needed to authenticate a caller.
* </p>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
public class AuthenticationRequestImpl implements Serializable, AuthenticationRequest
{
private static final long serialVersionUID = 1L;
-
+
private Principal principal;
private Set<?> credentials;
private Map<String,?> properties;
-
+
/* (non-Javadoc)
* @see org.jboss.soa.esb.services.security.auth.AuthenticationRequest#getCredentials()
*/
@@ -68,15 +68,15 @@
{
return principal;
}
-
+
public static class Builder
{
private Principal principal;
private Set<Object> credentials = new HashSet<Object>();
private Map<String,Object> properties = new HashMap<String,Object>();
-
+
public Builder() {}
-
+
public Builder(final Principal principal, final Set<Object> credentials)
{
this.principal = principal;
@@ -85,36 +85,36 @@
this.credentials.addAll(credentials);
}
}
-
+
public Builder property( final String name, final Object value)
{
properties.put(name, value);
return this;
}
-
+
public Builder username( final String username )
{
principal = new User( username );
return this;
}
-
+
public Builder password( final char[] password )
{
credentials.add(password);
return this;
}
-
- public AuthenticationRequest bulid()
+
+ public AuthenticationRequest build()
{
return new AuthenticationRequestImpl(this);
}
}
-
+
private AuthenticationRequestImpl(final Builder builder)
{
principal = builder.principal;
credentials = builder.credentials;
properties = builder.properties;
}
-
+
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/HttpSecurityInfoExtractor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/HttpSecurityInfoExtractor.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/HttpSecurityInfoExtractor.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -59,7 +59,7 @@
credentials.add( pwd.toCharArray() );
pwd = null;
decoded = null;
- return new AuthenticationRequestImpl.Builder(new User(username), credentials ).bulid();
+ return new AuthenticationRequestImpl.Builder(new User(username), credentials ).build();
}
if ( authType.equals("DIGEST"))
{
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/JbrHttpSecurityInfoExtractor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/JbrHttpSecurityInfoExtractor.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/http/JbrHttpSecurityInfoExtractor.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -62,7 +62,7 @@
}
}
- authRequest = new AuthenticationRequestImpl.Builder( user, credentials ).bulid();
+ authRequest = new AuthenticationRequestImpl.Builder( user, credentials ).build();
}
return authRequest;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityToken.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityToken.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityToken.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -26,12 +26,12 @@
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
-import sun.misc.BASE64Decoder;
+import org.apache.commons.codec.binary.Base64;
/**
* Represents a WS-Security BinarySecurityToken.
* <p/>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
@@ -41,32 +41,32 @@
private String valueType;
private Certificate cert;
private enum EncodingType { Base64Binary, HexBinary }
-
+
public String getEncodingType()
{
return encodingType;
}
-
+
public void setEncodingType(String encodingType)
{
this.encodingType = stripNS(encodingType);
}
-
+
public String getValueType()
{
return valueType;
}
-
+
public void setValueType(String valueType)
{
this.valueType = stripNS(valueType);
}
-
+
public Certificate getKey()
{
return cert;
}
-
+
public void setKey(final String key)
{
try
@@ -74,32 +74,28 @@
byte[] keyBytes = null;
if ( encodingType.equalsIgnoreCase( EncodingType.Base64Binary.toString() ) )
{
- BASE64Decoder decoder = new BASE64Decoder();
- keyBytes = decoder.decodeBuffer(key);
+ Base64 decoder = new Base64();
+ keyBytes = decoder.decode(key.getBytes());
}
else
{
keyBytes = key.getBytes();
}
-
+
CertificateFactory factory = CertificateFactory.getInstance( certificateMatch( valueType ) );
cert = factory.generateCertificate( new ByteArrayInputStream( keyBytes ));
- }
+ }
catch (CertificateException e)
{
throw new IllegalStateException("Could not create certificate: ", e);
- }
- catch (IOException e)
- {
- throw new IllegalStateException("Could not create certificate: ", e);
- }
+ }
}
-
+
private String certificateMatch(final String valueType)
{
if ( valueType.startsWith("X509") )
return "X.509";
-
+
return valueType;
}
@@ -122,5 +118,5 @@
}
return value;
}
-
+
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractor.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecurityInfoExtractor.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -110,7 +110,7 @@
{
credentials.add(binaryToken.getKey());
}
- return new AuthenticationRequestImpl.Builder(user, credentials ).bulid();
+ return new AuthenticationRequestImpl.Builder(user, credentials ).build();
}
private void createSmooks(final String configFile)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractor.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -134,7 +134,7 @@
}
}
// build the AuthenticationRequest.
- return new AuthenticationRequestImpl.Builder(user, credentials ).bulid();
+ return new AuthenticationRequestImpl.Builder(user, credentials ).build();
}
catch (final SOAPException e)
{
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/soa/esb/services/security/util)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,121 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.services.security.util;
-
-import java.security.InvalidKeyException;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-
-import javax.crypto.BadPaddingException;
-import javax.crypto.Cipher;
-import javax.crypto.IllegalBlockSizeException;
-import javax.crypto.NoSuchPaddingException;
-
-import org.jboss.soa.esb.services.security.SecurityServiceException;
-
-/**
- *
- * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
- *
- */
-public final class CryptoUtil
-{
- private CryptoUtil() {}
-
- public static byte[] decrypt(final byte[] bytes, final PrivateKey key, final String transformation) throws SecurityServiceException
- {
- try
- {
- final Cipher cipher = Cipher.getInstance(transformation);
- cipher.init(Cipher.DECRYPT_MODE, key);
- return cipher.doFinal(bytes);
- }
- catch (final NoSuchAlgorithmException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (final NoSuchPaddingException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (final InvalidKeyException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (final IllegalBlockSizeException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (final BadPaddingException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- }
-
- public static byte[] encrypt(byte[] text, PublicKey key, String transformation) throws SecurityServiceException
- {
- try
- {
- final Cipher cipher = Cipher.getInstance(transformation);
- cipher.init(Cipher.ENCRYPT_MODE, key);
- return cipher.doFinal(text);
- }
- catch (final NoSuchAlgorithmException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (final NoSuchPaddingException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (InvalidKeyException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (IllegalBlockSizeException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- catch (BadPaddingException e)
- {
- throw new SecurityServiceException(e.getMessage(), e);
- }
- }
-
- public static byte[] copyBytes(final byte[] bytes, final int length)
- {
- byte[] newArr = null;
- if (bytes.length == length)
- {
- newArr = bytes;
- } else
- {
- newArr = new byte[length];
- for (int i = 0; i < length; i++)
- {
- newArr[i] = bytes[i];
- }
- }
- return newArr;
- }
-
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/services/security/util/CryptoUtil.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.security.util;
+
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+
+import org.jboss.soa.esb.services.security.SecurityServiceException;
+
+/**
+ *
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public final class CryptoUtil
+{
+ private CryptoUtil() {}
+
+ public static byte[] decrypt(final byte[] bytes, final PrivateKey key, final String transformation) throws SecurityServiceException
+ {
+ try
+ {
+ final Cipher cipher = Cipher.getInstance(transformation);
+ cipher.init(Cipher.DECRYPT_MODE, key);
+ return cipher.doFinal(bytes);
+ }
+ catch (final NoSuchAlgorithmException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final NoSuchPaddingException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final InvalidKeyException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final IllegalBlockSizeException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final BadPaddingException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ }
+
+ public static byte[] encrypt(byte[] text, PublicKey key, String transformation) throws SecurityServiceException
+ {
+ try
+ {
+ final Cipher cipher = Cipher.getInstance(transformation);
+ cipher.init(Cipher.ENCRYPT_MODE, key);
+ return cipher.doFinal(text);
+ }
+ catch (final NoSuchAlgorithmException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (final NoSuchPaddingException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (IllegalBlockSizeException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ catch (BadPaddingException e)
+ {
+ throw new SecurityServiceException(e.getMessage(), e);
+ }
+ }
+
+ public static byte[] copyBytes(final byte[] bytes, final int length)
+ {
+ byte[] newArr = null;
+ if (bytes.length == length)
+ {
+ newArr = bytes;
+ } else
+ {
+ newArr = new byte[length];
+ for (int i = 0; i < length; i++)
+ {
+ newArr[i] = bytes[i];
+ }
+ }
+ return newArr;
+ }
+
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -35,8 +35,12 @@
import org.apache.commons.net.ftp.FTPClient;
import org.jboss.internal.soa.esb.util.FtpUtils;
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.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.util.RemoteFileSystem;
+import org.jboss.soa.esb.util.RemoteFileSystemException;
/**
* Simplified FTP transfers
@@ -45,6 +49,8 @@
* establish the FTP connection are provided at construction time and cannot
* change during the lifetime of the object <br/>Hides low level details.
* </p>
+ *
+ * TODO why duplicate so much of FtpImpl.java?
*/
public class FtpClientUtil
@@ -66,7 +72,7 @@
public static final String PARMS_PASSIVE = "ftpPassive";
private static final String TMP_SUFFIX = ".rosettaPart";
-
+
public enum XFER_TYPE
{
ascii, binary
@@ -85,6 +91,8 @@
private FTPClient m_oConn = new FTPClient();
private boolean m_bAsciiTransferType ;
+
+ private int renameRetry;
public String getRemoteDir ()
{
@@ -361,10 +369,34 @@
{
throw new RemoteFileSystemException("Failed to upload contents: " + m_oConn.getReplyString()) ;
}
- if (!m_oConn.rename(sRemoteTmp, p_sRemoteName))
+
+ boolean retryProblem = true; // https://jira.jboss.org/jira/browse/JBESB-1995
+
+ for (int i = 0; i < renameRetry; i++)
{
+ if (m_oConn.rename(sRemoteTmp, p_sRemoteName))
+ {
+ retryProblem = false;
+
+ break;
+ }
+ else
+ {
+ if (i+1 < renameRetry)
+ {
+ try
+ {
+ Thread.sleep(RemoteFileSystem.DEFAULT_RENAME_RETRY_TIMEOUT);
+ }
+ catch (final Exception ex)
+ {
+ }
+ }
+ }
+ }
+
+ if (retryProblem)
throw new RemoteFileSystemException("Failed to rename file: " + m_oConn.getReplyString());
- }
}
catch (IOException ex)
{
@@ -476,6 +508,27 @@
m_bPassive = false;
sAux = m_oParms.getAttribute(PARMS_PASSIVE);
m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
+
+ String renameRetryString = ModulePropertyManager.getPropertyManager(
+ ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
+ Environment.FTP_RENAME_RETRY, null);
+
+ if (renameRetryString != null)
+ {
+ try
+ {
+ renameRetry = Integer.parseInt(renameRetryString);
+ }
+ catch (Exception ex)
+ {
+ throw new ConfigurationException("Invalid rename retry limit: "+renameRetryString);
+ }
+ }
+ else
+ renameRetry = RemoteFileSystem.DEFAULT_RENAME_RETRY_NUMBER;
+
+ if (renameRetry < 1)
+ renameRetry = 1;
} // __________________________________
public static String fileToFtpString (File p_oF)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -58,6 +58,10 @@
public static final String PARMS_PASSPHRASE = "passphrase";
+ public static final int DEFAULT_RENAME_RETRY_NUMBER = 10; // default retries
+
+ public static final int DEFAULT_RENAME_RETRY_TIMEOUT = 1000; // 1 second
+
public String getRemoteDir ();
/**
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/JaasSecurityServiceUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/JaasSecurityServiceUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/JaasSecurityServiceUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -40,6 +40,7 @@
import org.jboss.soa.esb.services.security.SecurityService;
import org.jboss.soa.esb.services.security.SecurityServiceException;
import org.jboss.soa.esb.services.security.TestPrincipal;
+import org.jboss.soa.esb.services.security.SecurityConfig.Builder;
import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
import org.jboss.soa.esb.services.security.auth.AuthenticationRequestImpl;
import org.jboss.soa.esb.services.security.principals.Group;
@@ -52,81 +53,103 @@
/**
* Unit test for {@link SecurityServiceImpl}
* <p/>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @since 4.4
*/
public class JaasSecurityServiceUnitTest
{
- private SecurityService service = new JaasSecurityService();
- private Subject subject = new Subject();
- private String jbossEsbProperties;
-
+ private final SecurityService service = new JaasSecurityService();
+ private final Subject subject = new Subject();
+ private String jbossEsbProperties;
+
@Test
public void authenticateUserpassword() throws ConfigurationException, SecurityServiceException
{
final String userName = "testUser";
final String password = "testPassword";
- SecurityConfig configInfo = SecurityConfig.createSecurityInfo(null, null, "UserPassLogin", "org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler", null);
+ Builder builder = new SecurityConfig.Builder("UserPassLogin");
+ builder.callBackhandler("org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler");
+ SecurityConfig configInfo = builder.build();
TestPrincipal principal = new TestPrincipal(userName);
Set<Object> credentials = new HashSet<Object>();
credentials.add(password);
-
- AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder(principal, credentials).bulid();
+
+ AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder(principal, credentials).build();
SecurityContext context = new SecurityContext(subject);
service.configure();
service.authenticate(configInfo, context, authRequest);
-
+
Set<TestPrincipal> principals = subject.getPrincipals( TestPrincipal.class );
assertEquals( 1, principals.size() );
assertEquals( userName, principals.iterator().next().getName() );
}
-
+
@Test
public void authenticateWithRole() throws ConfigurationException, SecurityServiceException
{
- SecurityConfig configInfo = SecurityConfig.createSecurityInfo("adminRole", null, "SuccessfulLogin", null, null);
+ Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
+ builder.runAs("adminRole");
+ SecurityConfig configInfo = builder.build();
SecurityContext context = new SecurityContext(subject);
service.authenticate(configInfo, context, null);
Set<Principal> principals = subject.getPrincipals( Principal.class );
assertEquals( 2, principals.size() );
}
-
+
@Test
public void authenticateWithExistingRole() throws ConfigurationException, SecurityServiceException
{
- SecurityConfig configInfo = SecurityConfig.createSecurityInfo("adminRole", null, "SuccessfulLogin", null, null);
+ Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
+ builder.runAs("adminRole");
+ SecurityConfig configInfo = builder.build();
Group group = new Group("Roles");
group.addMember(new Role("adminRole1"));
-
+
subject.getPrincipals().add(group);
-
+
SecurityContext context = new SecurityContext(subject);
service.authenticate(configInfo, context, null);
-
+
Set<Principal> principals = subject.getPrincipals( Principal.class );
assertEquals( 2, principals.size() );
}
-
+
@Test
- public void isCallerInRole() throws SecurityServiceException
+ public void isCallerInRole() throws SecurityServiceException
{
final String roleName = "adminRole";
- SecurityConfig configInfo = SecurityConfig.createSecurityInfo(roleName, null, "SuccessfulLogin", null, null);
+ Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
+ builder.runAs(roleName);
+ SecurityConfig configInfo = builder.build();
SecurityContext context = new SecurityContext(subject);
service.authenticate(configInfo, context, null);
assertTrue( service.isCallerInRole(subject, new Role(roleName)));
}
-
+
@Test ( expected = SecurityServiceException.class )
public void loginFailure() throws ConfigurationException, SecurityServiceException
{
- SecurityConfig configInfo = SecurityConfig.createSecurityInfo(null, null, "FailureLogin", null, null);
+ Builder builder = new SecurityConfig.Builder("FailureLogin");
+ SecurityConfig configInfo = builder.build();
SecurityContext context = new SecurityContext(subject);
service.authenticate( configInfo, context, null );
}
-
+
@Test
+ public void rolesAllowed() throws ConfigurationException, SecurityServiceException
+ {
+ Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
+ builder.runAs("esbRole");
+ builder.rolesAllowed("esbRole");
+ SecurityConfig configInfo = builder.build();
+ SecurityContext context = new SecurityContext(subject);
+ service.authenticate( configInfo, context, null );
+ boolean checkRolesAllowed = service.checkRolesAllowed(configInfo.getRolesAllowed(), context);
+ assertTrue(checkRolesAllowed);
+ }
+
+ @Test
public void refresh() throws SecurityServiceException
{
Runnable runnable = new Runnable()
@@ -144,22 +167,23 @@
t2.start();
}
}
-
+
private void threadLogin()
{
- SecurityConfig configInfo = SecurityConfig.createSecurityInfo(null, null, "SuccessfulLogin", null, null);
+ Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
+ SecurityConfig configInfo = builder.build();
SecurityContext context = new SecurityContext(new Subject());
service.refreshSecurityConfig();
try
{
service.authenticate( configInfo, context, null );
- }
+ }
catch (SecurityServiceException e)
{
fail(e.getMessage());
}
}
-
+
@Before
public void setup() throws ConfigurationException
{
@@ -168,17 +192,17 @@
System.setProperty(Environment.PROPERTIES_FILE, "abs://" + resource.getFile());
service.configure();
}
-
+
@After
public void tearDown()
{
if ( jbossEsbProperties != null )
System.setProperty(Environment.PROPERTIES_FILE, jbossEsbProperties);
}
-
+
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter( JaasSecurityServiceUnitTest.class );
}
-
+
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtilUnitTest.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtilUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtilUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/PrivateCryptoUtilUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.services.security;
+
+import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.Provider;
+import java.security.Security;
+
+import javax.crypto.SealedObject;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.services.security.SecurityServiceException;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Unit test for PrivateCryptoUtil.
+ *
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public class PrivateCryptoUtilUnitTest
+{
+ private String jbossEsbProperties;
+
+ @Test
+ public void encryptAndDecrypt() throws SecurityServiceException
+ {
+ String object = "some texti: dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd";
+ byte[] encrypted = PrivateCryptoUtil.INSTANCE.encrypt(object);
+ assertFalse(object.equals(new String(encrypted)));
+
+ Serializable plainObject = PrivateCryptoUtil.INSTANCE.decrypt(encrypted);
+ assertEquals(object, plainObject);
+ }
+
+ @Before
+ public void setup() throws ConfigurationException
+ {
+ jbossEsbProperties = System.getProperty(Environment.PROPERTIES_FILE);
+ URL resource = ClassUtil.getResource("security-properties.xml", getClass());
+ System.setProperty(Environment.PROPERTIES_FILE, "abs://" + resource.getFile());
+ }
+
+ @After
+ public void tearDown()
+ {
+ if ( jbossEsbProperties != null )
+ {
+ System.setProperty(Environment.PROPERTIES_FILE, jbossEsbProperties);
+ }
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new JUnit4TestAdapter(PrivateCryptoUtilUnitTest.class);
+ }
+
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/privateKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/privateKeyStore)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/services/security/security-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -41,6 +41,12 @@
<property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.JaasSecurityService"/>
<property name="org.jboss.soa.esb.services.security.callbackHandler" value="org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler"/>
<property name="org.jboss.soa.esb.services.security.configUrl" value="jaas.login"/>
+
+ <property name="org.jboss.soa.esb.services.security.privateKeystore" value="privateKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyPassword" value="testPassword"/>
+
</properties>
<properties name="registry">
<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/BaseWebServiceUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/BaseWebServiceUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/BaseWebServiceUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import java.security.cert.X509Certificate;
import javax.xml.parsers.ParserConfigurationException;
@@ -38,19 +39,25 @@
import org.jboss.internal.soa.esb.services.registry.MockRegistry;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.listeners.message.MessageDeliverException;
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;
import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
import org.jboss.soa.esb.services.security.auth.ws.WSTestUtil;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.After;
import org.junit.AfterClass;
+import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.xml.sax.SAXException;
/**
* Unittest for {@link BaseWebService}
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
@@ -59,38 +66,45 @@
private static String serviceCategory = "cat";
private static String serviceName = "name";
private static MockCourier mockCourier;
-
+ private String jbossEsbProperties;
+
@Test
- public void invokeWithBinarySecurityTokenHeader() throws ParserConfigurationException, SAXException, IOException, SOAPException, MessageDeliverException
+ public void invokeWithBinarySecurityTokenHeader() throws ParserConfigurationException, SAXException, IOException, SOAPException, MessageDeliverException, SecurityServiceException
{
SOAPMessage soap = WSTestUtil.createMessage("soap-keys-example.xml", BaseWebServiceUnitTest.class);
MockBaseWebService service = new MockBaseWebService(serviceCategory, serviceName);
service.invoke(soap);
-
+
Message esbMessage = service.getEsbMessage();
- AuthenticationRequest authRequest = (AuthenticationRequest) esbMessage.getProperties().getProperty( SecurityService.AUTH_REQUEST );
+ byte[] encrypted = (byte[]) esbMessage.getProperties().getProperty( SecurityService.AUTH_REQUEST );
+ assertNotNull("AuthRequest should have been encrypted", encrypted );
+
+ AuthenticationRequest authRequest = (AuthenticationRequest) PublicCryptoUtil.INSTANCE.decrypt(encrypted);
assertNotNull( authRequest );
assertTrue(authRequest.getCredentials().size() == 1 );
assertTrue(authRequest.getCredentials().iterator().next() instanceof X509Certificate );
}
-
+
@Test
- public void invokeWithUsernameTokenHeader() throws ParserConfigurationException, SAXException, IOException, SOAPException, MessageDeliverException
+ public void invokeWithUsernameTokenHeader() throws ParserConfigurationException, SAXException, IOException, SOAPException, MessageDeliverException, SecurityServiceException
{
SOAPMessage soap = WSTestUtil.createMessage("soap-userpass-example.xml", BaseWebServiceUnitTest.class);
MockBaseWebService service = new MockBaseWebService(serviceCategory, serviceName);
service.invoke(soap);
-
+
Message esbMessage = service.getEsbMessage();
- AuthenticationRequest authRequest = (AuthenticationRequest) esbMessage.getProperties().getProperty( SecurityService.AUTH_REQUEST );
+ byte[] encrypted = (byte[]) esbMessage.getProperties().getProperty( SecurityService.AUTH_REQUEST );
+ assertNotNull("AuthRequest should have been encrypted", encrypted );
+
+ AuthenticationRequest authRequest = (AuthenticationRequest) PublicCryptoUtil.INSTANCE.decrypt(encrypted);
assertNotNull( authRequest );
assertEquals("Clark", authRequest.getPrincipal().getName());
assertTrue(authRequest.getCredentials().size() == 1 );
assertTrue(authRequest.getCredentials().iterator().next() instanceof char[] );
}
-
+
@BeforeClass
- public static void setup() throws ConfigurationException, URISyntaxException
+ public static void classSetup() throws ConfigurationException, URISyntaxException
{
MockCourierFactory.install();
MockRegistry.install();
@@ -98,14 +112,29 @@
mockCourier = new MockCourier(true);
MockRegistry.register(serviceCategory, serviceName, epr, mockCourier);
}
-
+
@AfterClass
- public static void tearDown()
+ public static void classTearDown()
{
MockRegistry.uninstall();
MockCourierFactory.uninstall();
}
-
+
+ @Before
+ public void setup() throws ConfigurationException
+ {
+ jbossEsbProperties = System.getProperty(Environment.PROPERTIES_FILE);
+ URL resource = ClassUtil.getResource("security-properties.xml", getClass());
+ System.setProperty(Environment.PROPERTIES_FILE, "abs://" + resource.getFile());
+ }
+
+ @After
+ public void tearDown()
+ {
+ if ( jbossEsbProperties != null )
+ System.setProperty(Environment.PROPERTIES_FILE, jbossEsbProperties);
+ }
+
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter(BaseWebServiceUnitTest.class);
@@ -114,22 +143,22 @@
private class MockBaseWebService extends BaseWebService
{
private Message esbMessage;
-
+
public Message getEsbMessage()
{
return esbMessage;
}
-
+
protected MockBaseWebService(String category, String name) throws MessageDeliverException
{
super(category, name);
}
-
+
@Override
protected Message deliverMessage(Message request) throws Exception
{
this.esbMessage = request;
-
+
return request;
}
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/no-security-properties.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/no-security-properties.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/no-security-properties.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/no-security-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,94 @@
+<?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.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.esb.bind.address}:1099"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
+ <property name="jboss.esb.invm.scope.default" value="NONE"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#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.LocalTransport"/>
+ </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"/>
+ <property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
+ <property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
+ <property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
+ </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">
+
+ <!-- connection manager type -->
+ <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/> -->
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
+
+ <!-- this property is only used if using the j2ee connection manager -->
+ <property name="org.jboss.soa.esb.persistence.db.datasource.name" value="java:/JBossESBDS"/>
+
+ <!-- standalone connection pooling settings -->
+ <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"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+
+ </properties>
+ <properties name="filters">
+ <property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
+ <property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
+ </properties>
+</esb>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/publicKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/publicKeyStore)
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/security-properties.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/security-properties.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/security-properties.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/security-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,105 @@
+<?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.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.esb.bind.address}:1099"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
+ <property name="jboss.esb.invm.scope.default" value="NONE"/>
+ </properties>
+ <properties name="security">
+ <property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.JaasSecurityService"/>
+ <property name="org.jboss.soa.esb.services.security.callbackHandler" value="org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler"/>
+ <property name="org.jboss.soa.esb.services.security.configUrl" value="jaas.login"/>
+
+ <property name="org.jboss.soa.esb.services.security.publicKeystore" value="publicKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#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.LocalTransport"/>
+ </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"/>
+ <property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
+ <property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
+ <property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
+ </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">
+
+ <!-- connection manager type -->
+ <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/> -->
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
+
+ <!-- this property is only used if using the j2ee connection manager -->
+ <property name="org.jboss.soa.esb.persistence.db.datasource.name" value="java:/JBossESBDS"/>
+
+ <!-- standalone connection pooling settings -->
+ <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"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+
+ </properties>
+ <properties name="filters">
+ <property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
+ <property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
+ </properties>
+</esb>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -20,10 +20,12 @@
package org.jboss.soa.esb.listeners;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
-import java.io.UnsupportedEncodingException;
import java.io.IOException;
+import javax.xml.parsers.ParserConfigurationException;
+
import junit.framework.JUnit4TestAdapter;
import org.jboss.internal.soa.esb.util.StreamUtils;
@@ -33,6 +35,7 @@
import org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer;
import org.jboss.soa.esb.schedule.SchedulingException;
import org.jboss.soa.esb.testutils.ESBConfigUtil;
+import org.jboss.soa.esb.testutils.StringUtils;
import org.junit.Test;
import org.xml.sax.SAXException;
@@ -43,12 +46,12 @@
public class ScheduledListenerUnitTest {
@Test
- public void test() throws IOException, SAXException, ConfigurationException {
+ public void test() throws IOException, SAXException, ConfigurationException, ParserConfigurationException {
ESBConfigUtil configUtil = new ESBConfigUtil(ScheduledListenerUnitTest.class.getResourceAsStream("scheduled-listener-config.xml"));
String actualListenerConfig = configUtil.getListenerConfig("simple-schedule-listener").toXml();
String expectedListenerConfig = StreamUtils.readStreamString(getClass().getResourceAsStream("scheduled-listener-config-configtree.xml"), "UTF-8");
- assertEquals(expectedListenerConfig, actualListenerConfig);
+ assertTrue("Service configuration", StringUtils.compareXMLContent(expectedListenerConfig, actualListenerConfig));
}
@Test
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -22,20 +22,45 @@
package org.jboss.soa.esb.listeners.message;
+import java.io.Serializable;
+import java.net.URL;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+
+import javax.security.auth.Subject;
+
+import junit.framework.JUnit4TestAdapter;
import junit.framework.TestCase;
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.helpers.ConfigTree;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
+import org.jboss.soa.esb.services.security.SecurityContext;
+import org.jboss.soa.esb.services.security.SecurityContextUnitTest;
+import org.jboss.soa.esb.services.security.SecurityService;
+import org.jboss.soa.esb.services.security.SecurityServiceException;
+import org.jboss.soa.esb.services.security.TestPrincipal;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequestImpl;
+import org.jboss.soa.esb.services.security.principals.User;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.After;
+import org.junit.Before;
public class ActionProcessingPipelineUnitTest extends TestCase
{
- public void testProperty() {
-
+ private String jbossEsbProperties;
+
+ public void testProperty() {
+
}
-
+
@Override
protected void setUp() throws Exception
{
@@ -45,13 +70,27 @@
com.arjuna.common.util.propertyservice.PropertyManager pm = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE);
pm.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
+ LifecycleResourceManager.getSingleton().associateDeployment(getClass().getCanonicalName()) ;
+
+ jbossEsbProperties = System.getProperty(Environment.PROPERTIES_FILE);
+ URL resource = ClassUtil.getResource("security-properties.xml", getClass());
+ System.setProperty(Environment.PROPERTIES_FILE, "abs://" + resource.getFile());
}
-
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ LifecycleResourceManager.getSingleton().disassociateDeployment(getClass().getCanonicalName()) ;
+ if ( jbossEsbProperties != null )
+ System.setProperty(Environment.PROPERTIES_FILE, jbossEsbProperties);
+ super.tearDown();
+ }
+
/*
* Tests to run
* - create a pipeline with a failure, make sure failure is called in correct order and subsequent actions are not called.
* Check initialise and destroy called.
- *
+ *
* Do the above for each type of action.
*/
public void testActionPipelineProcessor()
@@ -70,30 +109,30 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList(), 0, 2, 4) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList(), 4, 2, 0) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList(), 4, 2, 0, 4, 2, 0) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList(), 4, 2, 0) ;
}
-
+
public void testActionPipelineProcessorFailure()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionPipelineProcessor.class.getName(),
null, null, null) ;
addAction(configTree, MockActionPipelineProcessorFailure.class.getName(),
@@ -104,7 +143,7 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList(), 0, 2, 4) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2) ;
@@ -120,14 +159,14 @@
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList(), 4, 2, 0) ;
}
-
+
public void testOverriddenActionPipelineProcessor()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionPipelineProcessor.class.getName(),
"process", null, null) ;
addAction(configTree, MockActionPipelineProcessor.class.getName(),
@@ -140,30 +179,30 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList(), 0, 2, 4, 6) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 7) ;
checkOrder(MockActionInfo.getSuccessList(), 7, 4, 3, 0) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 7, 0, 2, 4, 6, 7) ;
checkOrder(MockActionInfo.getSuccessList(), 7, 4, 3, 0, 7, 4, 3, 0) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList(), 6, 4, 2, 0) ;
}
-
+
public void testOverriddenActionPipelineProcessorFailure()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionPipelineProcessor.class.getName(),
"process", null, null) ;
addAction(configTree, MockActionPipelineProcessor.class.getName(),
@@ -176,30 +215,30 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList(), 0, 2, 4, 6) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList()) ;
checkOrder(MockActionInfo.getExceptionList(), 5, 2, 0) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList()) ;
checkOrder(MockActionInfo.getExceptionList(), 5, 2, 0, 5, 2, 0) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList(), 6, 4, 2, 0) ;
}
-
+
public void testOverriddenActionLifecycleProcessor()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionLifecycleProcessor.class.getName(),
"process", null, null) ;
addAction(configTree, MockActionLifecycleProcessor.class.getName(),
@@ -212,30 +251,30 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList(), 0, 2, 4, 6) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 7) ;
checkOrder(MockActionInfo.getSuccessList(), 7, 2) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 7, 0, 2, 4, 6, 7) ;
checkOrder(MockActionInfo.getSuccessList(), 7, 2, 7, 2) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList(), 6, 4, 2, 0) ;
}
-
+
public void testOverriddenActionLifecycleProcessorFailure()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionLifecycleProcessor.class.getName(),
"process", null, null) ;
addAction(configTree, MockActionLifecycleProcessor.class.getName(),
@@ -248,30 +287,30 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList(), 0, 2, 4, 6) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList()) ;
checkOrder(MockActionInfo.getExceptionList(), 5) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList()) ;
checkOrder(MockActionInfo.getExceptionList(), 5, 5) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList(), 6, 4, 2, 0) ;
}
-
+
public void testOverriddenActionProcessor()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionProcessor.class.getName(),
"process", null, null) ;
addAction(configTree, MockActionProcessor.class.getName(),
@@ -284,30 +323,30 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList()) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 7) ;
checkOrder(MockActionInfo.getSuccessList(), 7, 2) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertTrue("Pipeline process failure", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 7, 8, 10, 12, 14, 15) ;
checkOrder(MockActionInfo.getSuccessList(), 7, 2, 15, 10) ;
checkOrder(MockActionInfo.getExceptionList()) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList()) ;
}
-
+
public void testOverriddenActionProcessorFailure()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionProcessor.class.getName(),
"process", null, null) ;
addAction(configTree, MockActionProcessor.class.getName(),
@@ -320,23 +359,23 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
pipeline.initialise() ;
checkOrder(MockActionInfo.getInitialiseList()) ;
-
+
final boolean result = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", result) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4) ;
checkOrder(MockActionInfo.getSuccessList()) ;
checkOrder(MockActionInfo.getExceptionList(), 5) ;
-
+
final boolean secondResult = pipeline.process(MessageFactory.getInstance().getMessage()) ;
assertFalse("Pipeline process succeeded", secondResult) ;
checkOrder(MockActionInfo.getProcessList(), 0, 2, 4, 6, 8, 10) ;
checkOrder(MockActionInfo.getSuccessList()) ;
checkOrder(MockActionInfo.getExceptionList(), 5, 11) ;
-
+
pipeline.destroy() ;
checkOrder(MockActionInfo.getDestroyList()) ;
}
-
+
public void testErrorActionProcessorException() throws Exception
{
final ConfigTree configTree = new ConfigTree("parent");
@@ -356,13 +395,13 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(
configTree);
pipeline.initialise();
-
+
final boolean result = pipeline.process(MessageFactory.getInstance()
.getMessage());
-
+
assertFalse(result);
}
-
+
public void testNPEActionProcessorException() throws Exception
{
final ConfigTree configTree = new ConfigTree("parent");
@@ -382,20 +421,20 @@
final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(
configTree);
pipeline.initialise();
-
+
final boolean result = pipeline.process(MessageFactory.getInstance()
.getMessage());
-
+
assertFalse(result);
}
-
+
public void testInvalidConstructor()
throws Exception
{
final ConfigTree configTree = new ConfigTree("parent") ;
configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG,
ListenerTagNames.MEP_ONE_WAY) ;
-
+
addAction(configTree, MockActionPipelineProcessorConstructorFailure.class.getName(),
null, null, null) ;
try
@@ -405,10 +444,118 @@
}
catch (final ConfigurationException ce)
{
-
+
}
}
+ public void testSecuredServiceWithoutExistingSecurityContext() throws Exception
+ {
+ final ConfigTree configTree = new ConfigTree("parent") ;
+ // added the security configuration
+ addSecurityConfig(configTree, "adminRole", null, "SuccessfulLogin", null);
+ configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG, ListenerTagNames.MEP_ONE_WAY) ;
+
+ addAction(configTree, MockSecuredActionProcessor.class.getName(), "process", null, null) ;
+
+ final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
+ pipeline.initialise() ;
+ checkOrder(MockActionInfo.getInitialiseList()) ;
+
+ Message message = MessageFactory.getInstance().getMessage();
+
+ // create an AuthenticationRequest which is needed to authenticate if the security
+ AuthenticationRequest build = new AuthenticationRequestImpl.Builder().build();
+ message.getProperties().setProperty(SecurityService.AUTH_REQUEST, PublicCryptoUtil.INSTANCE.encrypt((Serializable) build));
+
+ final boolean result = pipeline.process(message);
+ assertTrue(result);
+ assertEquals(new TestPrincipal("test").getName(), MockSecuredActionProcessor.getSubject().getPrincipals().iterator().next().getName());
+
+ pipeline.destroy() ;
+ checkOrder(MockActionInfo.getDestroyList()) ;
+ }
+
+ public void testSecuredServiceWithPreExistingSecurityContext() throws Exception
+ {
+ final ConfigTree configTree = new ConfigTree("parent") ;
+ addSecurityConfig(configTree, "adminRole", null, "SuccessfulLogin", null);
+ configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG, ListenerTagNames.MEP_ONE_WAY) ;
+
+ addAction(configTree, MockSecuredActionProcessor.class.getName(), "process", null, null) ;
+
+ final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
+ pipeline.initialise() ;
+ checkOrder(MockActionInfo.getInitialiseList()) ;
+
+ Message message = MessageFactory.getInstance().getMessage();
+
+ Subject subject = new Subject();
+ // add principal
+ User user = new User("AustinPowerwich");
+ subject.getPrincipals().add(user);
+ // add public credentials
+ byte[] publicCred = "publicsecret".getBytes();
+ subject.getPublicCredentials().add(publicCred);
+ // add private credentials
+ byte[] privateCred = "privatesecret".getBytes();
+ subject.getPrivateCredentials().add(privateCred);
+
+ // create and encrypt the security context. This simulates a call for a service
+ // that has already been authentcated..
+ SecurityContext securityContext = new SecurityContext(subject);
+ byte[] encrypt = SecurityContext.encryptContext(securityContext);
+
+ message.getProperties().setProperty(SecurityService.CONTEXT, encrypt);
+
+ final boolean result = pipeline.process(message);
+
+ assertTrue(result);
+ assertEquals(user, MockSecuredActionProcessor.getSubject().getPrincipals().iterator().next());
+
+ pipeline.destroy() ;
+ checkOrder(MockActionInfo.getDestroyList()) ;
+ }
+
+ public void testSecuredWithSecurityContextRolesAllowedNegativeCheck() throws Exception
+ {
+ final ConfigTree configTree = new ConfigTree("parent") ;
+ configTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG, ListenerTagNames.MEP_ONE_WAY) ;
+ addSecurityConfig(configTree, "adminRole", null, "SuccessfulLogin", "noRole");
+
+ addAction(configTree, MockSecuredActionProcessor.class.getName(), "process", null, null) ;
+
+ final ActionProcessingPipeline pipeline = new ActionProcessingPipeline(configTree) ;
+ pipeline.initialise() ;
+ checkOrder(MockActionInfo.getInitialiseList()) ;
+
+ Message message = MessageFactory.getInstance().getMessage();
+
+ Subject subject = new Subject();
+ User user = new User("AustinPowerwich");
+ subject.getPrincipals().add(user);
+ byte[] publicCred = "publicsecret".getBytes();
+ subject.getPublicCredentials().add(publicCred);
+ byte[] privateCred = "privatesecret".getBytes();
+ subject.getPrivateCredentials().add(privateCred);
+ SecurityContext securityContext = new SecurityContext(subject);
+ byte[] encrypt = SecurityContext.encryptContext(securityContext);
+
+ message.getProperties().setProperty(SecurityService.CONTEXT, encrypt);
+
+ try
+ {
+ pipeline.process(message);
+ }
+ catch(final Exception e)
+ {
+ e.printStackTrace();
+ assertTrue (e instanceof SecurityServiceException);
+ }
+
+ pipeline.destroy() ;
+ checkOrder(MockActionInfo.getDestroyList()) ;
+ }
+
public static void addAction(final ConfigTree configTree, final String actionName) {
addAction(configTree, actionName, null, null, null);
}
@@ -431,17 +578,36 @@
actionChild.setAttribute(ListenerTagNames.EXCEPTION_METHOD_TAG, exceptionOverride) ;
}
}
-
+
private void checkOrder(final Integer[] list, int ... values)
{
final int numValues = (values == null ? 0 : values.length) ;
final int listLength = (list == null ? 0 : list.length) ;
-
+
assertEquals("Unexpected list/values count", numValues, listLength) ;
-
+
for(int count = 0 ; count < numValues ; count++)
{
assertEquals("Unexpected call order at count " + count, values[count], list[count].intValue()) ;
}
}
+
+ private ConfigTree addSecurityConfig(
+ final ConfigTree parent,
+ final String runAs,
+ final String callerIdentity,
+ final String moduleName,
+ final String rolesAllowed)
+ {
+ final ConfigTree securityElement = new ConfigTree(ListenerTagNames.SECURITY_TAG, parent);
+ securityElement.setAttribute(ListenerTagNames.RUN_AS_TAG, runAs);
+ securityElement.setAttribute(ListenerTagNames.USE_CALLERS_IDENTIDY_TAG, callerIdentity);
+ securityElement.setAttribute(ListenerTagNames.MODULE_NAME_TAG, moduleName);
+ if ( rolesAllowed != null )
+ {
+ securityElement.setAttribute(ListenerTagNames.ROLES_ALLOWED, rolesAllowed);
+ }
+ return securityElement;
+ }
+
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/MockSecuredActionProcessor.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/MockSecuredActionProcessor.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/MockSecuredActionProcessor.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/MockSecuredActionProcessor.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,52 @@
+/*
+ * 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.message;
+
+import java.security.AccessController;
+
+import javax.security.auth.Subject;
+
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MockSecuredActionProcessor
+{
+ private static Subject subject ;
+
+ public MockSecuredActionProcessor(final ConfigTree tree)
+ {
+ }
+
+ public Message process(Message message) throws ActionProcessingException
+ {
+ subject = Subject.getSubject(AccessController.getContext());
+ return message ;
+ }
+
+ public static Subject getSubject()
+ {
+ return subject;
+ }
+
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounterUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -27,6 +27,7 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
import org.junit.Test;
/**
@@ -41,11 +42,12 @@
@Test
public void getObjectName()
+ throws LifecycleResourceException
{
ConfigTree config = createConfigTreeForScheduler();
log.debug( config );
- ServiceMessageCounter counter = new ServiceMessageCounter( config );
+ ServiceMessageCounter counter = ServiceMessageCounterLifecycleResource.getServiceMessageCounter(config);
ObjectName objectName = counter.getObjectName();
log.debug( objectName );
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/privateKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/privateKeyStore)
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/security-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,110 @@
+<?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.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.esb.bind.address}:1099"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
+ <property name="jboss.esb.invm.scope.default" value="NONE"/>
+ </properties>
+ <properties name="security">
+ <property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.JaasSecurityService"/>
+ <property name="org.jboss.soa.esb.services.security.callbackHandler" value="org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler"/>
+ <property name="org.jboss.soa.esb.services.security.configUrl" value="jaas.login"/>
+
+ <property name="org.jboss.soa.esb.services.security.privateKeystore" value="privateKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyPassword" value="testPassword"/>
+
+ <property name="org.jboss.soa.esb.services.security.publicKeystore" value="publicKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#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.LocalTransport"/>
+ </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"/>
+ <property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
+ <property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
+ <property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
+ </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">
+
+ <!-- connection manager type -->
+ <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/> -->
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
+
+ <!-- this property is only used if using the j2ee connection manager -->
+ <property name="org.jboss.soa.esb.persistence.db.datasource.name" value="java:/JBossESBDS"/>
+
+ <!-- standalone connection pooling settings -->
+ <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"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+
+ </properties>
+ <properties name="filters">
+ <property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
+ <property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
+ </properties>
+</esb>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,3 +1,3 @@
-<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" my-prop="1" name="simple-schedule-listener" scheduleidref="1-sec-trigger">
+<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" my-prop="1" name="simple-schedule-listener" scheduleidref="1-sec-trigger" service-category="ServiceCat" service-description="Test Service" service-name="ServiceName">
<action action="action" class="org.jboss.soa.esb.mock.MockAction"/>
</listener>
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -21,22 +21,19 @@
import junit.framework.TestCase;
import org.jboss.soa.esb.testutils.ESBConfigUtil;
+import org.jboss.soa.esb.testutils.StringUtils;
import org.jboss.soa.esb.parameters.ParamRepositoryException;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.util.ClassUtil;
import org.jboss.soa.esb.mock.MockAction;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
import org.jboss.internal.soa.esb.util.StreamUtils;
import org.xml.sax.SAXException;
-import org.quartz.impl.StdSchedulerFactory;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
import java.io.UnsupportedEncodingException;
-import java.io.InputStream;
import java.io.IOException;
-import java.util.Properties;
+import javax.xml.parsers.ParserConfigurationException;
+
/**
* Scheduling unit tests.
*
@@ -51,11 +48,11 @@
MockAction.message = null;
}
- public void test_listener_config() throws IOException, SAXException, ConfigurationException {
+ public void test_listener_config() throws IOException, SAXException, ConfigurationException, ParserConfigurationException {
ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config-01.xml"));
String expected = StreamUtils.readStreamString(getClass().getResourceAsStream("expected-config-01-listener.xml"), "UTF-8");
- assertEquals(expected, configUtil.getListenerConfig("simple-schedule-listener").toString());
+ assertTrue("Service Config", StringUtils.compareXMLContent(expected, configUtil.getListenerConfig("simple-schedule-listener").toString()));
}
public void test_simple_schedule_01() throws UnsupportedEncodingException, ParamRepositoryException, ConfigurationException, ManagedLifecycleException, SAXException, InterruptedException {
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,3 +1,3 @@
-<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" name="simple-schedule-listener" scheduleidref="1-sec-trigger">
+<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" name="simple-schedule-listener" scheduleidref="1-sec-trigger" service-category="ServiceCat" service-description="Test Service" service-name="ServiceName-01">
<action action="action" class="org.jboss.soa.esb.mock.MockAction"/>
</listener>
\ No newline at end of file
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/PublicCryptoUtilUnitTest.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/soa/esb/services/security/PublicCryptoUtilUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/PublicCryptoUtilUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/PublicCryptoUtilUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.security;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.Provider;
+import java.security.Security;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Unit test for PublicCryptoUtil.
+ *
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public class PublicCryptoUtilUnitTest
+{
+ private String jbossEsbProperties;
+
+ @Test
+ public void encryptAndDecrypt() throws SecurityServiceException, InvalidKeyException, NoSuchAlgorithmException, IOException, ClassNotFoundException
+ {
+ String object = "some textaalddddddddddddddaldkfjlakjfafadlalkfdalfjkfladsjfalkfjfljsafkjalkfjjafjlkafjfjjfaadlasajfkafkjalalfkjakljdljfajfjajfljalkfjlafljalsjfjj";
+ byte[] encrypted = PublicCryptoUtil.INSTANCE.encrypt(object);
+ assertFalse(object.equals(new String(encrypted)));
+
+ Serializable unsealedObject = PublicCryptoUtil.INSTANCE.decrypt(encrypted);
+ assertEquals(object, unsealedObject);
+ }
+
+ @SuppressWarnings("unused")
+ private void dumpSecurityProviders()
+ {
+ Provider[] providers = Security.getProviders();
+ for (Provider provider : providers)
+ {
+ System.out.println(provider.getServices());
+ }
+ }
+
+ @Before
+ public void setup() throws ConfigurationException
+ {
+ jbossEsbProperties = System.getProperty(Environment.PROPERTIES_FILE);
+ URL resource = ClassUtil.getResource("security-properties.xml", getClass());
+ System.setProperty(Environment.PROPERTIES_FILE, "abs://" + resource.getFile());
+ }
+
+ @After
+ public void tearDown()
+ {
+ if ( jbossEsbProperties != null )
+ System.setProperty(Environment.PROPERTIES_FILE, jbossEsbProperties);
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new JUnit4TestAdapter(PublicCryptoUtilUnitTest.class);
+ }
+
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityConfigUtilUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityConfigUtilUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityConfigUtilUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -35,24 +35,24 @@
/**
* Unit test for {@link SecurityConfigUtil}
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
- *
+ *
*/
public class SecurityConfigUtilUnitTest
{
- private String runAs = "kalle";
-
+ private final String runAs = "kalle";
+
@Test
public void createSecurityConfigInfoWithAuth()
{
final ConfigTree securityFragment = createSecurityFragment(runAs, null, null);
-
+
SecurityConfig securityInfo = SecurityConfigUtil.createSecurityConfig(securityFragment);
assertEquals(runAs, securityInfo.getRunAs());
assertNull(securityInfo.getUseCallerIdentity());
}
-
+
@Test
public void createSecurityConfigInfoWithoutAuth()
{
@@ -61,7 +61,7 @@
assertEquals(runAs, securityInfo.getRunAs());
assertNull(securityInfo.getUseCallerIdentity());
}
-
+
@Test
public void createSecurityConfigInfoWithUseCallersIdentity()
{
@@ -70,7 +70,7 @@
SecurityConfig securityInfo = SecurityConfigUtil.createSecurityConfig(securityFragment);
assertEquals(callersIdentity, securityInfo.getUseCallerIdentity());
}
-
+
@Test
public void createSecurityConfigInfoWithModuleName()
{
@@ -79,7 +79,7 @@
SecurityConfig securityInfo = SecurityConfigUtil.createSecurityConfig(securityFragment);
assertEquals(moduleName, securityInfo.getModuleName());
}
-
+
@Test
public void hasRunAs()
{
@@ -87,7 +87,7 @@
SecurityConfig securityInfo = SecurityConfigUtil.createSecurityConfig(securityFragment);
assertTrue(securityInfo.hasRunAs());
}
-
+
@Test
public void properties()
{
@@ -95,16 +95,26 @@
SecurityConfig securityInfo = SecurityConfigUtil.createSecurityConfig(securityFragment);
Map<String, String> properties = securityInfo.getProperties();
assertNotNull( properties );
+ assertEquals("kalle", properties.get("alias"));
}
-
+
+ @Test
+ public void rolesAllowed()
+ {
+ final ConfigTree securityFragment = createSecurityFragment(runAs, "role1, role2, ", null, null, null );
+ SecurityConfig securityInfo = SecurityConfigUtil.createSecurityConfig(securityFragment);
+ assertTrue(securityInfo.getRolesAllowed().contains("role1"));
+ assertTrue(securityInfo.getRolesAllowed().contains("role2"));
+ }
+
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter(SecurityConfigUtilUnitTest.class);
}
-
+
private ConfigTree createSecurityFragment(
- final String runAs,
- final String callerIdentity,
+ final String runAs,
+ final String callerIdentity,
final String moduleName)
{
final ConfigTree securityElement = new ConfigTree(ListenerTagNames.SECURITY_TAG);
@@ -113,18 +123,33 @@
securityElement.setAttribute(ListenerTagNames.MODULE_NAME_TAG, moduleName);
return securityElement;
}
-
+
private ConfigTree createSecurityFragment(
- final String runAs,
- final String callerIdentity,
+ final String runAs,
+ final String callerIdentity,
final String moduleName,
final String alias)
{
final ConfigTree securityElement = createSecurityFragment(runAs, callerIdentity, moduleName);
- ConfigTree property = new ConfigTree("property", securityElement);
- property.setAttribute("name", "alias");
- property.setAttribute("value", alias);
+ if ( alias != null )
+ {
+ ConfigTree property = new ConfigTree("property", securityElement);
+ property.setAttribute("name", "alias");
+ property.setAttribute("value", alias);
+ }
return securityElement;
}
+ private ConfigTree createSecurityFragment(
+ final String runAs,
+ final String rolesAllowed,
+ final String callerIdentity,
+ final String moduleName,
+ final String alias)
+ {
+ final ConfigTree securityElement = createSecurityFragment(runAs, callerIdentity, moduleName, alias);
+ securityElement.setAttribute("rolesAllowed", rolesAllowed);
+ return securityElement;
+ }
+
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityContextUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityContextUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/SecurityContextUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -21,24 +21,47 @@
package org.jboss.soa.esb.services.security;
import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+import java.util.HashSet;
+
import javax.security.auth.Subject;
+import junit.framework.JUnit4TestAdapter;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequestImpl;
import org.jboss.soa.esb.services.security.principals.Group;
import org.jboss.soa.esb.services.security.principals.Role;
import org.jboss.soa.esb.services.security.principals.User;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-import junit.framework.JUnit4TestAdapter;
-
/**
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
public class SecurityContextUnitTest
{
- @Test
+ private String jbossEsbProperties;
+
+ @Test
public void isCallerInRole()
{
Subject subject = new Subject();
@@ -46,12 +69,138 @@
Group roles = new Group("Roles");
roles.addMember( new Role("Admin"));
subject.getPrincipals().add(roles);
-
+
SecurityContext securityContext = new SecurityContext(subject);
boolean callerInRole = securityContext.isCallerInRole("Admin");
assertTrue( callerInRole );
}
+ @Test
+ public void serializeAndDeserialize() throws IOException, ClassNotFoundException
+ {
+ Subject subject = new Subject();
+ User user = new User("AustinPowerwich");
+ subject.getPrincipals().add(user);
+ byte[] publicCred = "secret".getBytes();
+ subject.getPublicCredentials().add(publicCred);
+
+ SecurityContext securityContext = new SecurityContext(subject);
+ assertEquals( user, securityContext.getSubject().getPrincipals().iterator().next() );
+ assertEquals( publicCred, securityContext.getSubject().getPublicCredentials().iterator().next());
+
+ // serialize object
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream(bout);
+ out.writeObject(securityContext);
+
+ // deserialize object
+ ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
+ ObjectInputStream oin = new ObjectInputStream(bin);
+ Object readObject = oin.readObject();
+
+ // assert that the content is still matches.
+ assertTrue (readObject instanceof SecurityContext);
+ SecurityContext deserialized = (SecurityContext)readObject;
+ assertEquals( user, deserialized.getSubject().getPrincipals().iterator().next() );
+ assertEquals( new String(publicCred), new String((byte[])deserialized.getPubCredentials().iterator().next()));
+ }
+
+ @Test
+ public void encryptThenSerializeAndDeserialize() throws IOException, ClassNotFoundException, SecurityServiceException
+ {
+ Subject subject = new Subject();
+ User user = new User("AustinPowerwich");
+ subject.getPrincipals().add(user);
+ byte[] publicCred = "secret".getBytes();
+ subject.getPublicCredentials().add(publicCred);
+
+ SecurityContext securityContext = new SecurityContext(subject);
+ Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+ byte[] encryptContext = SecurityContext.encryptContext(securityContext);
+ message.getProperties().setProperty(SecurityService.CONTEXT, encryptContext);
+
+
+ // serialize object
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream(bout);
+ out.writeObject(message);
+
+ // deserialize object
+ ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
+ ObjectInputStream oin = new ObjectInputStream(bin);
+ Object readObject = oin.readObject();
+
+ // assert that the content is still matches.
+ assertTrue (readObject instanceof Message);
+ Message deserializedMsg = (Message) readObject;
+ SecurityContext deserialized = SecurityContext.decryptContext((byte[]) deserializedMsg.getProperties().getProperty(SecurityService.CONTEXT));
+ assertEquals( user, deserialized.getSubject().getPrincipals().iterator().next() );
+ //assertEquals( new String(publicCred), new String((byte[])deserialized.getPubCredentials().iterator().next()));
+ assertEquals( new String(publicCred), new String((byte[])deserialized.getSubject().getPublicCredentials().iterator().next()));
+ }
+
+ @Test
+ public void decryptionConstructor() throws SecurityServiceException
+ {
+ Subject subject = new Subject();
+ User user = new User("AustinPowerwich");
+ subject.getPrincipals().add(user);
+ byte[] publicCred = "publicsecret".getBytes();
+ subject.getPublicCredentials().add(publicCred);
+ byte[] privateCred = "privatesecret".getBytes();
+ subject.getPrivateCredentials().add(privateCred);
+
+ SecurityContext securityContext = new SecurityContext(subject);
+ byte[] encrypt = SecurityContext.encryptContext(securityContext);
+ assertNotNull(encrypt);
+
+ SecurityContext decryptContext = SecurityContext.decryptContext(encrypt);
+ assertEquals( new String(publicCred), new String((byte[])decryptContext.getPubCredentials().iterator().next()));
+ assertEquals( new String(privateCred), new String((byte[])decryptContext.getPrivCredentials().iterator().next()));
+ }
+
+ @Test
+ public void compareTo() throws SecurityServiceException
+ {
+ Subject subject = new Subject();
+ User user = new User("AustinPowerwich");
+ subject.getPrincipals().add(user);
+ byte[] publicCred = "publicsecret".getBytes();
+ subject.getPublicCredentials().add(publicCred);
+ byte[] privateCred = "privatesecret".getBytes();
+ subject.getPrivateCredentials().add(privateCred);
+
+ SecurityContext securityContext = new SecurityContext(subject);
+
+ HashSet<Object> credentials = new HashSet<Object>();
+ credentials.add(publicCred);
+ credentials.add(privateCred);
+
+ AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder(user, credentials).build();
+ assertTrue(securityContext.compareTo(authRequest));
+
+ credentials = new HashSet<Object>();
+ credentials.add("public-modified-secret".getBytes());
+ authRequest = new AuthenticationRequestImpl.Builder(user, credentials).build();
+ assertFalse(securityContext.compareTo(authRequest));
+ assertFalse(securityContext.compareTo(null));
+ }
+
+ @Before
+ public void setup() throws ConfigurationException
+ {
+ jbossEsbProperties = System.getProperty(Environment.PROPERTIES_FILE);
+ URL resource = ClassUtil.getResource("security-properties.xml", getClass());
+ System.setProperty(Environment.PROPERTIES_FILE, "abs://" + resource.getFile());
+ }
+
+ @After
+ public void tearDown()
+ {
+ if ( jbossEsbProperties != null )
+ System.setProperty(Environment.PROPERTIES_FILE, jbossEsbProperties);
+ }
+
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter(SecurityContextUnitTest.class);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagatorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagatorUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/actions/JBossSecurityPropagatorUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -22,13 +22,13 @@
import static org.junit.Assert.*;
+import java.security.PrivilegedAction;
+
import javax.security.auth.Subject;
import org.jboss.security.SecurityAssociation;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.security.SecurityContext;
-import org.jboss.soa.esb.services.security.SecurityService;
import org.jboss.soa.esb.services.security.principals.User;
import org.junit.Test;
@@ -37,7 +37,7 @@
/**
* Unittest for {@link JBossSecurityPropagator}
* </p>
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
@@ -46,22 +46,26 @@
@Test
public void process()
{
- JBossSecurityPropagator propagator = new JBossSecurityPropagator();
+ final JBossSecurityPropagator propagator = new JBossSecurityPropagator();
propagator.setRunAs("adminRole");
- Message message = MessageFactory.getInstance().getMessage();
+ final Message message = MessageFactory.getInstance().getMessage();
Subject subject = new Subject();
subject.getPrincipals().add(new User("testUser"));
-
- SecurityContext securityContext = new SecurityContext(subject);
- message.getProperties().setProperty( SecurityService.CONTEXT, securityContext );
-
- propagator.process(message);
-
+
+ PrivilegedAction<Message> action = new PrivilegedAction<Message>()
+ {
+ public Message run()
+ {
+ return propagator.process(message);
+ }
+ };
+
+ Message processResult = (Message) Subject.doAsPrivileged(subject, action, null);
+ assertNull(processResult.getProperties().getProperty("org.jboss.soa.esb.services.security.context"));
Subject jbossSubject = SecurityAssociation.getSubject();
- System.out.println(jbossSubject);
assertEquals( subject, jbossSubject);
}
-
+
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter(JBossSecurityPropagatorUnitTest.class);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/AuthenticationRequestUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -40,7 +40,7 @@
public void contruct()
{
final Principal principal = new TestPrincipal("testUser");
- AuthenticationRequest request = new AuthenticationRequestImpl.Builder(principal, null ).bulid();
+ AuthenticationRequest request = new AuthenticationRequestImpl.Builder(principal, null ).build();
assertEquals( principal, request.getPrincipal());
}
@@ -49,7 +49,7 @@
{
final String username = "Donald";
final String password = "Duck123";
- AuthenticationRequest request = new AuthenticationRequestImpl.Builder().username(username).password(password.toCharArray()).bulid();
+ AuthenticationRequest request = new AuthenticationRequestImpl.Builder().username(username).password(password.toCharArray()).build();
assertEquals( username, request.getPrincipal().getName() );
assertTrue( request.getCredentials().size() == 1 );
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityTokenTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityTokenTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/BinarySecurityTokenTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,17 +2,17 @@
* JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
* LLC, and individual contributors by the @authors tag. See the copyright.txt
* in the distribution for a full listing of individual contributors.
- *
+ *
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this software; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.security.cert.Certificate;
import javax.xml.parsers.ParserConfigurationException;
@@ -37,7 +38,7 @@
/**
* Unittest for {@link BinarySecurityToken}
- *
+ *
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
*/
@@ -46,28 +47,28 @@
private String expectedEncoding = "Base64Binary";
private String expectedValueType = "X509v3";
private BinarySecurityToken token = new BinarySecurityToken();
-
+
@Test
public void setEncodingTypeWithNSPrefix()
{
token.setEncodingType("wsse:" + expectedEncoding);
assertEquals( expectedEncoding, token.getEncodingType() );
}
-
+
@Test
public void setEncodingTypeWithNSPrefix2()
{
token.setEncodingType("d:" + expectedEncoding);
assertEquals( expectedEncoding, token.getEncodingType() );
}
-
+
@Test
public void setEncodingTypeWithoutNSPrefix()
{
token.setEncodingType(expectedEncoding);
assertEquals( expectedEncoding, token.getEncodingType() );
}
-
+
@Test
public void setEncodingTypeFullPath()
{
@@ -75,7 +76,7 @@
token.setEncodingType(url);
assertEquals( expectedEncoding, token.getEncodingType() );
}
-
+
@Test
public void setValueType()
{
@@ -83,29 +84,31 @@
token.setValueType(url);
assertEquals( expectedValueType, token.getValueType() );
}
-
+
@Test
public void setEncodingType()
{
token.setEncodingType(expectedEncoding);
assertEquals( expectedEncoding, token.getEncodingType() );
}
-
+
@Test
public void setEncodingTypeNull()
{
token.setEncodingType(null);
assertNull(token.getEncodingType());
}
-
+
@Test
public void setKey() throws ConfigurationException, SAXException, IOException, ParserConfigurationException
{
token.setEncodingType(expectedEncoding);
token.setValueType(expectedValueType);
token.setKey(getExampleCert());
+ Certificate key = token.getKey();
+ assertNotNull(key);
}
-
+
private String getExampleCert() throws SAXException, IOException, ParserConfigurationException, ConfigurationException
{
InputStream inputStream = ClassUtil.getResourceAsStream("cert-example.xml", getClass() );
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/privateKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/soa/esb/services/security/privateKeyStore)
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/publicKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/rosetta/tests/src/org/jboss/soa/esb/services/security/publicKeyStore)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/tests/src/org/jboss/soa/esb/services/security/security-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -31,37 +31,48 @@
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.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.esb.bind.address}:1099"/>
<property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
<property name="jboss.esb.invm.scope.default" value="NONE"/>
</properties>
<properties name="security">
<property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.JaasSecurityService"/>
+ <property name="org.jboss.soa.esb.services.security.callbackHandler" value="org.jboss.internal.soa.esb.services.security.UserPassCallbackHandler"/>
<property name="org.jboss.soa.esb.services.security.configUrl" value="jaas.login"/>
+
+ <property name="org.jboss.soa.esb.services.security.privateKeystore" value="privateKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.privateKeyPassword" value="testPassword"/>
+
+ <property name="org.jboss.soa.esb.services.security.publicKeystore" value="publicKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
</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"/>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#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"/>
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
</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"/>
+ <property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
+ <property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
+ <property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
</properties>
<properties name="connection">
<property name="min-pool-size" value="5"/>
@@ -71,20 +82,29 @@
<property name="abandoned-connection-time-interval" value="30000"/>
</properties>
<properties name="dbstore">
+
+ <!-- connection manager type -->
+ <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/> -->
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
+
+ <!-- this property is only used if using the j2ee connection manager -->
+ <property name="org.jboss.soa.esb.persistence.db.datasource.name" value="java:/JBossESBDS"/>
+
+ <!-- standalone connection pooling settings -->
<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.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"/>
+ <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.test.table" value="pooltest"/>
<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="filters">
+ <property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
+ <property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
</properties>
- <properties name="messagerouting">
- <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
- </properties>
</esb>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/business_ruleservice_ruleAgent/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -18,6 +18,8 @@
</filterset>
</copy>
</target>
+
+ <target name="config" depends="dependencies,quickstart-specific-assemblies"/>
<!-- Import the base Ant build script... -->
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/conf/base-build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -79,9 +79,6 @@
<!-- ==================================================================== -->
<target name="messaging-config" depends="jbossesb-dependencies">
- <property name="org.jboss.esb.server.deploy.dir"
- value="${org.jboss.esb.server.server}/deploy"/>
-
<condition property="messaging.present">
<available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging"/>
</condition>
@@ -134,29 +131,31 @@
<!-- Configure dependencies for jbossesb and source distributions -->
<target name="jbossesb-dependencies" depends="check-jbossesb-dist, qslib-dependencies, non-qslib-dependencies, jbossesb-source-dependencies, jbossesb-server-dependencies">
<property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+ <property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
<path id="deployment-classpath">
- <fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.sar/lib" includes="*.jar"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib" includes="*.jar"/>
<!-- jbossesb config -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.esb" includes="*.jar"/>
- <pathelement location="${org.jboss.esb.server.server}/deploy/jbossesb.esb"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/jbossesb.esb" includes="*.jar"/>
+ <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.esb"/>
<!-- jbpm config -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/jbpm.esb" includes="*.jar"/>
- <pathelement location="${org.jboss.esb.server.server}/deploy/jbpm.esb"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/jbpm.esb" includes="*.jar"/>
+ <pathelement location="${org.jboss.esb.server.deploy.dir}/jbpm.esb"/>
<pathelement location="${org.jboss.esb.server.server}/lib/cglib.jar"/>
<pathelement location="${org.jboss.esb.server.server}/lib/dom4j.jar"/>
+ <pathelement location="${org.jboss.esb.server.server}/lib/antlr.jar"/>
<!-- smooks config -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/smooks.esb" includes="*.jar"/>
- <pathelement location="${org.jboss.esb.server.server}/deploy/smooks.esb"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/smooks.esb" includes="*.jar"/>
+ <pathelement location="${org.jboss.esb.server.deploy.dir}/smooks.esb"/>
<!-- jbrules config -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/jbrules.esb" includes="*.jar"/>
- <pathelement location="${org.jboss.esb.server.server}/deploy/jbrules.esb"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/jbrules.esb" includes="*.jar"/>
+ <pathelement location="${org.jboss.esb.server.deploy.dir}/jbrules.esb"/>
<!-- spring config -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/spring.esb" includes="*.jar"/>
- <pathelement location="${org.jboss.esb.server.server}/deploy/spring.esb"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/spring.esb" includes="*.jar"/>
+ <pathelement location="${org.jboss.esb.server.deploy.dir}/spring.esb"/>
<!-- soap config -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/soap.esb" includes="*.jar"/>
- <pathelement location="${org.jboss.esb.server.server}/deploy/soap.esb"/>
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/soap.esb" includes="*.jar"/>
+ <pathelement location="${org.jboss.esb.server.deploy.dir}/soap.esb"/>
<fileset dir="${org.jboss.esb.server.server}/lib" includes="activation.jar, mail.jar, jboss-ejb3x.jar"/>
<!-- general libs -->
<pathelement location="${org.jboss.esb.server.home}/lib/commons-logging.jar"/>
@@ -165,6 +164,18 @@
<pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar"/>
<pathelement location="${org.jboss.esb.server.server}/lib/jbossts-common.jar"/>
<pathelement location="${org.jboss.esb.server.server}/lib/quartz.jar"/>
+ <!-- includes for read only cache -->
+ <fileset dir="${org.jboss.esb.server.server}/lib" includes="jboss-cache*.jar"/>
+ <pathelement location="${org.jboss.esb.server.server}/lib/jgroups.jar"/>
+ <!-- includes for h2 -->
+ <fileset dir="${org.jboss.esb.server.server}/lib" includes="h2*.jar"/>
+ <!-- common client jars -->
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar"/>
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jaxws-rt.jar jaxws-tools.jar jboss-jaxws.jar jboss-saaj.jar jbossws-common.jar jbossws-spi.jar"/>
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossall-client.jar"/>
+ <!-- common lib jars -->
+ <fileset dir="${org.jboss.esb.server.home}/lib" includes="commons-httpclient.jar"/>
+ <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="xalan.jar"/>
</path>
</target>
@@ -241,13 +252,13 @@
<fail unless="jbossesb-server-recognised" message="Could not detect embedded ESB configuration"/>
<condition property="org.jboss.esb.server.config"
+ value="production">
+ <isset property="jbossesb-server-production"/>
+ </condition>
+ <condition property="org.jboss.esb.server.config"
value="default">
<isset property="jbossesb-server-default"/>
</condition>
- <condition property="org.jboss.esb.server.config"
- value="production">
- <isset property="jbossesb-server-production"/>
- </condition>
<echo message="Defaulting to profile: ${org.jboss.esb.server.config}"/>
</target>
@@ -312,7 +323,7 @@
<fileset dir="${org.jboss.esb.server.server}/lib" includes="hibernate3.jar commons-collections.jar hsqldb.jar" /> <!-- Required for jbpm Client Code. -->
<fileset dir="${org.jboss.esb.server.server}/lib" includes="bsh.jar" /> <!-- Required for scripting Client Code. -->
<fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="*.jar" /> <!-- Required for JMS Client Code. -->
- <fileset dir="${org.jboss.esb.server.server}/deploy/jboss-aop-jdk50.deployer" includes="jboss-aop-jdk50.jar" /> <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.deploy.dir}/jboss-aop-jdk50.deployer" includes="jboss-aop-jdk50.jar" /> <!-- Required for JMS Client Code. -->
<path refid="compile-classpath" />
<pathelement location="${pwd}/anttasks/classes" />
</path>
@@ -555,6 +566,11 @@
<fail unless="is-valid-jbr-version" message="Invalid version of JBossRemoting installed on target server. Please install version 2.2.2.SP2 or higher: http://repository.jboss.org/jboss/remoting/" />
</target>
+ <target name="assert-jgroups" depends="jbossesb-dependencies">
+ <available property="jgroups-available" file="${org.jboss.esb.server.server}/lib/jgroups.jar"/>
+ <fail unless="jgroups-available" message="Unfortunately this aspect requires jgroups in order to function correctly. Please target a server instance which contains jgroups.jar"/>
+ </target>
+
<!-- ==================================================================== -->
<!-- This section defines properties/targets to be overridden by the -->
<!-- quickstart specific build.xml file. -->
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/oracle-aq/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/oracle-aq/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_action/oracle-aq/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -4,22 +4,22 @@
ACTION_REQUEST, B and HELLO_WORLD_ACTION, make sure to set
the payload type to Object: SYS, AQ$_JMS_MESSAGE.
-2. Edit the jndi.properties file to reflect your database connection settings
+2. Edit the jboss-esb.xml file to reflect your database connection settings
3. Copy the jndi.properties and the jboss-esb.xml in the helloworld_action directory.
-4. From the lib/ext/jms/oracleaq directory copy the following jars in to the
+4. Follow the instructions in the readme.txt within lib/ext/jms/oracleaq and place the following jars in the
helloworld_action/lib directory
- 26747 Mar 18 18:16 asm.jar
- 286330 Mar 18 18:16 cglib-2.1_2jboss.jar
- 120342 Aug 4 2006 mockejb.jar
- 8757 Apr 4 14:13 org.jboss.soa.esb.oracle.aq-4.2.MR2.jar
+ asm.jar
+ cglib-2.1_2jboss.jar
+ mockejb.jar
+ org.jboss.soa.esb.oracle.aq.<version>.jar
and obtain the following jars from your Oracle DB install:
- 772466 Mar 27 11:14 aqapi13.jar (from oracle)
-1397543 Mar 27 11:13 ojdbc14.jar (from oracle)
+ aqapi13.jar (from oracle)
+ ojdbc14.jar (from oracle)
Note that
@@ -28,7 +28,16 @@
2. Oracle AQ does not have a JNDI provider and it is common to register
Queues in an LDAP. Here we chose to register the Queues to MockContext
which is why you need the mockejb.jar, as well as the asm and cglib jars
- that it depends on. The org.jboss.soa.esb.oracle.aq-4.2.MR2.jar plugin
+ that it depends on. The org.jboss.soa.esb.oracle.aq.<version>.MR2.jar plugin
does the actual work of registering. Registering to JNP proved not
possible because of code in the Oracle API to support option 1, the LDAP
- registration.
\ No newline at end of file
+ registration.
+
+
+The following can be used to create the queue table, create the queue, and enable the queue:
+
+exec dbms_aqadm.CREATE_queue_table(queue_table => 'myqueue_table_name', multiple_consumers => FALSE, queue_payload_type => 'SYS.AQ$_JMS_MESSAGE');
+
+exec dbms_aqadm.CREATE_queue(queue_name => 'myqueue_name', queue_table => 'myqueue_table_name');
+
+exec dbms_aqadm.start_queue( queue_name =>'myqueue_name' ,enqueue => true ,dequeue => true );
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -5,7 +5,7 @@
${line.separator}
</description>
- <property name="additional.deploys" value="ftpfile-cache-config.xml,lib/cache.jar,lib/jgroups.jar"/>
+ <property name="additional.deploys" value="ftpfile-cache-config.xml db-service.xml"/>
<import file="../conf/base-build.xml"/>
@@ -33,7 +33,7 @@
</java>
</target>
- <target name="run-readonly" description="run the readonly version">
+ <target name="run-readonly" description="run the readonly version" depends="assert-jgroups">
<copy file="ftpfile-cache-config.xml" todir="${basedir}/build/classes"/>
<property name="readonly.mode" value="true"/>
@@ -53,7 +53,7 @@
</antcall>
</target>
- <target name="deploy-readonly" description="deploy the readonly version">
+ <target name="deploy-readonly" description="deploy the readonly version" depends="assert-jgroups">
<copy file="ftpfile-cache-config.xml" todir="${basedir}/classes"/>
<property name="readonly.mode" value="true"/>
@@ -80,6 +80,16 @@
</copy>
</target>
+ <target name="deploy-database" depends="jbossesb-dependencies">
+ <copy tofile="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-service.xml"
+ file="db-service.xml"/>
+ </target>
+
+ <target name="undeploy-database" depends="jbossesb-dependencies">
+ <delete file="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-service.xml"
+ quiet="true"/>
+ </target>
+
<target name="quickstart-specific-clean">
<delete >
<fileset dir="${basedir}">
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/db-service.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/helloworld_ftp_action/db-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/db-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/db-service.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.internal.soa.esb.dependencies.H2Database"
+ name="jboss:service=HelloworldFTPDB">
+ <attribute name="Port">1707</attribute>
+ <attribute name="BindAddress">localhost</attribute>
+ <attribute name="Database">HelloworldFTPDB</attribute>
+ <attribute name="ServerMode">true</attribute>
+ </mbean>
+</server>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/deployment.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/deployment.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/deployment.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,3 +1,4 @@
<jbossesb-deployment>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ftp_esb</depends>
+ <depends>jboss:service=HelloworldFTPDB</depends>
</jbossesb-deployment>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -103,8 +103,8 @@
<cacheloader>
<class>org.jboss.cache.loader.JDBCCacheLoader</class>
<properties>
- cache.jdbc.driver=org.hsqldb.jdbcDriver
- cache.jdbc.url=jdbc:hsqldb:hsql://localhost:9001/ftpcache
+ cache.jdbc.driver=org.h2.Driver
+ cache.jdbc.url=jdbc:h2:tcp://localhost:1707/HelloworldFTPDB
cache.jdbc.user=sa
cache.jdbc.password=
</properties>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/log4j.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/log4j.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/log4j.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -23,6 +23,7 @@
<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 -->
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/helloworld_ftp_action/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -4,6 +4,17 @@
gateway so that it picks up messages from an ftp server, routes them through
a JMS queue and finally to your action class for processing.
+Pre-requisites
+==============
+ This quickstart includes a demonstration of a setup for processing remote
+ files on an ftp server without renaming. This ability relies on a distributed
+ cache provided by jgroups and, as a consequence, can only run when targetting
+ a server containing jgroups.jar within the lib directory.
+
+ The 'readonly' targets reference an assertion test which checks for the
+ existence of this jar file. If the jar is not present then please adjust
+ your configuration to target an instance which contains the jar.
+
Running this quickstart:
========================
Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
@@ -29,15 +40,16 @@
==============================================
1. In a command terminal window in this folder ("Window1"), type
'ant deploy-jms-dests'.
- 1. In a command terminal window in this folder ("Window2"), type
+ 2. In "Window1", type 'ant deploy-database'
+ 3. In a command terminal window in this folder ("Window2"), type
'ant run-readonly'.
- 2. In another command terminal window in this folder ("Window3"), type
+ 4. In another command terminal window in this folder ("Window3"), type
'ant run-readonly'.
- 3. In "Window1", type 'ant runtest'.
- 4. You should see the file contents displayed in the one of the listener
+ 5. In "Window1", type 'ant runtest'.
+ 6. You should see the file contents displayed in the one of the listener
windows.
Log onto the ftpserver and see that the file has not been renamed.
- 5. Examine the jboss-esb-readonly-unfiltered.xml file and specifically this
+ 7. Examine the jboss-esb-readonly-unfiltered.xml file and specifically this
ftp-listener section:
<property name="remoteFileSystemStrategy-configFile"
@@ -58,6 +70,8 @@
This will cause the filename to be deleted every 20 seconds. Such as short
period is only for testing and a more realistic interval could perhaps be
every day or so.
+ 8. When finished, interrupt the ESB using Ctrl-C and, in this folder
+ ("Window1"), type 'ant undeploy-database undeploy-jms-dests'.
To Run '.esb' archive mode:
===========================
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/load_generator/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -11,8 +11,9 @@
Protected JMX
=======================
- If access to JMX is secured on your server, run the "ant runtest-secure" target,
- which takes a username and a password.
+ If access to JMX is secured on your server, after deploying this quickstart
+ you will need to run the "ant runtest-secure" target, which takes a username
+ and a password, instead of the "ant runtest" target.
To Run standalone mode:
=======================
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -19,7 +19,7 @@
category="ESBServiceSample"
name="HelloWorldPubService"
description="Hello world ESB Service">
- <security moduleName="messaging" />
+ <security moduleName="messaging" rolesAllowed="adminRole,esbrole" />
<listeners>
<jms-listener name="helloWorld"
@@ -27,7 +27,7 @@
maxThreads="1"
/>
</listeners>
- <actions inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd" webservice="security">
+ <actions inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd" webservice="none">
<action name="action" class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.ESBWSListenerAction" process="displayMessage"/>
</actions>
</service>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -36,6 +36,13 @@
<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="security">
+ <property name="org.jboss.soa.esb.services.security.publicKeystore" value="/publicKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
+ </properties>
<properties name="registry">
<property name="org.jboss.soa.esb.registry.queryManagerURI"
value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/publicKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/publish_as_webservice/publicKeyStore)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -23,6 +23,7 @@
package org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test;
import java.util.Set;
+import java.io.Serializable;
import java.util.HashSet;
import org.jboss.soa.esb.services.security.auth.AuthenticationRequestImpl;
import org.jboss.soa.esb.message.Message;
@@ -32,6 +33,7 @@
import org.jboss.soa.esb.services.security.principals.User;
import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.couriers.FaultMessageException;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
/**
* Standalone class with to send ESB messages to a 'known' [category,name].
@@ -59,10 +61,10 @@
Message esbMessage = MessageFactory.getInstance().getMessage();
// create an AuthenticationRequest
- AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder().username(args[3]).password(args[4].toCharArray()).bulid();
+ AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder().username(args[3]).password(args[4].toCharArray()).build();
// set the authentication request on the message
- esbMessage.getProperties().setProperty( SecurityService.AUTH_REQUEST, authRequest );
+ esbMessage.getProperties().setProperty(SecurityService.AUTH_REQUEST, PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest));
final String message = "<say:sayHi xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" + args[2] + "</say:arg0></say:sayHi>" ;
esbMessage.getBody().add(message);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -83,7 +83,4 @@
JBoss ESB. It uses the Transformation engine as well as the static-routing
feature. It also demonstrations the use of multiple JVMs running different
services.
- This is a fairly advanced demonstration.
-
-* publish_as_webservice - demonstrations how to use SOAPIn and SOAPOut action to publish
- a esb service as a web service
+ This is a fairly advanced demonstration.
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,40 +0,0 @@
-<project name="Quickstart_SecurityBasic" default="run" basedir=".">
-
- <description>
- ${ant.project.name}
- ${line.separator}
- </description>
-
- <property name="username" value="esbuser" />
- <property name="password" value="esbpassword" />
-
- <!-- Import the base Ant build script... -->
- <import file="../conf/base-build.xml"/>
-
- <target name="runtest" depends="compile"
- description="sends a HTTP request to the JBossRemoting gateway">
- <echo>Http Client</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitybasic.HttpClient" failonerror="true">
- <arg value="http"/>
- <arg value="localhost"/>
- <arg value="9888"/>
- <arg value="${username}"/>
- <arg value="${password}"/>
- <classpath refid="exec-classpath"/>
- </java>
- </target>
-
- <target name="sendesb" depends="compile" description="send esb Message to esb service">
- <echo>Send esb message to esb service and get response</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitybasic.test.SendEsbMessage" failonerror="true">
- <arg value="Security"/> <!-- service category -->
- <arg value="SimpleListenerSecured"/> <!-- service name -->
- <arg value="Hello Secured World"/> <!-- Message text -->
- <arg value="esbuser"/> <!-- username text -->
- <arg value="esbpassword"/> <!-- password text -->
- <classpath refid="exec-classpath"/>
- </java>
- </target>
-
-
-</project>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/build.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,40 @@
+<project name="Quickstart_SecurityBasic" default="run" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="username" value="esbuser" />
+ <property name="password" value="esbpassword" />
+
+ <!-- Import the base Ant build script... -->
+ <import file="../conf/base-build.xml"/>
+
+ <target name="runtest" depends="compile"
+ description="sends a HTTP request to the JBossRemoting gateway">
+ <echo>Http Client</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitybasic.HttpClient" failonerror="true">
+ <arg value="http"/>
+ <arg value="localhost"/>
+ <arg value="9888"/>
+ <arg value="${username}"/>
+ <arg value="${password}"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="sendesb" depends="compile" description="send esb Message to esb service">
+ <echo>Send esb message to esb service and get response</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitybasic.test.SendEsbMessage" failonerror="true">
+ <arg value="Security"/> <!-- service category -->
+ <arg value="SimpleListenerSecured"/> <!-- service name -->
+ <arg value="Hello Secured World"/> <!-- Message text -->
+ <arg value="esbuser"/> <!-- username text -->
+ <arg value="esbpassword"/> <!-- password text -->
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+
+</project>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/deployment.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,5 +0,0 @@
-<jbossesb-deployment>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_securitybasic_Request_esb</depends>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_securitybasic_Request2_esb</depends>
- <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_securitybasic_Request_gw</depends>
-</jbossesb-deployment>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/deployment.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,5 @@
+<jbossesb-deployment>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_securitybasic_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_securitybasic_Request2_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_securitybasic_Request_gw</depends>
+</jbossesb-deployment>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jbm-queue-service.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,30 +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_securitybasic_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_securitybasic_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_securitybasic_Request_esb_reply"
- 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_securitybasic_Request2_esb"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
-
-</server>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbm-queue-service.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,30 @@
+<?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_securitybasic_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_securitybasic_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_securitybasic_Request_esb_reply"
+ 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_securitybasic_Request2_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+
+</server>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jbmq-queue-service.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,28 +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_securitybasic_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_securitybasic_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_securitybasic_Request_esb_reply">
- <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_securitybasic_Request2_esb">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
- </mbean>
-
-</server>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbmq-queue-service.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,28 @@
+<?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_securitybasic_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_securitybasic_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_securitybasic_Request_esb_reply">
+ <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_securitybasic_Request2_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+</server>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jboss-esb.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,92 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
- <providers>
- <jms-provider name="JMSProvider" connection-factory="ConnectionFactory">
- <jms-bus busid="quickstartGwChannel">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_securitybasic_Request_gw" />
- </jms-bus>
- <jms-bus busid="quickstartEsbChannel">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_securitybasic_Request_esb" />
- </jms-bus>
- <jms-bus busid="quickstartEsbChannel2">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_securitybasic_Request2_esb" />
- </jms-bus>
-
- </jms-provider>
- <jbr-provider name="JBR-Http" protocol="http" host="localhost">
- <jbr-bus busid="Http-1" port="9888" />
- </jbr-provider>
- </providers>
-
- <services>
- <service category="Security" name="SimpleListenerSecured" description="Hello World">
- <security moduleName="messaging"/>
-
- <listeners>
- <jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" is-gateway="true" />
- <jms-listener name="helloWorld" busidref="quickstartEsbChannel" maxThreads="1" />
-
- <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true">
- <property name="synchronous" value="false"/>
- </jbr-listener>
-
- </listeners>
-
- <actions mep="OneWay">
- <action name="debug" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="printfull" value="false"/>
- <property name="message" value="In Service1"/>
- </action>
- <action name="action1" class="org.jboss.soa.esb.samples.quickstart.securitybasic.MyListenerAction" process="displayMessage"/>
-
- <!-- The next action is for Continuous Integration testing -->
- <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
-
- <!-- Route to the "Service 2" -->
- <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
- <property name="destinations">
- <route-to service-category="Security" service-name="Service2"/>
- </property>
- </action>
-
- </actions>
- </service>
-
- <service category="Security" name="Service2" description="Service 2">
- <security moduleName="messaging" />
- <listeners>
- <jms-listener name="helloWorld" busidref="quickstartEsbChannel2" maxThreads="1" />
- </listeners>
- <actions mep="OneWay">
- <action name="action1" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="printfull" value="false"/>
- <property name="message" value="In Service2"/>
- </action>
- <action name="action2" class="org.jboss.soa.esb.samples.quickstart.securitybasic.MyListenerAction" process="displayMessage"/>
-
- <!-- Route to the "Service 3"
- <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
- <property name="destinations">
- <route-to service-category="Security" service-name="Service3"/>
- </property>
- </action> -->
- </actions>
- </service>
-
- <service category="Security" name="Service3" description="Service 3" invmScope="GLOBAL">
- <security moduleName="messaging" runAs="adminRole"/>
- <actions mep="OneWay">
-
- <action name="propagate" class="org.jboss.soa.esb.services.security.actions.JBossSecurityPropagator">
- <property name="runAs" value="adminRole"/>
- </action>
-
- </actions>
-
- </service>
-
-
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jboss-esb.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jboss-esb.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,92 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JMSProvider" connection-factory="ConnectionFactory">
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_securitybasic_Request_gw" />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_securitybasic_Request_esb" />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel2">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_securitybasic_Request2_esb" />
+ </jms-bus>
+
+ </jms-provider>
+ <jbr-provider name="JBR-Http" protocol="http" host="localhost">
+ <jbr-bus busid="Http-1" port="9888" />
+ </jbr-provider>
+ </providers>
+
+ <services>
+ <service category="Security" name="SimpleListenerSecured" description="Hello World">
+ <security moduleName="messaging"/>
+
+ <listeners>
+ <jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" is-gateway="true" />
+ <jms-listener name="helloWorld" busidref="quickstartEsbChannel" maxThreads="1" />
+
+ <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true">
+ <property name="synchronous" value="false"/>
+ </jbr-listener>
+
+ </listeners>
+
+ <actions mep="OneWay">
+ <action name="debug" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="false"/>
+ <property name="message" value="In Service1"/>
+ </action>
+ <action name="action1" class="org.jboss.soa.esb.samples.quickstart.securitybasic.MyListenerAction" process="displayMessage"/>
+
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+
+ <!-- Route to the "Service 2" -->
+ <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
+ <property name="destinations">
+ <route-to service-category="Security" service-name="Service2"/>
+ </property>
+ </action>
+
+ </actions>
+ </service>
+
+ <service category="Security" name="Service2" description="Service 2">
+ <security moduleName="messaging" />
+ <listeners>
+ <jms-listener name="helloWorld" busidref="quickstartEsbChannel2" maxThreads="1" />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="action1" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull" value="false"/>
+ <property name="message" value="In Service2"/>
+ </action>
+ <action name="action2" class="org.jboss.soa.esb.samples.quickstart.securitybasic.MyListenerAction" process="displayMessage"/>
+
+ <!-- Route to the "Service 3"
+ <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
+ <property name="destinations">
+ <route-to service-category="Security" service-name="Service3"/>
+ </property>
+ </action> -->
+ </actions>
+ </service>
+
+ <service category="Security" name="Service3" description="Service 3" invmScope="GLOBAL">
+ <security moduleName="messaging" runAs="adminRole"/>
+ <actions mep="OneWay">
+
+ <action name="propagate" class="org.jboss.soa.esb.services.security.actions.JBossSecurityPropagator">
+ <property name="runAs" value="adminRole"/>
+ </action>
+
+ </actions>
+
+ </service>
+
+
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jbossesb-properties.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,97 +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="security">
- <property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.OpenSSOSecuritySerivce"/>
- <property name="org.jboss.soa.esb.services.security.configUrl" value="/AMConfig.properties"/>
-
- <property name="org.jboss.soa.esb.services.security.publicKeystore" value="/publicKeyStore"/>
- <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
- <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
- <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
- <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
-
- </properties>
- <properties name="registry">
- <property name="org.jboss.soa.esb.registry.queryManagerURI"
- value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
- <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
- value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
- <property name="org.jboss.soa.esb.registry.implementationClass"
- value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
- <property name="org.jboss.soa.esb.registry.factoryClass"
- value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
- <property name="org.jboss.soa.esb.registry.user"
- value="jbossesb"/>
- <property name="org.jboss.soa.esb.registry.password"
- value="password"/>
- <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
- <property name="org.jboss.soa.esb.scout.proxy.transportClass"
- value="org.apache.ws.scout.transport.RMITransport"/>
- </properties>
- <properties name="transports" depends="core">
- <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
- <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
- <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
- <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
- </properties>
- <properties name="connection">
- <property name="min-pool-size" value="5"/>
- <property name="max-pool=size" value="10"/>
- <property name="blocking-timeout-millis" value="5000"/>
- <property name="abandoned-connection-timeout" value="10000"/>
- <property name="abandoned-connection-time-interval" value="30000"/>
- </properties>
- <properties name="dbstore">
- <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
- <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
- <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
- <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
- <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
- <!--table managed by pool to test for valid connections - created by pool automatically -->
- <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
- <!-- # of milliseconds to timeout waiting for a connection from pool -->
- <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
- </properties>
- <properties name="messagerouting">
- <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
- </properties>
-</esb>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jbossesb-properties.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,97 @@
+<?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="security">
+ <property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.OpenSSOSecuritySerivce"/>
+ <property name="org.jboss.soa.esb.services.security.configUrl" value="/AMConfig.properties"/>
+
+ <property name="org.jboss.soa.esb.services.security.publicKeystore" value="/publicKeyStore"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeystorePassword" value="testKeystorePassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyAlias" value="testAlias"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyPassword" value="testPassword"/>
+ <property name="org.jboss.soa.esb.services.security.publicKeyTransformation" value="RSA/ECB/PKCS1Padding"/>
+
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+ value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+ value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+ value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout" value="10000"/>
+ <property name="abandoned-connection-time-interval" value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool automatically -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jndi.properties 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/jndi.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/jndi.properties 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/juddi.properties 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,69 +0,0 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
-
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/juddi.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/juddi.properties 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/lib (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/lib)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/log4j.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Target" value="System.out"/>
- <param name="Threshold" value="INFO"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
- </layout>
- </appender>
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A size based file rolling appender -->
- <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="./listener.log"/>
- <param name="Append" value="false"/>
- <param name="MaxFileSize" value="500KB"/>
- <param name="MaxBackupIndex" value="1"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
- </layout>
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <category name="org.jboss">
- <priority value="WARN"/>
- </category>
- <category name="org.jboss.soa.esb">
- <priority value="ERROR"/>
- </category>
- <category name="org.jboss.internal.soa.esb">
- <priority value="ERROR"/>
- </category>
- <category name="org.apache">
- <priority value="ERROR"/>
- </category>
- <category name="quickstart">
- <priority value="DEBUG"/>
- </category>
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/log4j.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/log4j.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A size based file rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./listener.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.jboss.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.jboss.internal.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.apache">
+ <priority value="ERROR"/>
+ </category>
+ <category name="quickstart">
+ <priority value="DEBUG"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/publicKeyStore
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/publicKeyStore (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/publicKeyStore)
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,20 +0,0 @@
-Overview:
-=========
- This quickstart demonstrates basic security in JBossESB.
- 1. 'ant runtest' will send a HTTP request to a JBossRemoting Gatway
- 2. 'ant sendesb' will invoke the Service directly using the ServiceInvoker
-
-Running this quickstart:
-========================
- Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
- and a more detailed descripton of the different ways to run the quickstarts.
-
-To Run '.esb' archive mode with JBossAS-server:
-===========================
- 1. Type 'ant deploy'.
- 2. Type 'ant runtest'
- 3. Type 'ant sendesb'
-
-What to look for in this quickstart
-===================================
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/readme.txt)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,20 @@
+Overview:
+=========
+ This quickstart demonstrates basic security in JBossESB.
+ 1. 'ant runtest' will send a HTTP request to a JBossRemoting Gatway
+ 2. 'ant sendesb' will invoke the Service directly using the ServiceInvoker
+
+Running this quickstart:
+========================
+ Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+ and a more detailed descripton of the different ways to run the quickstarts.
+
+To Run '.esb' archive mode with JBossAS-server:
+===========================
+ 1. Type 'ant deploy'.
+ 2. Type 'ant runtest'
+ 3. Type 'ant sendesb'
+
+What to look for in this quickstart
+===================================
+
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.securitybasic;
-
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class HttpClient
-{
- // Default locator values
- private static String transport = "http";
- private static String host = "localhost";
- private static int port = 5400;
- private static String username;
- private static String password;
-
- public void makeInvocation(String locatorURI) throws Throwable
- {
- InvokerLocator locator = new InvokerLocator(locatorURI);
- System.out.println("Calling remoting server with locator uri of: " + locatorURI);
-
- Client remotingClient = new Client(locator);
- remotingClient.connect();
-
- Map metadata = new HashMap();
- metadata.put("TYPE", "POST");
- metadata.put("http.basic.username", username);
- metadata.put("http.basic.password", password);
- remotingClient.invokeOneway( "Message payload example(just a String) ", metadata );
-
- System.out.println("Sent http post to server.");
- Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE);
- String responseMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
- System.out.println("Response code from server: " + responseCode);
- System.out.println("Response message from server: " + responseMessage);
- remotingClient.disconnect();
-
- }
-
- public static void main(String[] args)
- {
- if(args != null && args.length == 5)
- {
- transport = args[0];
- host = args[1];
- port = Integer.parseInt(args[2]);
- username = args[3];
- password = args[4];
- }
- String locatorURI = transport + "://" + host + ":" + port;
- HttpClient client = new HttpClient();
- try
- {
- client.makeInvocation(locatorURI);
- }
- catch(Throwable e)
- {
- e.printStackTrace();
- }
- }
-}
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/HttpClient.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.securitybasic;
+
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class HttpClient
+{
+ // Default locator values
+ private static String transport = "http";
+ private static String host = "localhost";
+ private static int port = 5400;
+ private static String username;
+ private static String password;
+
+ public void makeInvocation(String locatorURI) throws Throwable
+ {
+ InvokerLocator locator = new InvokerLocator(locatorURI);
+ System.out.println("Calling remoting server with locator uri of: " + locatorURI);
+
+ Client remotingClient = new Client(locator);
+ remotingClient.connect();
+
+ Map metadata = new HashMap();
+ metadata.put("TYPE", "POST");
+ metadata.put("http.basic.username", username);
+ metadata.put("http.basic.password", password);
+ remotingClient.invokeOneway( "Message payload example(just a String) ", metadata );
+
+ System.out.println("Sent http post to server.");
+ Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE);
+ String responseMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
+ System.out.println("Response code from server: " + responseCode);
+ System.out.println("Response message from server: " + responseMessage);
+ remotingClient.disconnect();
+
+ }
+
+ public static void main(String[] args)
+ {
+ if(args != null && args.length == 5)
+ {
+ transport = args[0];
+ host = args[1];
+ port = Integer.parseInt(args[2]);
+ username = args[3];
+ password = args[4];
+ }
+ String locatorURI = transport + "://" + host + ":" + port;
+ HttpClient client = new HttpClient();
+ try
+ {
+ client.makeInvocation(locatorURI);
+ }
+ catch(Throwable e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
+
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,56 +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.securitybasic;
-
-import java.net.URL;
-import java.io.File;
-import java.io.FilePermission;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.CodeSource;
-import java.security.Permissions;
-import java.security.PermissionCollection;
-import java.security.Policy;
-
-import javax.security.auth.Subject;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyListenerAction extends AbstractActionLifecycle
-{
-
- protected ConfigTree config;
-
- public MyListenerAction(ConfigTree config) throws ConfigurationException
- {
- this.config = config;
- }
-
- public Message displayMessage(Message message) throws Exception
- {
- System.out.println("Subject in MyListenerAction : " + Subject.getSubject(AccessController.getContext()));
- return message;
- }
-
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/MyListenerAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,56 @@
+/*
+ * 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.securitybasic;
+
+import java.net.URL;
+import java.io.File;
+import java.io.FilePermission;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.CodeSource;
+import java.security.Permissions;
+import java.security.PermissionCollection;
+import java.security.Policy;
+
+import javax.security.auth.Subject;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyListenerAction extends AbstractActionLifecycle
+{
+
+ protected ConfigTree config;
+
+ public MyListenerAction(ConfigTree config) throws ConfigurationException
+ {
+ this.config = config;
+ }
+
+ public Message displayMessage(Message message) throws Exception
+ {
+ System.out.println("Subject in MyListenerAction : " + Subject.getSubject(AccessController.getContext()));
+ return message;
+ }
+
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,80 +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.securitybasic.test;
-
-import java.util.Set;
-import java.io.Serializable;
-import java.util.HashSet;
-import org.jboss.soa.esb.services.security.auth.AuthenticationRequestImpl;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.security.SecurityService;
-import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
-import org.jboss.soa.esb.services.security.principals.User;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.couriers.FaultMessageException;
-import org.jboss.soa.esb.services.security.PublicCryptoUtil;
-
-/**
- * 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
- * <br/>arg3 - username
- * <br/>arg4 - password
- *
- * @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 < 5)
- {
- System.out.println("Usage SendEsbMessage <category> <name> <text to send> <username> <password>");
- }
- Message esbMessage = MessageFactory.getInstance().getMessage();
-
- // create an AuthenticationRequest
- AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder().username(args[3]).password(args[4].toCharArray()).build();
-
- // set the authentication request on the message
- esbMessage.getProperties().setProperty(SecurityService.AUTH_REQUEST, PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest));
-
- final String message = args[2];
- esbMessage.getBody().add(message);
-
- ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);
-
- try {
- invoker.deliverAsync(esbMessage);
- }catch(Exception ex) {
- ex.printStackTrace();
- }
- System.exit(0);
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/security_basic/src/org/jboss/soa/esb/samples/quickstart/securitybasic/test/SendEsbMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.samples.quickstart.securitybasic.test;
+
+import java.util.Set;
+import java.io.Serializable;
+import java.util.HashSet;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequestImpl;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.security.SecurityService;
+import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
+import org.jboss.soa.esb.services.security.principals.User;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.couriers.FaultMessageException;
+import org.jboss.soa.esb.services.security.PublicCryptoUtil;
+
+/**
+ * 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
+ * <br/>arg3 - username
+ * <br/>arg4 - password
+ *
+ * @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 < 5)
+ {
+ System.out.println("Usage SendEsbMessage <category> <name> <text to send> <username> <password>");
+ }
+ Message esbMessage = MessageFactory.getInstance().getMessage();
+
+ // create an AuthenticationRequest
+ AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder().username(args[3]).password(args[4].toCharArray()).build();
+
+ // set the authentication request on the message
+ esbMessage.getProperties().setProperty(SecurityService.AUTH_REQUEST, PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest));
+
+ final String message = args[2];
+ esbMessage.getBody().add(message);
+
+ ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);
+
+ try {
+ invoker.deliverAsync(esbMessage);
+ }catch(Exception ex) {
+ ex.printStackTrace();
+ }
+ System.exit(0);
+ }
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/transform_CSV2XML/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -15,7 +15,7 @@
and a more detailed descripton of the different ways to run the quickstarts.
A comprehensive description of message transformation can be found in
- MessageTransformation.pdf, located in the docs/services folder.
+ the ProgrammersGuide.pdf, located in the docs/services folder.
To Run standalone mode:
=======================
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -55,7 +55,7 @@
</target>
<target name="sendjms" depends="compile">
- <echo>Send ESB message that triggers webservice call</echo>
+ <echo>Send JMS message that triggers webservice call</echo>
<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.test.SendJMSMessage" failonerror="true">
<arg value="Jimbo"/>
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,92 +1,94 @@
-Overview:
-=========
- This example demonstrates how to consume a 181 Web Service in an ESB action.
- This ESB will make a webservice request that requires a single "toWhom" string parameter.
- The webservice will return a greeting response. The ESB simply dislays the response on the
- 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 standalone mode:
-=======================
- This quickstart will not currently run in standalone mode.
-
-To Run '.esb' archive mode:
-===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant undeploy-jms-dests'.
- 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
-
- 'runtest' target description:
- In a separate command prompt window, run "ant runtest" to shoot a JMS message
- into the listener which will then invoke the MyJMSListenerAction and display
- it to the console. You can modify the build.xml to change the phrase
- "Hello World" to something else and re-run "ant runtest".
-
- You should output that looks like this, after running "ant runtest":
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,975 INFO [STDOUT] Request map is: {sayHello.toWhom=Jimbo}
- 12:35:47,975 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,990 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using
- getResponseBodyAsStream instead is recommended.
- 12:35:47,991 INFO [STDOUT]
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,991 INFO [STDOUT] Response Map is:
- <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
- <env:Header></env:Header>
- <env:Body>
- <hel:sayHelloResponse xmlns:hel='http://webservice_consumer1/helloworld'>
- <return>Hello World Greeting for 'Jimbo' on Sat Jul 14 12:35:47 EDT 2007</return>
- </hel:sayHelloResponse></env:Body></env:Envelope>
- 12:35:47,991 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-
-Project file descriptions:
-==========================
-
- jboss-esb.xml:
- There is no JMS gateway in this quickstart. A java client talks directly to the ESB
- listener queue called "queue/quickstart_webservice_consumer1_esb". The actions in
- jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
- to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
- and jbossesb-properties.xml are used when the service first boots up for self-registration
- based upon the service-category and service-name found in the esb-config.xml file.
-
- jndi.properties:
- Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendESBMessage that is fired by ant runtest.
-
- log4j.xml:
- Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
-
- src/../SendEsbMessage.java:
- Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
- gateway and speak directly to an ESB service.
-
- src/../MyRequestAction.java
- Convert the message body into a webservice request parameter Map that only has one paramater called
- "sayHello.toWhom" for the web service call. The request parameter map is named
- "helloworld-request-parameters".
-
- org.jboss.soa.esb.actions.soap.SOAPClient
- This class is used to make the call to the webservice. It will take the
- parameters that MyRequestAction set in "paramsLocation", call the webservice, then place
- the response in "responseLocation". This is zero Java code ESB wiring in jboss-esb.xml.
-
- src/../MyResponseAction.java
- Retrieve the webservice response and display it on the console. The response location name
- is "helloworld-response".
-
- build.xml:
- Targets and structure description:
- * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
- front of the list
- * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
- Usage is: ant echoCP > myclasspath.txt
- This generates a file called myclasspath.txt which can be reviewed in a text editor
- * the run task calls the Launcher passing in 3 arguments the most important are the esb-config.xml and
- esb-config-gateway.xml files
- * the runtest task calls the org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage class and passes in an argument representing
- the string-based message to be pused into the queue the gateway is listening on.
\ No newline at end of file
+Overview:
+=========
+ This example demonstrates how to use Wise SOAPClient action to consume a 181 Web Service in an ESB action.
+ This ESB will make a webservice request that requires a single "toWhom" string parameter.
+ The webservice will return a greeting response. The ESB simply dislays the request and response on the
+ 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 standalone mode:
+=======================
+ This quickstart will not currently run in standalone mode.
+
+To Run '.esb' archive mode:
+===========================
+ 1. Open wise-core.properties and modify the propertie 'wise.tmpDir' there to suit your environment.
+ 2. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+ 3. Open another command terminal window in this folder ("Window2"), type 'ant runtest'.
+ 4. Switch back to Application Server console to see the output from the ESB
+
+ 'runtest' target description:
+ In a separate command prompt window, run "ant runtest" to shoot a ESB message
+ into the listener which will then invoke the MyRequestAction, SOAPClient and MyResponse
+ and display it to the console.
+
+ You should output that looks like this, after running "ant runtest":
+ 13:20:27,431 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 13:20:27,432 INFO [STDOUT] Request map is: {toWhom=Jimbo}
+ 13:20:27,433 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 13:20:27,830 INFO [STDOUT] parsing WSDL...
+ 13:20:28,962 INFO [STDOUT] generating code...
+ 13:20:29,000 INFO [STDOUT] it/javalinux/wise/HelloWorld.java
+ 13:20:29,049 INFO [STDOUT] it/javalinux/wise/HelloWorldWSService.java
+ 13:20:29,053 INFO [STDOUT] it/javalinux/wise/ObjectFactory.java
+ 13:20:29,057 INFO [STDOUT] it/javalinux/wise/SayHello.java
+ 13:20:29,058 INFO [STDOUT] it/javalinux/wise/SayHelloResponse.java
+ 13:20:29,066 INFO [STDOUT] it/javalinux/wise/package-info.java
+ 13:20:30,010 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 13:20:30,010 INFO [STDOUT] Response Map is: {result=Hello World Greeting for 'Jimbo' on Tue Sep 09 13:20:29 CST 2008}
+ 13:20:30,010 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+
+ 5. When finished, undeploy the application by typing 'ant undeploy'.
+
+Project file descriptions:
+==========================
+
+ jboss-esb.xml:
+ The actions in jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
+ to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
+ and jbossesb-properties.xml are used when the service first boots up for self-registration
+ based upon the service-category and service-name found in the esb-config.xml file.
+
+ jndi.properties:
+ Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendESBMessage that is fired by ant runtest.
+
+ wise-core.properties
+ Needed to configure SOAPClient based on Wise project.
+
+ log4j.xml:
+ Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
+
+ src/../SendEsbMessage.java:
+ Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
+ gateway and speak directly to an ESB service.
+
+ src/../SendJMSMessage.java:
+ Send a message to JMS gateway listener and speak to an ESB service.
+
+ src/../MyRequestAction.java
+ Convert the message body into a webservice request parameter Map that only has one paramater called
+ "toWhom" for the web service call.
+
+ src/../SOAPClient
+ This class is used to make the call to the webservice. It will take the
+ parameters map that MyRequestAction set in message body, call the webservice, then place
+ the response in message.
+
+ src/../MyResponseAction.java
+ Retrieve the webservice response and display it on the console.
+
+ build.xml:
+ Targets and structure description:
+ * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
+ front of the list
+ * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
+ Usage is: ant echoCP > myclasspath.txt
+ This generates a file called myclasspath.txt which can be reviewed in a text editor
+ * the runtest task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendEsbMessage class and passes in an argument representing
+ the string-based message to be pused into esb message aware listener queue.
+ * the sendjms task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendJMSMessage class and passes in an argument representing
+ the string-based message to be pused into the queue the gateway is listening on.
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyRequestAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyRequestAction.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyRequestAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -51,10 +51,8 @@
HashMap requestMap = new HashMap();
// add paramaters to the web service request map
- requestMap.put("toWhom", msgBody);
+ requestMap.put("toWhom", msgBody);
- // The "paramsLocation" property was set in jboss-esb.xml to
- // "helloworld-request-parameters"
message.getBody().add(requestMap);
System.out.println("Request map is: " + requestMap.toString());
@@ -83,4 +81,4 @@
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
}
-}
\ No newline at end of file
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyResponseAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyResponseAction.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/MyResponseAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -49,9 +49,7 @@
logHeader();
- // The "responseLocation" property was set in jboss-esb.xml to
- // "helloworld-response"
- Map responseMsg = (Map) message.getBody().get(Body.DEFAULT_LOCATION);
+ Map responseMsg = (Map) message.getBody().get();
System.out.println("Response Map is: " + responseMsg);
logFooter();
@@ -79,4 +77,4 @@
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
}
-}
\ No newline at end of file
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/test/SendJMSMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise/test/SendJMSMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -52,7 +52,7 @@
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer1_Request_gw");
+ que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer_wise_Request_gw");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
System.out.println("Connection Started");
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -55,7 +55,7 @@
</target>
<target name="sendjms" depends="compile">
- <echo>Send ESB message that triggers webservice call</echo>
+ <echo>Send JMS message that triggers webservice call</echo>
<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.test.SendJMSMessage" failonerror="true">
<arg value="Jimbo"/>
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,92 +1,103 @@
-Overview:
-=========
- This example demonstrates how to consume a 181 Web Service in an ESB action.
- This ESB will make a webservice request that requires a single "toWhom" string parameter.
- The webservice will return a greeting response. The ESB simply dislays the response on the
- 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 standalone mode:
-=======================
- This quickstart will not currently run in standalone mode.
-
-To Run '.esb' archive mode:
-===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant undeploy-jms-dests'.
- 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
-
- 'runtest' target description:
- In a separate command prompt window, run "ant runtest" to shoot a JMS message
- into the listener which will then invoke the MyJMSListenerAction and display
- it to the console. You can modify the build.xml to change the phrase
- "Hello World" to something else and re-run "ant runtest".
-
- You should output that looks like this, after running "ant runtest":
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,975 INFO [STDOUT] Request map is: {sayHello.toWhom=Jimbo}
- 12:35:47,975 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,990 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using
- getResponseBodyAsStream instead is recommended.
- 12:35:47,991 INFO [STDOUT]
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,991 INFO [STDOUT] Response Map is:
- <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
- <env:Header></env:Header>
- <env:Body>
- <hel:sayHelloResponse xmlns:hel='http://webservice_consumer1/helloworld'>
- <return>Hello World Greeting for 'Jimbo' on Sat Jul 14 12:35:47 EDT 2007</return>
- </hel:sayHelloResponse></env:Body></env:Envelope>
- 12:35:47,991 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-
-Project file descriptions:
-==========================
-
- jboss-esb.xml:
- There is no JMS gateway in this quickstart. A java client talks directly to the ESB
- listener queue called "queue/quickstart_webservice_consumer1_esb". The actions in
- jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
- to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
- and jbossesb-properties.xml are used when the service first boots up for self-registration
- based upon the service-category and service-name found in the esb-config.xml file.
-
- jndi.properties:
- Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendESBMessage that is fired by ant runtest.
-
- log4j.xml:
- Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
-
- src/../SendEsbMessage.java:
- Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
- gateway and speak directly to an ESB service.
-
- src/../MyRequestAction.java
- Convert the message body into a webservice request parameter Map that only has one paramater called
- "sayHello.toWhom" for the web service call. The request parameter map is named
- "helloworld-request-parameters".
-
- org.jboss.soa.esb.actions.soap.SOAPClient
- This class is used to make the call to the webservice. It will take the
- parameters that MyRequestAction set in "paramsLocation", call the webservice, then place
- the response in "responseLocation". This is zero Java code ESB wiring in jboss-esb.xml.
-
- src/../MyResponseAction.java
- Retrieve the webservice response and display it on the console. The response location name
- is "helloworld-response".
-
- build.xml:
- Targets and structure description:
- * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
- front of the list
- * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
- Usage is: ant echoCP > myclasspath.txt
- This generates a file called myclasspath.txt which can be reviewed in a text editor
- * the run task calls the Launcher passing in 3 arguments the most important are the esb-config.xml and
- esb-config-gateway.xml files
- * the runtest task calls the org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage class and passes in an argument representing
- the string-based message to be pused into the queue the gateway is listening on.
\ No newline at end of file
+Overview:
+=========
+ This example demonstrates how to use Wise SOAPClient and SmooksMapper to consume a jaxws Web Service in an ESB action.
+ In this quickstart, we use SmooksRequestMapper to transform the ExternalObject(see ExternalObject.java)
+ to JAXWS annotated web service request object (see ComplexObject.java under the wise.tmpDir configured in wise-core.properties)
+ and call a Web Service. We also configure a SmooksResponseMapper to transform the web service result to an ExternalObject.
+
+Running this quickstart:
+========================
+ Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts and a
+ more detailed descripton of the different ways to run the quickstarts.
+
+To Run standalone mode:
+=======================
+ This quickstart will not currently run in standalone mode.
+
+To Run '.esb' archive mode:
+===========================
+ 1. Open wise-core.properties and modify the propertie 'wise.tmpDir' there to suit your environment.
+ 2. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+ 3. Open another command terminal window in this folder ("Window2"), type 'ant runtest'.
+ 4. Switch back to Application Server console to see the output from the ESB
+
+ 'runtest' target description:
+ In a separate command prompt window, run "ant runtest" to shoot a ESB message
+ into the listener which will then invoke the MyRequestAction, SOAPClient and MyResponse
+ and display it to the console.
+
+ 15:20:46,077 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 15:20:46,079 INFO [STDOUT] Request map is: {external=org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.ExternalObject at 30a4a7
+ [internal=org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.InternalObject at 189ff39[text=Jimbo,number=1],date=Wed Mar 07 04:27:00 GMT 2007]}
+ 15:20:46,079 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 15:20:46,099 INFO [STDOUT] parsing WSDL...
+ 15:20:46,136 INFO [STDOUT] generating code...
+ 15:20:46,138 INFO [STDOUT] it/javalinux/wise/ComplexObject.java
+ 15:20:46,157 INFO [STDOUT] it/javalinux/wise/ObjectFactory.java
+ 15:20:46,159 INFO [STDOUT] it/javalinux/wise/PingComplexObject.java
+ 15:20:46,160 INFO [STDOUT] it/javalinux/wise/PingComplexObjectResponse.java
+ 15:20:46,161 INFO [STDOUT] it/javalinux/wise/PingWS.java
+ 15:20:46,162 INFO [STDOUT] it/javalinux/wise/PingWSService.java
+ 15:20:46,164 INFO [STDOUT] it/javalinux/wise/package-info.java
+ 15:20:46,564 INFO [ClassUtil] Loaded 4 classes from 2 URLs through class list file META-INF/content-handlers.inf. Process took 2ms. Turn on debug logging for more info.
+ 15:20:46,982 INFO [ClassUtil] Loaded 4 classes from 2 URLs through class list file META-INF/content-handlers.inf. Process took 2ms. Turn on debug logging for more info.
+ 15:20:47,480 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 15:20:47,481 INFO [STDOUT] Response Map is: {InternalObject=org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.InternalObject at 956740[text=Jimbo,number=1], ExternalObject=org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.ExternalObject at 43f916[internal=org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.InternalObject at 956740[text=Jimbo,number=1],date=Wed Mar 07 00:00:00 GMT 2007]}
+ 15:20:47,481 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+
+
+ 5. When finished, undeploy the application by typing 'ant undeploy'.
+
+Project file descriptions:
+==========================
+
+ jboss-esb.xml:
+ The actions in jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
+ to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
+ and jbossesb-properties.xml are used when the service first boots up for self-registration
+ based upon the service-category and service-name found in the esb-config.xml file.
+
+ jndi.properties:
+ Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendESBMessage that is fired by ant runtest.
+
+ wise-core.properties
+ Needed to configure SOAPClient based on Wise project.
+
+ smooks-config-XMLGregorianCalendar.xml
+ Smooks style configuration xml. Needed to configure the SmooksRequestMapper.
+
+ smooks-response-config
+ Smooks style configuration xml. Needed to configure the SmooksReMapper.
+
+ log4j.xml:
+ Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
+
+ src/../SendEsbMessage.java:
+ Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
+ gateway and speak directly to an ESB service.
+
+ src/../SendJMSMessage.java:
+ Send a message to JMS gateway listener and speak to an ESB service.
+
+ src/../MyRequestAction.java
+ Convert the message body into a webservice request parameter Map.
+
+ src/../SOAPClient
+ This class is used to make the call to the webservice. It will take the
+ parameters map that MyRequestAction set in message body, call the webservice, then place
+ the response in message.
+
+ src/../MyResponseAction.java
+ Retrieve the webservice response and display it on the console.
+
+ build.xml:
+ Targets and structure description:
+ * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
+ front of the list
+ * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
+ Usage is: ant echoCP > myclasspath.txt
+ This generates a file called myclasspath.txt which can be reviewed in a text editor
+ * the runtest task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendEsbMessage class and passes in an argument representing
+ the string-based message to be pused into esb message aware listener queue.
+ * the sendjms task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendJMSMessage class and passes in an argument representing
+ the string-based message to be pused into the queue the gateway is listening on.
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/smooks-response-config.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/smooks-response-config.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/smooks-response-config.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -10,6 +10,7 @@
<param name="beanId">ExternalObject</param>
<param name="beanClass">org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.ExternalObject</param>
<param name="bindings">
+ <binding property="date" type="MessageDate">messageDate.year + "-" + messageDate.month + "-" + messageDate.day</binding>
<binding property="internal" selector="${InternalObject}" />
</param>
</resource-config>
@@ -24,5 +25,20 @@
</param>
</resource-config>
+ <resource-config selector="it.javalinux.wise.ComplexObject">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">messageDate</param>
+ <param name="beanClass">java.util.HashMap</param>
+ <param name="bindings">
+ <binding property="day" selector="calendarField/day" default ="0"/>
+ <binding property="month" selector="calendarField/month" default ="0" />
+ <binding property="year" selector="calendarField/year" default ="0"/>
+ </param>
+ </resource-config>
+
+ <resource-config selector="decoder:MessageDate">
+ <resource>org.milyn.javabean.decoders.DateDecoder</resource>
+ <param name="format">yyyy-MM-dd</param>
+ </resource-config>
-</smooks-resource-list>
\ No newline at end of file
+</smooks-resource-list>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/MyRequestAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/MyRequestAction.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/MyRequestAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -51,10 +51,7 @@
logHeader();
Object msgBody = (Object) message.getBody().get();
HashMap requestMap = new HashMap();
- // add paramaters to the web service request map
requestMap.put("external", msgBody);
- // The "paramsLocation" property was set in jboss-esb.xml to
- // "helloworld-request-parameters"
message.getBody().add(requestMap);
System.out.println("Request map is: " + requestMap.toString());
@@ -83,4 +80,4 @@
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
}
-}
\ No newline at end of file
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/test/SendJMSMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/test/SendJMSMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -22,6 +22,10 @@
import java.util.Properties;
+import java.text.SimpleDateFormat;
+import java.text.ParseException;
+import java.util.Date;
+
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
@@ -33,7 +37,11 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.ExternalObject;
+import org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.InternalObject;
+
public class SendJMSMessage {
+ public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
QueueConnection conn;
QueueSession session;
Queue que;
@@ -52,7 +60,7 @@
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer1_Request_gw");
+ que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer_wise2_Request_gw");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
System.out.println("Connection Started");
@@ -65,10 +73,18 @@
conn.close();
}
- public void sendAMessage(String msg) throws JMSException {
+ public void sendAMessage(String msg) throws JMSException, ParseException {
- QueueSender send = session.createSender(que);
- ObjectMessage tm = session.createObjectMessage(msg);
+ QueueSender send = session.createSender(que);
+ ExternalObject external = new ExternalObject();
+ InternalObject internal = new InternalObject();
+ internal.setNumber(new Integer(1));
+ internal.setText(msg);
+ external.setInternal(internal);
+ String dateString = "2007-03-07T04:27:00";
+ Date date = (new SimpleDateFormat(DEFAULT_DATE_FORMAT)).parse(dateString);
+ external.setDate(date);
+ ObjectMessage tm = session.createObjectMessage(external);
send.send(tm);
send.close();
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/war/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/PingWS.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/war/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/PingWS.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise2/war/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise2/PingWS.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -35,6 +35,7 @@
public ComplexObject pingComplexObject(@WebParam(name = "complexObject")
ComplexObject arg0) {
String greeting = "Ping with " + arg0.toString();
+ System.out.println(greeting);
return arg0;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -55,7 +55,7 @@
</target>
<target name="sendjms" depends="compile">
- <echo>Send ESB message that triggers webservice call</echo>
+ <echo>Send JMS message that triggers webservice call</echo>
<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise3.test.SendJMSMessage" failonerror="true">
<arg value="Jimbo"/>
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,92 +1,112 @@
-Overview:
-=========
- This example demonstrates how to consume a 181 Web Service in an ESB action.
- This ESB will make a webservice request that requires a single "toWhom" string parameter.
- The webservice will return a greeting response. The ESB simply dislays the response on the
- 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 standalone mode:
-=======================
- This quickstart will not currently run in standalone mode.
-
-To Run '.esb' archive mode:
-===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant undeploy-jms-dests'.
- 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
-
- 'runtest' target description:
- In a separate command prompt window, run "ant runtest" to shoot a JMS message
- into the listener which will then invoke the MyJMSListenerAction and display
- it to the console. You can modify the build.xml to change the phrase
- "Hello World" to something else and re-run "ant runtest".
-
- You should output that looks like this, after running "ant runtest":
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,975 INFO [STDOUT] Request map is: {sayHello.toWhom=Jimbo}
- 12:35:47,975 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,990 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using
- getResponseBodyAsStream instead is recommended.
- 12:35:47,991 INFO [STDOUT]
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,991 INFO [STDOUT] Response Map is:
- <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
- <env:Header></env:Header>
- <env:Body>
- <hel:sayHelloResponse xmlns:hel='http://webservice_consumer1/helloworld'>
- <return>Hello World Greeting for 'Jimbo' on Sat Jul 14 12:35:47 EDT 2007</return>
- </hel:sayHelloResponse></env:Body></env:Envelope>
- 12:35:47,991 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-
-Project file descriptions:
-==========================
-
- jboss-esb.xml:
- There is no JMS gateway in this quickstart. A java client talks directly to the ESB
- listener queue called "queue/quickstart_webservice_consumer1_esb". The actions in
- jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
- to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
- and jbossesb-properties.xml are used when the service first boots up for self-registration
- based upon the service-category and service-name found in the esb-config.xml file.
-
- jndi.properties:
- Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendESBMessage that is fired by ant runtest.
-
- log4j.xml:
- Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
-
- src/../SendEsbMessage.java:
- Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
- gateway and speak directly to an ESB service.
-
- src/../MyRequestAction.java
- Convert the message body into a webservice request parameter Map that only has one paramater called
- "sayHello.toWhom" for the web service call. The request parameter map is named
- "helloworld-request-parameters".
-
- org.jboss.soa.esb.actions.soap.SOAPClient
- This class is used to make the call to the webservice. It will take the
- parameters that MyRequestAction set in "paramsLocation", call the webservice, then place
- the response in "responseLocation". This is zero Java code ESB wiring in jboss-esb.xml.
-
- src/../MyResponseAction.java
- Retrieve the webservice response and display it on the console. The response location name
- is "helloworld-response".
-
- build.xml:
- Targets and structure description:
- * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
- front of the list
- * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
- Usage is: ant echoCP > myclasspath.txt
- This generates a file called myclasspath.txt which can be reviewed in a text editor
- * the run task calls the Launcher passing in 3 arguments the most important are the esb-config.xml and
- esb-config-gateway.xml files
- * the runtest task calls the org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage class and passes in an argument representing
- the string-based message to be pused into the queue the gateway is listening on.
\ No newline at end of file
+Overview:
+=========
+ This is another example of how to use SmookHandler in Wise SOAPClient to do soap message transformation.
+ The tranformation is done by confguring 'smooks-handler-config' for
+SOAPClient. This sample simply adds the soap header to the soap message.
+
+Running this quickstart:
+========================
+ Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts and a
+ more detailed descripton of the different ways to run the quickstarts.
+
+To Run standalone mode:
+=======================
+ This quickstart will not currently run in standalone mode.
+
+To Run '.esb' archive mode:
+===========================
+ 1. Open wise-core.properties and modify the propertie 'wise.tmpDir' there to suit your environment.
+ 2. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+ 3. Open another command terminal window in this folder ("Window2"), type 'ant runtest'.
+ 4. Switch back to Application Server console to see the output from the ESB
+
+ 'runtest' target description:
+ In a separate command prompt window, run "ant runtest" to shoot a ESB message
+ into the listener which will then invoke the MyRequestAction, SOAPClient and MyResponse
+ and display it to the console.
+
+ 17:06:05,571 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 17:06:05,571 INFO [STDOUT] Request map is: {toWhom=Jimbo}
+ 17:06:05,571 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 17:06:05,576 INFO [STDOUT] parsing WSDL...
+ 17:06:05,603 INFO [STDOUT] generating code...
+ 17:06:05,605 INFO [STDOUT] it/javalinux/wise/HelloWorld.java
+ 17:06:05,836 INFO [STDOUT] it/javalinux/wise/HelloWorldWSService.java
+ 17:06:05,839 INFO [STDOUT] it/javalinux/wise/ObjectFactory.java
+ 17:06:05,844 INFO [STDOUT] it/javalinux/wise/SayHello.java
+ 17:06:05,846 INFO [STDOUT] it/javalinux/wise/SayHelloResponse.java
+ 17:06:05,849 INFO [STDOUT] it/javalinux/wise/package-info.java
+ 17:06:06,216 INFO [SOAPClient] adding smooks handler:smooks-handler.xml
+ 17:06:06,216 INFO [SOAPClient] adding logging handler
+ 17:06:06,225 INFO [STDOUT]
+ Outbound message:
+ 17:06:06,230 INFO [STDOUT] <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header><sign:sign xmlns:sign='uri://
+ org.example.webservices.signature.Sign'/></env:Header><env:Body><ns1:sayHello xmlns:ns1='http://webservice_consumer_wise3/helloworld'><toWhom>Jimbo
+ 17:06:06,230 INFO [STDOUT] </toWhom>
+ 17:06:06,230 INFO [STDOUT] </ns1:sayHello>
+ 17:06:06,230 INFO [STDOUT] </env:Body></env:Envelope>
+ 17:06:06,246 INFO [STDOUT]
+ Inbound message:
+ 17:06:06,246 INFO [STDOUT] <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns2:sayHelloResponse
+ xmlns:ns2='http://webservice_consumer_wise3/helloworld'><return>Hello World Greeting for 'Jimbo' on Tue Sep 09 17:06:06 CST 2008
+ 17:06:06,246 INFO [STDOUT] </return>
+ 17:06:06,246 INFO [STDOUT] </ns2:sayHelloResponse>
+ 17:06:06,246 INFO [STDOUT] </env:Body></env:Envelope>
+ 17:06:06,255 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ 17:06:06,255 INFO [STDOUT] Response Map is: {result=Hello World Greeting for 'Jimbo' on Tue Sep 09 17:06:06 CST 2008}
+ 17:06:06,255 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+
+
+
+ 5. When finished, undeploy the application by typing 'ant undeploy'.
+
+Project file descriptions:
+==========================
+
+ jboss-esb.xml:
+ The actions in jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
+ to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
+ and jbossesb-properties.xml are used when the service first boots up for self-registration
+ based upon the service-category and service-name found in the esb-config.xml file.
+
+ jndi.properties:
+ Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendESBMessage that is fired by ant runtest.
+
+ wise-core.properties
+ Needed to configure SOAPClient based on Wise project.
+
+ smooks-handler.xml
+ Smooks style configuration xml. Needed to configure the SmooksHander.
+
+ log4j.xml:
+ Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
+
+ src/../SendEsbMessage.java:
+ Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
+ gateway and speak directly to an ESB service.
+
+ src/../SendJMSMessage.java:
+ Send a message to JMS gateway listener and speak to an ESB service.
+
+ src/../MyRequestAction.java
+ Convert the message body into a webservice request parameter Map.
+
+ src/../SOAPClient
+ This class is used to make the call to the webservice. It will take the
+ parameters map that MyRequestAction set in message body, call the webservice, then place
+ the response in message.
+
+ src/../MyResponseAction.java
+ Retrieve the webservice response and display it on the console.
+
+ build.xml:
+ Targets and structure description:
+ * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
+ front of the list
+ * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
+ Usage is: ant echoCP > myclasspath.txt
+ This generates a file called myclasspath.txt which can be reviewed in a text editor
+ * the runtest task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendEsbMessage class and passes in an argument representing
+ the string-based message to be pused into esb message aware listener queue.
+ * the sendjms task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendJMSMessage class and passes in an argument representing
+ the string-based message to be pused into the queue the gateway is listening on.
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise3/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise3/test/SendJMSMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise3/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise3/test/SendJMSMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -52,7 +52,7 @@
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer1_Request_gw");
+ que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer_wise3_Request_gw");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
System.out.println("Connection Started");
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -55,7 +55,7 @@
</target>
<target name="sendjms" depends="compile">
- <echo>Send ESB message that triggers webservice call</echo>
+ <echo>Send JMS message that triggers webservice call</echo>
<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise4.test.SendJMSMessage" failonerror="true">
<arg value="Jimbo"/>
<classpath refid="exec-classpath"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,92 +1,78 @@
-Overview:
-=========
- This example demonstrates how to consume a 181 Web Service in an ESB action.
- This ESB will make a webservice request that requires a single "toWhom" string parameter.
- The webservice will return a greeting response. The ESB simply dislays the response on the
- 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 standalone mode:
-=======================
- This quickstart will not currently run in standalone mode.
-
-To Run '.esb' archive mode:
-===========================
- 1. In a command terminal window in this folder ("Window1"), type 'ant undeploy-jms-dests'.
- 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
-
- 'runtest' target description:
- In a separate command prompt window, run "ant runtest" to shoot a JMS message
- into the listener which will then invoke the MyJMSListenerAction and display
- it to the console. You can modify the build.xml to change the phrase
- "Hello World" to something else and re-run "ant runtest".
-
- You should output that looks like this, after running "ant runtest":
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,975 INFO [STDOUT] Request map is: {sayHello.toWhom=Jimbo}
- 12:35:47,975 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,990 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using
- getResponseBodyAsStream instead is recommended.
- 12:35:47,991 INFO [STDOUT]
- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
- 12:35:47,991 INFO [STDOUT] Response Map is:
- <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
- <env:Header></env:Header>
- <env:Body>
- <hel:sayHelloResponse xmlns:hel='http://webservice_consumer1/helloworld'>
- <return>Hello World Greeting for 'Jimbo' on Sat Jul 14 12:35:47 EDT 2007</return>
- </hel:sayHelloResponse></env:Body></env:Envelope>
- 12:35:47,991 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-
-Project file descriptions:
-==========================
-
- jboss-esb.xml:
- There is no JMS gateway in this quickstart. A java client talks directly to the ESB
- listener queue called "queue/quickstart_webservice_consumer1_esb". The actions in
- jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
- to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
- and jbossesb-properties.xml are used when the service first boots up for self-registration
- based upon the service-category and service-name found in the esb-config.xml file.
-
- jndi.properties:
- Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendESBMessage that is fired by ant runtest.
-
- log4j.xml:
- Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
-
- src/../SendEsbMessage.java:
- Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
- gateway and speak directly to an ESB service.
-
- src/../MyRequestAction.java
- Convert the message body into a webservice request parameter Map that only has one paramater called
- "sayHello.toWhom" for the web service call. The request parameter map is named
- "helloworld-request-parameters".
-
- org.jboss.soa.esb.actions.soap.SOAPClient
- This class is used to make the call to the webservice. It will take the
- parameters that MyRequestAction set in "paramsLocation", call the webservice, then place
- the response in "responseLocation". This is zero Java code ESB wiring in jboss-esb.xml.
-
- src/../MyResponseAction.java
- Retrieve the webservice response and display it on the console. The response location name
- is "helloworld-response".
-
- build.xml:
- Targets and structure description:
- * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
- front of the list
- * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
- Usage is: ant echoCP > myclasspath.txt
- This generates a file called myclasspath.txt which can be reviewed in a text editor
- * the run task calls the Launcher passing in 3 arguments the most important are the esb-config.xml and
- esb-config-gateway.xml files
- * the runtest task calls the org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage class and passes in an argument representing
- the string-based message to be pused into the queue the gateway is listening on.
\ No newline at end of file
+Overview:
+=========
+ This quickstart demonstrates how to use SmookHandler and JAX-WS hander in Wise SOAPClient to transform and manipulate
+ soap message.
+
+Running this quickstart:
+========================
+ Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts and a
+ more detailed descripton of the different ways to run the quickstarts.
+
+To Run standalone mode:
+=======================
+ This quickstart will not currently run in standalone mode.
+
+To Run '.esb' archive mode:
+===========================
+ 1. Open wise-core.properties and modify the propertie 'wise.tmpDir' there to suit your environment.
+ 2. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+ 3. Open another command terminal window in this folder ("Window2"), type 'ant runtest'.
+ 4. Switch back to Application Server console to see the output from the ESB
+ 5. When finished, undeploy the application by typing 'ant undeploy'.
+
+Project file descriptions:
+==========================
+
+ jboss-esb.xml:
+ The actions in jboss-esb.xml convert the ESB message into to a webservice parameter Map, make a call
+ to the HelloWorldWS webservice, then print the response on the console. Both juddi.properties
+ and jbossesb-properties.xml are used when the service first boots up for self-registration
+ based upon the service-category and service-name found in the esb-config.xml file.
+
+ jndi.properties:
+ Needed primarily for org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendESBMessage that is fired by ant runtest.
+
+ wise-core.properties
+ Needed to configure SOAPClient based on Wise project.
+
+ smooks-handler.xml
+ Smooks style configuration xml. Needed to configure the SmooksHander.
+
+ log4j.xml:
+ Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
+
+ src/../SendEsbMessage.java:
+ Send a message directly the the ESB internal JMS listener. Demonstrates how one can bypass the
+ gateway and speak directly to an ESB service.
+
+ src/../SendJMSMessage.java:
+ Send a message to JMS gateway listener and speak to an ESB service.
+
+ src/../MyRequestAction.java
+ Convert the message body into a webservice request parameter Map.
+
+ src/../SOAPClient
+ This class is used to make the call to the webservice. It will take the
+ parameters map that MyRequestAction set in message body, call the webservice, then place
+ the response in message.
+
+ src/../MyResponseAction.java
+ Retrieve the webservice response and display it on the console.
+
+ src/../MyCustomLoggingHandler.java
+ JAX-WS hanlder file. It is used to display the soap message to the console.
+
+ src/../MyCustomLoggingHandler2.java
+ Another JAX-WS handler file.
+
+ build.xml:
+ Targets and structure description:
+ * the classpath property pulls the jbossesb-properties.xml file and the juddi.properties file to the
+ front of the list
+ * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
+ Usage is: ant echoCP > myclasspath.txt
+ This generates a file called myclasspath.txt which can be reviewed in a text editor
+ * the runtest task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendEsbMessage class and passes in an argument representing
+ the string-based message to be pused into esb message aware listener queue.
+ * the sendjms task calls the org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.SendJMSMessage class and passes in an argument representing
+ the string-based message to be pused into the queue the gateway is listening on.
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise4/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise4/test/SendJMSMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_consumer_wise4/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer_wise4/test/SendJMSMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -52,7 +52,7 @@
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer1_Request_gw");
+ que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer_wise4_Request_gw");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
System.out.println("Connection Started");
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/jboss-esb.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/jboss-esb.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -26,7 +26,7 @@
<services>
<service category="MyServiceCategory" name="MyWSProducerService" description="WS Frontend speaks natively to the ESB">
- <security moduleName="CertLogin" runAs="adminRole" callbackHandler="org.jboss.internal.soa.esb.services.security.CertCallbackHandler">
+ <security moduleName="CertLogin" runAs="adminRole" rolesAllowed="adminRole,users" callbackHandler="org.jboss.internal.soa.esb.services.security.CertCallbackHandler">
<property name="alias" value="jbossesb"/>
<property name="keyPassword" value="jbossesb"/>
</security>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/readme.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/readme.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -2,8 +2,8 @@
=========
This sample demonstrates how to deploy a JSR181 Webservice endpoint on
JBossESB using the SOAPProcessor action and configuring security in JBossESB.
- This quickstart sends a SOAP message, with a security header using a BinarySecurityToken
- which is a public certifcate.
+ Authentication is done by verifying that a certificate exist in a keystore. The
+ certifcate is identified by an alias and a keyPassword which is configured in jboss-esb.xml
Running this quickstart:
========================
@@ -17,7 +17,33 @@
To Run:
=======
1. Type 'ant deploy'.
- 2. Restart you esb server
+ 2. Restart you esb server
2. 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'.
+
+Things to look for in this quickstart:
+======================================
+ 1. Security configuration in jboss-esb.xml:
+ <security moduleName="CertLogin" runAs="adminRole" callbackHandler="org.jboss.internal.soa.esb.services.security.CertCallbackHandler">
+ <property name="alias" value="jbossesb"/>
+ <property name="keyPassword" value="jbossesb"/>
+ </security>
+ In the above configuration the 'alias' specifies a alias that will be used to identify a certificate in the keystore.
+ The 'keyPassword' is the password for the certificate.
+ Try updating either the alias of the password to trigger an authentication failure.
+
+ 2. jaas.login:
+ CertLogin {
+ com.sun.security.auth.module.KeyStoreLoginModule required keyStoreURL="file://@KEYSTORE_PATH@" debug=false;
+ };
+ This file contains the JAAS login module configuration. As you can see the keyStoreURL points to the keystore
+ to use. This file gets filtered and the path is set in build.xml.
+
+
+
+
+
+
+
+
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/PrintSubjectAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/PrintSubjectAction.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/PrintSubjectAction.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -50,6 +50,7 @@
public Message process(Message message) throws Exception
{
+ System.out.println("SecurityContext " + message.getProperties().getProperty("org.jboss.soa.esb.services.security.context"));
System.out.println("Subject : " + Subject.getSubject(AccessController.getContext()));
return message;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/SendMessage.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/SendMessage.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/SendMessage.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -88,7 +88,7 @@
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
- que = (Queue) iniCtx.lookup("queue/quickstart_webservice_producer_gw");
+ que = (Queue) iniCtx.lookup("queue/quickstart_webservice_producer_secured_gw");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/soap_message_01.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/soap_message_01.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/samples/quickstarts/webservice_producer_secured/src/org/jboss/soa/esb/samples/quickstart/webserviceproducersecured/test/soap_message_01.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,18 +1,5 @@
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">
<soapenv:Header>
-<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
- <wsse:BinarySecurityToken EncodingType="wsse:Base64Binary" ValueType="wsse:X509v3">MIICVDCCAb0CBEii4NgwDQYJKoZIhvcNAQEEBQAwcTELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0
-b2NraG9sbTESMBAGA1UEBxMJU3RvY2tob2xtMRAwDgYDVQQKEwdSZWQgSGF0MQ4wDAYDVQQLEwVK
-Qm9zczEYMBYGA1UEAxMPRGFuaWVsIEJldmVuaXVzMB4XDTA4MDgxMzEzMjU0NFoXDTM1MTIyOTEz
-MjU0NFowcTELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9sbTESMBAGA1UEBxMJU3RvY2to
-b2xtMRAwDgYDVQQKEwdSZWQgSGF0MQ4wDAYDVQQLEwVKQm9zczEYMBYGA1UEAxMPRGFuaWVsIEJl
-dmVuaXVzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJRSE6wHkF5DK6DkHTMPnP4dNZXeon
-cCP7Ufn5hjXWLdsq9dAEbuiRLAE4HoNxxqgCHdoKjMO9N1/CIn5dmWw4DBWLp8OHx8Wnyp0MYmCz
-B31jHJpuXkkRq50vRYtKN0NIOyw7eF+XWf4u0dXNgFtXHuUxhAyEm/kTxO1SNVUTwwIDAQABMA0G
-CSqGSIb3DQEBBAUAA4GBADCzl0gXAY0xysdHkKNdwaBDzlibLPz2zmaHcit841qVn05p/I1gsbUV
-vEPh6i/Dj57vdE+X66sPbI36uZiqyWqEr6wvCJDtaTbhSLmckk7ioXwLvdKEQ150MPBsjWRRnFGN
-tZhrQfjo0q8seLh0kgconbfN4pHllfNkJPcdSBvi</wsse:BinarySecurityToken>
- </wsse:Security>
</soapenv:Header>
<soapenv:Body>
<good:sayGoodbye>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/build.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/build.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -8,6 +8,9 @@
<ant dir="ant-task">
<property name="jbpm.jar.file" location="build/jbpm-ant.jar"/>
</ant>
+ <copy tofile="build/asm.jar">
+ <fileset dir="${esb.main.lib}" includes="asm*.jar"/>
+ </copy>
</target>
<target name="test" depends="base.test"/>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/asm.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/asm.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/asm.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/asm.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,27 +0,0 @@
-The BSD License
-
- The following is a BSD license template. To generate your own license, change the values of OWNER, ORGANIZATION and YEAR from their original values as given here, and substitute your own.
-
- Note: The advertising clause in the license appearing on BSD Unix files was officially rescinded by the Director of the Office of Technology Licensing of the University of California on July 22 1999. He states that clause 3 is "hereby deleted in its entirety."
-
- Note the new BSD license is thus equivalent to the MIT License, except for the no-endorsement final clause.
-
-<OWNER> = Regents of the University of California
-<ORGANIZATION> = University of California, Berkeley
-<YEAR> = 1998
-
-In the original BSD license, both occurrences of the phrase "COPYRIGHT HOLDERS AND CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS".
-
-Here is the license template:
-
-Copyright (c) <YEAR>, <OWNER>
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/activation.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/activation.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/activation.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/activation.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,384 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-
- 1. Definitions.
-
- 1.1. "Contributor" means each individual or entity that
- creates or contributes to the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the
- Original Software, prior Modifications used by a
- Contributor (if any), and the Modifications made by that
- particular Contributor.
-
- 1.3. "Covered Software" means (a) the Original Software, or
- (b) Modifications, or (c) the combination of files
- containing Original Software with files containing
- Modifications, in each case including portions thereof.
-
- 1.4. "Executable" means the Covered Software in any form
- other than Source Code.
-
- 1.5. "Initial Developer" means the individual or entity
- that first makes Original Software available under this
- License.
-
- 1.6. "Larger Work" means a work which combines Covered
- Software or portions thereof with code not governed by the
- terms of this License.
-
- 1.7. "License" means this document.
-
- 1.8. "Licensable" means having the right to grant, to the
- maximum extent possible, whether at the time of the initial
- grant or subsequently acquired, any and all of the rights
- conveyed herein.
-
- 1.9. "Modifications" means the Source Code and Executable
- form of any of the following:
-
- A. Any file that results from an addition to,
- deletion from or modification of the contents of a
- file containing Original Software or previous
- Modifications;
-
- B. Any new file that contains any part of the
- Original Software or previous Modification; or
-
- C. Any new file that is contributed or otherwise made
- available under the terms of this License.
-
- 1.10. "Original Software" means the Source Code and
- Executable form of computer software code that is
- originally released under this License.
-
- 1.11. "Patent Claims" means any patent claim(s), now owned
- or hereafter acquired, including without limitation,
- method, process, and apparatus claims, in any patent
- Licensable by grantor.
-
- 1.12. "Source Code" means (a) the common form of computer
- software code in which modifications are made and (b)
- associated documentation included in or with such code.
-
- 1.13. "You" (or "Your") means an individual or a legal
- entity exercising rights under, and complying with all of
- the terms of, this License. For legal entities, "You"
- includes any entity which controls, is controlled by, or is
- under common control with You. For purposes of this
- definition, "control" means (a) the power, direct or
- indirect, to cause the direction or management of such
- entity, whether by contract or otherwise, or (b) ownership
- of more than fifty percent (50%) of the outstanding shares
- or beneficial ownership of such entity.
-
- 2. License Grants.
-
- 2.1. The Initial Developer Grant.
-
- Conditioned upon Your compliance with Section 3.1 below and
- subject to third party intellectual property claims, the
- Initial Developer hereby grants You a world-wide,
- royalty-free, non-exclusive license:
-
- (a) under intellectual property rights (other than
- patent or trademark) Licensable by Initial Developer,
- to use, reproduce, modify, display, perform,
- sublicense and distribute the Original Software (or
- portions thereof), with or without Modifications,
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making,
- using or selling of Original Software, to make, have
- made, use, practice, sell, and offer for sale, and/or
- otherwise dispose of the Original Software (or
- portions thereof).
-
- (c) The licenses granted in Sections 2.1(a) and (b)
- are effective on the date Initial Developer first
- distributes or otherwise makes the Original Software
- available to a third party under the terms of this
- License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent
- license is granted: (1) for code that You delete from
- the Original Software, or (2) for infringements
- caused by: (i) the modification of the Original
- Software, or (ii) the combination of the Original
- Software with other software or devices.
-
- 2.2. Contributor Grant.
-
- Conditioned upon Your compliance with Section 3.1 below and
- subject to third party intellectual property claims, each
- Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license:
-
- (a) under intellectual property rights (other than
- patent or trademark) Licensable by Contributor to
- use, reproduce, modify, display, perform, sublicense
- and distribute the Modifications created by such
- Contributor (or portions thereof), either on an
- unmodified basis, with other Modifications, as
- Covered Software and/or as part of a Larger Work; and
-
-
- (b) under Patent Claims infringed by the making,
- using, or selling of Modifications made by that
- Contributor either alone and/or in combination with
- its Contributor Version (or portions of such
- combination), to make, use, sell, offer for sale,
- have made, and/or otherwise dispose of: (1)
- Modifications made by that Contributor (or portions
- thereof); and (2) the combination of Modifications
- made by that Contributor with its Contributor Version
- (or portions of such combination).
-
- (c) The licenses granted in Sections 2.2(a) and
- 2.2(b) are effective on the date Contributor first
- distributes or otherwise makes the Modifications
- available to a third party.
-
- (d) Notwithstanding Section 2.2(b) above, no patent
- license is granted: (1) for any code that Contributor
- has deleted from the Contributor Version; (2) for
- infringements caused by: (i) third party
- modifications of Contributor Version, or (ii) the
- combination of Modifications made by that Contributor
- with other software (except as part of the
- Contributor Version) or other devices; or (3) under
- Patent Claims infringed by Covered Software in the
- absence of Modifications made by that Contributor.
-
- 3. Distribution Obligations.
-
- 3.1. Availability of Source Code.
-
- Any Covered Software that You distribute or otherwise make
- available in Executable form must also be made available in
- Source Code form and that Source Code form must be
- distributed only under the terms of this License. You must
- include a copy of this License with every copy of the
- Source Code form of the Covered Software You distribute or
- otherwise make available. You must inform recipients of any
- such Covered Software in Executable form as to how they can
- obtain such Covered Software in Source Code form in a
- reasonable manner on or through a medium customarily used
- for software exchange.
-
- 3.2. Modifications.
-
- The Modifications that You create or to which You
- contribute are governed by the terms of this License. You
- represent that You believe Your Modifications are Your
- original creation(s) and/or You have sufficient rights to
- grant the rights conveyed by this License.
-
- 3.3. Required Notices.
-
- You must include a notice in each of Your Modifications
- that identifies You as the Contributor of the Modification.
- You may not remove or alter any copyright, patent or
- trademark notices contained within the Covered Software, or
- any notices of licensing or any descriptive text giving
- attribution to any Contributor or the Initial Developer.
-
- 3.4. Application of Additional Terms.
-
- You may not offer or impose any terms on any Covered
- Software in Source Code form that alters or restricts the
- applicable version of this License or the recipients"
- rights hereunder. You may choose to offer, and to charge a
- fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Software.
- However, you may do so only on Your own behalf, and not on
- behalf of the Initial Developer or any Contributor. You
- must make it absolutely clear that any such warranty,
- support, indemnity or liability obligation is offered by
- You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred
- by the Initial Developer or such Contributor as a result of
- warranty, support, indemnity or liability terms You offer.
-
-
- 3.5. Distribution of Executable Versions.
-
- You may distribute the Executable form of the Covered
- Software under the terms of this License or under the terms
- of a license of Your choice, which may contain terms
- different from this License, provided that You are in
- compliance with the terms of this License and that the
- license for the Executable form does not attempt to limit
- or alter the recipient"s rights in the Source Code form
- from the rights set forth in this License. If You
- distribute the Covered Software in Executable form under a
- different license, You must make it absolutely clear that
- any terms which differ from this License are offered by You
- alone, not by the Initial Developer or Contributor. You
- hereby agree to indemnify the Initial Developer and every
- Contributor for any liability incurred by the Initial
- Developer or such Contributor as a result of any such terms
- You offer.
-
- 3.6. Larger Works.
-
- You may create a Larger Work by combining Covered Software
- with other code not governed by the terms of this License
- and distribute the Larger Work as a single product. In such
- a case, You must make sure the requirements of this License
- are fulfilled for the Covered Software.
-
- 4. Versions of the License.
-
- 4.1. New Versions.
-
- Sun Microsystems, Inc. is the initial license steward and
- may publish revised and/or new versions of this License
- from time to time. Each version will be given a
- distinguishing version number. Except as provided in
- Section 4.3, no one other than the license steward has the
- right to modify this License.
-
- 4.2. Effect of New Versions.
-
- You may always continue to use, distribute or otherwise
- make the Covered Software available under the terms of the
- version of the License under which You originally received
- the Covered Software. If the Initial Developer includes a
- notice in the Original Software prohibiting it from being
- distributed or otherwise made available under any
- subsequent version of the License, You must distribute and
- make the Covered Software available under the terms of the
- version of the License under which You originally received
- the Covered Software. Otherwise, You may also choose to
- use, distribute or otherwise make the Covered Software
- available under the terms of any subsequent version of the
- License published by the license steward.
-
- 4.3. Modified Versions.
-
- When You are an Initial Developer and You want to create a
- new license for Your Original Software, You may create and
- use a modified version of this License if You: (a) rename
- the license and remove any references to the name of the
- license steward (except to note that the license differs
- from this License); and (b) otherwise make it clear that
- the license contains terms which differ from this License.
-
-
- 5. DISCLAIMER OF WARRANTY.
-
- COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
- BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
- INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
- SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
- PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
- PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
- COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
- INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
- ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
- WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
- DISCLAIMER.
-
- 6. TERMINATION.
-
- 6.1. This License and the rights granted hereunder will
- terminate automatically if You fail to comply with terms
- herein and fail to cure such breach within 30 days of
- becoming aware of the breach. Provisions which, by their
- nature, must remain in effect beyond the termination of
- this License shall survive.
-
- 6.2. If You assert a patent infringement claim (excluding
- declaratory judgment actions) against Initial Developer or
- a Contributor (the Initial Developer or Contributor against
- whom You assert such claim is referred to as "Participant")
- alleging that the Participant Software (meaning the
- Contributor Version where the Participant is a Contributor
- or the Original Software where the Participant is the
- Initial Developer) directly or indirectly infringes any
- patent, then any and all rights granted directly or
- indirectly to You by such Participant, the Initial
- Developer (if the Initial Developer is not the Participant)
- and all Contributors under Sections 2.1 and/or 2.2 of this
- License shall, upon 60 days notice from Participant
- terminate prospectively and automatically at the expiration
- of such 60 day notice period, unless if within such 60 day
- period You withdraw Your claim with respect to the
- Participant Software against such Participant either
- unilaterally or pursuant to a written agreement with
- Participant.
-
- 6.3. In the event of termination under Sections 6.1 or 6.2
- above, all end user licenses that have been validly granted
- by You or any distributor hereunder prior to termination
- (excluding licenses granted to You by any distributor)
- shall survive termination.
-
- 7. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
- INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
- COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
- LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
- CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
- LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
- STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
- INJURY RESULTING FROM SUCH PARTY"S NEGLIGENCE TO THE EXTENT
- APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
- NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
- CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
- APPLY TO YOU.
-
- 8. U.S. GOVERNMENT END USERS.
-
- The Covered Software is a "commercial item," as that term is
- defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
- computer software" (as that term is defined at 48 C.F.R. "
- 252.227-7014(a)(1)) and "commercial computer software
- documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
- 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
- through 227.7202-4 (June 1995), all U.S. Government End Users
- acquire Covered Software with only those rights set forth herein.
- This U.S. Government Rights clause is in lieu of, and supersedes,
- any other FAR, DFAR, or other clause or provision that addresses
- Government rights in computer software under this License.
-
- 9. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the
- extent necessary to make it enforceable. This License shall be
- governed by the law of the jurisdiction specified in a notice
- contained within the Original Software (except to the extent
- applicable law, if any, provides otherwise), excluding such
- jurisdiction"s conflict-of-law provisions. Any litigation
- relating to this License shall be subject to the jurisdiction of
- the courts located in the jurisdiction and venue specified in a
- notice contained within the Original Software, with the losing
- party responsible for costs, including, without limitation, court
- costs and reasonable attorneys" fees and expenses. The
- application of the United Nations Convention on Contracts for the
- International Sale of Goods is expressly excluded. Any law or
- regulation which provides that the language of a contract shall
- be construed against the drafter shall not apply to this License.
- You agree that You alone are responsible for compliance with the
- United States export administration regulations (and the export
- control laws and regulation of any other countries) when You use,
- distribute or otherwise make available any Covered Software.
-
- 10. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or
- indirectly, out of its utilization of rights under this License
- and You agree to work with Initial Developer and Contributors to
- distribute such responsibility on an equitable basis. Nothing
- herein is intended or shall be deemed to constitute any admission
- of liability.
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/antlr-2.7.6.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/antlr-2.7.6.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/antlr-2.7.6.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/antlr-2.7.6.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,19 +0,0 @@
-http://www.antlr.org/license.html
-
-Software License
-
-We reserve no legal rights to the ANTLR--it is fully in the public domain. An
-individual or company may do whatever they wish with source code distributed
-with ANTLR or the code generated by ANTLR, including the incorporation of ANTLR,
-or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However, we do ask that
-credit is given to us for developing ANTLR. By "credit", we mean that if you
-use ANTLR or incorporate any source code into one of your programs (commercial
-product, research project, or otherwise) that you acknowledge this fact
-somewhere in the documentation, research report, etc... If you like ANTLR and
-have developed a nice tool with the output, please mention that you developed
-it using ANTLR. In addition, we ask that the headers remain intact in our
-source code. As long as these guidelines are kept, we expect to continue
-enhancing this system and expect to make other tools available as they are
-completed.
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/bsh.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/bsh.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/bsh.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/bsh.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library 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 library 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 library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/cglib.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/cglib.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/cglib.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/cglib.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-backport-concurrent.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-backport-concurrent.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-backport-concurrent.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-backport-concurrent.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,30 +0,0 @@
-Copyright-Only Dedication (based on United States law) or
-Public Domain Certification
-
-The person or persons who have associated work with this document (the
-"Dedicator" or "Certifier") hereby either (a) certifies that, to the best
-of his knowledge, the work of authorship identified is in the public
-domain of the country from which the work is published, or (b) hereby
-dedicates whatever copyright the dedicators holds in the work of authorship
-identified below (the "Work") to the public domain. A certifier, moreover,
-dedicates any copyright interest he may have in the associated work, and
-for these purposes, is described as a "dedicator" below.
-
-A certifier has taken reasonable steps to verify the copyright status of
-this work. Certifier recognizes that his good faith efforts may not shield
-him from liability if in fact the work certified is not in the public domain.
-
-Dedicator makes this dedication for the benefit of the public at large and
-to the detriment of the Dedicator's heirs and successors. Dedicator intends
-this dedication to be an overt act of relinquishment in perpetuity of all
-present and future rights under copyright law, whether vested or contingent,
-in the Work. Dedicator understands that such relinquishment of all rights
-includes the relinquishment of all rights to enforce (by lawsuit or otherwise)
-those copyrights in the Work.
-
-Dedicator recognizes that, once placed in the public domain, the Work may be
-freely reproduced, distributed, transmitted, used, modified, built upon,
-or otherwise exploited by anyone for any purpose, commercial or non-commercial,
-and in any way, including by methods that have not yet been invented or conceived.
-
-(See http://creativecommons.org/licenses/publicdomain)
\ No newline at end of file
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-j2ee.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-j2ee.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-j2ee.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jboss-j2ee.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library 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 library 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 library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jbossretro-rt.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jbossretro-rt.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jbossretro-rt.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jbossretro-rt.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library 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 library 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 library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jcr-1.0.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/jcr-1.0.jar.license.txt
===================================================================
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/servlet-api.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/servlet-api.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/servlet-api.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/build-time/servlet-api.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/dom4j.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/dom4j.jar.license.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/dom4j.jar.license.txt 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/lib/ext/dom4j.jar.license.txt 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,12 +0,0 @@
-Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document.
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- 3. The name "DOM4J" must not be used to endorse or promote products derived from this Software without prior written permission of MetaStuff, Ltd. For written permission, please contact dom4j-info at metastuff.com.
- 4. Products derived from this Software may not be called "DOM4J" nor may "DOM4J" appear in their names without prior written permission of MetaStuff, Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
- 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
-
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
-
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapper.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapper.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -154,7 +154,7 @@
String remainingExpression = null;
int dotPosition=expression.indexOf(".");
if (dotPosition > 0) {
- objectName = expression.substring(0, dotPosition-1);
+ objectName = expression.substring(0, dotPosition);
remainingExpression = expression.substring(dotPosition+1);
}
if (isPrcScope) {
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapperUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapperUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/JBpmObjectMapperUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -93,10 +93,14 @@
String helloWorldTokenScope = "Hello world token scope";
String helloWorldGlobalScope = "Hello world process-instance scope";
+ TestJBPMVariable objectTokenScope = new TestJBPMVariable("Object token scope") ;
+ TestJBPMVariable objectGlobalScope = new TestJBPMVariable("Object global scope") ;
Token token = processInstance.getRootToken();
processInstance.getContextInstance().setVariable("v1", helloWorldTokenScope, token);
processInstance.getContextInstance().setVariable("g2", helloWorldGlobalScope);
+ processInstance.getContextInstance().setVariable("h3", objectTokenScope, token);
+ processInstance.getContextInstance().setVariable("i4", objectGlobalScope);
ExecutionContext executionContext = new ExecutionContext(token);
JBpmObjectMapper mapper = new JBpmObjectMapper();
@@ -104,6 +108,8 @@
assertEquals(helloWorldTokenScope,String.valueOf(message.getBody().get("esbObj1")));
assertEquals(helloWorldGlobalScope,String.valueOf(message.getBody().get("esbObj2")));
+ assertEquals(objectTokenScope.getInternal(), String.valueOf(message.getBody().get("esbObj3")));
+ assertEquals(objectGlobalScope.getInternal(), String.valueOf(message.getBody().get("esbObj4")));
}
/**
* Tests obtaining *no* variables from the jBPM variableMap.
@@ -118,10 +124,14 @@
String helloWorldTokenScope = "Hello world token scope";
String helloWorldGlobalScope = "Hello world process-instance scope";
+ TestJBPMVariable objectTokenScope = new TestJBPMVariable("Object token scope") ;
+ TestJBPMVariable objectGlobalScope = new TestJBPMVariable("Object global scope") ;
Token token = processInstance.getRootToken();
processInstance.getContextInstance().createVariable("v1", helloWorldTokenScope, token);
processInstance.getContextInstance().createVariable("g2", helloWorldGlobalScope);
+ processInstance.getContextInstance().createVariable("h3", objectTokenScope, token);
+ processInstance.getContextInstance().createVariable("i4", objectGlobalScope);
ExecutionContext executionContext = new ExecutionContext(token);
JBpmObjectMapper mapper = new JBpmObjectMapper();
@@ -144,18 +154,24 @@
String helloWorldTokenScope = "Hello world token scope";
String helloWorldGlobalScope = "Hello world process-instance scope";
+ TestJBPMVariable objectTokenScope = new TestJBPMVariable("Object token scope") ;
+ TestJBPMVariable objectGlobalScope = new TestJBPMVariable("Object global scope") ;
Token token = processInstance.getRootToken();
processInstance.getContextInstance().createVariable("v1", helloWorldTokenScope, token);
processInstance.getContextInstance().createVariable("g2", helloWorldGlobalScope);
+ processInstance.getContextInstance().createVariable("h3", objectTokenScope, token);
+ processInstance.getContextInstance().createVariable("i4", objectGlobalScope);
ExecutionContext executionContext = new ExecutionContext(token);
JBpmObjectMapper mapper = new JBpmObjectMapper();
Message message = mapper.mapFromJBpmToEsbMessage(bpmToEsbVars, Boolean.FALSE, executionContext);
//We should find 2 variables which are named just like their jBPM counterparts.
- assertEquals(message.getBody().getNames().length,2);
+ assertEquals(message.getBody().getNames().length,4);
assertEquals(String.valueOf(message.getBody().get("v1")),helloWorldTokenScope);
assertEquals(String.valueOf(message.getBody().get("g2")),helloWorldGlobalScope);
+ assertEquals(message.getBody().get("h3"), objectTokenScope);
+ assertEquals(message.getBody().get("i4"), objectGlobalScope);
}
/**
* Tests obtaining info about the jBPM ExecutionContext, such as current token and node, transition etc.
@@ -201,9 +217,8 @@
assertEquals(String.valueOf(String.valueOf(message.getBody().get("piVersion"))), String.valueOf(processInstance.getVersion()));
logger.info("Message=" + message);
}
-
+
public static junit.framework.Test suite(){
return new JUnit4TestAdapter(JBpmObjectMapperUnitTest.class);
}
-
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/TestJBPMVariable.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/TestJBPMVariable.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/TestJBPMVariable.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/TestJBPMVariable.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,64 @@
+/*
+ * 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.services.jbpm;
+
+/**
+ * Test class used to test object manipulation for JBpmObjectMapper
+ *
+ * @author kevin
+ *
+ */
+public final class TestJBPMVariable
+{
+ private String internal ;
+
+ public TestJBPMVariable(final String internal)
+ {
+ this.internal = internal ;
+ }
+
+ public String getInternal()
+ {
+ return internal ;
+ }
+
+ public void setInternal(final String internal)
+ {
+ this.internal = internal ;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return internal.hashCode() ;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof TestJBPMVariable)
+ {
+ return internal.equals(((TestJBPMVariable)obj).getInternal()) ;
+ }
+ return false ;
+ }
+}
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/JBpmObjectMapperCallbackUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/JBpmObjectMapperCallbackUnitTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/JBpmObjectMapperCallbackUnitTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -39,6 +39,7 @@
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.services.jbpm.Constants;
import org.jboss.soa.esb.services.jbpm.JBpmObjectMapper;
+import org.jboss.soa.esb.services.jbpm.TestJBPMVariable;
import org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
@@ -89,10 +90,14 @@
String helloWorldTokenScope = "Hello world token scope";
String helloWorldGlobalScope = "Hello world process-instance scope";
+ TestJBPMVariable objectTokenScope = new TestJBPMVariable("Object token scope") ;
+ TestJBPMVariable objectGlobalScope = new TestJBPMVariable("Object global scope") ;
Token token = processInstance.getRootToken();
processInstance.getContextInstance().createVariable("v1", helloWorldTokenScope, token);
processInstance.getContextInstance().createVariable("g2", helloWorldGlobalScope);
+ processInstance.getContextInstance().createVariable("h3", objectTokenScope, token);
+ processInstance.getContextInstance().createVariable("i4", objectGlobalScope);
ExecutionContext executionContext = new ExecutionContext(token);
JBpmObjectMapper mapper = new JBpmObjectMapper();
@@ -111,6 +116,7 @@
assertEquals(helloWorldGlobalScope,variableMap.get("x2"));
}
+
public static junit.framework.Test suite(){
return new JUnit4TestAdapter(JBpmObjectMapperCallbackUnitTest.class);
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/resources/JBpmObjectMapperTestProcessDefinition.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/resources/JBpmObjectMapperTestProcessDefinition.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbpm/src/test/resources/JBpmObjectMapperTestProcessDefinition.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -11,6 +11,8 @@
<bpmToEsbVars>
<mapping bpm="v1" esb="esbObj1" />
<mapping bpm="g2" esb="esbObj2" process-scope="true" />
+ <mapping bpm="h3.internal" esb="esbObj3" />
+ <mapping bpm="i4.internal" esb="esbObj4" process-scope="true" />
</bpmToEsbVars>
<esbToBpmVars>
<mapping esb="esbObj1" bpm="x1" process-scope="true" />
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/lib/ext/mvel-1.3.1-java1.4.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/lib/ext/stax-api-1.0.1.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/jbrules/lib/ext/xstream-1.2.2.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/slsb/src/main/java/org/jboss/soa/esb/actions/EJBProcessor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/slsb/src/main/java/org/jboss/soa/esb/actions/EJBProcessor.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/slsb/src/main/java/org/jboss/soa/esb/actions/EJBProcessor.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -48,6 +48,7 @@
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.util.ClassUtil;
/**
* EJBProcessor is an action that can call stateless session beans
@@ -149,7 +150,7 @@
{
// get the parameter from the esb message and
// cast it to the in the jboss-esb.xml specified type
- param[i] = Class.forName(ejbParams.get(i).getType()).cast(
+ param[i] = ClassUtil.forName(ejbParams.get(i).getType(), getClass()).cast(
msg.getBody().get(ejbParams.get(i).getLoc()));
}
Object ret;
@@ -327,7 +328,7 @@
Class[] sigArray = new Class[ejbParams.size()];
for (int i = 0; i < ejbParams.size(); i++)
{
- sigArray[i] = Class.forName(ejbParams.get(i).getType());
+ sigArray[i] = ClassUtil.forName(ejbParams.get(i).getType(), getClass());
}
// Get the specified method
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/antlr-2.7.2.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/groovy-all-1.0.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/mvel-1.3.3-java1.5.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/xalan-2.7.0.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/xbean-2.2.0.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/smooks/lib/ext/xml-apis-1.0.b2.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/activation.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/commons-logging-1.0.4.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossall-client.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossts-common.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossws-core.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossws-jboss421.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/jbossws-spi.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/junit-4.1.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/log4j.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/build-time/servlet-api-2.3.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/commons-httpclient-3.0.1.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/commons-ssl-0.3.4.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxb-api.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxb-impl.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxb-xjc.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxws-rt.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jaxws-tools.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jboss-jaxws.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jboss-saaj.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jboss-system.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jbossall-client.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jbossws-common.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/lib/ext/jbossws-spi.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletRequest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletRequest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletRequest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -321,4 +321,24 @@
{
throw new UnsupportedOperationException("Not yet supported") ;
}
+
+ public String getLocalAddr()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getLocalName()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public int getLocalPort()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public int getRemotePort()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletResponse.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletResponse.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/adapter/SOAPProcessorHttpServletResponse.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -165,6 +165,32 @@
return null ;
}
+ public void setCharacterEncoding(final String charset)
+ {
+ final String contentType = getContentType() ;
+ if (contentType != null)
+ {
+ final int charsetIndex = contentType.indexOf(CHARSET) ;
+ if (charsetIndex == -1)
+ {
+ setContentType(contentType + ';' + CHARSET + charset) ;
+ }
+ else
+ {
+ final StringBuilder sb = new StringBuilder() ;
+ sb.append(contentType, 0, charsetIndex) ;
+ sb.append(CHARSET) ;
+ sb.append(charset) ;
+ final int endIndex = contentType.indexOf(';', charsetIndex) ;
+ if (endIndex != -1)
+ {
+ sb.append(contentType, endIndex, contentType.length()) ;
+ }
+ setContentType(sb.toString()) ;
+ }
+ }
+ }
+
/*
* The following methods are not supported by this adapter.
*/
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-codec-1.2.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-httpclient-3.0.1.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-logging-1.0.4.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/soapui-client/src/lib/commons-ssl-0.3.4.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/asm.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/cglib-2.1_3.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/commons-logging-1.0.4.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/junit-4.1.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/services/spring/lib/ext/build-time/log4j.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -53,21 +53,21 @@
return pollMinuteFrequency;
}
- public void start() throws Exception {
- super.start();
+ @Override
+ protected void startService() throws Exception {
SchedulerFactory schedulerFactory = new StdSchedulerFactory();
+ // This is relying on the default scheduler which is controlled externally
scheduler = schedulerFactory.getScheduler();
schedule() ;
}
- public void stop() {
+ @Override
+ protected void stopService() {
try {
- scheduler.shutdown();
scheduler.deleteJob(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME);
} catch (SchedulerException e) {
logger.error("", e);
}
- super.stop();
}
public void setPollMinuteFrequency(int f_pollMinuteFrequency) {
@@ -96,7 +96,6 @@
simpleTrigger.setRepeatCount(-1);
scheduler.scheduleJob(jobDetail, simpleTrigger);
- scheduler.start();
} catch (SchedulerException se) {
logger.error("", se);
} catch (Exception e) {
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/install.sh
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/install.sh 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/install.sh 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,3 +1,6 @@
#!/bin/sh
+rm -rf ~/.m2/repository/org/jboss/on/rhq-jbossesb-plugin
mvn -Dmaven.test.skip=true clean install
-cp target/rhq-jbossesb-plugin-2.0.1-SNAPSHOT.jar ~/src/jon/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins
+cp target/rhq-jbossesb-plugin-2.1.0-SNAPSHOT.jar ~/src/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins
+cp target/rhq-jbossesb-plugin-2.1.0-SNAPSHOT.jar ~/src/jon/jon/dist/agent/target/jon-agent-2.1.0-SNAPSHOT/plugins/rhq-jbossesb-plugin-2.1.0-SNAPSHOT.jar
+
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/pom.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/pom.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/pom.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -6,7 +6,7 @@
<groupId>org.jboss.on</groupId>
<!-- Bypass the jon-plugins-parent which can not have children. It must build after the plugins in order to execute integration tests on them. -->
<artifactId>jon-parent</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
@@ -25,6 +25,15 @@
<scm.module.path>jon/plugins/jbossesb/</scm.module.path>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>rhq-jbossas-plugin</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
@@ -66,7 +75,6 @@
<build>
<plugins>
-
<!-- Integration testing voodoo to load and test this plugin with its plugin dependencies -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -21,7 +21,7 @@
import java.util.Set;
import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
-import org.mc4j.ems.connection.bean.operation.EmsOperation;
+import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
@@ -33,7 +33,9 @@
import org.mc4j.ems.connection.bean.EmsBean;
/**
- * @author Greg Hinkle
+ * The ActionComponent finds ESB action data (messages, bytes, time).
+ *
+ * @author Tom Cunningham
*/
public class ActionComponent extends MBeanResourceComponent<MBeanResourceComponent> {
private ResourceContext<MBeanResourceComponent> context;
@@ -41,19 +43,50 @@
private static final String SUCCESS_PROCESSED = "messages successfully processed count";
private static final String FAILED_PROCESSED = "messages failed count";
private static final String PROCESSING_TIME = "processing time";
- private static final String OVERALL_BYTES_PROCESSED = "bytes processed";
- private static final String OVERALL_BYTES_FAILED = "bytes failed";
-
+ private static final String OVERALL_BYTES_PROCESSED = "processed bytes";
+ private static final String OVERALL_BYTES_FAILED = "failed bytes";
+
+ private static final String OVERALL_METRIC_NAME = "overallMessagesCount";
private static final String SUCCESS_METRIC_NAME = "successProcessedCount";
private static final String FAILED_METRIC_NAME = "failedProcessedCount";
private static final String PROCESSINGTIME_METRIC_NAME = "processingTime";
private static final String BYTESPROCESSED_METRIC_NAME = "overallBytesProcessed";
private static final String BYTESFAILED_METRIC_NAME = "overallBytesFailed";
+ /**
+ * Is this service alive?
+ *
+ * @return true if the service is running
+ */
@Override
+ public AvailabilityType getAvailability() {
+ try {
+ EmsBean emsbean = getEmsBean();
+ if (emsbean.isRegistered()) {
+ String actionName = this.context.getResourceKey();
+ actionName = actionName.trim();
+ EmsAttribute attribute = this.bean.getAttribute(actionName + " " + SUCCESS_PROCESSED);
+ if (attribute != null) {
+ return AvailabilityType.UP;
+ }
+ return AvailabilityType.DOWN;
+ } else {
+ return AvailabilityType.DOWN;
+ }
+ } catch (NullPointerException npe) {
+ if (resourceContext != null) {
+ log.warn("Could not determine availability of unknown ems bean for ["
+ + resourceContext.getResourceType() + ":" + resourceContext.getResourceKey() + "]");
+ }
+
+ return AvailabilityType.DOWN;
+ }
+ }
+
+ @Override
public void start(ResourceContext<MBeanResourceComponent> context) {
super.start(context);
- this.context = context;
+ this.context = context;
this.bean = context.getParentResourceComponent().getEmsBean();
}
@@ -67,33 +100,55 @@
actionName = actionName.trim();
//Object entityStatistics = operation.invoke(context.getResourceKey());
- for (MeasurementScheduleRequest request : requests) {
+ int counter = 0;
+ for (MeasurementScheduleRequest request : requests) {
String metricName = request.getName();
if (metricName.equals (SUCCESS_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + SUCCESS_PROCESSED);
- Integer processed = (Integer) attribute.refresh();
+ Integer processed = new Integer(0);
+ if (attribute != null) {
+ processed = (Integer) attribute.refresh();
+ }
+ counter += processed.intValue();
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
} else if (metricName.equals(FAILED_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + FAILED_PROCESSED);
- Integer processed = (Integer) attribute.refresh();
+ Integer processed = new Integer(0);
+ if (attribute != null) {
+ processed = (Integer) attribute.refresh();
+ }
+ counter += processed.intValue();
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
} else if (metricName.equals(PROCESSINGTIME_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + PROCESSING_TIME);
Double processed = (Double) attribute.refresh();
if (processed != null) {
+ processed = new Double(processed.doubleValue() / 1000000);
report.addData(new MeasurementDataNumeric(request, processed));
} else {
report.addData(new MeasurementDataNumeric(request, new Double(0)));
}
} else if (metricName.equals(BYTESPROCESSED_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_PROCESSED);
- Integer bytesProcessed = (Integer) attribute.refresh();
+ Integer bytesProcessed = new Integer(0);
+ if (attribute != null) {
+ bytesProcessed = (Integer) attribute.refresh();
+ }
report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
} else if (metricName.equals(BYTESFAILED_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_FAILED);
- Integer bytesProcessed = (Integer) attribute.refresh();
+ Integer bytesProcessed = new Integer(0);
+ if (attribute != null) {
+ bytesProcessed = (Integer) attribute.refresh();
+ }
report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
}
}
+ for (MeasurementScheduleRequest request : requests) {
+ String metricName = request.getName();
+ if (metricName.equals (OVERALL_METRIC_NAME)) {
+ report.addData(new MeasurementDataNumeric(request, new Double(counter)));
+ }
+ }
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -20,8 +20,8 @@
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.Hashtable;
import java.util.Iterator;
-import java.util.List;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -30,22 +30,20 @@
import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.Property;
-import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.jmx.JMXComponent;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * Discovers hibernate entities from a hibernate stats mbean
+ * Discovers ESB actions from a JMX bean
*
- * @author Greg Hinkle
+ * @author Tom Cunningham
* @param <T>
*/
-public class ActionDiscoveryComponent<T extends JMXComponent> implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+public class ActionDiscoveryComponent<T extends JMXComponent> extends SOADiscoveryComponent {
private static final String SERVICE_NAME = "service-name";
private static final String MESSAGES_SUCCESSFULLY_PROCESSED = "messages successfully processed count";
@@ -75,8 +73,16 @@
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
EmsBean actionBean = context.getParentResourceComponent().getEmsBean();
- String serviceName = actionBean.getBeanName().getKeyProperty(SERVICE_NAME);
-
+ String serviceName = actionBean.getBeanName().getKeyProperty(SERVICE_NAME);
+
+ String versionNumber;
+ try {
+ Hashtable ht = getVersionAttribute(context);
+ versionNumber = (String) ht.get(VERSION_NUMBER);
+ } catch (Exception e) {
+ versionNumber = "";
+ }
+
// Do two passes - one to grab the entity names (ex. "data fileraction"
// and then a second to build up the metrics for the entity
Set<EmsAttribute> attributeSet = actionBean.getAttributes();
@@ -89,11 +95,7 @@
Configuration pc = detail.getPluginConfiguration();
ArrayList<Property> props = new ArrayList<Property>();
- //PropertySimple ps = new PropertySimple("", "");
- //props.add(ps);
- //pc.setProperties(props);
- //List<EmsAttribute> refreshedAttribute = actionBean.refreshAttributes();
-
+ detail.setResourceVersion(versionNumber);
entities.add(detail);
}
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/DeploymentComponent.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/DeploymentComponent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/DeploymentComponent.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/DeploymentComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,303 @@
+package org.jbosson.plugins.jbossesb;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.ContentResponseResult;
+import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
+import org.rhq.core.domain.content.transfer.DeployPackageStep;
+import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
+import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.pluginapi.content.ContentContext;
+import org.rhq.core.pluginapi.content.ContentFacet;
+import org.rhq.core.pluginapi.content.ContentServices;
+import org.rhq.core.pluginapi.event.EventContext;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.operation.OperationContext;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.plugins.jbossas.util.FileContentDelegate;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.utils.FileUtils;
+
+/**
+ * Component for ESB package deployment.
+ *
+ * @author Tom Cunningham
+ * @param <T>
+ */
+public class DeploymentComponent extends MBeanResourceComponent<JMXComponent> implements
+ OperationFacet, DeleteResourceFacet, ContentFacet {
+ public static final String JBOSS_WEB_NAME = "jbossWebName";
+ private EmsBean jbossWebMBean;
+ private File configPath;
+
+ private ResourceContext resourceContext;
+ private ContentContext contentContext;
+ private OperationContext operationContext;
+ private EventContext eventContext;
+
+ // The following constants reference the exact name of the package types as defined in the plugin descriptor
+ private static final String PACKAGE_TYPE_PATCH = "cumulativePatch";
+ private static final String PACKAGE_TYPE_LIBRARY = "library";
+
+
+ private static final String RESOURCE_TYPE_ESB = "JBoss ESB Deployments";
+
+ public File getConfigurationPath() {
+ return this.configPath;
+ }
+
+ public CreateResourceReport createResource(CreateResourceReport report) {
+ String resourceTypeName = report.getResourceType().getName();
+
+ if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+ esbCreate(report, resourceTypeName);
+ } else {
+ throw new UnsupportedOperationException("Unknown Resource type: " + resourceTypeName);
+ }
+
+ return report;
+ }
+
+ private void esbCreate(CreateResourceReport report, String resourceTypeName) {
+ ResourcePackageDetails details = report.getPackageDetails();
+ PackageDetailsKey key = details.getKey();
+ String archiveName = key.getName();
+
+ try {
+ // First check to see if the file name has the correct extension. Reject if the user attempts to
+ // deploy a WAR file with a bad extension.
+ String expectedExtension;
+ if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+ expectedExtension = "esb";
+ } else {
+ expectedExtension = "";
+ }
+
+ int lastPeriod = archiveName.lastIndexOf(".");
+ String extension = archiveName.substring(lastPeriod + 1);
+ if (lastPeriod == -1 || !expectedExtension.equals(extension)) {
+ report.setStatus(CreateResourceStatus.FAILURE);
+ report.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]. Expected ["
+ + expectedExtension + "]");
+ return;
+ }
+
+ Configuration deployTimeConfiguration = details.getDeploymentTimeConfiguration();
+ String deployDirectory = deployTimeConfiguration.getSimple("deployDirectory").getStringValue();
+
+ // Verify the user did not enter a path that represents a security issue:
+ // - No absolute directories; must be relative to the configuration path
+ // - Cannot contain parent directory references
+ File testPath = new File(deployDirectory);
+
+ if (testPath.isAbsolute()) {
+ throw new RuntimeException("Path to deploy (deployDirectory) must be a relative path. Path specified: "
+ + deployDirectory);
+ }
+
+ if (deployDirectory.contains("..")) {
+ throw new RuntimeException(
+ "Path to deploy (deployDirectory) may not reference the parent directory. Path specified: "
+ + deployDirectory);
+ }
+
+ // Perform the deployment
+ FileContentDelegate deployer = new FileContentDelegate(new File(getConfigurationPath() + File.separator
+ + deployDirectory), "", details.getPackageTypeName());
+
+ PropertySimple zipProperty = deployTimeConfiguration.getSimple("deployZipped");
+
+ if (zipProperty != null && zipProperty.getBooleanValue() != null) {
+ boolean zip = zipProperty.getBooleanValue();
+
+ File tempDir = resourceContext.getTemporaryDirectory();
+ File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
+ OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
+
+ ContentServices contentServices = contentContext.getContentServices();
+ contentServices
+ .downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);
+
+ osForTempDir.close();
+
+ // check for content
+ boolean valid = isOfType(tempFile, resourceTypeName);
+ if (!valid) {
+ report.setStatus(CreateResourceStatus.FAILURE);
+ report.setErrorMessage("Expected a " + resourceTypeName
+ + " file, but its format/content did not match");
+ return;
+ }
+
+ InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
+ deployer.createContent(details, isForTempDir, !zip);
+
+ // Resource key should match the following:
+ // EAR: jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=rhq.ear
+ // WAR: jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=WebModule,name=embedded-console.war
+
+ String resourceKey;
+ if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+ resourceKey = "jboss.esb:deployment="
+ + archiveName;
+ }
+
+ report.setResourceName(archiveName);
+ //report.setResourceKey(resourceKey);
+ report.setStatus(CreateResourceStatus.SUCCESS);
+ sleepAfterConfigXmlUpdate();
+ } else {
+ report.setStatus(CreateResourceStatus.FAILURE);
+ report.setErrorMessage("Zipped property is required");
+ }
+ } catch (Throwable t) {
+ log.error("Error deploying application for report: " + report, t);
+ report.setException(t);
+ report.setStatus(CreateResourceStatus.FAILURE);
+ }
+ }
+
+ /**
+ * Check to see if the passed file is actually in jar format and contains a
+ * <ul>
+ * <li>WEB-INF/web.xml for .war </li>
+ * <li>META-INF/application.xml for .ear</li>
+ * <li>META-INF/jboss.service.xml for .sar</li>
+ * </ul>
+ * @param file File to check
+ * @param type Type to match - see RESOURCE_TYPE_SAR, RESOURCE_TYPE_WAR and RESOURCE_TYPE_EAR
+ * @return true is the file is in jar format and matches the type
+ */
+ private boolean isOfType(File file, String type) {
+ JarFile jfile = null;
+ try {
+ jfile = new JarFile(file);
+ JarEntry entry;
+ if (RESOURCE_TYPE_ESB.equals(type))
+ entry = jfile.getJarEntry("META-INF/jboss-esb.xml");
+ else {
+ entry = null; // unknown type
+ log.warn("isOfType: " + type + " is unknown - not a valid file");
+ }
+
+ if (entry != null)
+ return true;
+
+ return false;
+ } catch (Exception e) {
+ log.info(e.getMessage());
+ return false;
+ } finally {
+ if (jfile != null)
+ try {
+ jfile.close();
+ } catch (IOException e) {
+ log.info("Exception when trying to close the war file: " + e.getMessage());
+ }
+ }
+ }
+
+ private void sleepAfterConfigXmlUpdate() {
+ // JBNADM-1984 - The contract with this method is that the newly created managed resource should be discoverable.
+ // Wait here so JBoss can recognize that the new managed resource has been created.
+ try {
+ Thread.sleep(5000L);
+ } catch (InterruptedException e) {
+ log.info("Sleep after Resource create interrupted", e);
+ }
+ }
+
+ @Override
+ public AvailabilityType getAvailability() {
+ // JBossASTomcatServerComponent parentTomcatComponent = (JBossASTomcatServerComponent) super.resourceContext
+ // .getParentResourceComponent();
+ // EmsConnection connection = parentTomcatComponent.getEmsConnection();
+ boolean isreg = bean.isRegistered();
+ return isreg ? AvailabilityType.UP : AvailabilityType.DOWN;
+ }
+
+ public void deleteResource() throws Exception {
+ Configuration pluginConfiguration = super.resourceContext.getPluginConfiguration();
+ String fullFileName = pluginConfiguration.getSimple("filename").getStringValue();
+
+ File file = new File(fullFileName);
+
+ if (!file.exists()) {
+ throw new Exception("Cannot find application file to delete: " + fullFileName);
+ }
+
+ if (file.isDirectory()) {
+ FileUtils.deleteDirectoryContents(file.listFiles());
+ }
+
+ boolean result = file.delete();
+
+ if (!result) {
+ throw new Exception("File delete call returned unsuccessful with no further detail");
+ }
+ }
+
+ public DeployPackagesResponse deployPackages(
+ Set<ResourcePackageDetails> packages,
+ ContentServices contentServices) {
+ ContentResponseResult overallResult = ContentResponseResult.SUCCESS;
+ List<DeployIndividualPackageResponse> individualResponses = new ArrayList<DeployIndividualPackageResponse>(
+ packages.size());
+
+ for (ResourcePackageDetails pkg : packages) {
+ log.info("Attempting to deploy package: " + pkg);
+
+ String packageTypeName = pkg.getPackageTypeName();
+ if (packageTypeName.equals(PACKAGE_TYPE_LIBRARY)) {
+ throw new UnsupportedOperationException("Deployment of new libraries is not supported by the plugin.");
+ }
+ }
+
+ DeployPackagesResponse response = new DeployPackagesResponse(overallResult);
+ response.getPackageResponses().addAll(individualResponses);
+
+ return response;
+ }
+
+ public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
+ return null;
+ }
+
+ public List<DeployPackageStep> generateInstallationSteps(
+ ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+ public RemovePackagesResponse removePackages(
+ Set<ResourcePackageDetails> packages) {
+ return null;
+ }
+
+ public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,228 @@
+package org.jbosson.plugins.jbossesb;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.ContentResponseResult;
+import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
+import org.rhq.core.domain.content.transfer.DeployPackageStep;
+import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
+import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.pluginapi.content.ContentContext;
+import org.rhq.core.pluginapi.content.ContentFacet;
+import org.rhq.core.pluginapi.content.ContentServices;
+import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.operation.OperationContext;
+import org.rhq.core.pluginapi.util.ResponseTimeLogParser;
+import org.rhq.plugins.jbossas.JBossASServerComponent;
+import org.rhq.plugins.jbossas.util.FileContentDelegate;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+public class ESBComponent extends MBeanResourceComponent implements CreateChildResourceFacet, ContentFacet {
+ private static final String RESOURCE_TYPE_ESB = "JBoss ESB Deployment";
+
+ private String configSet;
+ private ResponseTimeLogParser logParser;
+ private File configPath;
+
+ private ContentContext contentContext;
+ private OperationContext operationContext;
+ public static final String CONTEXT_ROOT_CONFIG_PROP = "contextRoot";
+ // The following constants reference the exact name of the package types as defined in the plugin descriptor
+ private static final String PACKAGE_TYPE_PATCH = "cumulativePatch";
+ private static final String PACKAGE_TYPE_LIBRARY = "library";
+
+ public static final String CONFIGURATION_PATH_CONFIG_PROP = "configurationPath";
+ public static final String SCRIPT_PREFIX_CONFIG_PROP = "scriptPrefix";
+ public static final String CONFIGURATION_SET_CONFIG_PROP = "configurationSet";
+
+ public static final String JBOSS_HOME_DIR_CONFIG_PROP = "jbossHomeDir";
+
+
+ @Override
+ public void start(ResourceContext context) {
+ super.start(context);
+ Configuration pluginConfig = context.getPluginConfiguration();
+
+ this.configPath = getConfigurationPath();
+ if (!this.configPath.exists()) {
+ throw new InvalidPluginConfigurationException("Configuration path '" + configPath + "' does not exist.");
+ }
+ this.configSet = pluginConfig.getSimpleValue(CONFIGURATION_SET_CONFIG_PROP, this.configPath.getName());
+ }
+
+ public File getConfigurationPath() {
+ JBossASServerComponent jass = (JBossASServerComponent) resourceContext.getParentResourceComponent();
+ return jass.getConfigurationPath();
+ }
+
+ @Override
+ public AvailabilityType getAvailability() {
+ AvailabilityType av = super.getAvailability();
+ return av;
+ }
+
+ private void esbCreate(CreateResourceReport report, String resourceTypeName) {
+ ResourcePackageDetails details = report.getPackageDetails();
+ PackageDetailsKey key = details.getKey();
+ String archiveName = key.getName();
+
+ try {
+ // First check to see if the file name has the correct extension. Reject if the user attempts to
+ // deploy a WAR file with a bad extension.
+ String expectedExtension;
+ if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+ expectedExtension = "esb";
+ } else {
+ expectedExtension = "";
+ }
+
+ int lastPeriod = archiveName.lastIndexOf(".");
+ String extension = archiveName.substring(lastPeriod + 1);
+ if (lastPeriod == -1 || !expectedExtension.equals(extension)) {
+ report.setStatus(CreateResourceStatus.FAILURE);
+ report.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]. Expected ["
+ + expectedExtension + "]");
+ return;
+ }
+
+ Configuration deployTimeConfiguration = details.getDeploymentTimeConfiguration();
+ String deployDirectory = deployTimeConfiguration.getSimple("deployDirectory").getStringValue();
+
+ // Verify the user did not enter a path that represents a security issue:
+ // - No absolute directories; must be relative to the configuration path
+ // - Cannot contain parent directory references
+ File testPath = new File(deployDirectory);
+
+ if (testPath.isAbsolute()) {
+ throw new RuntimeException("Path to deploy (deployDirectory) must be a relative path. Path specified: "
+ + deployDirectory);
+ }
+
+ if (deployDirectory.contains("..")) {
+ throw new RuntimeException(
+ "Path to deploy (deployDirectory) may not reference the parent directory. Path specified: "
+ + deployDirectory);
+ }
+
+ // Perform the deployment
+ FileContentDelegate deployer = new FileContentDelegate(new File(getConfigurationPath() + File.separator
+ + deployDirectory), "", details.getPackageTypeName());
+
+ PropertySimple zipProperty = deployTimeConfiguration.getSimple("deployZipped");
+
+ if (zipProperty != null && zipProperty.getBooleanValue() != null) {
+ boolean zip = zipProperty.getBooleanValue();
+
+ File tempDir = resourceContext.getTemporaryDirectory();
+ File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
+ OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
+
+ contentContext = resourceContext.getContentContext();
+ ContentServices contentServices = contentContext.getContentServices();
+ contentServices
+ .downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);
+
+ osForTempDir.close();
+
+ InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
+ deployer.createContent(details, isForTempDir, !zip);
+
+ // Resource key should match the following:
+ // ESB: jboss.esb:deployment=jbossesb.esb
+
+ String resourceKey;
+ resourceKey = "jboss.esb:deployment=" + archiveName;
+
+ report.setResourceName(archiveName);
+ report.setResourceKey(resourceKey);
+ report.setStatus(CreateResourceStatus.SUCCESS);
+ } else {
+ report.setStatus(CreateResourceStatus.FAILURE);
+ report.setErrorMessage("Zipped property is required");
+ }
+ } catch (Throwable t) {
+ log.error("Error deploying application for report: " + report, t);
+ report.setException(t);
+ report.setStatus(CreateResourceStatus.FAILURE);
+ }
+ }
+
+ public CreateResourceReport createResource(CreateResourceReport report) {
+ String resourceTypeName = report.getResourceType().getName();
+
+ if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+ esbCreate(report, resourceTypeName);
+ } else {
+ throw new UnsupportedOperationException("Unknown Resource type: " + resourceTypeName);
+ }
+
+ // JBNADM-1984 - The contract with this method is that the newly created managed resource should be discoverable.
+ // Wait here so JBoss can recognize that the new managed resource has been created.
+ try {
+ Thread.sleep(5000L);
+ } catch (InterruptedException e) {
+ log.info("Sleep after datasource create interrupted", e);
+ }
+
+ return report;
+ }
+
+ public DeployPackagesResponse deployPackages(
+ Set<ResourcePackageDetails> packages,
+ ContentServices contentServices) {
+ ContentResponseResult overallResult = ContentResponseResult.SUCCESS;
+ List<DeployIndividualPackageResponse> individualResponses = new ArrayList<DeployIndividualPackageResponse>(
+ packages.size());
+
+ for (ResourcePackageDetails pkg : packages) {
+ log.info("Attempting to deploy package: " + pkg);
+
+ String packageTypeName = pkg.getPackageTypeName();
+ if (packageTypeName.equals(PACKAGE_TYPE_LIBRARY)) {
+ throw new UnsupportedOperationException("Deployment of new libraries is not supported by the plugin.");
+ }
+ }
+
+ DeployPackagesResponse response = new DeployPackagesResponse(overallResult);
+ response.getPackageResponses().addAll(individualResponses);
+
+ return response;
+ }
+
+ public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
+ return null;
+ }
+
+ public List<DeployPackageStep> generateInstallationSteps(
+ ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+ public RemovePackagesResponse removePackages(
+ Set<ResourcePackageDetails> packages) {
+ throw new UnsupportedOperationException();
+ }
+
+ public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
+ throw new UnsupportedOperationException();
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,37 @@
+package org.jbosson.plugins.jbossesb;
+import java.util.Set;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * This DiscoveryComponent extends the MBeanResouceDiscoveryComponent, but also
+ * adds in the version number from the application server.
+ *
+ * @author Tom Cunningham
+ */
+public class ESBDiscoveryComponent extends MBeanResourceDiscoveryComponent {
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<JMXComponent> context) {
+ Set<DiscoveredResourceDetails> jmxResources = super.discoverResources(context);
+
+ String versionNumber;
+ try {
+ EmsBean bean = context.getParentResourceComponent().getEmsConnection().getBean(SOADiscoveryComponent.SYSTEM_BEAN);
+ EmsAttribute versionAttribute = bean.getAttribute(SOADiscoveryComponent.VERSION_NUMBER);
+ versionNumber = (String) versionAttribute.refresh();
+ } catch (Exception e) {
+ versionNumber = "";
+ }
+
+ for (DiscoveredResourceDetails jmxResource : jmxResources) {
+ jmxResource.setResourceVersion(versionNumber);
+ }
+
+ return jmxResources;
+ }
+}
\ No newline at end of file
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ListenerComponent.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ListenerComponent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ListenerComponent.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ListenerComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,111 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jbosson.plugins.jbossesb;
+
+import java.util.Set;
+
+import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+
+
+/**
+ * The ListenerComponent finds ESB configuration data stored in jboss-esb.xml.
+ *
+ * @author Tom Cunningham
+ */
+public class ListenerComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+ private ResourceContext<MBeanResourceComponent> context;
+
+ private static final String MEP = "mep";
+ private static final String LIFECYCLE_STATE = "LifeCycleState";
+ private static final String MAX_THREADS = "maxThreads";
+ private static final String START_DATE = "StartDate";
+ private static final String SERVICE_CATEGORY = "service-category";
+ private static final String SERVICE_NAME = "service-name";
+ private static final String SERVICE_DESCRIPTION = "service-description";
+
+ @Override
+ public void start(ResourceContext<MBeanResourceComponent> context) {
+ super.start(context);
+ this.context = context;
+ }
+
+ @Override
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
+ Configuration pluginConfig = this.context.getPluginConfiguration();
+ pluginConfig.put(new PropertySimple("type", "service"));
+ for (MeasurementScheduleRequest request : requests) {
+ String metricName = request.getName();
+ if (metricName.equals(MEP)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(MEP);
+ String processed = (String) attribute.refresh();
+ report.addData(new MeasurementDataTrait(request, processed));
+ } else if (metricName.equals(LIFECYCLE_STATE)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(LIFECYCLE_STATE);
+ String processed = new String();
+ if (attribute != null) {
+ processed = (String) attribute.refresh();
+ }
+ report.addData(new MeasurementDataTrait(request, processed));
+ } else if (metricName.equals(MAX_THREADS)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(MAX_THREADS);
+ String processed = new String();
+ if (attribute != null) {
+ processed = (String) attribute.refresh();
+ }
+ report.addData(new MeasurementDataTrait(request, processed));
+ } else if (metricName.equals(START_DATE)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(START_DATE);
+ String processed = new String();
+ if (attribute != null) {
+ processed = (String) attribute.refresh();
+ }
+ report.addData(new MeasurementDataTrait(request, processed));
+ } else if (metricName.equals(SERVICE_CATEGORY)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(SERVICE_CATEGORY);
+ String processed = new String();
+ if (attribute != null) {
+ processed = (String) attribute.refresh();
+ }
+ report.addData(new MeasurementDataTrait(request, processed));
+ } else if (metricName.equals(SERVICE_NAME)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(SERVICE_NAME);
+ String processed = new String();
+ if (attribute != null) {
+ processed = (String) attribute.refresh();
+ }
+ report.addData(new MeasurementDataTrait(request, processed));
+ } else if (metricName.equals(SERVICE_DESCRIPTION)) {
+ EmsAttribute attribute = getEmsBean().getAttribute(SERVICE_DESCRIPTION);
+ String processed = new String();
+ if (attribute != null) {
+ processed = (String) attribute.refresh();
+ }
+ report.addData(new MeasurementDataTrait(request, processed));
+ }
+ }
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/SOADiscoveryComponent.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/SOADiscoveryComponent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/SOADiscoveryComponent.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/SOADiscoveryComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,45 @@
+package org.jbosson.plugins.jbossesb;
+
+import java.util.Hashtable;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * Abstract class which gets version attributes.
+ *
+ * @author Tom Cunningham
+ * @param <T>
+ */
+public abstract class SOADiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+ public static final String SYSTEM_BEAN = "jboss.system:type=Server";
+ public static final String VERSION_NUMBER = "VersionNumber";
+ public static final String BUILD_DATE = "BuildDate";
+ public static final String BUILD_ID = "BuildID";
+
+ public Hashtable getVersionAttribute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Hashtable ht = new Hashtable();
+
+ try {
+ EmsBean bean = context.getParentResourceComponent().getEmsConnection().getBean(SYSTEM_BEAN);
+ EmsAttribute versionAttribute = bean.getAttribute(VERSION_NUMBER);
+ String version = (String) versionAttribute.refresh();
+
+ EmsAttribute buildDateAttribute = bean.getAttribute(BUILD_DATE);
+ String buildDate = (String) buildDateAttribute.refresh();
+
+ EmsAttribute buildIDAttribute = bean.getAttribute(BUILD_ID);
+ String buildID = (String) buildIDAttribute.refresh();
+
+ ht.put(VERSION_NUMBER, version);
+ ht.put(BUILD_DATE, buildDate);
+ ht.put(BUILD_ID, buildID);
+ } catch (Exception e) {
+ // Do nothing in the case that we cannot recover these attributes
+ }
+ return ht;
+ }
+}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -21,7 +21,6 @@
import java.util.Set;
import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
-import org.mc4j.ems.connection.bean.operation.EmsOperation;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
@@ -30,11 +29,12 @@
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.mc4j.ems.connection.bean.EmsBean;
/**
- * @author Greg Hinkle
+ * The ServiceComponent finds ESB service data (messages, bytes, time).
+ *
+ * @author Tom Cunningham
*/
public class ServiceComponent extends MBeanResourceComponent<MBeanResourceComponent> {
private ResourceContext<MBeanResourceComponent> context;
@@ -48,32 +48,46 @@
private static final String OVERALL_BYTES_PROCESSED = "overall bytes processed";
private static final String OVERALL_BYTES_FAILED = "overall bytes failed";
+ private static final String OVERALL_MINUTE_METRIC_NAME = "overallMessageCountByMinute";
+
@Override
public void start(ResourceContext<MBeanResourceComponent> context) {
super.start(context);
this.context = context;
}
-
@Override
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
Configuration pluginConfig = this.context.getPluginConfiguration();
- pluginConfig.put(new PropertySimple("type", "service"));
+ pluginConfig.put(new PropertySimple("type", "service"));
+ Integer overallMessages = null;
for (MeasurementScheduleRequest request : requests) {
String metricName = request.getName();
if (metricName.equals(OVERALL_MESSAGE_METRIC)) {
EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_MESSAGE_COUNT);
- Integer processed = (Integer) attribute.refresh();
- report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
+ overallMessages = (Integer) attribute.refresh();
+ report.addData(new MeasurementDataNumeric(request, new Double(overallMessages.doubleValue())));
} else if (metricName.equals(OVERALL_BYTES_PROCESSED_METRIC)) {
EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_PROCESSED);
- Integer processed = (Integer) attribute.refresh();
+ Integer processed = new Integer(0);
+ if (attribute != null) {
+ processed = (Integer) attribute.refresh();
+ }
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
} else if (metricName.equals(OVERALL_BYTES_FAILED_METRIC)) {
EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_FAILED);
- Integer processed = (Integer) attribute.refresh();
+ Integer processed = new Integer(0);
+ if (attribute != null) {
+ processed = (Integer) attribute.refresh();
+ }
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
}
}
+ for (MeasurementScheduleRequest request : requests) {
+ String metricName = request.getName();
+ if (metricName.equals(OVERALL_MINUTE_METRIC_NAME)) {
+ report.addData(new MeasurementDataNumeric(request, new Double(overallMessages.doubleValue())));
+ }
+ }
}
}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceDiscoveryComponent.java (from rev 23057, labs/jbossesb/tags/JBESB_4_4_GA_CP1_IR5/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceDiscoveryComponent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceDiscoveryComponent.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceDiscoveryComponent.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -0,0 +1,72 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jbosson.plugins.jbossesb;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * Discovers ESB Service entities from a ESB stats mbean
+ *
+ * @author Greg Hinkle
+ * @param <T>
+ */
+public class ServiceDiscoveryComponent<T extends JMXComponent> extends SOADiscoveryComponent {
+
+ private static Log log = LogFactory.getLog(ServiceDiscoveryComponent.class);
+
+ protected ResourceContext<T> resourceContext;
+
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+
+ EmsBean serviceBean = context.getParentResourceComponent().getEmsBean();
+ Set<EmsAttribute> attributeSet = serviceBean.getAttributes();
+ for (Iterator i = attributeSet.iterator(); i.hasNext();) {
+ EmsAttribute attr = (EmsAttribute) i.next();
+ System.out.println(attr.getName());
+ //entities.add(detail);
+ }
+
+ /*
+ String serviceName = serviceBean.getBeanName().getKeyProperty(SERVICE_NAME);
+
+ // Do two passes - one to grab the entity names (ex. "data fileraction"
+ // and then a second to build up the metrics for the entity
+ Set<EmsAttribute> attributeSet = actionBean.getAttributes();
+ for (Iterator i = attributeSet.iterator(); i.hasNext();) {
+ EmsAttribute attr = (EmsAttribute) i.next();
+ entities.add(detail);
+ }
+ */
+ return entities;
+ }
+}
\ No newline at end of file
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<plugin name="JBossESB"
- displayName="JBoss ESB Services"
+ displayName="JBossESB"
package="org.jbosson.plugins.jbossesb"
description="Provides monitoring of JBoss ESB"
version="2.0"
@@ -13,77 +13,173 @@
<depends plugin="Tomcat" />
<depends plugin="JBossAS" useClasses="true"/>
- <service name="JBossESB .esb Package"
- discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
- class="org.rhq.plugins.jmx.MBeanResourceComponent"
- description="Statistics for JBoss ESB">
-
+ <service name="ESB"
+ discovery="org.jbosson.plugins.jbossesb.ESBDiscoveryComponent"
+ class="org.jbosson.plugins.jbossesb.ESBComponent"
+ description="Overall statistics for JBoss ESB"
+ singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
</runs-inside>
<plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.esb:service=MessageCounter"/>
+ <c:simple-property name="nameTemplate" default="JBoss ESB Statistics"/>
+ <c:simple-property name="descriptionTemplate" default="JBoss ESB statistics."/>
+ <c:group name="connection" displayName="Connection Info">
+ <c:simple-property name="namingURL" displayName="Naming Provider URL"
+ description="The JNP URL with which to connect to the JBoss Application Server instance (e.g. jnp://127.0.0.1:1099)."
+ default="jnp://127.0.0.1:1099"/>
+ <c:simple-property name="principal" required="false" description="The name of the principal (i.e. user) to authenticate."/>
+ <c:simple-property name="credentials" type="password" required="false"
+ description="The credentials (i.e. password) that should be used to authenticate the principal."/>
+ <c:simple-property name="jbossHomeDir" displayName="JBoss Home Directory" type="directory" readOnly="true"
+ description="The absolute path to the directory where JBossAS is installed (e.g. /opt/jboss-4.2.2.GA)."/>
+ <c:simple-property name="configurationPath" displayName="Configuration Path" type="directory" readOnly="true"
+ description="The path to the configuration directory under which this instance
+ operates (e.g. /opt/jboss-4.2.2.GA/server/default); if the path is not absolute,
+ then it will be resolved relative to {jbossHomeDir}."/>
+ <c:simple-property name="configurationSet" displayName="Configuration Set" required="false"
+ description="The name of the server configuration (e.g. minimal, default, or all);
+ if not specified, it will default to the last path component of {configurationPath}."
+ default="default"/>
+ </c:group>
+ </plugin-configuration>
+ <operation name="start" displayName="Start deployment" description="Start the JBoss ESB deployment"/>
+ <operation name="stop" displayName="Stop deployment" description="Stop the JBoss ESB deployment"/>
+ <operation name="create" displayName="Move .esb deployment into the create state" description="Move the .esb deployment into the create state"/>
+ <operation name="destroy" displayName="Move .esb deployment into the destroy state" description="Move the .esb deployment into the destroy state"/>
+ <operation name="resetCounts" displayName="Reset Counts" description="Reset the overall counter"/>
+ <metric displayName="Successful Message Count" property="SuccessfulMessageCount" category="utilization" displayType="summary" measurementType="dynamic" description="Overall Successful Message Count"/>
+ <metric displayName="Total Message Count" property="TotalMessageCount" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Total Message Count"/>
+ <metric displayName="Failed Message Count" property="FailedMessageCount" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Failed Message Count"/>
+ <metric property="LastSuccessfulMessageDate" displayName="Last Successful Message Date" dataType="trait" displayType="summary" defaultOn="true" description="Last Successful Message Date"/>
+ <metric property="LastFailedMessageDate" displayName="Last Failed Message Date" dataType="trait" displayType="summary" defaultOn="true" description="Last Failed Message Date"/>
+ <metric property="StateString" dataType="trait" displayName="State" displayType="summary" defaultOn="true" description="State of the ESB"/>
+ <metric displayName="Bytes Processed" property="ProcessedBytes" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Overall Bytes Processed"/>
+ <content name="library" displayName="Jar Library" category="deployable"
+ description="Library Jar files deployed in JBoss AS">
+ <configuration>
+ <c:simple-property name="version" readOnly="true" description="The version declared by the JAR's manifest."/>
+ <c:simple-property name="title" readOnly="true" description="The title declared by the JAR's manifest."/>
+ <c:simple-property name="url" readOnly="true" description="The url declared by the JAR's manifest."/>
+ <c:simple-property name="vendor" readOnly="true" description="The vendor declared by the JAR's manifest."/>
+ <c:simple-property name="classpath" readOnly="true"
+ description="The classpath declared by the JAR's manifest."/>
+ <c:simple-property name="sealed" readOnly="true" type="boolean" description="True if the JAR is sealed."/>
+ </configuration>
+ </content>
+ <service name="JBoss ESB Deployment"
+ discovery="org.jbosson.plugins.jbossesb.ESBDiscoveryComponent"
+ class="org.jbosson.plugins.jbossesb.DeploymentComponent"
+ description="Statistics for JBoss ESB Deployments"
+ creationDataType="content"
+ createDeletePolicy="both">
+
+ <plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.esb:deployment=%deployment%"/>
- <c:simple-property name="nameTemplate" default="{deployment} JBoss ESB statistics"/>
+ <c:simple-property name="nameTemplate" default="{deployment} JBoss ESB Statistics"/>
<c:simple-property name="descriptionTemplate" default="JBoss ESB statistics for the {deployment} deployment."/>
<c:simple-property name="deployment" type="string" description="the JBoss ESB deployment name"/>
+ <c:group name="advanced" displayName="Advanced" hiddenByDefault="true">
+ <c:simple-property name="extension" default="esb" readOnly="true"/>
+ <c:simple-property name="descriptionTemplate" default="ESB package" readOnly="true"/>
+ </c:group>
</plugin-configuration>
-
-
<operation name="start" displayName="Start deployment" description="Start the JBoss ESB deployment"/>
<operation name="stop" displayName="Stop deployment" description="Stop the JBoss ESB deployment"/>
<operation name="create" displayName="Move .esb deployment into the create state" description="Move the .esb deployment into the create state"/>
<operation name="destroy" displayName="Move .esb deployment into the destroy state" description="Move the .esb deployment into the destroy state"/>
-
<metric property="Name" displayName="Deployment Type" dataType="trait" displayType="summary" defaultOn="true" description="Type of deployment"/>
- <!-- EsbXmlAsHtml is too large to fit in a measurement.
- <metric property="JbossEsbXmlAsHtml" displayName="ESB XML" dataType="trait" displayType="summary" defaultOn="true" description="The jboss-esb.xml of {deployment}"/-->
<metric property="StateString" displayName=".esb State String" dataType="trait" displayType="summary" defaultOn="true" description="Current state of the ESB"/>
-
- <help>
+ <metric property="State" displayName=".esb State" dataType="trait" displayType="summary" defaultOn="true" description="Numeric value of the state of the ESB deployment"/>
+ <!--help>
<![CDATA[
- JBoss ESB esb
+ JBoss ESB deployments are .esb packages deployed within a server.
]]>
- </help>
+ </help-->
+ <content name="file" displayName="ESB Package" category="deployable" isCreationType="true">
+ <configuration>
+ <c:group name="deployment" displayName="Deployment Options">
+ <c:simple-property name="deployZipped" displayName="Deploy Zipped" type="boolean" default="false" required="true"
+ description="Indicates if the ESB is deployed either zipped or exploded."/>
+ <c:simple-property name="deployDirectory" displayName="Deploy Directory" type="string" default="deploy" required="true"
+ description="Path to deploy the file. This must be a path relative to the AS configuration set in use."/>
+ </c:group>
+ </configuration>
+ </content>
<service name="JBoss ESB Services"
- discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ discovery="org.jbosson.plugins.jbossesb.ServiceDiscoveryComponent"
class="ServiceComponent"
description="JBoss ESB Services">
- <runs-inside>
- <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
- </runs-inside>
<plugin-configuration>
- <c:simple-property name="objectName" readOnly="true" default="jboss.esb:category=MessageCounter,deployment={deployment},service-name=%serviceName%"/>
- <c:simple-property name="nameTemplate" default="{serviceName} JBoss ESB statistics"/>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.esb:category=MessageCounter,deployment={deployment},service-category=%serviceCategory%,service-name=%serviceName%"/>
+ <c:simple-property name="nameTemplate" default="{serviceName} Service"/>
<c:simple-property name="DescriptionTemplate" default="JBoss ESB statistics for the {serviceName} service."/>
<c:simple-property name="serviceName" type="string" description="the JBoss ESB service name"/>
+ <c:simple-property name="serviceCategory" type="string" description="The JBoss ESB service category"/>
</plugin-configuration>
- <operation name="reset" displayName="Reset the message counter" description="Reset the message counter"/>
- <metric displayName="Overall Service Message Count" property="overallMessageCount" category="throughput" displayType="summary" measurementType="trendsup" description="Overall Service Message Count"/>
- <metric displayName="Overall Service Bytes Processed" property="overallBytesProcessed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup" description="Overall Service Bytes Processed"/>
- <metric displayName="Overall Service Bytes Failed" property="overallBytesFailed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup" description="Overall Service Bytes Failed"/>
+ <operation name="resetCounter" displayName="Reset the message counter" description="Reset the message counter"/>
+ <metric displayName="Overall Service Message Count" property="overallMessageCount" category="utilization" displayType="summary" measurementType="dynamic" description="Overall Service Message Count"/>
+ <metric displayName="Overall Service Bytes Processed" property="overallBytesProcessed" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Overall Service Bytes Processed"/>
+ <metric displayName="Overall Service Bytes Failed" property="overallBytesFailed" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Overall Service Bytes Failed"/>
<help>
<![CDATA[
- JBoss ESB Service
+ JBoss ESB Services are the services available within a deployment.
]]>
</help>
- <service name="JBoss ESB Actions"
+ <service name="JBoss ESB Listeners"
+ discovery="org.jbosson.plugins.jbossesb.ESBDiscoveryComponent"
+ class="ListenerComponent"
+ description="JBoss ESB Listeners">
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.esb:listener-name=listener,service-category=%service-category%,service-name={serviceName}"/>
+ <c:simple-property name="nameTemplate" default="{service-category} Listener Configuration"/>
+ <c:simple-property name="descriptionTemplate" default="JBoss Listener statistics"/>
+ <c:simple-property name="serviceCategory" type="string" description="the service category of the listener"/>
+ </plugin-configuration>
+ <operation name="initialise" displayName="Initialize listener" description="Initialize the listener."/>
+ <operation name="start" displayName="Start listener" description="Start the listener."/>
+ <operation name="stop" displayName="Stop listener" description="Stop the listener."/>
+ <operation name="destroy" displayName="Destroy listener" description="Destroy the listener."/>
+
+ <metric property="mep" displayName="MEP" dataType="trait" displayType="summary" defaultOn="true" description="Type of deployment"/>
+ <metric property="LifeCycleState" displayName="Lifecycle State" dataType="trait" displayType="summary" defaultOn="true" description="Lifecycle State"/>
+ <metric property="maxThreads" displayName="Maximum Number of Threads" dataType="trait" displayType="summary" defaultOn="true" description="Maximum number of threads"/>
+ <metric property="StartDate" displayName="Start Date" dataType="trait" displayType="summary" defaultOn="true" description="Start Date"/>
+ <metric property="service-category" displayName="Service Category" dataType="trait" displayType="summary" defaultOn="true" description="Service Category"/>
+ <metric property="service-description" displayName="Service Description" dataType="trait" displayType="summary" defaultOn="true" description="Service Description"/>
+ <metric property="service-name" displayName="Service Name" dataType="trait" displayType="summary" defaultOn="true" description="Service Name"/>
+ <help>
+ <![CDATA[
+ JBoss ESB Listener configuration shows the config of the listener.
+ ]]>
+ </help>
+ </service>
+
+ <service name="Actions"
discovery="ActionDiscoveryComponent"
class="ActionComponent"
description="JBoss ESB Actions">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.esb:category=MessageCounter,deployment={deployment},service-name=%service-name%"/>
- <c:simple-property name="nameTemplate" default="{actionName} JBoss ESB Action statistics"/>
+ <c:simple-property name="nameTemplate" default="{actionName} JBoss ESB Action statistics"/>
<c:simple-property name="descriptionTemplate" default="JBoss ESB statistics for the {actionName} action."/>
- <c:simple-property name="actionName" type="string" description="the JBoss ESB action name"/>
- </plugin-configuration>
- <metric displayName="Bytes Processed" property="overallBytesProcessed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
- <metric displayName="Bytes Failed" property="overallBytesFailed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
- <metric displayName="Messages Successfully Processed" property="successProcessedCount" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
- <metric displayName="Messages Failed" property="failedProcessedCount" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
- <metric displayName="Processing Time" property="processingTime" displayType="summary" defaultOn="true" category="performance"/>
+ <c:simple-property name="actionName" type="string" description="the JBoss ESB action name"/>
+ </plugin-configuration>
+ <metric displayName="Messages Successfully Processed" property="successProcessedCount" category="throughput" defaultOn="true"/>
+ <metric displayName="Messages Failed" property="failedProcessedCount" category="performance" defaultOn="true"/>
+ <metric displayName="Processing Time" property="processingTime" units="milliseconds" defaultOn="true" category="performance"/>
+ <metric displayName="Bytes Processed" property="overallBytesProcessed" units="bytes" category="performance" defaultOn="true"/>
+ <metric displayName="Bytes Failed" property="overallBytesFailed" units="bytes" category="performance" defaultOn="true"/>
+ <help>
+ <![CDATA[
+ JBoss ESB Actions are the actions executed within a service.
+ ]]>
+ </help>
</service>
</service>
</service>
+ </service>
</plugin>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/base-cp.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/base-cp.xml 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/base-cp.xml 2008-09-24 22:31:56 UTC (rev 23058)
@@ -54,6 +54,7 @@
<pathelement location="${org.jboss.esb.server.home}/lib/commons-codec.jar" />
<pathelement location="${org.jboss.esb.server.home}/lib/jboss-system.jar" />
<pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar" />
+ <pathelement location="${org.jboss.esb.server.home}/lib/commons-httpclient.jar" />
<pathelement location="${org.jboss.esb.server.server}/lib/log4j.jar" />
<fileset dir="${product.dir}/../testlib">
<include name="emma*.jar" />
@@ -62,4 +63,4 @@
<pathelement location="${org.jboss.esb.server.home}/client/jbossall-client.jar" />
<pathelement location="${pwd}" />
</path>
-</project>
\ No newline at end of file
+</project>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebServiceProducerTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebServiceProducerTest.java 2008-09-24 22:03:23 UTC (rev 23057)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebServiceProducerTest.java 2008-09-24 22:31:56 UTC (rev 23058)
@@ -6,7 +6,6 @@
import org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage;
import org.jboss.soa.esb.testutils.FileUtil;
-import org.jgroups.protocols.JMS;
/**
* CI test for the webservice_producer quickstart.
More information about the jboss-svn-commits
mailing list