[jboss-svn-commits] JBL Code SVN: r20915 - in labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product: docs and 88 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Jul 5 05:19:15 EDT 2008
Author: kevin.conner at jboss.com
Date: 2008-07-05 05:19:14 -0400 (Sat, 05 Jul 2008)
New Revision: 20915
Added:
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/images/gear1.gif
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/lib/swing-layout-1.0.jar
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.form
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/messaging-db-users-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_1713_SoapUIClientServiceMBeanUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_01.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_02.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/handdator.wsdl
Removed:
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/docs/FAQ.txt
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/hsqldb/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/lib/ext/jbpm-ant.jar
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/soap/OGNLUtils.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/aggregation_service/jbossesb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/blue_service/jbossesb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/green_service/jbossesb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/inbound_splitter/jbossesb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/red_service/jbossesb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration1/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/readme.txt
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/Priority_Rules.drl
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/processDefinition/processdefinition.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/processDefinition/processimage.jpg
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_rules_service/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_service/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/base-build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/quickstarts.properties-example
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/custom_action/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/deadletter/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/exceptions_faults/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/fun_cbr/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/groovy_gateway/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/quickstart-ds.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbossesb-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/quickstart-ds.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/readme.txt
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_topic/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/readme.txt
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/load_generator/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagefilter/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagestore/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/native_client/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/scripting_groovy/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_CSV2XML/SampleOrder.csv
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_bpel/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer2/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_mtom/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_producer/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wsaddressing/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/wiretap/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/base-project-build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/META-INF/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/META-INF/deployment.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/contract-web/src/main/webapp/contract.jsp
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/create_database.sql
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/management-ds.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/web.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/resources/oracle/monitoring-mappings.hbm.xml
Log:
Merge of CP3_3 into FP: JBESB-1854
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -34,7 +34,7 @@
<property name="org.jboss.esb.internal.jar.dest" location="build/jbossesb/lib"/>
<!-- JBoss ESB version -->
- <property name="version" value="4.2.1GA"/>
+ <property name="version" value="4.2.1CP3"/>
<property name="esb.server.name" value="jbossesb-server-${version}"/>
<property name="esbserver.dist.dir" value="${org.jboss.esb.internal.dest}/${esb.server.name}"/>
@@ -290,7 +290,6 @@
<mkdir dir="${org.jboss.esb.installationdirectory}/docs"/>
<copy file="docs/README_FIRST.txt" todir="${org.jboss.esb.installationdirectory}/docs"/>
- <copy file="docs/FAQ.txt" todir="${org.jboss.esb.installationdirectory}/docs"/>
<copy todir="${org.jboss.esb.installationdirectory}/docs">
<fileset dir="docs">
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/docs/FAQ.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/docs/FAQ.txt 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/docs/FAQ.txt 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,24 +0,0 @@
-Frequently Asked Questions (FAQs)
-
-Question 1: I was used to using the old configuration model. How do I transition to using the new XSD based model?
-
-Answer: See Transitioning From The Old Configuration Model.
-
-Question 2: Can I put whatever markup I like, wherever I like, in the new XSD based configuration?
-
-Answer: No! The new XSD based configuration only supports free-form markup on <property> elements/types and even there, the XSD to ConfigTree mapping that's currently in place, only supports mapping from <property> elements contained within an <action> i.e. the free form <property> child content is not mapped from <bus> or <listener> elements.
-See Transitioning From The Old Configuration Model.
-
-Question 3: Why does the XSD based configuration specify <listeners> and <actions>, as well as an optional “service-class” attribute on the <service> type?
-
-Answer: Sorry, but the answer to this question is quite convoluted. The reason the “service-class” attribute is on the <service> element is down to 2 factors:
-1.A known issue in the ESB (http://jira.jboss.com/jira/browse/JBESB-280).
-2.The need to be able to override the default listener class for a Gateway or Message Aware Listener.
-
-In hindsight however, adding this attribute here may not have been the best workaround. Hopefully the “service-class” attribute is only a short term feature of the XSD configuration.
-
-Question 4: Why does the XSD based configuration specify “target-service-name” and “target-service-category” attributes on the <service> type?
-
-Answer: As a workaround to a known issue in the ESB (http://jira.jboss.com/jira/browse/JBESB-280).
-
-
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -28,12 +28,12 @@
import java.util.Properties;
import javax.jms.DeliveryMode;
+import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Session;
-import javax.jms.Topic;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.xml.parsers.ParserConfigurationException;
@@ -98,26 +98,28 @@
public void cleanup() {
synchronized(this) {
- if (_messageProducer != null) {
- try {
- _messageProducer.close();
- } catch (Exception e) {
- _logger.debug(e.getMessage(), e);
- } finally {
- _messageProducer = null;
- closeSession();
+ try {
+ if (_messageProducer != null) {
+ try {
+ _messageProducer.close();
+ } catch (Exception e) {
+ _logger.debug(e.getMessage(), e);
+ } finally {
+ _messageProducer = null;
+ }
}
- }
- if (_messageConsumer != null) {
- try {
- _messageConsumer.close();
- } catch (JMSException e) {
- _logger.debug(e.getMessage(), e);
- } finally {
- _messageConsumer = null;
- closeSession();
+ if (_messageConsumer != null) {
+ try {
+ _messageConsumer.close();
+ } catch (JMSException e) {
+ _logger.debug(e.getMessage(), e);
+ } finally {
+ _messageConsumer = null;
+ }
}
+ } finally {
+ closeSession() ;
}
}
} // ________________________________
@@ -269,7 +271,7 @@
synchronized(this) {
try {
- if (jmsSession.getTransacted()) {
+ if ((jmsSession != null) && jmsSession.getTransacted()) {
jmsSession.rollback() ;
return false ;
} else {
@@ -311,48 +313,46 @@
} // ________________________________
private void createMessageProducer() throws CourierException, NamingContextException {
- Context oJndiCtx = null;
-
synchronized(this) {
if (_messageProducer == null) {
try {
- oJndiCtx = NamingContextPool.getNamingContext(_epr.getJndiEnvironment());
-
- String sType = _epr.getDestinationType();
- if (JMSEpr.QUEUE_TYPE.equals(sType)) {
- Session qSess = getJmsSession(_epr.getAcknowledgeMode());
- javax.jms.Queue queue = null;
- try {
- queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
- .getDestinationName());
- } catch (NamingException ne) {
+ final Session session = getJmsSession(_epr.getAcknowledgeMode());
+ Destination destination = null ;
+ final String destinationName = _epr.getDestinationName() ;
+ Context oJndiCtx = NamingContextPool.getNamingContext(_epr.getJndiEnvironment());
+ try {
+ String sType = _epr.getDestinationType();
+ if (JMSEpr.QUEUE_TYPE.equals(sType)) {
try {
- oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, _epr.getJndiEnvironment());
- queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
- .getDestinationName());
- } catch (NamingException nex) {
- //ActiveMQ
- queue = qSess.createQueue(_epr.getDestinationName());
+ destination = (Destination) oJndiCtx.lookup(destinationName);
+ } catch (NamingException ne) {
+ try {
+ oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, _epr.getJndiEnvironment());
+ destination = (Destination) oJndiCtx.lookup(destinationName);
+ } catch (NamingException nex) {
+ //ActiveMQ
+ destination = session.createQueue(destinationName);
+ }
}
+ } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
+ try {
+ destination = (Destination) oJndiCtx.lookup(destinationName);
+ }
+ catch (NamingException ne) {
+ destination = session.createTopic(destinationName);
+ }
+ } else {
+ throw new CourierException("Unknown destination type");
}
- _messageProducer = qSess.createProducer(queue);
- } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
- Session tSess = getJmsSession(_epr.getAcknowledgeMode());
- Topic topic = null;
- try {
- topic = (Topic) oJndiCtx.lookup(_epr
- .getDestinationName());
+ _messageProducer = session.createProducer(destination);
+ _messageProducer.setDeliveryMode(_epr.getPersistent()?DeliveryMode.PERSISTENT:DeliveryMode.NON_PERSISTENT);
+ if ( _logger.isDebugEnabled() )
+ _logger.debug("JMSCourier deliveryMode: " + _messageProducer.getDeliveryMode() + ", peristent:" + _epr.getPersistent());
+ } finally {
+ if (oJndiCtx != null) {
+ NamingContextPool.releaseNamingContext(oJndiCtx) ;
}
- catch (NamingException ne) {
- topic = tSess.createTopic(_epr.getDestinationName());
- }
- _messageProducer = tSess.createProducer(topic);
- } else {
- throw new CourierException("Unknown destination type");
}
- _messageProducer.setDeliveryMode(_epr.getPersistent()?DeliveryMode.PERSISTENT:DeliveryMode.NON_PERSISTENT);
- if ( _logger.isDebugEnabled() )
- _logger.debug("JMSCourier deliveryMode: " + _messageProducer.getDeliveryMode() + ", peristent:" + _epr.getPersistent());
}
catch (JMSException ex) {
_logger.debug("Error from JMS system.", ex);
@@ -361,10 +361,6 @@
}
catch (URISyntaxException ex) {
throw new CourierException(ex);
- } finally {
- if (oJndiCtx != null) {
- NamingContextPool.releaseNamingContext(oJndiCtx) ;
- }
}
}
}
@@ -491,42 +487,39 @@
boolean success = false;
try {
Properties environment = _epr.getJndiEnvironment();
+ final Session session = getJmsSession(_epr.getAcknowledgeMode());
+ Destination destination = null ;
+ final String destinationName = _epr.getDestinationName() ;
oJndiCtx = NamingContextPool.getNamingContext(environment);
try
{
String sType = _epr.getDestinationType();
if (JMSEpr.QUEUE_TYPE.equals(sType)) {
- Session qSess = getJmsSession(_epr.getAcknowledgeMode());
- javax.jms.Queue queue = null;
try {
- queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
- .getDestinationName());
+ destination = (Destination) oJndiCtx.lookup(destinationName);
} catch (NamingException ne) {
try {
oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
- queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
- .getDestinationName());
+ destination = (Destination) oJndiCtx.lookup(destinationName);
} catch (NamingException nex) {
//ActiveMQ
- queue = qSess.createQueue(_epr.getDestinationName());
+ destination = session.createQueue(destinationName);
}
}
- _messageConsumer = qSess.createConsumer(queue, _epr.getMessageSelector());
} else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
- Session tSess = getJmsSession(_epr.getAcknowledgeMode());
- Topic topic = null;
try {
- topic = (Topic) oJndiCtx.lookup(_epr
- .getDestinationName());
+ destination = (Destination) oJndiCtx.lookup(destinationName);
}
catch (NamingException ne) {
- topic = tSess.createTopic(_epr.getDestinationName());
+ destination = session.createTopic(destinationName);
}
- _messageConsumer = tSess.createConsumer(topic, _epr
- .getMessageSelector());
} else {
throw new CourierException("Unknown destination type");
}
+ if (destination == null) {
+ throw new CourierException("Could not locate destination: " + destinationName);
+ }
+ _messageConsumer = session.createConsumer(destination, _epr.getMessageSelector());
success = true;
} finally {
NamingContextPool.releaseNamingContext(oJndiCtx) ;
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -24,6 +24,7 @@
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.couriers.helpers.JDBCEprDBResourceFactory;
+import org.jboss.internal.soa.esb.util.StreamUtils;
import org.jboss.soa.esb.addressing.Call;
import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
import org.jboss.soa.esb.common.TransactionStrategy;
@@ -34,13 +35,18 @@
import org.jboss.soa.esb.message.util.Type;
import org.jboss.soa.esb.util.Util;
+import java.io.Reader;
import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
+import java.sql.Blob;
+import java.sql.Clob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
import java.sql.SQLException;
+import java.sql.Types;
import java.util.UUID;
public class SqlTableCourier implements PickUpOnlyCourier, DeliverOnlyCourier
@@ -284,6 +290,8 @@
selectUpdateStatement.setString(2, State.Pending.getColumnValue());
ResultSet resultSet = selectUpdateStatement.executeQuery();
+ final ResultSetMetaData metaData = resultSet.getMetaData() ;
+ final int type = metaData.getColumnType(1) ;
try
{
if (resultSet.next())
@@ -292,8 +300,22 @@
try
{
- Serializable blob = (Serializable) resultSet.getObject(1);
- result = Util.deserialize(blob);
+ final Serializable value ;
+ if (type == Types.BLOB)
+ {
+ final Blob blob = resultSet.getBlob(1) ;
+ value = StreamUtils.readStreamString(blob.getBinaryStream(), "UTF-8");
+ }
+ else if (type == Types.CLOB)
+ {
+ final Clob clob = resultSet.getClob(1) ;
+ value = StreamUtils.readReader(clob.getCharacterStream());
+ }
+ else
+ {
+ value = (Serializable) resultSet.getObject(1);
+ }
+ result = Util.deserialize(value);
}
catch (Exception e)
{
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -25,7 +25,10 @@
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+import org.h2.tools.Server;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.system.server.ServerConfigLocator;
@@ -39,235 +42,444 @@
* @author <a href="mailto:vesco.claudio at previnet.it">Claudio Vesco</a>
* @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
* @author <a href="mailto:kevin.conner at jboss.org">Kevin Conner</a>
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
* @version $Revision$
*/
-public class H2Database extends ServiceMBeanSupport
- implements H2DatabaseMBean
+public class H2Database extends ServiceMBeanSupport implements H2DatabaseMBean
{
- /** Default password: <code>empty string</code>. */
- private static final String DEFAULT_PASSWORD = "";
+ /** Default password: <code>empty string</code>. */
+ private static final String DEFAULT_PASSWORD = "";
+
+ /** Default user: <code>sa</code>. */
+ private static final String DEFAULT_USER = "sa";
+
+ /** JDBC Driver class: <code>org.h2.Driver</code>. */
+ private static final String JDBC_DRIVER_CLASS = "org.h2.Driver";
+
+ /** JDBC URL common prefix: <code>jdbc:h2:</code>. */
+ private static final String JDBC_URL_PREFIX = "jdbc:h2:";
- /** Default user: <code>sa</code>. */
- private static final String DEFAULT_USER = "sa";
+ /** JDBC in memory URL prefix: <code>jdbc:h2:mem:</code>. */
+ private static final String JDBC_MEM_URL_PREFIX = JDBC_URL_PREFIX + "mem:";
+
+ /** JDBC flags */
+ private static final String DEFAULT_FLAGS = ";MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE";
+
+ /** Default data subdir: <code>h2</code>. */
+ private static final String H2_DATA_DIR = "h2";
+
+ /** Default database name: <code>default</code>. */
+ private static final String DEFAULT_DATABASE_NAME = "default";
+
+ /** Default address for remote h2: <code>0.0.0.0</code>. */
+ private static final String DEFAULT_ADDRESS = "0.0.0.0";
+
+ /** Default port for remote h2: <code>9092</code>. */
+ private static final int DEFAULT_PORT = 9092;
+
+ /** Default delay for remote hypersonic initialisation (ms): <code>5000</code>. */
+ private static final long DEFAULT_DELAY = 5000;
+
+ // Private Data --------------------------------------------------
+
+ /** Full path to db/h2. */
+ private File dbPath;
+
+ /** Database name. */
+ private String name = DEFAULT_DATABASE_NAME;
+
+ /** In memory mode. */
+ private boolean inMemoryMode ;
+
+ /** Database user. */
+ private String user = DEFAULT_USER;
+
+ /** Database password. */
+ private String password = DEFAULT_PASSWORD;
+
+ /** Database flags */
+ private String flags = DEFAULT_FLAGS ;
+
+ /** Hold a connection for in memory h2. */
+ private Connection connection;
+
+ /** Default address. */
+ private String address = DEFAULT_ADDRESS;
+
+ /** Default port. */
+ private int port = DEFAULT_PORT;
+
+ /** Server/remote mode. */
+ private boolean serverMode = false;
- /** JDBC Driver class: <code>org.h2.Driver</code>. */
- private static final String JDBC_DRIVER_CLASS = "org.h2.Driver";
-
- /** JDBC URL common prefix: <code>jdbc:h2:</code>. */
- private static final String JDBC_URL_PREFIX = "jdbc:h2:";
-
- /** JDBC in memory URL prefix: <code>jdbc:h2:mem:</code>. */
- private static final String JDBC_MEM_URL_PREFIX = JDBC_URL_PREFIX + "mem:";
-
- /** Default data subdir: <code>h2</code>. */
- private static final String H2_DATA_DIR = "h2";
-
- /** Default database name: <code>default</code>. */
- private static final String DEFAULT_DATABASE_NAME = "default";
+ /** Server thread for remote h2. */
+ private Thread serverThread;
+
+ /** The remote server instance */
+ private Server remoteServer ;
+
+ /** Server thread delay for remote H2. */
+ private long delay = DEFAULT_DELAY ;
- // Private Data --------------------------------------------------
+ // Attributes ----------------------------------------------------
- /** Full path to db/h2. */
- private File dbPath;
+ /**
+ * Set the database name.
+ *
+ * @jmx.managed-attribute
+ */
+ public void setDatabase(String name)
+ {
+ if (name == null)
+ {
+ name = DEFAULT_DATABASE_NAME;
+ }
+ this.name = name;
+ }
- /** Database name. */
- private String name = DEFAULT_DATABASE_NAME;
-
- /** In memory mode. */
- private boolean inMemoryMode ;
-
- /** Database user. */
- private String user = DEFAULT_USER;
-
- /** Database password. */
- private String password = DEFAULT_PASSWORD;
-
- /** Hold a connection for in memory h2. */
- private Connection connection;
+ /**
+ * Get the database name.
+ *
+ * @jmx.managed-attribute
+ */
+ public String getDatabase()
+ {
+ return name;
+ }
+
+ /**
+ * Get the full database path.
+ *
+ * @jmx.managed-attribute
+ */
+ public String getDatabasePath()
+ {
+ if (dbPath != null)
+ {
+ return dbPath.toString();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * @return the <code>inMemoryMode</code> flag.
+ *
+ * @jmx.managed-attribute
+ */
+ public boolean isInMemoryMode()
+ {
+ return inMemoryMode;
+ }
+ /**
+ * If <b>true</b> the h2 is in memory mode otherwise embedded mode.
+ *
+ * @param b in memory mode.
+ *
+ * @jmx.managed-attribute
+ */
+ public void setInMemoryMode( boolean b )
+ {
+ inMemoryMode = b;
+ }
+
+ /**
+ * @return the password
+ *
+ * @jmx.managed-attribute
+ */
+ public String getPassword()
+ {
+ return password;
+ }
- // Attributes ----------------------------------------------------
+ /**
+ * @return the user
+ *
+ * @jmx.managed-attribute
+ */
+ public String getUser()
+ {
+ return user;
+ }
+
+ /**
+ * @return the flags
+ *
+ * @jmx.managed-attribute
+ */
+ public String getFlags()
+ {
+ return flags;
+ }
+
+ /**
+ * @param password
+ *
+ * @jmx.managed-attribute
+ */
+ public void setPassword(String password)
+ {
+ if (password == null)
+ {
+ password = DEFAULT_PASSWORD;
+ }
+ this.password = password;
+ }
+
+ /**
+ * @param user
+ *
+ * @jmx.managed-attribute
+ */
+ public void setUser(String user)
+ {
+ if (user == null)
+ {
+ user = DEFAULT_USER;
+ }
+ this.user = user;
+ }
+
+ /**
+ * @param flags
+ *
+ * @jmx.managed-attribute
+ */
+ public void setFlags(String flags)
+ {
+ if (flags == null)
+ {
+ flags = DEFAULT_FLAGS;
+ }
+ this.flags = flags;
+ }
- /**
- * Set the database name.
- *
- * @jmx.managed-attribute
- */
- public void setDatabase(String name)
- {
- if (name == null)
- {
- name = DEFAULT_DATABASE_NAME;
- }
- this.name = name;
- }
+ /**
+ * @return the serverMode
+ *
+ * @jmx.managed-attribute
+ */
+ public boolean isServerMode()
+ {
+ return serverMode;
+ }
- /**
- * Get the database name.
- *
- * @jmx.managed-attribute
- */
- public String getDatabase()
- {
- return name;
- }
+ /**
+ * @param serverMode
+ *
+ * @jmx.managed-attribute
+ */
+ public void setServerMode( boolean serverMode )
+ {
+ this.serverMode = serverMode;
+ }
- /**
- * Get the full database path.
- *
- * @jmx.managed-attribute
- */
- public String getDatabasePath()
- {
- if (dbPath != null)
- {
- return dbPath.toString();
- }
- else
- {
- return null;
- }
- }
+ /**
+ * @return the address
+ *
+ * @jmx.managed-attribute
+ */
+ public String getBindAddress()
+ {
+ return address;
+ }
- /**
- * @return the <code>inMemoryMode</code> flag.
- *
- * @jmx.managed-attribute
- */
- public boolean isInMemoryMode()
- {
- return inMemoryMode;
- }
+ /**
+ * @return the port
+ *
+ * @jmx.managed-attribute
+ */
+ public int getPort()
+ {
+ return port;
+ }
- /**
- * If <b>true</b> the h2 is in memory mode otherwise h2 is in server or remote mode.
- *
- * @param b in memory mode.
- *
- * @jmx.managed-attribute
- */
- public void setInMemoryMode(boolean b)
- {
- inMemoryMode = b;
- }
+ /**
+ * @param address
+ *
+ * @jmx.managed-attribute
+ */
+ public void setBindAddress(String address)
+ {
+ this.address = address;
+ }
- /**
- * @return the password
- *
- * @jmx.managed-attribute
- */
- public String getPassword()
- {
- return password;
- }
+ /**
+ * @param port
+ *
+ * @jmx.managed-attribute
+ */
+ public void setPort(int port)
+ {
+ this.port = port;
+ }
+
+ /**
+ * Set the delay for remote hypersonic initialisation.
+ *
+ * @jmx.managed-attribute
+ */
+ public void setDelay(final long delay)
+ {
+ this.delay = delay;
+ }
+
+ /**
+ * Get the delay for remote hypersonic initialisation.
+ *
+ * @jmx.managed-attribute
+ */
+ public long getDelay()
+ {
+ return delay;
+ }
+
+ // Lifecycle -----------------------------------------------------
+
+ /**
+ * Start the database
+ */
+ protected void startService() throws Exception
+ {
+ if (serverMode)
+ {
+ startRemoteDatabase();
+ }
+ else if (inMemoryMode)
+ {
+ startInMemoryDatabase();
+ }
+ else
+ {
+ startStandaloneDatabase();
+ }
+ }
- /**
- * @return the user
- *
- * @jmx.managed-attribute
- */
- public String getUser()
- {
- return user;
- }
+ /**
+ * We now close the connection clean by calling the
+ * serverSocket throught jdbc. The MBeanServer calls this
+ * method at closing time.
+ */
+ protected void stopService() throws Exception
+ {
+ if (serverMode)
+ {
+ stopRemoteDatabase();
+ }
+ else if (inMemoryMode)
+ {
+ stopInMemoryDatabase();
+ }
+ else
+ {
+ stopStandaloneDatabase();
+ }
+ }
- /**
- * @param password
- *
- * @jmx.managed-attribute
- */
- public void setPassword(String password)
- {
- if (password == null)
- {
- password = DEFAULT_PASSWORD;
- }
- this.password = password;
- }
+ // Private -------------------------------------------------------
+
+ /**
+ * Start the standalone (in process) database.
+ */
+ private void startStandaloneDatabase() throws Exception
+ {
+ final File h2Dir = checkDataDir() ;
+
+ dbPath = new File(h2Dir, name);
+
+ final String dbURL = JDBC_URL_PREFIX + dbPath.toURI().toString() + flags ;
+ log.info(dbURL);
+
+ // Check we have connectivity
+ connection = getConnection(dbURL);
+ }
- /**
- * @param user
- *
- * @jmx.managed-attribute
+ /**
+ * Start the only in memory database.
*/
- public void setUser(String user)
- {
- if (user == null)
- {
- user = DEFAULT_USER;
- }
- this.user = user;
- }
+ private void startInMemoryDatabase() throws Exception
+ {
+ final String dbURL = JDBC_MEM_URL_PREFIX + name + flags ;
- // Lifecycle -----------------------------------------------------
+ // hold a connection so h2 does not close the database
+ connection = getConnection(dbURL);
+ }
- /**
- * Start the database
- */
- protected void startService() throws Exception
- {
- if (inMemoryMode)
- {
- startInMemoryDatabase();
- }
- else
- {
- startStandaloneDatabase();
- }
- }
+ /**
+ * Start a remote/server database
+ * @throws Exception
+ */
+ private void startRemoteDatabase() throws Exception
+ {
+ final File h2Dir = checkDataDir() ;
+ dbPath = new File(h2Dir, name);
+
+ // Start DB in new thread, or else it will block us
+ serverThread = new Thread("h2-" + name)
+ {
+ public void run()
+ {
+ try
+ {
+ log.debug( "Starting remote h2 db with port : " + port );
+ final String[] args = new String[] {
+ "-baseDir", dbPath.getAbsolutePath(),
+ "-tcpPort", String.valueOf(port),
+ "-tcpAllowOthers","" }; // need the extra empty string or a exception is thrown by H2
+ final Server server = Server.createTcpServer(args) ;
+ server.start() ;
+ setRemoteServer(server);
+ }
+ catch (Exception e)
+ {
+ log.error("Failed to start database", e);
+ }
+ }
+ };
+
+ serverThread.start();
+
+ if (delay > 0)
+ {
+ log.debug("Waiting for Database initialisation: maximum " + delay + " milliseconds") ;
+ try
+ {
+ serverThread.join(delay) ;
+ }
+ catch (final InterruptedException ie)
+ {
+ Thread.currentThread().interrupt() ;
+ }
+
+ if (serverThread.isAlive())
+ {
+ log.warn("Database initialisation is still active") ;
+ }
+ else
+ {
+ log.debug("Database initialisation completed") ;
+ }
+ }
+ }
/**
- * We now close the connection clean by calling the
- * serverSocket throught jdbc. The MBeanServer calls this
- * method at closing time.
+ * Stop the standalone (in process) database.
*/
- protected void stopService() throws Exception
+ private void stopStandaloneDatabase() throws Exception
{
- if (inMemoryMode)
+ try
{
- stopInMemoryDatabase();
+ final Statement stmt = connection.createStatement() ;
+ stmt.execute("shutdown") ;
}
- else
+ finally
{
- stopStandaloneDatabase();
+ connection = null;
}
- }
-
- // Private -------------------------------------------------------
-
- /**
- * Start the standalone (in process) database.
- */
- private void startStandaloneDatabase() throws Exception
- {
- final File h2Dir = checkDataDir() ;
-
- dbPath = new File(h2Dir, name);
-
- final String dbURL = JDBC_URL_PREFIX + dbPath.toURI().toString();
-
- // Check wee have connectivity
- final Connection connection = getConnection(dbURL);
- connection.close() ;
- }
-
- /**
- * Start the only in memory database.
- */
- private void startInMemoryDatabase() throws Exception
- {
- final String dbURL = JDBC_MEM_URL_PREFIX + name;
-
- // hold a connection so h2 does not close the database
- connection = getConnection(dbURL);
- }
-
- /**
- * Stop the standalone (in process) database.
- */
- private void stopStandaloneDatabase() throws Exception
- {
- // Nothing to do here
log.info("Database standalone closed clean");
}
@@ -288,46 +500,80 @@
}
/**
- * Get the connection.
- *
- * @param dbURL jdbc url.
- * @return the connection, allocate one if needed.
- * @throws Exception
+ * Stop the remote database.
*/
- private synchronized Connection getConnection(String dbURL) throws Exception
+ private void stopRemoteDatabase() throws SQLException
{
- if (connection == null)
- {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class.forName(JDBC_DRIVER_CLASS, true, cl).newInstance();
- connection = DriverManager.getConnection(dbURL, user, password);
- }
- return connection;
+ final Server server = getRemoteServer() ;
+ if (server != null)
+ {
+ server.stop() ;
+ }
}
/**
- * Check the existence of the h2 data directory.
- * @return The h2 data directory.
- * @throws IOException For errors checking/creating the h2 data directory.
+ * Set the remote server instance.
+ * @param remoteServer The remote server instance.
*/
- private File checkDataDir()
- throws IOException
+ private synchronized void setRemoteServer(final Server remoteServer)
{
- // Get the server data directory
- final File dataDir = ServerConfigLocator.locate().getServerDataDir();
+ this.remoteServer = remoteServer ;
+ }
+
+ /**
+ * Get the remote server instance.
+ * @return The remote server instance.
+ */
+ private synchronized Server getRemoteServer()
+ {
+ return remoteServer ;
+ }
+
+ /**
+ * Get the connection.
+ *
+ * @param dbURL jdbc url.
+ * @return the connection, allocate one if needed.
+ * @throws Exception
+ */
+ private synchronized Connection getConnection(String dbURL) throws Exception
+ {
+ if (connection == null)
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ Class.forName(JDBC_DRIVER_CLASS, true, cl).newInstance();
+ connection = DriverManager.getConnection(dbURL, user, password);
+ }
+ return connection;
+ }
+
+ /**
+ * Check the existence of the h2 data directory.
+ * @return The h2 data directory.
+ * @throws IOException For errors checking/creating the h2 data directory.
+ */
+ private File checkDataDir() throws IOException
+ {
+ // Get the server data directory
+ final File dataDir = getDataDir();
- // Get DB directory
- final File h2Dir = new File(dataDir, H2_DATA_DIR);
+ // Get DB directory
+ final File h2Dir = new File(dataDir, H2_DATA_DIR);
- if (!h2Dir.exists())
- {
- h2Dir.mkdirs();
- }
- else if (!h2Dir.isDirectory())
- {
- throw new IOException("Failed to create directory: " + h2Dir);
- }
- return h2Dir ;
- }
+ if (!h2Dir.exists())
+ {
+ h2Dir.mkdirs();
+ }
+ else if (!h2Dir.isDirectory())
+ {
+ throw new IOException("Failed to create directory: " + h2Dir);
+ }
+ return h2Dir ;
+ }
+
+ File getDataDir()
+ {
+ return ServerConfigLocator.locate().getServerDataDir();
+ }
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -33,7 +33,7 @@
* A few notes on h2 running modes:
*
* remote (server) mode
- * Not supported yet
+ * h2 can be connected to vid tcp
*
* in-process (standalone) mode
* h2 can only be contacted from in-vm clients
@@ -68,4 +68,20 @@
/** In memory mode */
boolean isInMemoryMode() ;
void setInMemoryMode(boolean b) ;
+
+ /** Server/remote mode */
+ boolean isServerMode() ;
+ void setServerMode(boolean mode) ;
+
+ /** The flags to use when connecting to the DB, default is "" */
+ String getFlags();
+ void setFlags(String flags);
+
+ /** The listening port when in remove server mode, default is '9092' */
+ int getPort();
+ void setPort(int port);
+
+ /** The binding address, default is '0.0.0.0' */
+ String getBindAddress();
+ void setBindAddress(String address);
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/remoting/HttpUnmarshaller.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -101,10 +101,6 @@
int amtRead = inputStream.read(byteBuffer);
while (amtRead > 0) {
byteOutputStream.write(byteBuffer, pointer, amtRead);
- if (amtRead < bufferSize && byteOutputStream.size() >= contentLength) {
- //done reading, so process
- break;
- }
amtRead = inputStream.read(byteBuffer);
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -24,8 +24,17 @@
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadFactory;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -64,6 +73,15 @@
private static int CONFIGURED_POOL_SIZE = DEFAULT_POOL_SIZE;
private static int CONFIGURED_SLEEP = DEFAULT_SLEEP;
+ /**
+ * The executor used to create sessions.
+ */
+ private static final Executor SESSION_EXECUTOR = Executors.newSingleThreadExecutor(new DaemonThreadFactory()) ;
+ /**
+ * The completion service.
+ */
+ private static final CompletionService<JmsSession> COMPLETION_SERVICE = new ExecutorCompletionService<JmsSession>(SESSION_EXECUTOR) ;
+
/** Maximum number of Sessions that will be created in this pool */
private int MAX_SESSIONS = DEFAULT_POOL_SIZE; //TODO Make this manageable
@@ -104,6 +122,11 @@
private boolean terminated ;
/**
+ * The pool instance id.
+ */
+ private long id ;
+
+ /**
* Contructor of the pool.
*
*/
@@ -138,16 +161,44 @@
private synchronized void addAnotherSession(Map<String, String> poolKey, final boolean transacted, final int acknowledgeMode)
throws JMSException
{
+ final Future<JmsSession> future = COMPLETION_SERVICE.submit(new Callable<JmsSession>() {
+ public JmsSession call()
+ throws JMSException
+ {
+ final JmsSession session ;
+ if (transacted) {
+ session = new JmsXASession(JmsConnectionPool.this, ((XAConnection)jmsConnection).createXASession(), id);
+ } else {
+ session = new JmsSession(jmsConnection.createSession(transacted, acknowledgeMode), id);
+ }
+ return session ;
+ }
+ }) ;
+
//Create a new Session
ArrayList<JmsSession> freeSessions = freeSessionsMap.get(acknowledgeMode);
// For now we only support JTA transacted sessions
- final JmsSession session ;
- if (transacted) {
- session = new JmsXASession(this, ((XAConnection)jmsConnection).createXASession());
- } else {
- session = new JmsSession(jmsConnection.createSession(transacted, acknowledgeMode));
+ try
+ {
+ freeSessions.add(future.get());
}
- freeSessions.add(session);
+ catch (final InterruptedException ie) {} // ignore
+ catch (final ExecutionException ee)
+ {
+ final Throwable th = ee.getCause() ;
+ if (th instanceof JMSException)
+ {
+ throw (JMSException)th ;
+ }
+ if (th instanceof Error)
+ {
+ throw (Error)th ;
+ }
+ if (th instanceof RuntimeException)
+ {
+ throw (RuntimeException)th ;
+ }
+ }
logger.debug("Number of Sessions in the pool with acknowledgeMode: " + acknowledgeMode + " is now " + getSessionsInPool(acknowledgeMode));
}
@@ -258,19 +309,22 @@
*/
synchronized void handleCloseSession(final JmsSession session)
{
- final int mode ;
- try {
- mode = session.getAcknowledgeMode() ;
- } catch (final JMSException jmse) {
- logger.warn("JMSException while calling getAcknowledgeMode") ;
- logger.debug("JMSException while calling getAcknowledgeMode", jmse) ;
- return ;
+ if (session.getId() == id)
+ {
+ final int mode ;
+ try {
+ mode = session.getAcknowledgeMode() ;
+ } catch (final JMSException jmse) {
+ logger.warn("JMSException while calling getAcknowledgeMode") ;
+ logger.debug("JMSException while calling getAcknowledgeMode", jmse) ;
+ return ;
+ }
+
+ final ArrayList<JmsSession> sessions = (freeSessionsMap == null ? null : freeSessionsMap.get(mode));
+ if (sessions != null) {
+ sessions.add(session) ;
+ }
}
-
- final ArrayList<JmsSession> sessions = (freeSessionsMap == null ? null : freeSessionsMap.get(mode));
- if (sessions != null) {
- sessions.add(session) ;
- }
handleReleaseSession(session) ;
}
@@ -321,6 +375,42 @@
}
/**
+ * This method is called when the pool needs to cleaned. It closes all open sessions
+ * and the connection.
+ */
+ private void cleanSessionPool()
+ {
+ final Connection connection ;
+ synchronized(this)
+ {
+ if (terminated)
+ {
+ return ;
+ }
+ id++ ;
+ for (List<JmsSession> list : freeSessionsMap.values())
+ {
+ list.clear() ;
+ }
+ for (List<JmsSession> list : inUseSessionsMap.values())
+ {
+ list.clear() ;
+ }
+ transactionsToSessions.clear() ;
+ sessionsToTransactions.clear() ;
+
+ logger.debug("Cleared the session pool now closing the connection to the factory.");
+ connection = jmsConnection ;
+ jmsConnection = null ;
+ }
+ if (connection!=null) {
+ try {
+ connection.close();
+ } catch (final Exception ex) {} // ignore
+ }
+ }
+
+ /**
* This method is called when the pool needs to destroyed. It closes all open sessions
* and the connection and removes it from the container's poolMap.
*/
@@ -436,7 +526,7 @@
jmsConnection.setExceptionListener(new ExceptionListener() {
public void onException(JMSException arg0)
{
- removeSessionPool() ;
+ cleanSessionPool() ;
}
}) ;
jmsConnection.start();
@@ -531,4 +621,27 @@
}
}
}
+
+ /**
+ * Thread factory returning daemon threads.
+ * @author kevin
+ */
+ private static final class DaemonThreadFactory implements ThreadFactory
+ {
+ /**
+ * The default executor factory.
+ */
+ private final ThreadFactory defaultFactory = Executors.defaultThreadFactory() ;
+
+ /**
+ * Return a new daemon thread.
+ * @param runnable The runnable associated with the thread.
+ */
+ public Thread newThread(final Runnable runnable)
+ {
+ final Thread thread = defaultFactory.newThread(runnable) ;
+ thread.setDaemon(true) ;
+ return thread ;
+ }
+ }
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsSession.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -52,6 +52,10 @@
* The session delegate.
*/
private final Session session ;
+ /**
+ * The pool instance id.
+ */
+ private final long id ;
/**
* The set of active queue browsers.
@@ -69,15 +73,22 @@
/**
* Create the session wrapper.
* @param session The session delegate.
+ * @param id The pool instance id.
* @param isJTA True if this tales part in a JTA transaction
* @throws JMSException
*/
- JmsSession(final Session session)
+ JmsSession(final Session session, final long id)
throws JMSException
{
+ this.id = id ;
this.session = session ;
}
+ public long getId()
+ {
+ return id ;
+ }
+
public void close() throws JMSException
{
session.close();
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsXASession.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -72,13 +72,13 @@
* Create the session wrapper.
* @param pool The current connection pool
* @param session The session delegate.
- * @param isJTA True if this tales part in a JTA transaction
+ * @param id The pool instance id.
* @throws JMSException
*/
- JmsXASession(final JmsConnectionPool pool, final XASession session)
+ JmsXASession(final JmsConnectionPool pool, final XASession session, final long id)
throws JMSException
{
- super(session) ;
+ super(session, id) ;
this.pool = pool ;
this.session = session ;
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -400,7 +400,7 @@
*
* @param organizationName used to match with the name of the organization.
* @return the Organization.
- */
+ */
public static Organization findOrganization(String organizationName, JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException {
if (organizationName==null) {
organizationName="";
@@ -707,8 +707,9 @@
try {
RegistryService rs = connection.getRegistryService();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
- Collection<String> findQualifiers = new ArrayList<String>();
- findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
+ Collection<String> findQualifiers = null;
+ //Collection<String> findQualifiers = new ArrayList<String>();
+ //findQualifiers.add(FindQualifier.SORT_BY_DATE_ASC);
BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,null);
if (bulkResponse.getStatus()==JAXRResponse.STATUS_SUCCESS){
serviceBindings = (Collection<ServiceBinding>)bulkResponse.getCollection();
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/soap/OGNLUtils.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/soap/OGNLUtils.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/soap/OGNLUtils.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -67,40 +67,46 @@
}
public static String getOGNLExpression(Element element, String nameSpace) {
- StringBuffer ognlExpression = new StringBuffer();
- Node parent = element.getParentNode();
- boolean isInBody = false;
+ String preassignedOgnl = element.getAttributeNS(JBOSSESB_SOAP_NS, OGNL_ATTRIB);
- ognlExpression.append(getOGNLToken(element));
+ if(preassignedOgnl != null && !preassignedOgnl.equals("")) {
+ return preassignedOgnl;
+ } else {
+ StringBuffer ognlExpression = new StringBuffer();
+ Node parent = element.getParentNode();
+ boolean isInBody = false;
- while (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) {
- Element parentElement = (Element) parent;
- String parentName = YADOMUtil.getName(parentElement);
+ ognlExpression.append(getOGNLToken(element));
- if (parentName.equalsIgnoreCase("body") && checkParentNameSpace( parent.getNamespaceURI(), nameSpace ) ) {
- isInBody = true;
- break;
+ while (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) {
+ Element parentElement = (Element) parent;
+ String parentName = YADOMUtil.getName(parentElement);
+
+ if (parentName.equalsIgnoreCase("body") && checkParentNameSpace( parent.getNamespaceURI(), nameSpace ) ) {
+ isInBody = true;
+ break;
+ }
+
+ preassignedOgnl = parentElement.getAttributeNS(JBOSSESB_SOAP_NS, OGNL_ATTRIB);
+ if(preassignedOgnl != null && !preassignedOgnl.equals("")) {
+ ognlExpression.insert(0, "." + preassignedOgnl);
+ isInBody = true;
+ break;
+ } else {
+ ognlExpression.insert(0, getOGNLToken(parentElement));
+ }
+ parent = parent.getParentNode();
}
- String preassignedOgnl = parentElement.getAttributeNS(JBOSSESB_SOAP_NS, OGNL_ATTRIB);
- if(preassignedOgnl != null && !preassignedOgnl.equals("")) {
- ognlExpression.insert(0, "." + preassignedOgnl);
- isInBody = true;
- break;
- } else {
- ognlExpression.insert(0, getOGNLToken(parentElement));
+ if(!isInBody) {
+ return "";
}
- parent = parent.getParentNode();
- }
- if(!isInBody) {
- return "";
+ // Remove the leading '.'
+ ognlExpression.deleteCharAt(0);
+
+ return ognlExpression.toString();
}
-
- // Remove the leading '.'
- ognlExpression.deleteCharAt(0);
-
- return ognlExpression.toString();
}
public static String getOGNLToken(Element element) {
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -61,6 +61,31 @@
return outBuffer.toByteArray();
}
+
+ /**
+ * Read the supplied Reader and return as a string.
+ * @param reader The reader to read.
+ * @return The reader contents as a string.
+ */
+ public static String readReader(Reader reader) {
+ if(reader == null) {
+ throw new IllegalArgumentException("null 'reader' arg passed in method call.");
+ }
+
+ StringWriter outBuffer = new StringWriter();
+ char[] buffer = new char[256];
+ int readCount = 0;
+
+ try {
+ while((readCount = reader.read(buffer)) != -1) {
+ outBuffer.write(buffer, 0, readCount);
+ }
+ } catch (IOException e) {
+ throw new IllegalStateException("Error reading reader.", e);
+ }
+
+ return outBuffer.toString();
+ }
public static String readStreamString(InputStream stream, String charset) throws UnsupportedEncodingException {
return new String(StreamUtils.readStream(stream), charset);
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -62,25 +62,31 @@
* Sample Action Configuration:
* <pre>
* <action class="org.jboss.soa.esb.actions.routing.JMSRouter">
- * jndiName="queue/A"
- * message-prop-<i>>prop-name<</i>="<i>>prop-value<</i>" >!-- (Optional)--<
- * unwrap="true/false" >!-- (Optional - default false)--<
- * persistent="true/false" >!-- (Optional - default true)--<
- * priority="integer" >!-- (Optional - default Message.DEFAULT_PRIORITY)--<
- * time-to-live="long" >!-- (Optional - default Message.DEFAULT_TIME_TO_LIVE)--<
- * />
+ * <property name="jndiName" value="queue/A"/>
+ * </action>
+ *
+ * Optional attributes:
+ * <property name="unwrap" value="false"/>
+ * <property name="message-prop-<i>>prop-name<</i>="<i>> value="prop-value<</i>" />
+ * <property name="persistent" value="true"/>
+ * <property name="priority" value="javax.jms.Message.DEFAULT_PRIORITY"/>
+ * <property name="time-to-live" value="javax.jms.Message.DEFAULT_TIME_TO_LIVE"/>
+ * <property name="security-principal" value="username"/>
+ * <property name="security-credential" value="pasword"/>
* </pre>
- * Note how properties to be set on the message are prefixed with "message-prop-".
- * <p/>
+ * Description of configuration attribues:
* <ul>
- * <li>'unwrap' true will extract the message payload from the Message object before sending</li>
- * <li>'unwrap' false false will send the serialized Message object</li>
+ * <li><i>message-prop</i>: properties to be set on the message are prefixed with "message-prop-".
+ * <li><i>unwrap</i>:true will extract the message payload from the Message object before sending. false false will send the serialized Message object.
+ * <li><i>persistent</i>: the JMS DeliveryMode. 'true'(default) or 'false'.
+ * <li><i>priority</i>: the JMS Priority to be used.
+ * <li><i>time-to-live</i>: the JMS Time-To-Live to be used.
+ * <li><i>security-principal</i>: security principal use when creating the JMS connection.
+ * <li><i>security-credential</i>: the security credentials to use when creating the JMS connection.
* </ul>
*
- * TODO: Add support for JMS Topic destinations.
- *
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- * @author <a href="mailto:daniel.bevenius at redpill.se">daniel.bevenius at redpill.se</a>
+ * @author <a href="mailto:daniel.bevenius at redhat.com">daniel.bevenius at redhat.com</a>
* @since Version 4.0
*/
public class JMSRouter extends AbstractRouter {
@@ -101,6 +107,14 @@
*/
public static final String TIME_TO_LIVE_ATTR = "time-to-live";
/**
+ * Security principal used when creating the JMS connection
+ */
+ public static final String SECURITY_PRINCIPAL = "security-principal";
+ /**
+ * Security credential used when creating the JMS connection
+ */
+ public static final String SECURITY_CREDITIAL = "security-credential";
+ /**
* Routing properties.
*/
private ConfigTree properties;
@@ -160,7 +174,14 @@
if ( ttlStr != null )
timeToLive = Long.parseLong( ttlStr );
- createQueueSetup( queueName );
+ final String securityPrincipal = properties.getAttribute(SECURITY_PRINCIPAL);
+ final String securityCredential = properties.getAttribute(SECURITY_CREDITIAL);
+ if ( securityPrincipal != null && securityCredential == null )
+ throw new ConfigurationException("'" + SECURITY_PRINCIPAL + "' must be accompanied by a '" + SECURITY_CREDITIAL + "'");
+ else if ( securityCredential != null && securityPrincipal == null )
+ throw new ConfigurationException("'" + SECURITY_CREDITIAL + "' must be accompanied by a '" + SECURITY_PRINCIPAL + "'");
+
+ createQueueSetup(queueName, securityPrincipal, securityCredential);
}
/**
@@ -302,10 +323,11 @@
super.finalize();
}
- protected void createQueueSetup( String queueName ) throws ConfigurationException
- {
- try {
- queueSetup = new JMSSendQueueSetup(queueName);
+ void createQueueSetup( final String queueName, final String principal, final String credential ) throws ConfigurationException
+ {
+ try
+ {
+ queueSetup = new JMSSendQueueSetup(queueName,principal,credential);
queueSetup.setDeliveryMode( deliveryMode );
queueSetup.setPriority( priority );
queueSetup.setTimeToLive( timeToLive );
@@ -315,9 +337,16 @@
logger.debug( "JMSRouter Priority : " + priority);
logger.debug( "JMSRouter TimeToLive : " + timeToLive);
}
- } catch (Throwable t) {
+ }
+ catch (Throwable t)
+ {
throw new ConfigurationException("Failed to configure JMS Queue for routing.", t);
}
+ }
+
+ protected void createQueueSetup( String queueName ) throws ConfigurationException
+ {
+ createQueueSetup(queueName, null, null );
}
private static class JMSSendQueueSetup {
@@ -330,14 +359,16 @@
// TODO: Modify to support topic destinations too
- private JMSSendQueueSetup(String queueName) throws NamingException, JMSException, ConnectionException, NamingContextException {
+ private JMSSendQueueSetup(final String queueName, final String principal, final String credential) throws NamingException, JMSException, ConnectionException, NamingContextException {
environment = new Properties();
environment.setProperty(Context.PROVIDER_URL, Configuration.getJndiServerURL());
environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, Configuration.getJndiServerContextFactory());
environment.setProperty(Context.URL_PKG_PREFIXES, Configuration.getJndiServerPkgPrefix());
Context oCtx = NamingContextPool.getNamingContext(environment);
try {
- pool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory");
+ pool = ( principal != null ) ?
+ JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", principal, credential) :
+ JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory" );
this.queueName = queueName;
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -57,6 +57,7 @@
public static final String JNDI_SERVER_URL = "org.jboss.soa.esb.jndi.server.url";
public static final String JNDI_SERVER_CONTEXT_FACTORY = "org.jboss.soa.esb.jndi.server.context.factory";
public static final String JNDI_SERVER_PKG_PREFIX = "org.jboss.soa.esb.jndi.server.pkg.prefix";
+ public static final String JNDI_SERVER_TEST_LOOKUP = "org.jboss.soa.esb.jndi.test.lookup";
public static final String PARAMS_REPOS_IMPL_CLASS = "org.jboss.soa.esb.paramsRepository.class";
public static final String OBJECT_STORE_CONFIG_FILE = "org.jboss.soa.esb.objStore.configFile";
public static final String ENCRYPT_FACTORY_CLASS = "org.jboss.soa.esb.encryption.factory.class";
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -147,7 +147,7 @@
try
{
tm.begin() ;
- LOGGER.debug("Transaction started on current thread") ;
+ LOGGER.trace("Transaction started on current thread") ;
}
catch (final Throwable th)
{
@@ -171,18 +171,18 @@
switch(status)
{
case Status.STATUS_ACTIVE:
- LOGGER.debug("Committing transaction on current thread") ;
+ LOGGER.trace("Committing transaction on current thread") ;
tm.commit() ;
break ;
case Status.STATUS_MARKED_ROLLBACK:
- LOGGER.debug("Rollback transaction on current thread") ;
+ LOGGER.trace("Rollback transaction on current thread") ;
tm.rollback();
break ;
default:
// Transaction is in some other state, just disassociate
- if (LOGGER.isDebugEnabled())
+ if (LOGGER.isTraceEnabled())
{
- LOGGER.debug("Suspending transaction on current thread, status: " + status) ;
+ LOGGER.trace("Suspending transaction on current thread, status: " + status) ;
}
tm.suspend() ;
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -147,7 +147,7 @@
/**
* The mail Session to use
*/
- private Session oMailSess = null;
+ private final Session oMailSess;
/**
* Public constructor.
@@ -380,7 +380,7 @@
oMailP.setProperty("mail.smtp.host", Configuration.getSmtpHost());
String sAuth = Configuration.getSmtpAuth();
if(sAuth != null) {
- if(!sAuth.trim().equals("")) {
+ if(sAuth.trim().equals("")) {
logger.warn("'" + Environment.SMTP_AUTH + "' set to an empty value.");
}
oMailP.setProperty("mail.smtp.auth", sAuth);
@@ -395,7 +395,7 @@
catch (Exception e) { /* OK just leave standard port */ }
logger.info("Initialising mail server sesson. Properties: " + oMailP);
- javax.mail.Session oMailSess = javax.mail.Session.getDefaultInstance(oMailP, oAuth);
+ javax.mail.Session oMailSess = javax.mail.Session.getInstance(oMailP, oAuth);
return oMailSess;
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -35,6 +35,7 @@
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
+import javax.naming.NotContextException;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.common.Environment;
@@ -74,6 +75,10 @@
*/
private static final String DEFAULT_KEY = "<empty key>" ;
/**
+ * Default JNDI test lookup
+ */
+ private static final String DEFAULT_TEST_LOOKUP = "__dummy2" ;
+ /**
* Maximum pool size.
*/
private static final int POOL_SIZE ;
@@ -85,6 +90,10 @@
* Retry count for creating Naming Contexts.
*/
private static final int RETRY_COUNT ;
+ /**
+ * JNDI test lookup
+ */
+ private static final String TEST_LOOKUP ;
/**
* The lifecycle resource factory.
@@ -338,7 +347,7 @@
try
{
- context.list("__dummy2@#$%") ;
+ context.lookup(TEST_LOOKUP) ;
}
catch (final NameNotFoundException nfne) {} // Expected
}
@@ -387,6 +396,7 @@
POOL_SIZE = getIntProperty(prop, Environment.NAMING_CONTEXT_POOL_SIZE, DEFAULT_POOL_SIZE);
SLEEP_PERIOD = getIntProperty(prop, Environment.NAMING_CONTEXT_SLEEP_PERIOD, DEFAULT_SLEEP_PERIOD);
RETRY_COUNT = getIntProperty(prop, Environment.NAMING_CONTEXT_RETRY_COUNT, DEFAULT_RETRY_COUNT);
+ TEST_LOOKUP = prop.getProperty(Environment.JNDI_SERVER_TEST_LOOKUP, DEFAULT_TEST_LOOKUP) ;
}
/**
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -26,10 +26,13 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.sql.Blob;
+import java.sql.Clob;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
+import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -45,6 +48,7 @@
import javax.sql.DataSource;
import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.util.StreamUtils;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
@@ -479,8 +483,18 @@
Map<String, Object> row = new HashMap<String, Object>();
for (int iCurr = 1; iCurr <= meta.getColumnCount(); iCurr++) {
String sCol = meta.getColumnName(iCurr);
- if (!_inProcessField.equalsIgnoreCase(sCol))
- row.put(sCol, RS.getObject(iCurr));
+ if (!_inProcessField.equalsIgnoreCase(sCol)) {
+ final int type = meta.getColumnType(iCurr) ;
+ if (type == Types.BLOB) {
+ final Blob blob = RS.getBlob(iCurr) ;
+ row.put(sCol, StreamUtils.readStreamString(blob.getBinaryStream(), "UTF-8"));
+ } else if (type == Types.CLOB) {
+ final Clob clob = RS.getClob(iCurr) ;
+ row.put(sCol, StreamUtils.readReader(clob.getCharacterStream()));
+ } else {
+ row.put(sCol, RS.getObject(iCurr));
+ }
+ }
}
oResults.add(row);
@@ -601,37 +615,6 @@
} // ________________________________
/**
- * Assemble the SQL "select for update" statement for the
- * "inProcessField" parameter
- * <p/>
- * in the table row uniquely identified by the list of fields in the
- * "keyFields" parameter
- *
- * @return - The resulting SQL statement
- */
- protected String selectForUpdStatement() {
- StringBuilder sb = new StringBuilder().append("select ").append(
- _inProcessField).append(" from ").append(_tableName).append(
- " where ");
- int iCurr = 0;
- for (String sCurr : _keys) {
- if (iCurr++ > 0)
- sb.append(" and ");
- sb.append(sCurr).append(" = ?");
- }
-
- /*
- * HS QL does not support FOR UPDATE! All tables appear to be inherently
- * updatable!
- */
-
- if (_driver.contains("hsqldb"))
- return sb.toString();
- else
- return sb.append(" for update").toString();
- } // ________________________________
-
- /**
* Assemble the SQL statement to delete the current row in the table row
* uniquely identified by the list of fields in the "keyFields"
* parameter
@@ -659,13 +642,13 @@
try {
int iParm = 1;
for (String sColName : _keys) {
- String val = null;
+ final Object val ;
if (_currentRow.containsKey(sColName)) {
- val = String.valueOf(_currentRow.get(sColName));
+ val = _currentRow.get(sColName);
} else {
- val = String.valueOf(_upperCurrentRow.get(sColName));
+ val = _upperCurrentRow.get(sColName.toUpperCase());
}
- _PSdeleteRow.setString(iParm++, val);
+ _PSdeleteRow.setObject(iParm++, val);
}
try {
@@ -740,9 +723,9 @@
for (String sColName : _keys) {
Object oVal = null;
if (_currentRow.containsKey(sColName)) {
- oVal = String.valueOf(_currentRow.get(sColName.toUpperCase()));
+ oVal = _currentRow.get(sColName);
} else {
- oVal = String.valueOf(_upperCurrentRow.get(sColName.toUpperCase()));
+ oVal = _upperCurrentRow.get(sColName.toUpperCase());
}
_PSupdate.setObject(iParm++, oVal);
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -23,6 +23,7 @@
package org.jboss.soa.esb.notification;
import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.helpers.ConfigTree;
@@ -142,13 +143,15 @@
try
{
oRet = oCons.newInstance(new Object[] { p_oP });
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- if (null == oRet || (!(oRet instanceof NotificationTarget)))
- throw new ConfigurationException(sClass + " does not extend NotificationTarget");
+ } catch (InvocationTargetException e) {
+ Throwable cause = e.getCause();
+ throw new ConfigurationException("Failed to create an instance of NotificationTarget class '" + sClass + "'.", (cause != null?cause:e));
+ } catch (Exception e) {
+ throw new ConfigurationException("Failed to create an instance of NotificationTarget class '" + sClass + "'.", e);
+ }
+ if (!(oRet instanceof NotificationTarget)) {
+ throw new ConfigurationException(sClass + " does not extend NotificationTarget");
+ }
return (NotificationTarget) oRet;
} // __________________________________
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -26,12 +26,10 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.List;
import javax.jms.Destination;
import javax.jms.JMSException;
@@ -46,12 +44,9 @@
import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.actions.ActionUtils;
import org.jboss.soa.esb.addressing.eprs.JMSEpr;
import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.KeyValuePair;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.body.content.BytesBody;
import org.jboss.soa.esb.message.format.MessageFactory;
import org.junit.Before;
import org.junit.Ignore;
@@ -60,9 +55,10 @@
import org.mockejb.jms.TextMessageImpl;
/**
- *
+ * Integration test for {@link JMSRouter}
+ * <p/>
* @author John Doe
- * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
+ * @author <a href="daniel.bevenius at redhat.com">Daniel Bevenius</a>
*
*/
public class JmsRouterIntegrationTest
@@ -75,15 +71,8 @@
private Message msg;
private ConfigTree tree;
- @Before
- public void setup() throws URISyntaxException
- {
- msg = createESBMessageObject( messageID, bodyContent );
- tree = createConfigTree();
- }
-
@Test
- public void process_unwrap_false() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+ public void processWithUnwrapFalse() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
{
MockJMSRouter router = new MockJMSRouter(tree);
router.route( msg );
@@ -92,7 +81,7 @@
}
@Test
- public void process_unwrap_true() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+ public void processWithUnwrapTrue() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
{
tree.setAttribute( "unwrap", "true" );
MockJMSRouter router = new MockJMSRouter( tree );
@@ -108,9 +97,37 @@
assertEquals ( textMessage.getJMSCorrelationID(), messageID );
assertEquals ( textMessage.getText(), bodyContent );
}
+
+ @Test
+ public void constructorWithSecurity() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+ {
+ final String principal = "guest";
+ final String credential = "guest";
+ tree.setAttribute( "unwrap", "true" );
+ tree.setAttribute( JMSRouter.SECURITY_PRINCIPAL, principal );
+ tree.setAttribute( JMSRouter.SECURITY_CREDITIAL, credential );
+ MockJMSRouter router = new MockJMSRouter( tree );
+
+ assertEquals ( principal, router.getSecurityPrincipal() );
+ assertEquals ( credential, router.getSecurityCredential() );
+ }
+
+ @Test ( expected = ConfigurationException.class )
+ public void shouldThrowIfPrincipalIsNull() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+ {
+ tree.setAttribute( JMSRouter.SECURITY_CREDITIAL, "testpassword" );
+ new MockJMSRouter( tree );
+ }
+
+ @Test ( expected = ConfigurationException.class )
+ public void shouldThrowIfCredentialIsNull() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+ {
+ tree.setAttribute( JMSRouter.SECURITY_PRINCIPAL, "testuser" );
+ new MockJMSRouter( tree );
+ }
@Test ( expected = ActionProcessingException.class )
- public void route_negative() throws ConfigurationException, NamingException, JMSException, ActionProcessingException
+ public void shouldThrowIfObjectIsNotAMessageObject() throws ConfigurationException, NamingException, JMSException, ActionProcessingException
{
ConfigTree tree = createConfigTree();
JMSRouter router = new MockJMSRouter(tree);
@@ -118,7 +135,7 @@
}
@Test
- public void setJMSReplyTo_queue() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException
+ public void setJMSReplyToQueue() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException
{
final String queueName = "testQueue";
@@ -133,12 +150,11 @@
assertTrue( replyTo instanceof Queue );
Queue replyToQueue = (Queue) replyTo;
assertEquals( queueName , replyToQueue.getQueueName() );
-
}
@Test
@Ignore
- public void setJMSReplyTo_topic() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException
+ public void setJMSReplyToTopic() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException
{
final String queueName = "testTopic";
@@ -155,61 +171,16 @@
assertEquals( queueName , replyToTopic.getTopicName() );
}
- /*
- * Not quite sure that this is supposed to be testing.
- * Can we remove this test? /Daniel
- */
@Test
- @Ignore
- public void testRouter () throws Exception
+ public void constructWithDefaultPersitentAttribute() throws ConfigurationException, NamingException, JMSException
{
- boolean exception = false;
-
- Message msg = MessageFactory.getInstance().getMessage();
-
- msg.getBody().add("hello world".getBytes());
- JMSRouter router = new JMSRouter( createConfigTree() );
- try
- {
- router.route(msg);
- }
- catch (ActionProcessingException ex)
- {
- exception = true;
- }
-
- if (!exception)
- fail();
-
- router.unwrap = true;
-
- try
- {
- msg.getBody().add("hello world");
- router.process(msg);
- }
- catch (ActionProcessingException ex)
- {
- exception = true;
- }
-
- if (!exception)
- fail();
-
- router.getErrorNotification(null);
- router.getOkNotification(null);
- }
-
- @Test
- public void construct_with_default_persitent_attribute() throws ConfigurationException, NamingException, JMSException
- {
ConfigTree config = createConfigTree();
JMSRouter router = new JMSRouter( config );
assertTrue( router.isDeliveryModePersistent() );
}
@Test
- public void construct_with_persitent_attribute() throws ConfigurationException, NamingException, JMSException
+ public void constructWithPersitentAttribute() throws ConfigurationException, NamingException, JMSException
{
ConfigTree config = createConfigTree();
config.setAttribute( JMSRouter.PERSISTENT_ATTR, "false" );
@@ -219,7 +190,7 @@
}
@Test
- public void construct_with_default_priority_attribute() throws ConfigurationException, NamingException, JMSException
+ public void constructWithDefaultPriorityAttribute() throws ConfigurationException, NamingException, JMSException
{
ConfigTree config = createConfigTree();
JMSRouter router = new JMSRouter( config );
@@ -227,7 +198,7 @@
}
@Test
- public void construct_with_priority_attribute() throws ConfigurationException, NamingException, JMSException
+ public void constructWithPriorityAttribute() throws ConfigurationException, NamingException, JMSException
{
final int expectedPriority = 9;
ConfigTree config = createConfigTree();
@@ -238,7 +209,7 @@
}
@Test
- public void construct_with_default_time_to_live_attribute() throws ConfigurationException, NamingException, JMSException
+ public void constructWithDefaultTimeToLiveAttribute() throws ConfigurationException, NamingException, JMSException
{
ConfigTree config = createConfigTree();
JMSRouter router = new JMSRouter( config );
@@ -246,7 +217,7 @@
}
@Test
- public void construct_with_time_to_live_attribute() throws ConfigurationException, NamingException, JMSException
+ public void constructWithTimeToLiveAttribute() throws ConfigurationException, NamingException, JMSException
{
final long ttl = 6000l;
ConfigTree config = createConfigTree();
@@ -256,6 +227,15 @@
assertEquals ( ttl, router.getTimeToLive() );
}
+ @Before
+ public void setup() throws URISyntaxException
+ {
+ msg = createESBMessageObject( messageID, bodyContent );
+ tree = createConfigTree();
+ }
+
+ // private
+
private void assertProcessContract( final String messageID, final Message msg, JMSRouter router ) throws ActionProcessingException, JMSException
{
final Message message = router.process ( msg );
@@ -264,12 +244,30 @@
assertEquals ( jmsMessage.getJMSCorrelationID(), messageID );
}
+ private Message createESBMessageObject( final String messageID, final String body) throws URISyntaxException
+ {
+ Message msg = MessageFactory.getInstance().getMessage();
+ msg.getHeader().getCall().setMessageID( new URI ( "1234-junittest" ) );
+ msg.getBody().add(body.getBytes());
+ return msg;
+ }
+
+ private static ConfigTree createConfigTree()
+ {
+ ConfigTree tree = new ConfigTree("test");
+ tree.setAttribute("jndiName", "/queue/A");
+ return tree;
+ }
+
private static class MockJMSRouter extends JMSRouter
{
@SuppressWarnings ( "unused" )
private Logger log = Logger.getLogger( MockJMSRouter.class );
private javax.jms.Message jmsMessage;
+
+ private String securityPrincipal;
+ private String securityCredential;
public MockJMSRouter(ConfigTree propertiesTree) throws ConfigurationException, NamingException, JMSException
{
@@ -278,6 +276,12 @@
@Override
protected void createQueueSetup( String queueName ) throws ConfigurationException { }
+
+ void createQueueSetup( final String queueName, final String principal, final String credential )
+ {
+ this.securityPrincipal = principal;
+ this.securityCredential = credential;
+ }
@Override
protected void send( javax.jms.Message jmsMessage ) throws JMSException
@@ -305,23 +309,16 @@
impl.setObject( (Serializable) message );
return impl;
}
+
+ public String getSecurityPrincipal() {
+ return securityPrincipal;
+ }
+
+ public String getSecurityCredential() {
+ return securityCredential;
+ }
}
- private Message createESBMessageObject( final String messageID, final String body) throws URISyntaxException
- {
- Message msg = MessageFactory.getInstance().getMessage();
- msg.getHeader().getCall().setMessageID( new URI ( "1234-junittest" ) );
- msg.getBody().add(body.getBytes());
- return msg;
- }
-
- private static ConfigTree createConfigTree()
- {
- ConfigTree tree = new ConfigTree("test");
- tree.setAttribute("jndiName", "/queue/A");
- return tree;
- }
-
/*
* Just here to help Ant to find annotated test.
*/
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerTest.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,197 +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.lifecycle;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.junit.Test;
-
-/**
- * @author Kevin Conner
- *
- */
-public class LifecycleResourceManagerTest {
-
- @Test
- public void testAssociation()
- throws Exception
- {
- // create a lifecycle resource
- final LifecycleResource<TestLifecycleResource1> resource = new LifecycleResource<TestLifecycleResource1>(new TestLifecycleResource1Factory()) ;
- // get unassociated resource and check id
- final TestLifecycleResource1 first = resource.getLifecycleResource() ;
- assertEquals(LifecycleResourceManager.DEFAULT_IDENTITY, first.getId()) ;
- assertNull(first.getDestroyId()) ;
-
-
- // associate deployment
- final String deploymentName = "deploymentName" ;
- // get associated resource and check id
- LifecycleResourceManager.getSingleton().associateDeployment(deploymentName) ;
- final TestLifecycleResource1 second = resource.getLifecycleResource() ;
- final String id = second.getId() ;
- assertFalse(LifecycleResourceManager.DEFAULT_IDENTITY.equals(id)) ;
- assertNull(second.getDestroyId()) ;
- assertNull(first.getDestroyId()) ;
-
- // disassociate deployment
- LifecycleResourceManager.getSingleton().disassociateDeployment(deploymentName) ;
- // check id has been cleaned
- assertEquals(id, second.getDestroyId()) ;
- // check other resources using this classloader have also been cleared.
- assertEquals(LifecycleResourceManager.DEFAULT_IDENTITY, first.getDestroyId()) ;
- }
-
- // Check order
- // create three resources (none, 0, 1000)
- // disassociate deployment
- // check id has been cleaned and resources destroyed in correct order.
-
- @Test
- public void testOrder()
- throws Exception
- {
- // create factories and lifecycle resources
- final TestLifecycleResource2Factory factory1 = new TestLifecycleResource2Factory() ;
- final LifecycleResource<TestLifecycleResource2> lifecycleResource1 = new LifecycleResource<TestLifecycleResource2>(factory1) ;
- final TestLifecycleResource2Factory factory2 = new TestLifecycleResource2Factory() ;
- final LifecycleResource<TestLifecycleResource2> lifecycleResource2 = new LifecycleResource<TestLifecycleResource2>(factory2, 100) ;
- final TestLifecycleResource2Factory factory3 = new TestLifecycleResource2Factory() ;
- final LifecycleResource<TestLifecycleResource2> lifecycleResource3 = new LifecycleResource<TestLifecycleResource2>(factory3, 0) ;
-
- // create resources
- final TestLifecycleResource2 resource1 = lifecycleResource1.getLifecycleResource() ;
- final TestLifecycleResource2 resource2 = lifecycleResource2.getLifecycleResource() ;
- final TestLifecycleResource2 resource3 = lifecycleResource3.getLifecycleResource() ;
-
- // check correct factory is used
- assertEquals(factory1, resource1.getFactory()) ;
- assertEquals(factory2, resource2.getFactory()) ;
- assertEquals(factory3, resource3.getFactory()) ;
-
- // check nothing is destroyed
- assertEquals(0, TestLifecycleResource2Factory.getDestroyOrder().size()) ;
-
- // cleanup all resources
- LifecycleResourceManager.getSingleton().cleanupAllResources() ;
-
- // check we have three resources destroyed
- assertEquals(3, TestLifecycleResource2Factory.getDestroyOrder().size()) ;
-
- // check order of destroy calls.
- assertEquals(resource1, TestLifecycleResource2Factory.getDestroyOrder().get(0)) ;
- assertEquals(resource3, TestLifecycleResource2Factory.getDestroyOrder().get(1)) ;
- assertEquals(resource2, TestLifecycleResource2Factory.getDestroyOrder().get(2)) ;
- }
-
- private static class TestLifecycleResource1
- {
- private final String id ;
- private String destroyId ;
-
- TestLifecycleResource1(final String id)
- {
- this.id = id ;
- }
-
- String getId()
- {
- return id ;
- }
-
- String getDestroyId()
- {
- return destroyId ;
- }
-
- void setDestroyId(final String destroyId)
- {
- this.destroyId = destroyId ;
- }
- }
-
- private static class TestLifecycleResource1Factory implements LifecycleResourceFactory<TestLifecycleResource1>
- {
- public TestLifecycleResource1 createLifecycleResource(final String lifecycleIdentity)
- throws LifecycleResourceException
- {
- return new TestLifecycleResource1(lifecycleIdentity) ;
- }
-
- public void destroyLifecycleResource(final TestLifecycleResource1 resource,
- final String lifecycleIdentity)
- throws LifecycleResourceException
- {
- resource.setDestroyId(lifecycleIdentity) ;
- }
- }
-
- private static class TestLifecycleResource2
- {
- private final LifecycleResourceFactory<TestLifecycleResource2> factory ;
-
- TestLifecycleResource2(final LifecycleResourceFactory<TestLifecycleResource2> factory)
- {
- this.factory = factory ;
- }
-
- LifecycleResourceFactory<TestLifecycleResource2> getFactory()
- {
- return factory ;
- }
- }
-
- private static class TestLifecycleResource2Factory implements LifecycleResourceFactory<TestLifecycleResource2>
- {
- private static final List<TestLifecycleResource2> destroyOrder = new ArrayList<TestLifecycleResource2>() ;
-
- public TestLifecycleResource2 createLifecycleResource(final String lifecycleIdentity)
- throws LifecycleResourceException
- {
- return new TestLifecycleResource2(this) ;
- }
-
- public void destroyLifecycleResource(final TestLifecycleResource2 resource,
- final String lifecycleIdentity)
- throws LifecycleResourceException
- {
- destroyOrder.add(resource) ;
- }
-
- static List<TestLifecycleResource2> getDestroyOrder()
- {
- return destroyOrder ;
- }
- }
-
- public static junit.framework.Test suite()
- {
- return new JUnit4TestAdapter(LifecycleResourceManagerTest.class);
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerUnitTest.java (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerUnitTest.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManagerUnitTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,199 @@
+/*
+* 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.lifecycle;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.junit.Test;
+
+/**
+ * @author Kevin Conner
+ *
+ */
+public class LifecycleResourceManagerUnitTest {
+
+ @Test
+ public void testAssociation()
+ throws Exception
+ {
+ // create a lifecycle resource
+ final LifecycleResource<TestLifecycleResource1> resource = new LifecycleResource<TestLifecycleResource1>(new TestLifecycleResource1Factory()) ;
+ // get unassociated resource and check id
+ final TestLifecycleResource1 first = resource.getLifecycleResource() ;
+ assertEquals(LifecycleResourceManager.DEFAULT_IDENTITY, first.getId()) ;
+ assertNull(first.getDestroyId()) ;
+
+
+ // associate deployment
+ final String deploymentName = "deploymentName" ;
+ // get associated resource and check id
+ LifecycleResourceManager.getSingleton().associateDeployment(deploymentName) ;
+ final TestLifecycleResource1 second = resource.getLifecycleResource() ;
+ final String id = second.getId() ;
+ assertFalse(LifecycleResourceManager.DEFAULT_IDENTITY.equals(id)) ;
+ assertNull(second.getDestroyId()) ;
+ assertNull(first.getDestroyId()) ;
+
+ // disassociate deployment
+ LifecycleResourceManager.getSingleton().disassociateDeployment(deploymentName) ;
+ // check id has been cleaned
+ assertEquals(id, second.getDestroyId()) ;
+ assertNull(first.getDestroyId()) ;
+ // check resources are eventually cleaned up.
+ LifecycleResourceManager.getSingleton().cleanupAllResources() ;
+ assertEquals(LifecycleResourceManager.DEFAULT_IDENTITY, first.getDestroyId()) ;
+ }
+
+ // Check order
+ // create three resources (none, 0, 1000)
+ // disassociate deployment
+ // check id has been cleaned and resources destroyed in correct order.
+
+ @Test
+ public void testOrder()
+ throws Exception
+ {
+ // create factories and lifecycle resources
+ final TestLifecycleResource2Factory factory1 = new TestLifecycleResource2Factory() ;
+ final LifecycleResource<TestLifecycleResource2> lifecycleResource1 = new LifecycleResource<TestLifecycleResource2>(factory1) ;
+ final TestLifecycleResource2Factory factory2 = new TestLifecycleResource2Factory() ;
+ final LifecycleResource<TestLifecycleResource2> lifecycleResource2 = new LifecycleResource<TestLifecycleResource2>(factory2, 100) ;
+ final TestLifecycleResource2Factory factory3 = new TestLifecycleResource2Factory() ;
+ final LifecycleResource<TestLifecycleResource2> lifecycleResource3 = new LifecycleResource<TestLifecycleResource2>(factory3, 0) ;
+
+ // create resources
+ final TestLifecycleResource2 resource1 = lifecycleResource1.getLifecycleResource() ;
+ final TestLifecycleResource2 resource2 = lifecycleResource2.getLifecycleResource() ;
+ final TestLifecycleResource2 resource3 = lifecycleResource3.getLifecycleResource() ;
+
+ // check correct factory is used
+ assertEquals(factory1, resource1.getFactory()) ;
+ assertEquals(factory2, resource2.getFactory()) ;
+ assertEquals(factory3, resource3.getFactory()) ;
+
+ // check nothing is destroyed
+ assertEquals(0, TestLifecycleResource2Factory.getDestroyOrder().size()) ;
+
+ // cleanup all resources
+ LifecycleResourceManager.getSingleton().cleanupAllResources() ;
+
+ // check we have three resources destroyed
+ assertEquals(3, TestLifecycleResource2Factory.getDestroyOrder().size()) ;
+
+ // check order of destroy calls.
+ assertEquals(resource1, TestLifecycleResource2Factory.getDestroyOrder().get(0)) ;
+ assertEquals(resource3, TestLifecycleResource2Factory.getDestroyOrder().get(1)) ;
+ assertEquals(resource2, TestLifecycleResource2Factory.getDestroyOrder().get(2)) ;
+ }
+
+ private static class TestLifecycleResource1
+ {
+ private final String id ;
+ private String destroyId ;
+
+ TestLifecycleResource1(final String id)
+ {
+ this.id = id ;
+ }
+
+ String getId()
+ {
+ return id ;
+ }
+
+ String getDestroyId()
+ {
+ return destroyId ;
+ }
+
+ void setDestroyId(final String destroyId)
+ {
+ this.destroyId = destroyId ;
+ }
+ }
+
+ private static class TestLifecycleResource1Factory implements LifecycleResourceFactory<TestLifecycleResource1>
+ {
+ public TestLifecycleResource1 createLifecycleResource(final String lifecycleIdentity)
+ throws LifecycleResourceException
+ {
+ return new TestLifecycleResource1(lifecycleIdentity) ;
+ }
+
+ public void destroyLifecycleResource(final TestLifecycleResource1 resource,
+ final String lifecycleIdentity)
+ throws LifecycleResourceException
+ {
+ resource.setDestroyId(lifecycleIdentity) ;
+ }
+ }
+
+ private static class TestLifecycleResource2
+ {
+ private final LifecycleResourceFactory<TestLifecycleResource2> factory ;
+
+ TestLifecycleResource2(final LifecycleResourceFactory<TestLifecycleResource2> factory)
+ {
+ this.factory = factory ;
+ }
+
+ LifecycleResourceFactory<TestLifecycleResource2> getFactory()
+ {
+ return factory ;
+ }
+ }
+
+ private static class TestLifecycleResource2Factory implements LifecycleResourceFactory<TestLifecycleResource2>
+ {
+ private static final List<TestLifecycleResource2> destroyOrder = new ArrayList<TestLifecycleResource2>() ;
+
+ public TestLifecycleResource2 createLifecycleResource(final String lifecycleIdentity)
+ throws LifecycleResourceException
+ {
+ return new TestLifecycleResource2(this) ;
+ }
+
+ public void destroyLifecycleResource(final TestLifecycleResource2 resource,
+ final String lifecycleIdentity)
+ throws LifecycleResourceException
+ {
+ destroyOrder.add(resource) ;
+ }
+
+ static List<TestLifecycleResource2> getDestroyOrder()
+ {
+ return destroyOrder ;
+ }
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new JUnit4TestAdapter(LifecycleResourceManagerUnitTest.class);
+ }
+}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -45,7 +45,21 @@
public void test_NotifySqlTable() throws Exception {
ConfigTree domEl = ConfigTree.fromInputStream(getClass().getResourceAsStream("NotifySqlTable_testfile1.xml"));
- NotifySqlTable nst = new NotifySqlTable(domEl);
+ NotifySqlTable nst = new NotifySqlTable(domEl);
+
+ assertEquals("driver-class", nst.m_sDriver);
+ assertEquals("connection-url", nst.m_sURL);
+ assertEquals("user-name", nst.m_sUser);
+ assertEquals("password", nst.m_sPwd);
+ assertEquals("table", nst.m_sTable);
+ assertEquals("dataColumn", nst.m_sDataCol);
+
+ assertEquals(3, nst.m_oCols.size());
+ assertEquals("colvalue1", nst.m_oCols.getProperty("colname1"));
+ assertEquals("colvalue2", nst.m_oCols.getProperty("colname2"));
+ assertEquals("colvalue3", nst.m_oCols.getProperty("colname3"));
+
+ assertEquals("insert into table (colname3,colname2,colname1) values ('colvalue3','colvalue2','colvalue1')", nst.getInsertStmt());
}
public void test_sendNotificationNegative() throws SAXException, IOException, ConfigurationException
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/aggregation_service/jbossesb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/aggregation_service/jbossesb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/aggregation_service/jbossesb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,9 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" >
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="AggregatorListenQueue">
<jms-message-filter dest-type="QUEUE" dest-name="queue/A"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/blue_service/jbossesb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/blue_service/jbossesb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/blue_service/jbossesb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,9 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="Aggregator_ToBlue">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Aggregator_ToBlue"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/green_service/jbossesb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/green_service/jbossesb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/green_service/jbossesb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,9 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="Aggregator_ToGreen">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Aggregator_ToGreen"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/inbound_splitter/jbossesb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/inbound_splitter/jbossesb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/inbound_splitter/jbossesb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,9 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" >
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Aggregator_Request_GW"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/red_service/jbossesb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/red_service/jbossesb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/aggregator/red_service/jbossesb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,9 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" >
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="Aggregator_ToRed">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Aggregator_ToRed"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration1/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration1/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration1/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -41,11 +41,11 @@
<target name="deployProcess" description="deploys the process definition" depends="dependencies">
<echo>Deploy the process definition</echo>
- <taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
- <classpath refid="exec-classpath"/>
- </taskdef>
- <deployToServer>
- <fileset dir="${basedir}/processDefinition" includes="*"/>
+ <taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
+ <classpath refid="exec-classpath"/>
+ </taskdef>
+ <deployToServer username="${jbpm.console.username}" password="${jbpm.console.password}" serverDeployer="${org.jboss.esb.jbpm.console.upload.url}">
+ <fileset dir="${basedir}/processDefinition" includes="*"/>
</deployToServer>
</target>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,4 +1,4 @@
-<project name="Quickstart_bpm_orchestration2" default="run" basedir=".">
+<project name="Quickstart_bpm_orchestration2" default="deploy" basedir=".">
<description>
${ant.project.name}
@@ -27,6 +27,10 @@
<antcall target="deployProcess"/>
</target>
+ <target name="run">
+ <echo message="This target is not implemented for this quickstart. Please run 'ant deploy', 'ant deployProcess' and 'ant startProcess'"/>
+ </target>
+
<target name="runtest">
<echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
</target>
@@ -36,7 +40,7 @@
<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
<classpath refid="exec-classpath"/>
</taskdef>
- <deployToServer>
+ <deployToServer username="${jbpm.console.username}" password="${jbpm.console.password}" serverDeployer="${org.jboss.esb.jbpm.console.upload.url}">
<fileset dir="${basedir}/processDefinition" includes="*"/>
</deployToServer>
</target>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,10 +3,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="deployGwChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_bpm_orchestration2_deploy_Request_gw" />
@@ -62,8 +59,6 @@
</providers>
<services>
-
-
<service category="BPM_Orchestration2_Starter_Service" name="Starter_Service"
description="BPM Orchestration Sample 2: Use this service to start a process instance">
<listeners>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/readme.txt 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration2/readme.txt 2008-07-05 09:19:14 UTC (rev 20915)
@@ -7,17 +7,7 @@
To Run standalone mode:
=======================
- 1. In a command terminal window in the quickstart folder type
- 'ant deploy-jms-dests'.
- 2. In a command terminal window in this folder ("Window1"), type 'ant run'.
- 3. Open another command terminal window in this folder ("Window2"), type
- 'ant deployProcess' to deploy the process.
- 4. Switch back to ESB console and wait for the message
- 'Process Definition Deployed:' to appear on the console.
- 5. Switch back to "Window2", type 'ant startProcess' to start the process.
- 6. Switch back to "Window1" to see the output from the ESB
- 7. When finished, interrupt the ESB using Ctrl-C and, in this folder
- ("Window1"), type 'ant undeploy-jms-dests'.
+ This quickstart does not run in standalone mode.
To Run '.esb' archive mode:
===========================
@@ -112,4 +102,4 @@
13:18:39,106 INFO [STDOUT] Out: Getting Started 'Receive Order' 'Credit Check' 'Validate Order' 'Inventory Check' 'Dallas' 'Shipped'
13:18:39,106 INFO [STDOUT] ***** End Ship It *****
13:18:39,113 INFO [STDOUT] SUCCESS!:
-13:18:39,113 INFO [STDOUT] [Getting Started 'Receive Order' 'Credit Check' 'Validate Order' 'Inventory Check' 'Dallas' 'Shipped' ].
\ No newline at end of file
+13:18:39,113 INFO [STDOUT] [Getting Started 'Receive Order' 'Credit Check' 'Validate Order' 'Inventory Check' 'Dallas' 'Shipped' ].
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -40,7 +40,7 @@
<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
<classpath refid="exec-classpath"/>
</taskdef>
- <deployToServer>
+ <deployToServer username="${jbpm.console.username}" password="${jbpm.console.password}" serverDeployer="${org.jboss.esb.jbpm.console.upload.url}">
<fileset dir="${basedir}/processDefinition" includes="*"/>
</deployToServer>
</target>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,9 +3,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="deployGwChannel">
<jms-message-filter dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/Priority_Rules.drl
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/Priority_Rules.drl 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/Priority_Rules.drl 2008-07-05 09:19:14 UTC (rev 20915)
@@ -12,24 +12,18 @@
rule "Logging"
+salience 10
when
order: OrderHeader()
customer: Customer()
then
System.out.println("Customer Status: " + customer.getStatus());
System.out.println("Order Total: " + order.getTotalAmount());
+ order.setOrderPriority(1);
end
-rule "Customer Platinum Status"
- when
- customer: Customer(status > 50)
- order: OrderHeader(totalAmount > 50)
- then
- System.out.println("Platinum Customer - High Priority");
- order.setOrderPriority(3);
-end
-
rule "Customer Gold Status"
+salience 20
when
customer: Customer(status > 10, status <= 50)
order: OrderHeader(totalAmount > 25)
@@ -38,6 +32,15 @@
order.setOrderPriority(2);
end
+rule "Customer Platinum Status"
+salience 20
+ when
+ customer: Customer(status > 50)
+ order: OrderHeader(totalAmount > 50)
+ then
+ System.out.println("Platinum Customer - High Priority");
+ order.setOrderPriority(3);
+end
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -42,7 +42,7 @@
<target name="startProcess" depends="compile" description="Sends a message to start the process instance">
<echo>Sends a message to start the process instance</echo>
- <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.test.SendJMSMessageStart" failonerror="true">
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.test.SendJMSMessageStart" failonerror="true">
<arg value="SampleOrder.xml"/>
<classpath refid="exec-classpath"/>
</java>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/images/gear1.gif (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/bpm_orchestration4/images/gear1.gif)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -13,6 +13,9 @@
<jms-bus busid="startGwChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_bpm_orchestration4_start_gw" />
+ <!-- quickstart_bpm_orchestration4_start_gw -->
+ <!-- This queue is used for JPetstore's order -->
+ <!-- queue/quickstart_simple_cbr_Request -->
</jms-bus>
<jms-bus busid="startEsbChannel">
<jms-message-filter dest-type="QUEUE"
@@ -116,7 +119,7 @@
<action name="SetupMessage"
class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.esb_actions.SetupMessage">
- <property name="status" value="60" />
+ <property name="status" value="40" />
<!-- status was not in order XML, this is just for demo purposes -->
</action>
@@ -241,7 +244,7 @@
busidref="conciergeServiceEsbChannel" maxThreads="1">
</jms-listener>
</listeners>
- <actions>
+ <actions mep="OneWay">
<action name="monitor" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.esb_actions.SimpleJMSNotifier">
<property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration4_monitor" />
<property name="PREPENDED_TEXT" value="Concierge:Highest Priority Customers/Orders" />
@@ -257,7 +260,7 @@
busidref="distributionServiceEsbChannel" maxThreads="1">
</jms-listener>
</listeners>
- <actions>
+ <actions mep="OneWay">
<action name="monitor" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.esb_actions.SimpleJMSNotifier">
<property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration4_monitor" />
<property name="PREPENDED_TEXT" value="Distribution Manager:Medium Priority Customers/Orders" />
@@ -272,7 +275,7 @@
busidref="basicShippingServiceEsbChannel" maxThreads="1">
</jms-listener>
</listeners>
- <actions>
+ <actions mep="OneWay">
<action name="monitor" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.esb_actions.SimpleJMSNotifier">
<property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration4_monitor" />
<property name="PREPENDED_TEXT" value="Basic:Lowest Priority Customers/Orders" />
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/lib/swing-layout-1.0.jar (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/bpm_orchestration4/lib/swing-layout-1.0.jar)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/processDefinition/processdefinition.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/processDefinition/processdefinition.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,92 +1,100 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-definition
- name="bpm4_ESBOrderProcess">
- <start-state name="start">
- <transition name="" to="Intake Order"></transition>
- </start-state>
-
- <node name="Intake Order">
-
- <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
- <esbCategoryName>BPM_Orchestration4</esbCategoryName>
- <esbServiceName>IntakeService</esbServiceName>
- <!-- async call of IntakeService -->
- <bpmToEsbVars>
- <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
- </bpmToEsbVars>
- <esbToBpmVars>
- <mapping esb="body.entireOrderAsXML" bpm="entireOrderAsXML" />
- <mapping esb="body.orderHeader" bpm="entireOrderAsObject" />
- <mapping esb="body.customer" bpm="entireCustomerAsObject" />
- <mapping esb="body.order_orderId" bpm="order_orderid" />
- <mapping esb="body.order_totalAmount" bpm="order_totalamount" />
- <mapping esb="body.order_orderPriority" bpm="order_priority" />
- <mapping esb="body.customer_firstName" bpm="customer_firstName" />
- <mapping esb="body.customer_lastName" bpm="customer_lastName" />
- <mapping esb="body.customer_status" bpm="customer_status" />
- </esbToBpmVars>
- </action>
-
- <transition name="" to="Review Order"></transition>
- </node>
-
- <task-node name="Review Order">
- <task name="Order Review">
- <assignment actor-id="user"></assignment>
- <controller>
- <variable name="customer_firstName" access="read,write,required"></variable>
- <variable name="customer_lastName" access="read,write,required"></variable>
- <variable name="customer_status" access="read"></variable>
- <variable name="order_totalamount" access="read"></variable>
- <variable name="order_priority" access="read"></variable>
- <variable name="order_orderid" access="read"></variable>
- <variable name="order_discount" access="read"></variable>
- <variable name="entireOrderAsXML" access="read"></variable>
- </controller>
- </task>
- <transition name="" to="Calculate Discount"></transition>
- </task-node>
-
- <node name="Calculate Discount">
-
- <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
- <esbCategoryName>BPM_Orchestration4</esbCategoryName>
- <esbServiceName>DiscountService</esbServiceName>
- <bpmToEsbVars>
- <mapping bpm="entireCustomerAsObject" esb="customer" />
- <mapping bpm="entireOrderAsObject" esb="orderHeader" />
- <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
- </bpmToEsbVars>
- <esbToBpmVars>
- <mapping bpm="entireOrderAsObject" esb="order" />
- <mapping esb="body.order_orderDiscount" bpm="order_discount" />
- </esbToBpmVars>
- </action>
-
- <transition name="" to="Review Discount"></transition>
- </node>
-
- <task-node name="Review Discount">
- <task name="Discount Review">
- <assignment actor-id="manager"></assignment>
- </task>
- <transition name="" to="Ship It"></transition>
- </task-node>
-
- <node name="Ship It">
- <transition name="" to="end">
- <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbNotifier">
- <esbCategoryName>BPM_Orchestration4</esbCategoryName>
- <esbServiceName>ShippingService</esbServiceName>
- <bpmToEsbVars><mapping bpm="entireCustomerAsObject" esb="customer" />
- <mapping bpm="entireOrderAsObject" esb="orderHeader" />
- <mapping bpm="entireOrderAsXML" esb="entireOrderAsXML" />
- </bpmToEsbVars>
- </action>
- </transition>
- </node>
-
- <end-state name="end"></end-state>
-
-</process-definition>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ name="bpm4_ESBOrderProcess">
+ <start-state name="start">
+ <transition name="" to="Intake Order"></transition>
+ </start-state>
+
+ <node name="Intake Order" async="true">
+
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>BPM_Orchestration4</esbCategoryName>
+ <esbServiceName>IntakeService</esbServiceName>
+ <!-- async call of IntakeService -->
+ <bpmToEsbVars>
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping esb="body.entireOrderAsXML" bpm="entireOrderAsXML" />
+ <mapping esb="body.orderHeader" bpm="entireOrderAsObject" />
+ <mapping esb="body.customer" bpm="entireCustomerAsObject" />
+ <mapping esb="body.order_orderId" bpm="order_orderid" />
+ <mapping esb="body.order_totalAmount" bpm="order_totalamount" />
+ <mapping esb="body.order_orderPriority" bpm="order_priority" />
+ <mapping esb="body.customer_firstName" bpm="customer_firstName" />
+ <mapping esb="body.customer_lastName" bpm="customer_lastName" />
+ <mapping esb="body.customer_status" bpm="customer_status" />
+ </esbToBpmVars>
+ </action>
+
+ <transition name="" to="Review Order"></transition>
+ </node>
+
+ <task-node name="Review Order" async="true">
+ <task name="Order Review">
+ <assignment actor-id="user"></assignment>
+ <controller>
+ <variable name="customer_firstName" access="read,write,required"/>
+ <variable name="customer_lastName" access="read,write,required"/>
+ <variable name="customer_status" access="read,write"/>
+ <variable name="order_totalamount" access="read"/>
+ <variable name="order_priority" access="read"/>
+ <variable name="order_orderid" access="read"/>
+ <variable name="order_discount" access="read"/>
+ <variable name="entireOrderAsXML" access="read"/>
+ </controller>
+ </task>
+ <transition name="" to="Calculate Discount"/>
+ </task-node>
+
+ <node name="Calculate Discount" async="true">
+
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>BPM_Orchestration4</esbCategoryName>
+ <esbServiceName>DiscountService</esbServiceName>
+ <bpmToEsbVars>
+ <mapping bpm="entireCustomerAsObject" esb="body.customer" />
+ <mapping bpm="customer_firstName" esb="body.customer.firstName" />
+ <mapping bpm="customer_lastName" esb="body.customer.lastName" />
+ <mapping bpm="customer_status" esb="body.customer.status" />
+ <mapping bpm="entireOrderAsObject" esb="orderHeader" />
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="entireOrderAsObject" esb="order" />
+ <mapping esb="body.order_orderDiscount" bpm="order_discount" />
+ <mapping esb="body.customer.firstName" bpm="customer_firstName" />
+ <mapping esb="body.customer.lastName" bpm="customer_lastName" />
+ <mapping esb="body.customer.status" bpm="customer_status" />
+ </esbToBpmVars>
+ </action>
+
+ <transition name="" to="Review Discount"></transition>
+ </node>
+
+ <task-node name="Review Discount" async="true">
+ <task name="Discount Review">
+ <assignment actor-id="manager"></assignment>
+ </task>
+ <transition name="" to="Ship It"></transition>
+ </task-node>
+
+ <node name="Ship It" async="true">
+ <transition name="" to="end">
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbNotifier">
+ <esbCategoryName>BPM_Orchestration4</esbCategoryName>
+ <esbServiceName>ShippingService</esbServiceName>
+ <bpmToEsbVars><mapping bpm="entireCustomerAsObject" esb="customer" />
+ <mapping bpm="customer_firstName" esb="body.customer.firstName" />
+ <mapping bpm="customer_lastName" esb="body.customer.lastName" />
+ <mapping bpm="entireOrderAsObject" esb="orderHeader" />
+ <mapping bpm="entireOrderAsXML" esb="entireOrderAsXML" />
+ </bpmToEsbVars>
+ </action>
+ </transition>
+ </node>
+
+ <end-state name="end"></end-state>
+
+</process-definition>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/processDefinition/processimage.jpg
===================================================================
(Binary files differ)
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.form (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.form)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.form (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.form 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="Service Alert Monitor"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane1" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jButton1" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jLabel3" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jLabel1" alignment="0" pref="265" max="32767" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jLabel1" min="-2" pref="39" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jScrollPane1" min="-2" pref="98" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel3" pref="84" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Tahoma" size="18" style="0"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="cc" green="0" red="0" type="rgb"/>
+ </Property>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ <Property name="text" type="java.lang.String" value="Service Alert Monitor"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTextArea" name="textAreaOrderQueue">
+ <Properties>
+ <Property name="columns" type="int" value="20"/>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Arial" size="14" style="0"/>
+ </Property>
+ <Property name="rows" type="int" value="5"/>
+ <Property name="tabSize" type="int" value="2"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JButton" name="jButton1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Clear"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel3">
+ <Properties>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+</Form>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.java (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/bpm_orchestration4/src/ServiceAlertMonitor.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,192 @@
+/*
+ * ServiceAlertMonitor2.java
+ *
+ * Created on November 21, 2006, 12:10 AM
+ */
+import javax.swing.UIManager;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.jms.Message;
+import javax.jms.QueueReceiver;
+import javax.jms.MessageListener;
+
+/**
+ *
+ * @author burr
+ */
+public class ServiceAlertMonitor extends javax.swing.JFrame implements MessageListener {
+ InitialContext iniCtx = null;
+ QueueConnectionFactory qcf = null;
+ QueueConnection conn = null;
+ QueueSession receiverSession = null;
+ Queue receiverQueue = null;
+ QueueReceiver queueReceiver = null;
+
+ String imageName = "images/javawork.gif";
+
+ /** Creates new form ServiceAlertMonitor */
+ public ServiceAlertMonitor(String serviceName, String queueName, String imageName) {
+ initComponents();
+ this.jLabel1.setText(serviceName);
+ try {
+ if (iniCtx == null) iniCtx = new InitialContext();
+ if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+ if (conn == null) {
+ conn = qcf.createQueueConnection();
+ conn.start();
+ }
+ String responseQueueName = "queue/" + queueName;
+ this.imageName = imageName;
+ receiverQueue = (Queue) iniCtx.lookup(responseQueueName);
+ receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ queueReceiver = receiverSession.createReceiver(receiverQueue);
+ queueReceiver.setMessageListener(this);
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ jLabel1 = new javax.swing.JLabel();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ textAreaOrderQueue = new javax.swing.JTextArea();
+ jButton1 = new javax.swing.JButton();
+ jLabel3 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setTitle("Service Alert Monitor");
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent evt) {
+ formWindowClosing(evt);
+ }
+ });
+
+ jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18));
+ jLabel1.setForeground(new java.awt.Color(0, 0, 204));
+ jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+ jLabel1.setText("Service Alert Monitor");
+
+ textAreaOrderQueue.setColumns(20);
+ textAreaOrderQueue.setFont(new java.awt.Font("Arial", 0, 14));
+ textAreaOrderQueue.setRows(5);
+ textAreaOrderQueue.setTabSize(2);
+ jScrollPane1.setViewportView(textAreaOrderQueue);
+
+ jButton1.setText("Clear");
+ jButton1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton1ActionPerformed(evt);
+ }
+ });
+
+ jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
+ .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
+ .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 98, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jButton1)
+ .addContainerGap())
+ );
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
+ try {
+ if (queueReceiver != null) queueReceiver.close();
+ if (receiverSession != null) receiverSession.close();
+
+ } catch (JMSException e) {
+ System.out.println(e);
+ }
+ }//GEN-LAST:event_formWindowClosing
+
+ boolean on = false;
+ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
+ textAreaOrderQueue.setText("");
+ this.jLabel3.setIcon(null);
+ //this.jLabel3.setVisible(false);
+ }//GEN-LAST:event_jButton1ActionPerformed
+
+
+ public void onMessage(Message msg) {
+ try {
+ String textMessage = ((TextMessage)msg).getText();
+ textAreaOrderQueue.setText(textMessage);
+ java.io.File x = new java.io.File(imageName);
+ System.out.println(x.getAbsolutePath());
+ javax.swing.ImageIcon icon = new javax.swing.ImageIcon(x.getAbsolutePath()); // animated gif
+ this.jLabel3.setIcon(icon);
+ this.jLabel3.setVisible(true);
+ } catch (Exception e) {
+ System.err.println(e);
+ textAreaOrderQueue.setText("ERROR: " + e.getMessage());
+ }
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) throws Exception {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ System.out.println(args[0]);
+ final String tempServiceName = args[0];
+ System.out.println(args[1]);
+ final String tempQueueName = args[1];
+ System.out.println(args[2]);
+ final String tempImageName = args[2];
+ java.awt.EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ ServiceAlertMonitor frame = new ServiceAlertMonitor(tempServiceName,tempQueueName,tempImageName);
+
+ // center the window
+ Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
+ frame.setLocation(d.width/2 - frame.getWidth()/2,
+ d.height/2 - frame.getHeight()/2);
+ frame.setVisible(true);
+ }
+ });
+ }
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jButton1;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTextArea textAreaOrderQueue;
+ // End of variables declaration//GEN-END:variables
+
+}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_rules_service/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_rules_service/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_rules_service/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,9 +4,7 @@
<providers>
<jms-provider name="JBossMQ"
- connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_Business_Rules_Request_GW" />
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_service/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_service/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/business_service/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,10 +3,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/base-build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/base-build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -251,8 +251,40 @@
<!-- compile-classpath, exec-classpath -->
<!-- ==================================================================== -->
- <target name="dependencies" depends="classpath-dependencies, quickstart-specific-checks"/>
+ <target name="dependencies" depends="classpath-dependencies, quickstart-specific-checks">
+
+ <!-- jBPM Console properties -->
+ <condition property="jbpm.production.properties.set" value="true" else="false">
+ <and>
+ <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+ <isset property="quickstart.jbpm.console.username"/>
+ <isset property="quickstart.jbpm.console.password"/>
+ </and>
+ </condition>
+ <fail message="Quickstart configuration error: ${line.separator}${line.separator} jBPM username and password must be set in ${pwd}/quickstarts.properties. ${line.separator} The jBPM web console is secured when running in production mode i.e when org.jboss.esb.server.config=production.">
+ <condition>
+ <and>
+ <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+ <equals arg1="${jbpm.production.properties.set}" arg2="false"/>
+ </and>
+ </condition>
+ </fail>
+ <condition property="org.jboss.esb.jbpm.console.upload.url" value="/jbpm-console/app/upload/" else="/jbpm-console/upload/">
+ <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+ </condition>
+
+ <condition property="jbpm.console.username" value="${quickstart.jbpm.console.username}" else="">
+ <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+ </condition>
+
+ <condition property="jbpm.console.password" value="${quickstart.jbpm.console.password}" else="">
+ <equals arg1="${org.jboss.esb.server.config}" arg2="production"/>
+ </condition>
+
+ <!-- End jBPM Console properties -->
+ </target>
+
<target name="classpath-dependencies" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
<path id="compile-classpath">
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/quickstarts.properties-example
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/quickstarts.properties-example 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/conf/quickstarts.properties-example 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,13 +5,17 @@
##############################################################################################
# Location of your JBoss Application Server installation.
# Will override the same property name from install/deployment.properties
-#org.jboss.esb.server.home=${product.dir}/build/jbossesb-server-4.2GA
+#org.jboss.esb.server.home=${product.dir}/build/jbossesb-server-4.2.1CP3
# JBossAS server name. If not set defaults to 'default'
# Will override the same property name from install/deployment.properties
#org.jboss.esb.server.config=default
+# jBPM console security credentials (if org.jboss.esb.server.config=production)
+#jbpm.console.username=admin
+#jbpm.console.password=admin
+
# If you are running the ftp tests then you must complete the following
jbossesb.ftp.hostname=
jbossesb.ftp.username=
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/custom_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/custom_action/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/custom_action/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,14 +2,11 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
- dest-name="queue/quickstart_custom_action_GW"
+ dest-name="queue/quickstart_custom_action_GW"
/>
</jms-bus>
<jms-bus busid="quickstartEsbChannel">
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/deadletter/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/deadletter/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/deadletter/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/exceptions_faults/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/exceptions_faults/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/exceptions_faults/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="LostMessageServiceGW">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/fun_cbr/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/fun_cbr/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/fun_cbr/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,9 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" >
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_GW"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/groovy_gateway/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/groovy_gateway/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/groovy_gateway/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -6,7 +6,7 @@
${line.separator}
</description>
- <property name="additional.deploys" value="jbossesb-service.xml" />
+ <property name="additional.deploys" value="jbossesb-service.xml quickstart-ds.xml" />
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
@@ -28,7 +28,6 @@
<target name="undeploy" depends="dependencies">
<delete file="${org.jboss.esb.server.deploy.dir}/${ant.project.name}.esb"/>
- <delete file="${org.jboss.esb.server.deploy.dir}/quickstart-ds.xml"/>
</target>
<target name="config" depends="compile">
@@ -69,6 +68,7 @@
we are packaging it within an .ear -->
<mkdir dir="${build.dir}/META-INF"/>
<copy file="jboss-esb.xml" todir="${build.dir}/META-INF"/>
+ <copy file="deployment.xml" todir="${build.dir}/META-INF"/>
<delete file="${build.dir}/${ant.project.name}.esb"/>
<jar destfile="${build.dir}/${ant.project.name}.esb">
<fileset dir="${build.dir}">
@@ -76,9 +76,10 @@
<include name="*.war"/>
<include name="action.jar"/>
</fileset>
- <fileset dir="${basedir}">
- <include name="quickstart-ds.xml"/>
+ <fileset dir="${basedir}/src">
+ <include name="**/*.sql"/>
</fileset>
+ <fileset dir="${basedir}" includes="${additional.deploys} ${jms.service.file}"/>
</jar>
</target>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/deployment.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_hibernate_action/deployment.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/deployment.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,3 @@
+<jbossesb-deployment>
+ <depends>jboss.esb:service=HelloworldHibernateDatabaseInitializer</depends>
+</jbossesb-deployment>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,13 @@
+<?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_hibernate_action_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <!-- redelivery attempt delay in millis -->
+ <attribute name="RedeliveryDelay">1000</attribute>
+ <attribute name="MaxDeliveryAttempts">15</attribute>
+ </mbean>
+
+</server>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,10 @@
+<?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_hibernate_action_Request_esb">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+ <!-- redelivery attempt delay in millis -->
+ <attribute name="RedeliveryDelay">1000</attribute>
+ </mbean>
+</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -16,7 +16,7 @@
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-type="QUEUE"
- dest-name="queue/A"
+ dest-name="queue/quickstart_hibernate_action_Request_esb"
selector="source='fromHelloworldHibernateAction'"
/>
</jms-bus>
@@ -28,7 +28,7 @@
<services>
<service
category="myCategory"
- name="myJmsListener"
+ name="myHibernateListener"
description="Hello World Hibernate Action (esb hibernate listener)">
<listeners>
<hibernate-listener name="HibernateGateway"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-service.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/jbossesb-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,12 +2,12 @@
<server>
<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
- name="jboss.esb:service=QuickstartDatabaseInitializer">
- <attribute name="Datasource">java:/QuickstartDB</attribute>
+ name="jboss.esb:service=HelloworldHibernateDatabaseInitializer">
+ <attribute name="Datasource">java:/HelloworldHibernateDB</attribute>
<attribute name="ExistsSql">select * from orders</attribute>
<attribute name="SqlFiles">
hsqldb/create.sql
</attribute>
- <depends>jboss.jca:name=QuickstartDB,service=DataSourceBinding</depends>
+ <depends>jboss.jca:name=HelloworldHibernateDB,service=DataSourceBinding</depends>
</mbean>
</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/quickstart-ds.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/quickstart-ds.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_hibernate_action/quickstart-ds.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
- <jndi-name>QuickstartDB</jndi-name>
+ <jndi-name>HelloworldHibernateDB</jndi-name>
<connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1703</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
@@ -9,16 +9,15 @@
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
- <depends>jboss:service=Hypersonic</depends>
+ <depends>jboss:service=HelloworldHibernateDB</depends>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</local-tx-datasource>
- <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
- <mbean code="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic">
+ <mbean code="org.jboss.internal.soa.esb.dependencies.HypersonicDatabase"
+ name="jboss:service=HelloworldHibernateDB">
<attribute name="Port">1703</attribute>
<attribute name="BindAddress">${jboss.bind.address}</attribute>
- <attribute name="Database">quickstartDB</attribute>
+ <attribute name="Database">HelloworldHibernateDB</attribute>
<attribute name="Silent">true</attribute>
<attribute name="Trace">false</attribute>
<attribute name="No_system_exit">true</attribute>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,19 +5,13 @@
${line.separator}
</description>
- <property name="additional.deploys" value="jbossesb-service.xml" />
+ <property name="additional.deploys" value="jbossesb-service.xml quickstart-ds.xml" />
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
<target name="quickstart-specific-assemblies" description="Quickstart specific assemblies">
</target>
-
- <target name="quickstart-specific-deploys" description="Quickstart specific deploys">
- <copy file="quickstart-ds.xml"
- todir="${org.jboss.esb.server.deploy.dir}"
- overwrite="false"/>
- </target>
<target name="runtest" depends="dependencies" description="Insert row data into sql table polled by gateway">
<property name="hsqldb.jar"
@@ -25,7 +19,7 @@
<echo>Insert row data into sql table polled by gateway</echo>
<sql
driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ url="jdbc:hsqldb:hsql://localhost:1704"
userid="sa"
autocommit="true"
password="">
@@ -43,7 +37,7 @@
<sql
print="true"
driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ url="jdbc:hsqldb:hsql://localhost:1704"
userid="sa"
autocommit="true"
password="">
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/deployment.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_sql_action/deployment.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/deployment.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,3 @@
+<jbossesb-deployment>
+ <depends>jboss.esb:service=HelloworldSqlDatabaseInitializer</depends>
+</jbossesb-deployment>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,13 @@
+<?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_sql_action_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <!-- redelivery attempt delay in millis -->
+ <attribute name="RedeliveryDelay">1000</attribute>
+ <attribute name="MaxDeliveryAttempts">15</attribute>
+ </mbean>
+
+</server>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,10 @@
+<?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_sql_action_Request_esb">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+ <!-- redelivery attempt delay in millis -->
+ <attribute name="RedeliveryDelay">1000</attribute>
+ </mbean>
+</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,7 +3,7 @@
<providers>
<sql-provider name="SQLprovider"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ url="jdbc:hsqldb:hsql://localhost:1704"
driver="org.hsqldb.jdbcDriver"
username="sa"
password="">
@@ -25,7 +25,7 @@
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-type="QUEUE"
- dest-name="queue/A"
+ dest-name="queue/quickstart_sql_action_Request_esb"
selector="source='fromHelloworldSQLAction'"
/>
</jms-bus>
@@ -37,7 +37,7 @@
<services>
<service
category="myCategory"
- name="myJmsListener"
+ name="mySqlListener"
description="Hello World SQL Action (esb jdbc listener)">
<listeners>
<sql-listener name="SqlGateway"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbossesb-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbossesb-service.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/jbossesb-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,12 +2,12 @@
<server>
<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
- name="jboss.esb:service=QuickstartDatabaseInitializer">
- <attribute name="Datasource">java:/QuickstartDB</attribute>
+ name="jboss.esb:service=HelloworldSqlDatabaseInitializer">
+ <attribute name="Datasource">java:/HelloworldSqlDB</attribute>
<attribute name="ExistsSql">select * from gateway_table</attribute>
<attribute name="SqlFiles">
hsqldb/create.sql
</attribute>
- <depends>jboss.jca:name=QuickstartDB,service=DataSourceBinding</depends>
+ <depends>jboss.jca:name=HelloworldSqlDB,service=DataSourceBinding</depends>
</mbean>
</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/quickstart-ds.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/quickstart-ds.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_sql_action/quickstart-ds.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,24 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
- <jndi-name>QuickstartDB</jndi-name>
- <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1703</connection-url>
+ <jndi-name>HelloworldSqlDB</jndi-name>
+ <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1704</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
- <depends>jboss:service=Hypersonic</depends>
+ <depends>jboss:service=HelloworldSqlDB</depends>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</local-tx-datasource>
- <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
- <mbean code="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic">
- <attribute name="Port">1703</attribute>
+ <mbean code="org.jboss.internal.soa.esb.dependencies.HypersonicDatabase"
+ name="jboss:service=HelloworldSqlDB">
+ <attribute name="Port">1704</attribute>
<attribute name="BindAddress">${jboss.bind.address}</attribute>
- <attribute name="Database">quickstartDB</attribute>
+ <attribute name="Database">HelloworldSqlDB</attribute>
<attribute name="Silent">true</attribute>
<attribute name="Trace">false</attribute>
<attribute name="No_system_exit">true</attribute>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,7 +5,7 @@
${line.separator}
</description>
- <property name="additional.deploys" value="jbossesb-service.xml" />
+ <property name="additional.deploys" value="jbossesb-service.xml quickstart-ds.xml" />
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
@@ -13,125 +13,114 @@
<target name="quickstart-specific-assemblies" description="Quickstart specific assemblies">
</target>
- <target name="quickstart-specific-deploys" description="Quickstart specific deploys">
- <copy file="quickstart-ds.xml"
- todir="${org.jboss.esb.server.deploy.dir}"
- overwrite="false"/>
+ <target name="quickstart-specific-checks">
+ <property name="driver" value="org.h2.Driver"/>
+ <property name="driver.jar" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/h2.jar"/>
+ <property name="url" value="jdbc:h2:tcp://localhost:9095/"/>
</target>
-
+
<target name="runtest" depends="dependencies" description="Insert row data into sql table polled by gateway">
- <property name="hsqldb.jar"
- value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
- <echo>Insert row data into sql table polled by gateway</echo>
- <sql
- driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
- userid="sa"
- autocommit="true"
- password="">
- <classpath>
- <pathelement path="${hsqldb.jar}"/>
- </classpath>
+ <echo>Insert row data into sql table polled by gateway</echo>
+ <sql
+ driver="${driver}"
+ url="${url}"
+ userid="sa"
+ autocommit="true"
+ password="">
+ <classpath>
+ <pathelement path="${driver.jar}"/>
+ </classpath>
<transaction src="populate.sql"/>
- </sql>
+ </sql>
</target>
<target name="create" depends="dependencies" description="create table tx_esb_messages">
- <property name="hsqldb.jar"
- value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
<echo>create table tx_esb_messages</echo>
<sql
print="true"
- driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ driver="${driver}"
+ url="${url}"
userid="sa"
autocommit="true"
password="">
<classpath>
- <pathelement path="${hsqldb.jar}"/>
+ <pathelement path="${driver.jar}"/>
</classpath>
<transaction>
- create table tx_esb_messages(MESSAGE_ID varchar, STATUS_COL varchar NOT NULL, TIMESTAMP_COL bigint, DATA_COL varchar NOT NULL);
+ create table tx_esb_messages(MESSAGE_ID varchar, STATUS_COL varchar NOT NULL, TIMESTAMP_COL bigint, DATA_COL varchar NOT NULL);
</transaction>
- </sql>
-
+ </sql>
</target>
<target name="drop" depends="dependencies" description="drop table tx_esb_messages">
- <property name="hsqldb.jar"
- value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
<echo>drop table tx_esb_messages</echo>
<sql
print="true"
- driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ driver="${driver}"
+ url="${url}"
userid="sa"
autocommit="true"
password="">
<classpath>
- <pathelement path="${hsqldb.jar}"/>
+ <pathelement path="${driver.jar}"/>
</classpath>
<transaction>
- drop table tx_esb_messages
+ drop table tx_esb_messages
</transaction>
- </sql>
-
+ </sql>
</target>
<target name="drop2" depends="dependencies" description="drop table gateway_table">
- <property name="hsqldb.jar"
- value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
+ <echo>drop table tx_esb_messages</echo>
<echo>drop table gateway_table</echo>
<sql
print="true"
- driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ driver="${driver}"
+ url="${url}"
userid="sa"
autocommit="true"
password="">
<classpath>
- <pathelement path="${hsqldb.jar}"/>
+ <pathelement path="${driver.jar}"/>
</classpath>
<transaction>
- drop table gateway_table
+ drop table gateway_table
</transaction>
- </sql>
-
+ </sql>
</target>
<target name="select" depends="dependencies" description="select * from gateway_table">
- <property name="hsqldb.jar"
- value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
- <echo>Select * from gateway_table</echo>
+ <echo>Select * from tx_esb_messages</echo>
<sql
print="true"
- driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ driver="${driver}"
+ url="${url}"
userid="sa"
autocommit="true"
password="">
<classpath>
- <pathelement path="${hsqldb.jar}"/>
+ <pathelement path="${driver.jar}"/>
</classpath>
<transaction>
- select * from tx_esb_messages
+ select * from tx_esb_messages
</transaction>
- </sql>
+ </sql>
+
+ <echo>Select * from gateway_table</echo>
<sql
print="true"
- driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ driver="${driver}"
+ url="${url}"
userid="sa"
autocommit="true"
password="">
<classpath>
- <pathelement path="${hsqldb.jar}"/>
+ <pathelement path="${driver.jar}"/>
</classpath>
<transaction>
- select * from gateway_table
+ select * from gateway_table where DATA_COLUMN like 'data%' and upper(STATUS_COL) like 'P%' order by DATA_COLUMN
</transaction>
- </sql>
-
+ </sql>
</target>
<target name="deploy-jms-dests">
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,3 +0,0 @@
-<jbossesb-deployment>
- <depends>jboss.esb:service=QuickstartDatabaseInitializer</depends>
-</jbossesb-deployment>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,3 @@
+<jbossesb-deployment>
+ <depends>jboss.esb:service=HelloworldTxSqlDatabaseInitializer</depends>
+</jbossesb-deployment>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,16 +3,14 @@
<providers>
<sql-provider name="GatewaySQLprovider"
- url="jdbc:hsqldb:hsql://localhost:1703"
- driver="org.hsqldb.jdbcDriver"
- username="sa"
- password="">
+ url="jdbc:h2:tcp://localhost:9095/"
+ datasource="java:/HelloworldTxSqlDB">
<sql-bus busid="helloSQLChannel" >
<sql-message-filter
- tablename="GATEWAY_TABLE"
+ tablename="gateway_table"
status-column="STATUS_COL"
- order-by="DATA_COLUMN"
- where-condition="DATA_COLUMN like 'data%'"
+ order-by="DATA_COLUMN"
+ where-condition="DATA_COLUMN like 'data%'"
message-column="DATA_COLUMN"
message-id-column="UNIQUE_ID"
insert-timestamp-column="TIMESTAMP_COL"
@@ -21,15 +19,15 @@
</sql-provider>
<sql-provider name="SQLprovider"
- url="jdbc:hsqldb:hsql://localhost:1703"
- datasource="java:/QuickstartDB">
+ url="jdbc:h2:tcp://localhost:9095/"
+ datasource="java:/HelloworldTxSqlDB">
<sql-bus busid="TxHelloSQLChannel" >
<sql-message-filter
tablename="TX_ESB_MESSAGES"
- message-id-column="MESSAGE_ID"
+ message-id-column="MESSAGE_ID"
status-column="STATUS_COL"
- insert-timestamp-column="TIMESTAMP_COL"
- message-column="DATA_COLUMN"
+ insert-timestamp-column="TIMESTAMP_COL"
+ message-column="DATA_COLUMN"
/>
</sql-bus>
</sql-provider>
@@ -37,27 +35,16 @@
</providers>
<services>
- <service
- category="myCategory"
- name="myTxListener"
- description="Hello World TX SQL Action (esb jdbc listener)">
+ <service category="myCategory" name="myTxListener" description="Hello World TX SQL Action (esb jdbc listener)">
<listeners>
- <sql-listener name="SqlGateway"
- busidref="helloSQLChannel"
- maxThreads="1"
- is-gateway="true"/>
- <sql-listener name="TxSqlListener"
- busidref="TxHelloSQLChannel"
- maxThreads="1">
- <property name="transacted" value="true"/>
+ <sql-listener name="SqlGateway" busidref="helloSQLChannel" maxThreads="1" is-gateway="true"/>
+ <sql-listener name="TxSqlListener" busidref="TxHelloSQLChannel" maxThreads="1">
+ <property name="transacted" value="true"/>
</sql-listener>
</listeners>
<actions mep="OneWay">
- <action name="action1"
- class="org.jboss.soa.esb.samples.quickstart.helloworldtxsqlaction.MyAction"
- process="displayMessage"
- />
- <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln" />
+ <action name="action1" class="org.jboss.soa.esb.samples.quickstart.helloworldtxsqlaction.MyAction" process="displayMessage" />
+ <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln" />
</actions>
</service>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-service.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/jbossesb-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,12 +2,10 @@
<server>
<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
- name="jboss.esb:service=QuickstartDatabaseInitializer">
- <attribute name="Datasource">java:/QuickstartDB</attribute>
+ name="jboss.esb:service=HelloworldTxSqlDatabaseInitializer">
+ <attribute name="Datasource">java:/HelloworldTxSqlDB</attribute>
<attribute name="ExistsSql">select * from gateway_table</attribute>
- <attribute name="SqlFiles">
- hsqldb/create.sql
- </attribute>
- <depends>jboss.jca:name=QuickstartDB,service=DataSourceBinding</depends>
+ <attribute name="SqlFiles">h2/create.sql</attribute>
+ <depends>jboss.jca:name=HelloworldTxSqlDB,service=DataSourceBinding</depends>
</mbean>
</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,26 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
- <jndi-name>QuickstartDB</jndi-name>
- <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1703</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- <min-pool-size>5</min-pool-size>
- <max-pool-size>20</max-pool-size>
- <idle-timeout-minutes>0</idle-timeout-minutes>
- <depends>jboss:service=Hypersonic</depends>
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
+ <jndi-name>HelloworldTxSqlDB</jndi-name>
+ <connection-url>jdbc:h2:tcp://localhost:9095/;DB_CLOSE_ON_EXIT=FALSE</connection-url>
+ <driver-class>org.h2.Driver</driver-class>
+ <user-name>sa</user-name>
+ <password/>
+ <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+ <depends>jboss:service=HelloworldTxSqlDB</depends>
</local-tx-datasource>
- <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
- <mbean code="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic">
- <attribute name="Port">1703</attribute>
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
- <attribute name="Database">QuickstartDB</attribute>
- <attribute name="Silent">true</attribute>
- <attribute name="Trace">false</attribute>
- <attribute name="No_system_exit">true</attribute>
+ <mbean code="org.jboss.internal.soa.esb.dependencies.H2Database" name="jboss:service=HelloworldTxSqlDB">
+ <attribute name="Database">HelloworldTxSqlDB</attribute>
+ <attribute name="ServerMode">true</attribute>
+ <attribute name="Port">9095</attribute>
+ <attribute name="InMemoryMode">false</attribute>
</mbean>
</datasources>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2 (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_tx_sql_action/src/h2)
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,15 +0,0 @@
-CREATE TABLE gateway_table
-(
-unique_id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
-data_column VARCHAR(255) NOT NULL,
-status_col VARCHAR(255) NOT NULL,
-timestamp_col VARCHAR(255)
-);
-
-CREATE TABLE TX_ESB_MESSAGES
-(
-message_id VARCHAR(255) NOT NULL,
-data_column CLOB NOT NULL,
-status_col VARCHAR(255) NOT NULL,
-timestamp_col VARCHAR(255)
-);
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/helloworld_tx_sql_action/src/h2/create.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,15 @@
+CREATE TABLE gateway_table
+(
+unique_id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
+data_column VARCHAR(255) NOT NULL,
+status_col VARCHAR(255) NOT NULL,
+timestamp_col VARCHAR(255)
+);
+
+CREATE TABLE TX_ESB_MESSAGES
+(
+message_id VARCHAR(255) NOT NULL,
+data_column CLOB NOT NULL,
+status_col VARCHAR(255) NOT NULL,
+timestamp_col VARCHAR(255)
+);
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,6 +4,8 @@
${ant.project.name}
${line.separator}
</description>
+
+ <property name="additional.deploys" value="messaging-db-users-service.xml" />
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/deployment.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/deployment.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,4 +1,5 @@
<jbossesb-deployment>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_esb</depends>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_secured_Request_gw</depends>
+ <depends>jboss.messaging:service=JMSSecuredQuickstartUserManager</depends>
</jbossesb-deployment>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
+ <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/messaging-db-users-service.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/samples/quickstarts/jms_secured/messaging-db-users-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/messaging-db-users-service.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/messaging-db-users-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
+ name="jboss.messaging:service=JMSSecuredQuickstartUserManager"
+ xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
+
+ <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
+
+ <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
+
+ <attribute name="DataSource">java:/DefaultDS</attribute>
+
+ <attribute name="CreateTablesOnStartup">true</attribute>
+
+ <attribute name="SqlProperties"><![CDATA[
+POPULATE.TABLES.1 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('esbuser', 'esbpassword')
+POPULATE.TABLES.2 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('gatewayuser', 'gwpassword')
+POPULATE.TABLES.3 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('esbrole','esbuser')
+POPULATE.TABLES.4 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('gatewayrole','gatewayuser')
+ ]]></attribute>
+ </mbean>
+
+</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/readme.txt 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_secured/readme.txt 2008-07-05 09:19:14 UTC (rev 20915)
@@ -49,5 +49,10 @@
3. jboss-esb.xml
The message-filter for the jms-bus now specifies 'jms-security-principal' and
'jms-security-credential'
-
-
+ 4. messaging-users.properties and messaging-roles.properties
+ Simple properties files which are used when JBoss Messaging is configured for property file
+ based authentication. These files are copied to the conf/props directory of the jbossesb server
+ in use.
+ 5. messaging-db-users.properties
+ Is a jboss service that insert users and roles into the JBoss Messaging database. This is only used when JBoss
+ Messaging is configured to use a database for managing users and roles.
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_topic/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_topic/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_topic/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -13,10 +13,7 @@
<providers>
- <jms-provider name="JMS" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
-
+ <jms-provider name="JMS" connection-factory="ConnectionFactory">
<jms-bus busid="quickstart-topic">
<jms-message-filter dest-type="TOPIC" dest-name="topic/quickstart_jmstopic_topic"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,21 +5,11 @@
${line.separator}
</description>
- <property name="additional.deploys" value="jbossesb-service.xml" />
+ <property name="additional.deploys" value="jbossesb-service.xml quickstart-ds.xml" />
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
- <target name="quickstart-specific-deploys">
- <copy file="quickstart-ds.xml"
- todir="${org.jboss.esb.server.deploy.dir}"
- overwrite="false"/>
- </target>
-
- <target name="quickstart-specific-undeploys">
- <delete file="${org.jboss.esb.server.deploy.dir}/quickstart-ds.xml"/>
- </target>
-
<target name="runtest" depends="compile"
description="sends a JMS message to queue/quickstart_jms_transacted_Request_gw">
<echo>Runs Test JMS Sender</echo>
@@ -27,16 +17,19 @@
<arg value="Hello Transacted JMS World]"/>
<classpath refid="exec-classpath"/>
</java>
+ <sleep milliseconds="4000"/>
+ <antcall target="select"/>
+ <antcall target="truncate"/>
</target>
- <target name="select" depends="dependencies" description="select * from jsm_transacted_table">
+ <target name="select">
<property name="hsqldb.jar"
value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
<echo>Select * from jms_transacted_table</echo>
<sql
print="true"
driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ url="jdbc:hsqldb:hsql://localhost:1706"
userid="sa"
autocommit="true"
password="">
@@ -50,14 +43,14 @@
</target>
- <target name="truncate" depends="dependencies" description="delete from jms_transacted_table">
+ <target name="truncate">
<property name="hsqldb.jar"
value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
- <echo>Delete from jms_transacted_table </echo>
+ <echo>(clean up) Delete from jms_transacted_table </echo>
<sql
print="true"
driver="org.hsqldb.jdbcDriver"
- url="jdbc:hsqldb:hsql://localhost:1703"
+ url="jdbc:hsqldb:hsql://localhost:1706"
userid="sa"
autocommit="true"
password="">
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/deployment.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/deployment.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,4 +1,5 @@
<jbossesb-deployment>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb</depends>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw</depends>
+ <depends>jboss.esb:service=JmsTransactedDatabaseInitializer</depends>
</jbossesb-deployment>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
+ <jms-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
@@ -42,12 +39,12 @@
<actions mep="OneWay">
<action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="message" value="JMS Transacted Quickstart start..."/>
+ <property name="message" value="JMS Transacted Quickstart enter. Message body"/>
<property name="printfull" value="false"/>
</action>
<action name="insertDBAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction">
- <property name="datasource-name" value="java:QuickstartDS"/>
+ <property name="datasource-name" value="java:JmsTransactedDB"/>
<property name="db-insert-sql" value="insert into jms_transacted_table(data_column) values(?)"/>
</action>
@@ -58,7 +55,7 @@
<action name="throwExceptionAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction"/>
<action name="printMessageDone" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="message" value="JMS Transacted Quickstart processed sucessfully"/>
+ <property name="message" value="JMS Transacted Quickstart processed sucessfully. Message body"/>
<property name="printfull" value="false"/>
</action>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jbossesb-service.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/jbossesb-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,12 +2,12 @@
<server>
<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
- name="jboss.esb:service=QuickstartDatabaseInitializer">
- <attribute name="Datasource">java:/QuickstartDS</attribute>
+ name="jboss.esb:service=JmsTransactedDatabaseInitializer">
+ <attribute name="Datasource">java:/JmsTransactedDB</attribute>
<attribute name="ExistsSql">select * from jms_transacted_table</attribute>
<attribute name="SqlFiles">
hsqldb/create.sql
</attribute>
- <depends>jboss.jca:name=QuickstartDS,service=DataSourceBinding</depends>
+ <depends>jboss.jca:name=JmsTransactedDB,service=DataSourceBinding</depends>
</mbean>
</server>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/quickstart-ds.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/quickstart-ds.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,24 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
- <jndi-name>QuickstartDS</jndi-name>
- <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1703</connection-url>
+ <jndi-name>JmsTransactedDB</jndi-name>
+ <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1706</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
- <depends>jboss:service=Hypersonic</depends>
+ <depends>jboss:service=JmsTransactedDB</depends>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</local-tx-datasource>
- <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
- <mbean code="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic">
- <attribute name="Port">1703</attribute>
+ <mbean code="org.jboss.internal.soa.esb.dependencies.HypersonicDatabase"
+ name="jboss:service=JmsTransactedDB">
+ <attribute name="Port">1706</attribute>
<attribute name="BindAddress">${jboss.bind.address}</attribute>
- <attribute name="Database">QuickstartDB</attribute>
+ <attribute name="Database">JmsTransactedDB</attribute>
<attribute name="Silent">true</attribute>
<attribute name="Trace">false</attribute>
<attribute name="No_system_exit">true</attribute>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/readme.txt 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/jms_transacted/readme.txt 2008-07-05 09:19:14 UTC (rev 20915)
@@ -6,9 +6,9 @@
This quickstart consists of a single service that contains 4 actions:
1. Log a statement that we have entered the quickstart.
- 2. Insert the contents of the ESB Message object to a database table
+ 2. Insert the contents of the ESB Message object to a database table.
3. Call a custom action that throws an exception if the message has not
- been redelivered. (more on this later)
+ been redelivered. (more on this later)
4. Log a statement that we are about to exit the quickstart.
The main thing to look for is that the first time we enter the action processing
@@ -19,7 +19,7 @@
put back onto the queue.
For more details about how this quickstart works look at the
- "What to look at in this Quckstart" section below.
+ "What to look at in this Quickstart" section below.
This quickstart uses jms-jca-provider and more information about jms jca can
be found here: http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingJCAWithJBossESB
@@ -32,24 +32,73 @@
To Run '.esb' archive mode:
===========================
1. In a command terminal window in this folder ("Window1"), type:
- 'ant deploy'
- This will deploy the quickstart
+ 'ant deploy'
+ This will deploy the quickstart
2. Open another command terminal window in this folder ("Window2"), type:
'ant runtest'
3. Switch back to Application Server console to see the output from the ESB
4. In this folder ("Window1"), type:
- 'ant select'
- This will display the content of the database table
- 5. [optional] In this folder ("Window1"), type:
- 'ant truncate'
- This will delete the content of the database table.
- 6. In this folder ("Window1"), type:
- 'ant undeploy'
- This will undeploy the quickstart.
+ 'ant undeploy'
+ This will undeploy the quickstart.
What to look at in this Quickstart:
===================================
- 1. DBInsertAction
+
+ 1. Overall flow of this quickstart:
+ * The first time we enter the action pipleline, we insert a row into the database: (server console output below)
+ [DBInsertAction] Successfully inserted [Hello Transacted JMS World] counter[1]] into jms_transacted_table
+
+ * Next, the ThrowExceptionAction is called.
+ It checks if the ESB Message property 'javax.jms.message.redelivered'
+ is false in which case an exception is thrown, resulting in the JCA
+ adapter rolling back the transaction. This will also cause the
+ database insert in the preceding action to be rolled back.
+
+ The console output will display an error message from the
+ ActionProcessingPipeline followed by a stacktrace of the
+ generated exception. This exception is then propagated to the
+ JCA/JMS adapter which will also document the issue.
+
+ Part of the console output follows:
+ [ActionProcessingPipeline] Unexpected exception caught while
+ processing the action pipeline:
+ java.lang.IllegalStateException: [Throwing Exception to trigger a
+ transaction rollback]
+ [JmsServerSession] Unexpected error delivering message
+ delegator->JBossMessage[512]:PERSISTENT, deliveryId=1
+ java.lang.IllegalStateException: [Throwing Exception to trigger a
+ transaction rollback]
+
+ If the ESB Message property 'javax.jms.message.redelivered' is true
+ then the message will simple pass throw this action, unmodified,
+ and the action pipeline will complete normally:
+ (server console ouput below)
+ [DBInsertAction] Successfully inserted [Hello Transacted JMS World] counter[2]] into jms_transacted_table
+ [ThrowExceptionAction] [javax.jms.message.redelivered:true]
+ [STDOUT] JMS Transacted Quickstart processed sucessfully. Message body:
+
+ * Only the last insert will be committed to the database when the action pipeline successfully completes.
+ In the console output window where 'ant runtest' was run from, the output of the database table is displayed:
+ [echo] Select * from jms_transacted_table
+ [sql] Executing commands
+ [sql] DATA_COLUMN
+ [sql] Hello Transacted JMS World] counter[2]
+ [sql]
+ [sql] 0 rows affected
+ [sql] 1 of 1 SQL statements executed successfully
+ This shows that only the last insert was committed. The other was never written to the database since that transaction
+ was rolled back.
+
+ The value of counter in 'Hello Transacted JMS World] counter[2]' should always match the value in the servers console for
+ the last successfully completed execution of the action pipeline:
+ [DBInsertAction] Successfully inserted [Hello Transacted JMS World] counter[2]] into jms_transacted_table
+ [STDOUT] JMS Transacted Quickstart processed successfully. Message body:
+ [STDOUT] [Hello Transacted JMS World]].
+
+ Note that for successive runs the counter might not be 1 and 2, but by examining the server console you can see which was
+ the last value that was inserted. You may also undeploy and redploy the quickstart and the counter will be reset.
+
+ 2. org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction
Inserts the contents of the ESB Message object into the database table
by using the sql statement defined in the property 'db-insert-sql'.
This class contains a counter that is incremented for each call. This
@@ -60,52 +109,15 @@
data is committed to the database. In a normal run, when the counter is
'1', the counter should be 2 indicating that only the second commit succeeded.
- 2. ThrowExceptionAction
- Checks if the ESB Messae property 'javax.jms.message.redelivered'
- is false, in which case an IllegalArgumentException will be thrown.
- This will will cause the message to be redelivered by JMS transaction handling.
+ 3. org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction
+ The current transaction is rolled back as a result of the action
+ handler throwing a RuntimeException (or a subclass of such) during
+ the processing method. The exception is caught by the
+ ActionProcessingPipeline but, as it is not identified as an application
+ exception, it will be propagated to the caller (in this case the
+ JMS/JCA adapter). The JMS/JCA adapter will then force the enclosing
+ transaction to rollback, resulting in the redelivery of the message.
- 3. jboss-esb.xml
+ 4. jboss-esb.xml
The message-filter for the jms-bus-filter now specifies 'transacted' attribute.
- 4. 'ant select'
- Ant target that will display all the rows in the database table.
-
- 5. 'ant truncate'
- Ant target that will delete all the rows in the database table.
- Useful to clear the table after multiple runs.
-
-
-Inside look:
-============
- 1. Transactions with JMSGateway
-
- Lets walk through a client publishing a message to a queue. The queue
- will be the queue that our gateway is configured to listen on.
-
- 1. Client publishes message to JMS queue. It can use a JMS session that
- is transacted to do so or not. It does not matter.
- 2. The gateway listener will create a JMS session, or use an existing
- session from the pool, that is transacted. While the JMS Listener
- is running it will consume a JMS message from the queue, package the
- contents of that JMS message into an ESB Message, and use a courier to
- pass the message on to the action pipeline.
-
- Commit:
- When the message has be sent to the courier, and no exception has
- been thrown, the transaction will commit and acknowledge that it
- has accepted the JMS Message.
-
- Rollback:
- But if an exception has occurred, the transaction will be rolled-back
- and the JMS message will not be acknowledged, hence it will be put
- back on the queue.
-
- Usecase for transactions in JMSGateway
- Now, this situation may seem far fetched, but one usecase for
- it might be that the task of packaging the content of the JMS
- Message into the ESB Message is a memory intensive process.
- Lets say that one of your machines is under more heavy load then others
- which could cause it to throw an OutOfMemory Exception. In this case the
- message could be picked up by another ESB instance, which hopefully
- can deal with the message.
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/load_generator/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/load_generator/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/load_generator/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,11 +5,7 @@
<providers>
<jms-provider name="JBossMQ"
- connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
+ connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_load_generator_Request_gw" />
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagefilter/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagefilter/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagefilter/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,7 +3,6 @@
<providers>
<jms-provider name="JBossMessaging" connection-factory="ConnectionFactory">
-
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagestore/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagestore/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/messagestore/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/native_client/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/native_client/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/native_client/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,9 +3,7 @@
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/scripting_groovy/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/scripting_groovy/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/scripting_groovy/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_CSV2XML/SampleOrder.csv
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_CSV2XML/SampleOrder.csv 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_CSV2XML/SampleOrder.csv 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,4 +1,3 @@
1,Wed Nov 15 13:45:28 EST 2006,0,59.97,64.92,4.95,user1,Harry,Fletcher,SD,1,1,364,The 40-Year-Old Virgin,29.98,2,1,299,Pulp Fiction,29.99
2,Wed Nov 15 13:45:28 EST 2007,0,60.00,64.92,4.95,user2,Kalle,Anka,SD,1,1,364,Fletch,29.98,2,1,299,Fletch Lives,29.99
3,Wed Nov 15 13:45:28 EST 2007,0,60.00,64.92,4.95,user3,Donald,Duck,SD,1,1,364,The Goonies,29.98,2,1,4,Happy Gilmor,29.99
-
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,10 +2,7 @@
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost" >
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_bpel/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_bpel/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_bpel/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,10 +4,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="OrderManagerGateway">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_gw"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,9 +5,7 @@
<providers>
<jms-provider name="JBossMQ"
- connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer2/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer2/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_consumer2/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -5,9 +5,7 @@
<providers>
<jms-provider name="JBossMQ"
- connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_mtom/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_mtom/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_mtom/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,9 +4,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_mtom_esb"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_producer/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_producer/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_producer/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,10 +4,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
-
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_producer_gw"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wsaddressing/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wsaddressing/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wsaddressing/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,9 +4,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_wsa_esb"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,9 +4,7 @@
parameterReloadSecs="5">
<providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_wss_esb"/>
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/wiretap/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/wiretap/jboss-esb.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/samples/quickstarts/wiretap/jboss-esb.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,7 +3,6 @@
<providers>
<jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
-
<jms-bus busid="wiretapCBRChannel">
<jms-message-filter dest-type="QUEUE" dest-name="queue/qswiretap_cbr_Request" />
</jms-bus>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/base-project-build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/base-project-build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/base-project-build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -19,8 +19,11 @@
<target name="prepare">
<mkdir dir="build/${ant.project.name}.esb/META-INF" />
<mkdir dir="build/classes" />
+ <antcall target="service-prepare"/>
</target>
+ <target name="service-prepare"/>
+
<path id="emma.libs">
<fileset dir="${esb.product.lib.ext}" includes="emma*.jar"/>
</path>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -370,7 +370,6 @@
{
con = mgr.getConnection();
con.setAutoCommit(false);
- con.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
}
catch (final SQLException e)
{
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/META-INF/deployment.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/META-INF/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,4 +3,7 @@
<depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
<depends>jboss.esb.destination:service=Queue,name=DeadMessageQueue</depends>
<depends>jboss.esb:service=MessageStoreDatabaseInitializer</depends>
+ <depends>jboss.esb.destination:service=Queue,name=DataCollectorQueue</depends>
+ <depends>jboss.esb.destination:service=Queue,name=OperationsCollectorQueue</depends>
+ <depends>jboss.esb.destination:service=Queue,name=OperationsResultCollectorQueue</depends>
</jbossesb-deployment>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbossesb/src/main/resources/message-store-sql/mssql)
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,10 +0,0 @@
-
-CREATE TABLE message
-(
- uuid varchar(128) NOT NULL,
- type varchar(128) NOT NULL,
- message text NOT NULL,
- delivered varchar(10) NOT NULL,
- classification varchar(10),
- PRIMARY KEY (uuid)
-);
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/create_database.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,10 @@
+
+CREATE TABLE message
+(
+ uuid varchar(128) NOT NULL,
+ type varchar(128) NOT NULL,
+ message text NOT NULL,
+ delivered varchar(10) NOT NULL,
+ classification varchar(10),
+ PRIMARY KEY (uuid)
+);
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1 +0,0 @@
-DROP TABLE message;
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbossesb/src/main/resources/message-store-sql/mssql/drop_database.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1 @@
+DROP TABLE message;
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,20 +1,20 @@
<project name="jbpm-ant-task" default="build-task" basedir=".">
-
- <path id="classpath">
- <pathelement location="src/test/resources"/>
- <pathelement location="build/classes" />
- <pathelement location="build/test/classes" />
- </path>
-
-
- <target name="build-task">
+ <property name="jbpm.jar.file" location="build/jbpm-ant.jar"/>
+
+ <path id="classpath">
+ <pathelement location="src/test/resources"/>
+ <pathelement location="${basedir}/../../../lib/ext/commons-codec-1.3.jar" />
+ <pathelement location="${basedir}/../../../lib/ext/junit-4.1.jar" />
+ <pathelement location="${basedir}/../../../lib/ext/commons-httpclient.jar" />
+ <pathelement location="${ant.library.dir}/ant.jar" />
+ </path>
+
+ <target name="build-task">
<mkdir dir="build/classes"/>
- <javac srcdir="src" destdir="build/classes"
- debug="on" >
- <classpath refid="classpath" />
- </javac>
- <jar basedir="build/classes" destfile="build/jbpm-ant.jar"
- includes="**/*.class"/>
+ <javac srcdir="src" destdir="build/classes" debug="on" >
+ <classpath refid="classpath" />
+ </javac>
+ <jar basedir="build/classes" destfile="${jbpm.jar.file}" includes="**/*.class"/>
</target>
</project>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -29,6 +29,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.ConnectException;
+import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
@@ -37,6 +38,14 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.httpclient.Cookie;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpState;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.taskdefs.MatchingTask;
@@ -44,26 +53,51 @@
/**
* ant task for deploying process archives to the deployment servlet.
+ * </p>
+ * Usage:
+ * <pre>
+ * <taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
+ * <classpath refid="exec-classpath"/>
+ * </taskdef>
*
+ * <deployToServer serverDeployer="jbpm-console/upload">
+ * <fileset dir="${basedir}/processDefinition" includes="*"/>
+ * </deployToServer>
+ * </pre>
+ * Optional attributes:
+ * <pre>
+ * serverName="localhost"
+ * serverPort="8080"
+ * serverDeployer="/jbpm-console/upload"
+ * process="processDefinitions/processdefinition.xml"
+ * username="username"
+ * password="password"
+ * </pre>
+ *
* @author kurt stam
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*/
public class DeployProcessToServerTask extends MatchingTask {
private static final String boundary = "AaB03x";
- String serverName = "localhost";
+ String servername = "localhost";
String serverPort = "8080";
String serverDeployer = "/jbpm-console/upload";
String debug = null;
File process = null;
List fileSets = new ArrayList();
+ private String username;
+
+ private String password;
+
public void setServerDeployer(String serverDeployer) {
this.serverDeployer = serverDeployer;
}
public void setServerName(String serverName) {
- this.serverName = serverName;
+ this.servername = serverName;
}
public void setServerPort(String serverPort) {
@@ -77,7 +111,17 @@
public void setDebug(String debug) {
this.debug = debug;
}
+
+ public void setUsername( final String userName )
+ {
+ this.username = userName;
+ }
+ public void setPassword( final String password )
+ {
+ this.password = password;
+ }
+
public void execute() throws BuildException {
try {
if (pingServerOK()) {
@@ -95,7 +139,7 @@
if (debug!=null) {
saveParFile("debug.par", out.toByteArray());
}
- deployProcessWithServlet(serverName, serverPort, serverDeployer, out.toByteArray());
+ deployProcessWithServlet(servername, serverPort, serverDeployer, out.toByteArray());
in.close();
log("deployment complete.");
}
@@ -127,13 +171,12 @@
if (debug!=null) {
saveParFile("debug.par", byteArrayOutputStream.toByteArray());
}
- deployProcessWithServlet(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
+ deployProcessWithServlet(servername, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
log("deployment complete.");
}
}
} catch (Exception e) {
- e.printStackTrace();
- throw new BuildException( "couldn't deploy process archives : " + e.getMessage() );
+ throw new BuildException( "couldn't deploy process archives : " + e.getMessage(), e);
}
}
@@ -141,16 +184,33 @@
this.fileSets.add(fileSet);
}
- public void deployProcessWithServlet(String serverName, String serverPort, String serverDeployer, byte[] parBytes) throws Exception {
+ public void deployProcessWithServlet(final String serverName, final String serverPort, final String serverDeployer, final byte[] parBytes) throws Exception {
+ log(deployProcess(serverName, serverPort, serverDeployer, parBytes));
+ }
+
+ String deployProcess(final String serverName, final String serverPort, final String serverDeployer, final byte[] parBytes) throws Exception {
+ String sessionID = null;
+ // pass security credentials if specified.
+ boolean security = verifySecurityProperties();
+ if ( security )
+ sessionID = tryFormBasedAuthentication();
+
URL url = new URL("http://" + serverName + ":" + serverPort + serverDeployer);
- URLConnection urlConnection = url.openConnection();
+ HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
+ urlConnection.setRequestMethod( "POST" );
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
+ urlConnection.setAllowUserInteraction(false);
urlConnection.setUseCaches(false);
- urlConnection.setRequestProperty("Content-Type",
- "multipart/form-data; boundary=AaB03x");
- DataOutputStream dataOutputStream = new DataOutputStream(urlConnection
- .getOutputStream());
+
+ if ( sessionID != null ) // FORM based authentication
+ urlConnection.setRequestProperty( "Cookie", sessionID );
+ else // fall back to BASIC authentication
+ urlConnection.setRequestProperty( "Authorization", "Basic " + encode(username + ":" + password ) );
+
+ urlConnection.setRequestProperty("Content-Type", "multipart/form-data; boundary=AaB03x");
+
+ DataOutputStream dataOutputStream = new DataOutputStream(urlConnection.getOutputStream());
dataOutputStream.writeBytes("--" + boundary + "\r\n");
dataOutputStream.writeBytes("Content-Disposition: form-data; name=\"definition\"; filename=\"dummy.par\"\r\n");
dataOutputStream.writeBytes("Content-Type: application/x-zip-compressed\r\n\r\n");
@@ -160,14 +220,66 @@
dataOutputStream.writeBytes("\r\n--" + boundary + "--\r\n");
dataOutputStream.flush();
dataOutputStream.close();
+
InputStream inputStream = urlConnection.getInputStream();
StringBuffer result = new StringBuffer();
int read;
while ((read = inputStream.read()) != -1) {
result.append((char)read);
}
+ return result.toString() ;
}
+
+ /**
+ * Adds BASIC Authentication properties to the passed-in urlConnection.
+ *
+ * @param urlConnection
+ */
+ void addBasicSecurityCredentials( final URLConnection urlConnection )
+ {
+ urlConnection.setRequestProperty("Authorization", "Basic " + encode(username + ":" + password));
+ }
+
+ /**
+ * Try to authenticate using FORM based Authentication.
+ * If succuessful the returned String will contain the JSESSIONID.
+ *
+ * @return String The session id from the serlvet.
+ */
+ private String tryFormBasedAuthentication() throws HttpException, IOException
+ {
+ final String path ="http://" + servername + ":" + serverPort + serverDeployer;
+ String sessionId = null;
+
+ final HttpClient httpClient = new HttpClient();
+ GetMethod indexGet = new GetMethod( path );
+
+ if ( httpClient.executeMethod(indexGet) == 200 )
+ {
+
+ HttpState state = httpClient.getState();
+ Cookie[] cookies = state.getCookies();
+ for (Cookie cookie : cookies)
+ {
+ if( cookie.getName().equalsIgnoreCase("JSESSIONID") )
+ {
+ sessionId = "JSESSIONID=" + cookie.getValue();
+ }
+ }
+
+ PostMethod loginFormPost = new PostMethod( path + "/j_security_check");
+ loginFormPost.addParameter("j_username", username);
+ loginFormPost.addParameter("j_password", password);
+ httpClient.executeMethod(loginFormPost.getHostConfiguration(), loginFormPost, state);
+ Header location = loginFormPost.getResponseHeader("Location");
+ String indexURI = location.getValue();
+ GetMethod war1Index = new GetMethod(indexURI);
+ httpClient.executeMethod(war1Index.getHostConfiguration(), war1Index, state);
+ }
+ return sessionId;
+ }
+
public void addFile(ZipOutputStream zos, File file)
throws IOException
{
@@ -194,9 +306,12 @@
public boolean pingServerOK() {
URL url = null;
try {
- url = new URL("http://" + serverName + ":" + serverPort + serverDeployer);
+ url = new URL("http://" + servername + ":" + serverPort + serverDeployer);
URLConnection urlConnection = url.openConnection();
urlConnection.setDoOutput(true);
+ // pass security credentials is specified.
+ if ( verifySecurityProperties() )
+ addBasicSecurityCredentials( urlConnection );
InputStream inputStream = urlConnection.getInputStream();
StringBuffer result = new StringBuffer();
int read;
@@ -210,8 +325,26 @@
return false;
}
catch (Exception e) {
+ e.printStackTrace();
log("An unexpected exception happened while testing the server (" + url + ") connection.");
return false;
}
}
+
+ boolean verifySecurityProperties() throws BuildException
+ {
+ if ( username == null && password == null || "".equals( username ) && "".equals( password ) )
+ return false;
+
+ if ( username != null && password == null )
+ throw new BuildException( "'userName' must be accompanied with 'password'");
+ else if ( password != null && username == null )
+ throw new BuildException( "'password' must be accompanied with 'userName'");
+
+ return true;
+ }
+
+ public static String encode (String source) {
+ return new String( new Base64().encode( source.getBytes() ));
+ }
}
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -48,6 +48,6 @@
zipOutputStream.close();
- dptt.deployProcessWithServlet(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
+ dptt.deployProcess(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
}
}
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbpm/ant-task/test)
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbpm/ant-task/test/org)
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbpm/ant-task/test/org/jbpm)
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbpm/ant-task/test/org/jbpm/ant)
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,82 +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.jbpm.ant;
-
-import static org.junit.Assert.*;
-
-import org.apache.tools.ant.BuildException;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit test for {@link DeployProcessToServerTask}
- * <p/>
- * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
- *
- */
-public class DeployProcessToServerTaskUnitTest
-{
- private DeployProcessToServerTask task;
-
- private final String userName = "testuser";
- private final String password = "testpasswd";
-
- @Test ( expected = BuildException.class )
- public void showThrowIfPasswordIsNotSet()
- {
- task.setUsername( userName );
- task.verifySecurityProperties();
-
- }
-
- @Test ( expected = BuildException.class )
- public void showThrowIfUserNameIsNotSet()
- {
- task.setPassword( password );
- task.verifySecurityProperties();
- }
-
- @Test
- public void noSecurityPropeties()
- {
- boolean useSecurity = task.verifySecurityProperties();
- assertFalse ( useSecurity );
- }
-
- @Test
- public void emptyStringsSecurityPropeties()
- {
- task.setUsername( "" );
- task.setPassword( "" );
- boolean useSecurity = task.verifySecurityProperties();
- assertFalse ( useSecurity );
- }
-
- // lifecycle
-
- @Before
- public void setup()
- {
- task = new DeployProcessToServerTask();
- }
-
-}
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/ant-task/test/org/jbpm/ant/DeployProcessToServerTaskUnitTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,82 @@
+/*
+ * 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.jbpm.ant;
+
+import static org.junit.Assert.*;
+
+import org.apache.tools.ant.BuildException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Unit test for {@link DeployProcessToServerTask}
+ * <p/>
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public class DeployProcessToServerTaskUnitTest
+{
+ private DeployProcessToServerTask task;
+
+ private final String userName = "testuser";
+ private final String password = "testpasswd";
+
+ @Test ( expected = BuildException.class )
+ public void showThrowIfPasswordIsNotSet()
+ {
+ task.setUsername( userName );
+ task.verifySecurityProperties();
+
+ }
+
+ @Test ( expected = BuildException.class )
+ public void showThrowIfUserNameIsNotSet()
+ {
+ task.setPassword( password );
+ task.verifySecurityProperties();
+ }
+
+ @Test
+ public void noSecurityPropeties()
+ {
+ boolean useSecurity = task.verifySecurityProperties();
+ assertFalse ( useSecurity );
+ }
+
+ @Test
+ public void emptyStringsSecurityPropeties()
+ {
+ task.setUsername( "" );
+ task.setPassword( "" );
+ boolean useSecurity = task.verifySecurityProperties();
+ assertFalse ( useSecurity );
+ }
+
+ // lifecycle
+
+ @Before
+ public void setup()
+ {
+ task = new DeployProcessToServerTask();
+ }
+
+}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,6 +4,12 @@
<!-- Import the base Ant build script... -->
<import file="${services.base.build}"/>
+ <target name="service-prepare">
+ <ant dir="ant-task">
+ <property name="jbpm.jar.file" location="build/jbpm-ant.jar"/>
+ </ant>
+ </target>
+
<target name="test" depends="base.test"/>
-</project>
\ No newline at end of file
+</project>
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/lib/ext/jbpm-ant.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/META-INF/deployment.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/META-INF/deployment.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,4 +2,5 @@
<jbossesb-deployment>
<depends>jboss.esb:deployment=jbossesb.esb</depends>
<depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
+ <depends>jboss.esb:service=JBPMDatabaseInitializer</depends>
</jbossesb-deployment>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-service.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -8,8 +8,7 @@
<attribute name="Datasource">java:/JbpmDS</attribute>
<attribute name="ExistsSql">select * from JBPM_ID_USER</attribute>
<attribute name="SqlFiles">
- jbpm-sql/jbpm.jpdl.hsqldb.sql,
- jbpm-sql/import.sql
+ jbpm-sql/jbpm.jpdl.hsqldb.sql
</attribute>
<depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
<attribute name="UseEOL">true</attribute>
@@ -17,5 +16,6 @@
<mbean code="org.jboss.soa.esb.services.jbpm.configuration.JbpmService"
name="jboss.esb:service=JbpmService">
+ <depends>jboss.esb:service=JBPMDatabaseInitializer</depends>
</mbean>
</server>
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,23 +0,0 @@
-insert into JBPM_ID_USER (ID_,CLASS_,NAME_,EMAIL_,PASSWORD_) values (1,'U','user','user at sample.domain','user');
-insert into JBPM_ID_USER (ID_,CLASS_,NAME_,EMAIL_,PASSWORD_) values (2,'U','manager','manager at sample.domain','manager');
-insert into JBPM_ID_USER (ID_,CLASS_,NAME_,EMAIL_,PASSWORD_) values (3,'U','admin','admin at sample.domain','admin');
-insert into JBPM_ID_USER (ID_,CLASS_,NAME_,EMAIL_,PASSWORD_) values( 4,'U','shipper','shipper at sample.domain','shipper');
-
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (1,'G','sales','organisation');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (2,'G','admin','security-role');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (3,'G','user','security-role');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (4,'G','hr','organisation');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (5,'G','manager','security-role');
-
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (1,'M',2,4);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (2,'M',3,4);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (3,'M',4,4);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (4,'M',4,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (5,'M',1,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (6,'M',2,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (7,'M',3,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (8,'M',3,2);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (9,'M',2,2);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (10,'M',2,5);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (11,'M',2,1);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (12,'M',1,1);
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -371,15 +371,20 @@
}
public Message process(final Message message) throws ActionProcessingException {
- Map params;
+ Object payload;
try {
- params = (Map) payloadProxy.getPayload(message);
+ payload = payloadProxy.getPayload(message);
} catch (MessageDeliverException e) {
- throw new ActionProcessingException("Could not locate SOAP message parameters from payload", e) ;
+ throw new ActionProcessingException("Error getting SOAP message parameters from payload.", e);
}
- if(params.isEmpty()) {
+ if (!(payload instanceof Map)) {
+ throw new ActionProcessingException("Invalid payload type in message body location '" + payloadProxy.getGetPayloadLocation() + "'. Expected 'java.util.Map', was '" + payload.getClass().getName() + "'.");
+ }
+
+ Map params = (Map) payload;
+ if (params.isEmpty()) {
logger.warn("Params Map found in message, but the map is empty.");
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -42,7 +42,7 @@
public SoapUIInvoker() {
// Lookup the MBean ObjectName for the soapUI service (in soapui-client.sar)...
try {
- mbeanServer = MBeanServerLocator.locate();
+ mbeanServer = MBeanServerLocator.locateJBoss();
serviceName = new ObjectName("jboss.esb:service=SoapUIClientService");
} catch (MalformedObjectNameException e) {
throw new IllegalStateException("Unexpected exception.", e);
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -19,35 +19,38 @@
*/
package org.jboss.soa.esb.services.soapui;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.*;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.dom.DOMResult;
-
+import com.eviware.soapui.impl.wsdl.WsdlInterface;
+import com.eviware.soapui.impl.wsdl.WsdlProject;
+import com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader;
+import com.eviware.soapui.model.iface.Operation;
+import org.apache.commons.httpclient.HttpClient;
import org.apache.log4j.Logger;
-import org.apache.commons.httpclient.HttpClient;
import org.jboss.internal.soa.esb.soap.OGNLUtils;
+import org.jboss.internal.soa.esb.util.ESBProperties;
import org.jboss.internal.soa.esb.util.LRUCache;
-import org.jboss.internal.soa.esb.util.ESBProperties;
+import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.dom.YADOMUtil;
import org.jboss.soa.esb.http.HttpClientFactory;
-import org.jboss.soa.esb.ConfigurationException;
import org.jboss.system.ServiceMBeanSupport;
-import org.milyn.xml.XmlUtil;
import org.milyn.Smooks;
+import org.milyn.container.standalone.StandaloneExecutionContext;
+import org.milyn.javabean.BeanAccessor;
import org.milyn.resource.URIResourceLocator;
+import org.milyn.xml.XmlUtil;
import org.w3c.dom.*;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
-import com.eviware.soapui.impl.wsdl.WsdlInterface;
-import com.eviware.soapui.impl.wsdl.WsdlProject;
-import com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader;
-import com.eviware.soapui.model.iface.Operation;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.*;
/**
* Soap UI Soap Client Service MBean.
@@ -140,8 +143,8 @@
return operationInst;
}
}
-
- // Try clearing WSDL cache, WSDL may have updated
+
+ // Try clearing WSDL cache, WSDL may have updated
wsdls.remove(wsdl);
wsdlInterfaces = getWsdlInterfaces(wsdl, httpClientProps);
@@ -152,7 +155,7 @@
return operationInst;
}
}
-
+
throw new UnsupportedOperationException("Operation '" + operation + "' not supported by WSDL '" + wsdl + "'.");
}
@@ -162,33 +165,71 @@
return new EsbWsdlLoader(wsdl, httpClient);
}
- private String buildRequest(String soapMessage, Map params, String smooksResource, String soapNs) throws IOException, SAXException {
- Document messageDoc = getDocBuilder().parse(new ByteArrayInputStream(soapMessage.getBytes()));
+ private String buildRequest(String soapMessageTemplate, Map params, String smooksResource, String soapNs) throws IOException, SAXException {
+ Document messageDoc = getDocBuilder().parse(new InputSource(new StringReader(soapMessageTemplate)));
Element docRoot = messageDoc.getDocumentElement();
+ // Purposely not using log levels to output because I want to make
+ // it as easy as possible for the developer to dump the SOAP during dev. They
+ // just need to set "dumpSOAP" in the param Map....
+ boolean dumpSOAP = params.containsKey("dumpSOAP");
+
+ if(dumpSOAP) {
+ dumpSOAP("SOAP Template:", docRoot);
+ }
expandMessage(docRoot, params);
+ if(dumpSOAP) {
+ dumpSOAP("SOAP Template (Expanded):", docRoot);
+ }
+
injectParameters(docRoot, params, soapNs);
+
+ if(dumpSOAP) {
+ dumpSOAP("SOAP Template (Populated):", docRoot);
+ }
+
if(smooksResource != null) {
- applySmooksTransform(smooksResource, messageDoc);
+ return applySmooksTransform(smooksResource, messageDoc, params);
+ } else {
+ return XmlUtil.serialize(messageDoc.getChildNodes());
}
+ }
- return XmlUtil.serialize(messageDoc.getChildNodes());
+ private void dumpSOAP(String message, Element docRoot) {
+ System.out.println("------------------------------------------------------------------------------------------------------------------------------------------");
+ System.out.println(message + "\n");
+ try {
+ YADOMUtil.serialize(docRoot, new StreamResult(System.out));
+ } catch (ConfigurationException e) {
+ logger.error("Unable to dump SOAP.", e);
+ }
+ System.out.println("------------------------------------------------------------------------------------------------------------------------------------------");
}
- private void applySmooksTransform(String smooksResource, Document messageDoc) throws IOException, SAXException {
- if(smooksResource != null) {
- Smooks smooks = smooksCache.get(smooksResource);
+ private String applySmooksTransform(String smooksResource, Document messageDoc, Map requestParams) throws IOException, SAXException {
+ Smooks smooks = smooksCache.get(smooksResource);
- if(smooks == null) {
- smooks = new Smooks();
- smooks.addConfigurations("smooks-resource", new ByteArrayInputStream(smooksResource.getBytes("UTF-8")));
- smooks.addConfigurations("cdu-creators", new URIResourceLocator().getResource("/META-INF/smooks-creators.xml"));
- smooksCache.put(smooksResource, smooks);
+ if(smooks == null) {
+ synchronized (Smooks.class) {
+ smooks = smooksCache.get(smooksResource);
+ if(smooks == null) {
+ smooks = new Smooks();
+ smooks.addConfigurations("smooks-resource", new ByteArrayInputStream(smooksResource.getBytes("UTF-8")));
+ smooks.addConfigurations("cdu-creators", new URIResourceLocator().getResource("/META-INF/smooks-creators.xml"));
+ smooksCache.put(smooksResource, smooks);
+ }
}
+ }
- smooks.filter(new DOMSource(messageDoc), new DOMResult(), smooks.createExecutionContext());
- }
+ StringWriter resultWriter = new StringWriter();
+ StandaloneExecutionContext executionContext = smooks.createExecutionContext();
+ Map beanMap = BeanAccessor.getBeans(executionContext);
+
+ beanMap.putAll(requestParams);
+ smooks.filter(new DOMSource(messageDoc), new StreamResult(resultWriter), executionContext);
+
+ return resultWriter.toString();
}
/**
@@ -228,6 +269,10 @@
} else if(collectionSize == 1) {
// It's a collection, but no need to clone coz we
// already have an entry for it...
+ if(clonePoint == element) {
+ // If the element itself is the clone point, add the OGNL expression attribute...
+ element.setAttributeNS(OGNLUtils.JBOSSESB_SOAP_NS, OGNLUtils.JBOSSESB_SOAP_NS_PREFIX + OGNLUtils.OGNL_ATTRIB, ognl + "[0]");
+ }
} else {
// It's a collection and we need to do some cloning
if(clonePoint != null) {
@@ -376,7 +421,7 @@
return;
}
- Element nextSibling = YADOMUtil.getNextSiblingElement(element);
+ Node insertPoint = element.getNextSibling();
Node parent = element.getParentNode();
element.setAttributeNS(OGNLUtils.JBOSSESB_SOAP_NS, OGNLUtils.JBOSSESB_SOAP_NS_PREFIX + OGNLUtils.OGNL_ATTRIB, ognl + "[0]");
@@ -385,12 +430,11 @@
clone.setAttributeNS(OGNLUtils.JBOSSESB_SOAP_NS, OGNLUtils.JBOSSESB_SOAP_NS_PREFIX + IS_CLONE_ATTRIB, "true");
clone.setAttributeNS(OGNLUtils.JBOSSESB_SOAP_NS, OGNLUtils.JBOSSESB_SOAP_NS_PREFIX + OGNLUtils.OGNL_ATTRIB, ognl + "[" + Integer.toString(i + 1) + "]");
- if (nextSibling == null) {
+ if (insertPoint == null) {
parent.appendChild(clone);
} else {
- parent.insertBefore(clone, nextSibling);
+ parent.insertBefore(clone, insertPoint);
}
- nextSibling = YADOMUtil.getNextSiblingElement(clone);
}
}
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_1713_SoapUIClientServiceMBeanUnitTest.java (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_1713_SoapUIClientServiceMBeanUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_1713_SoapUIClientServiceMBeanUnitTest.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/JBESB_1713_SoapUIClientServiceMBeanUnitTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.services.soapui;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+import java.util.*;
+
+import javax.xml.transform.stream.StreamResult;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.http.HttpClientFactory;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+public class JBESB_1713_SoapUIClientServiceMBeanUnitTest extends TestCase {
+
+ private class PostBlahMessage1 {
+ public String arg0 = "argument 0";
+ public List<String> arg1;
+ public List<String> arg2;
+ public boolean arg3 = true;
+ public String arg4 = "argument 4";
+ public long arg5 = 1;
+ public long arg6 = 2;
+ }
+
+ private class PostBlahMessage2 {
+ public String arg0 = "argument 0";
+ public String[] arg1;
+ public String[] arg2;
+ public boolean arg3 = true;
+ public String arg4 = "argument 4";
+ public long arg5 = 1;
+ public long arg6 = 2;
+ }
+
+ private void addBlahs(List<String> trains, int num) {
+ for(int i = 0; i < num; i++) {
+ trains.add(String.valueOf(i + 1));
+ }
+ }
+
+ private void addRoles(List<String> roles, int num) {
+ for(int i = 0; i < num; i++) {
+ roles.add(new String("Role " + (i + 1)));
+ }
+ }
+
+ private static final String WSDL_LOCATAION = "src/test/java/org/jboss/soa/esb/services/soapui";
+ private Properties properties;
+
+ protected void setUp() throws Exception {
+ properties = new Properties();
+ }
+
+ public void test_JBESB_1713_single() throws IOException, SAXException, ConfigurationException {
+ test_JBESB_1713(1, "expected_JBESB_1713_01.xml");
+ }
+
+ public void test_JBESB_1713_multiple() throws IOException, SAXException, ConfigurationException {
+ test_JBESB_1713(4, "expected_JBESB_1713_02.xml");
+ }
+
+ public void test_JBESB_1713(int num, String expected) throws IOException, SAXException, ConfigurationException {
+ File wsdlFile = new File(WSDL_LOCATAION + "/handdator.wsdl");
+ SoapUIClientService mbean = new SoapUIClientService();
+ Map params = new HashMap();
+
+ params.put("dumpSOAP", null);
+
+ PostBlahMessage1 postBlahMessage1 = new PostBlahMessage1();
+ PostBlahMessage2 postBlahMessage2 = new PostBlahMessage2();
+
+ List<String> blahs1 = new ArrayList<String>();
+ List<String> roles1 = new ArrayList<String>();
+ String[] blahs2 = new String[num];
+ String[] roles2 = new String[num];
+
+ properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+
+ addBlahs(blahs1, num);
+ addRoles(roles1, num);
+ postBlahMessage1.arg1 = blahs1;
+ postBlahMessage1.arg2 = roles1;
+ blahs1.toArray(blahs2);
+ roles1.toArray(roles2);
+ postBlahMessage2.arg1 = blahs2;
+ postBlahMessage2.arg2 = roles2;
+
+ params.put("postBlahMessage", postBlahMessage1);
+
+ String message = mbean.buildRequest(wsdlFile.toURI().toString(), "postBlahMessage", params, properties, null, null);
+ assertTrue("Generated SOAP message not as expected. See " + expected + ". Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream(expected), new ByteArrayInputStream(message.getBytes())));
+
+ params.put("postBlahMessage", postBlahMessage2);
+
+ message = mbean.buildRequest(wsdlFile.toURI().toString(), "postBlahMessage", params, properties, null, null);
+
+ assertTrue("Generated SOAP message not as expected. See " + expected + ". Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream(expected), new ByteArrayInputStream(message.getBytes())));
+ }
+
+ // Lifted from milyn commons
+ public static boolean compareCharStreams(InputStream s1, InputStream s2) {
+ try {
+ final String xml1 = trimLines(s1).toString() ;
+ final String xml2 = trimLines(s2).toString() ;
+
+ final Document doc1 = YADOMUtil.parse(xml1) ;
+ final Document doc2 = YADOMUtil.parse(xml2) ;
+
+ final StringWriter writer1 = new StringWriter() ;
+ final StringWriter writer2 = new StringWriter() ;
+ YADOMUtil.serialize(doc1, new StreamResult(writer1)) ;
+ YADOMUtil.serialize(doc2, new StreamResult(writer2)) ;
+ return (writer1.toString().equals(writer2.toString())) ;
+ } catch (IOException e) {
+ // fail the comparison
+ } catch (SAXException e) {
+ // fail the comparison
+ } catch (ConfigurationException e) {
+ // fail the comparison
+ }
+
+ return false;
+ }
+ public static StringBuffer trimLines(InputStream charStream) throws IOException {
+ StringBuffer stringBuf = new StringBuffer();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(charStream));
+ String line;
+
+ while((line = reader.readLine()) != null) {
+ stringBuf.append(line.trim());
+ }
+
+ return stringBuf;
+ }
+}
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -77,6 +77,8 @@
List<OrderItem> items1 = new ArrayList<OrderItem>();
OrderItem[] items2 = new OrderItem[4];
+ params.put("dumpSOAP", null);
+
properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
addOrderItems(items1);
@@ -303,6 +305,7 @@
properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
params.put("salesOrderNotification", new OrderNotification());
+ params.put("someDynamicValue", 123);
String message = mbean.buildRequest(wsdlFile.toURI().toString(), "SendSalesOrderNotification", params, properties, StreamUtils.readStreamString(getClass().getResourceAsStream("sendNotificationTransform.xml"), "UTF-8"), null);
assertTrue("Generated SOAP message not as expected. See expected_04.xml. Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("expected_04.xml"), new ByteArrayInputStream(message.getBytes())));
assertEquals("http://localhost:18080/active-bpel/services/RetailerCallback", mbean.getEndpoint(wsdlFile.toURI().toString(), properties));
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,5 +1,8 @@
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:abi="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager">
- <soapenv:Header><something addedto="header"/></soapenv:Header>
+ <soapenv:Header>
+ <something addedto="header" />
+ <somethingelse>123</somethingelse>
+</soapenv:Header>
<soapenv:Body>
<abi:salesOrderNotification>
<abi:orderNumber>12345</abi:orderNumber>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_01.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_01.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_01.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_01.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x="http://x.y.x/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <x:postBlahMessage>
+ <!--Optional:-->
+ <arg0>argument 0</arg0>
+ <!--Zero or more repetitions: - cloned-->
+ <arg1>1</arg1>
+ <!--Zero or more repetitions: - cloned-->
+ <arg2>Role 1</arg2>
+ <arg3>true</arg3>
+ <!--Optional:-->
+ <arg4>argument 4</arg4>
+ <arg5>1</arg5>
+ <arg6>2</arg6>
+ </x:postBlahMessage>
+ </soapenv:Body>
+</soapenv:Envelope>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_02.xml (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_02.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_02.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_JBESB_1713_02.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x="http://x.y.x/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <x:postBlahMessage>
+ <!--Optional:-->
+ <arg0>argument 0</arg0>
+ <!--Zero or more repetitions: - cloned-->
+ <arg1>1</arg1>
+<arg1>2</arg1>
+<arg1>3</arg1>
+<arg1>4</arg1>
+ <!--Zero or more repetitions: - cloned-->
+ <arg2>Role 1</arg2>
+<arg2>Role 2</arg2>
+<arg2>Role 3</arg2>
+<arg2>Role 4</arg2>
+ <arg3>true</arg3>
+ <!--Optional:-->
+ <arg4>argument 4</arg4>
+ <arg5>1</arg5>
+ <arg6>2</arg6>
+ </x:postBlahMessage>
+ </soapenv:Body>
+</soapenv:Envelope>
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/handdator.wsdl (from rev 20914, labs/jbossesb/tags/JBESB_4_2_1_GA_CP3_3/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/handdator.wsdl)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/handdator.wsdl (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/handdator.wsdl 2008-07-05 09:19:14 UTC (rev 20915)
@@ -0,0 +1,51 @@
+<definitions name='DummyHanddatorWSBeanService' targetNamespace='http://x.y.x/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://x.y.x/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema targetNamespace='http://x.y.x/' version='1.0' xmlns:tns='http://x.y.x/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='postBlahMessage' type='tns:postBlahMessage'/>
+ <xs:element name='postBlahMessageResponse' type='tns:postBlahMessageResponse'/>
+ <xs:complexType name='postBlahMessage'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='arg0' type='xs:string'/>
+ <xs:element maxOccurs='unbounded' minOccurs='0' name='arg1' type='xs:string'/>
+ <xs:element maxOccurs='unbounded' minOccurs='0' name='arg2' type='xs:string'/>
+ <xs:element name='arg3' type='xs:boolean'/>
+ <xs:element minOccurs='0' name='arg4' type='xs:string'/>
+ <xs:element name='arg5' type='xs:long'/>
+ <xs:element name='arg6' type='xs:long'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='postBlahMessageResponse'>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='DummyHanddatorWSBean_postBlahMessageResponse'>
+ <part element='tns:postBlahMessageResponse' name='postBlahMessageResponse'></part>
+ </message>
+ <message name='DummyHanddatorWSBean_postBlahMessage'>
+ <part element='tns:postBlahMessage' name='postBlahMessage'></part>
+ </message>
+ <portType name='DummyHanddatorWSBean'>
+ <operation name='postBlahMessage' parameterOrder='postBlahMessage'>
+ <input message='tns:DummyHanddatorWSBean_postBlahMessage'></input>
+ <output message='tns:DummyHanddatorWSBean_postBlahMessageResponse'></output>
+ </operation>
+ </portType>
+ <binding name='DummyHanddatorWSBeanBinding' type='tns:DummyHanddatorWSBean'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='postBlahMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='DummyHanddatorWSBeanService'>
+ <port binding='tns:DummyHanddatorWSBeanBinding' name='DummyHanddatorWSBeanPort'>
+ <soap:address location='http://localhost:8380/HanddatorDummyWS/DummyHanddatorWSBean'/>
+ </port>
+ </service>
+</definitions>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -14,9 +14,7 @@
<name>item1</name>
<!--Optional:-->
<price>10.99</price>
- </lineItems>
- <!--Optional:-->
- <lineItems>
+ </lineItems><lineItems>
<!--Optional:-->
<id>890</id>
<!--Optional:-->
@@ -30,8 +28,10 @@
<name>item3</name>
<!--Optional:-->
<price>76.34</price>
- </lineItems><shipTo>Skeagh Bridge</shipTo>
+ </lineItems>
+ <!--Optional:-->
+ <shipTo>Skeagh Bridge</shipTo>
</order>
</end:processOrder>
</soapenv:Body>
-</soapenv:Envelope>
\ No newline at end of file
+</soapenv:Envelope>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/orderprocessing/expected_01_JBESB-1329.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -12,9 +12,7 @@
<name>item1</name>
<!--Optional:-->
<price>10.99</price>
- </lineItems>
- <!--Optional:-->
- <lineItems>
+ </lineItems><lineItems>
<!--Optional:-->
<id>890</id>
<!--Optional:-->
@@ -28,10 +26,12 @@
<name>item3</name>
<!--Optional:-->
<price>76.34</price>
- </lineItems><id>123</id>
+ </lineItems>
<!--Optional:-->
+ <id>123</id>
+ <!--Optional:-->
<shipTo>Skeagh Bridge</shipTo>
</order>
</end:processOrder>
</soapenv:Body>
-</soapenv:Envelope>
\ No newline at end of file
+</soapenv:Envelope>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -2,12 +2,10 @@
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
<resource-config selector="header">
- <resource type="xsl">
- <!--
- <something addedto="header" />
- -->
+ <resource type="ftl"><!--
+ <something addedto="header" />
+ <somethingelse>${someDynamicValue}</somethingelse>-->
</resource>
- <param name="is-xslt-templatelet">true</param>
<param name="action">addto</param>
</resource-config>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/contract-web/src/main/webapp/contract.jsp
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/contract-web/src/main/webapp/contract.jsp 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/contract-web/src/main/webapp/contract.jsp 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,66 +1,86 @@
-<%@ page import="java.util.List" %>
-<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
-<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
-<%@ page import="java.net.URI" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
-<%@ page import="org.jboss.soa.esb.actions.soap.WebserviceContractPublisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
-<%
- List publishers = ServicePublisher.getServicePublishers();
- Registry registry = RegistryFactory.getRegistry();
- String targetServiceCat = request.getParameter("serviceCat");
- String targetServiceName = request.getParameter("serviceName");
- String targetProtocol = request.getParameter("protocol");
- ContractInfo contractInfo = null;
- String contractData = null;
-
- for (int i = 0; i < publishers.size() && contractInfo == null; i++) {
- ServicePublisher publisher = (ServicePublisher) publishers.get(i);
- String serviceCategory = publisher.getCategory();
- String serviceName = publisher.getServiceName();
- List eprs;
-
- if (publisher.getContractPublisher() == null) {
- continue;
- } else if (!serviceCategory.equalsIgnoreCase(targetServiceCat) ||
- !serviceName.equalsIgnoreCase(targetServiceName)) {
- continue;
- }
-
- try {
- eprs = (List) registry.findEPRs(serviceCategory, serviceName);
- } catch (RegistryException e) {
- // ignore for now - just return an empty list
- eprs = new ArrayList();
- }
-
- for (int ii = 0; ii < eprs.size(); ii++) {
- EPR epr = (EPR) eprs.get(ii);
- URI eprURI = URI.create(epr.getAddr().getAddress());
- String protocol = eprURI.getScheme();
-
- if (protocol.equalsIgnoreCase(targetProtocol)) {
- ContractPublisher contractPublisher = publisher.getContractPublisher();
-
- if(contractPublisher instanceof WebserviceContractPublisher) {
- contractInfo = ((WebserviceContractPublisher)contractPublisher).getContractInfo(epr, request);
- } else {
- contractInfo = contractPublisher.getContractInfo(epr);
- }
- break;
- }
- }
-
- if (contractInfo != null) {
- contractData = contractInfo.getData();
- response.setContentType(contractInfo.getMimeType());
- } else {
- contractData = "<Unavailable/>";
- response.setContentType("text/xml");
- }
- }
-%><%=contractData%>
\ No newline at end of file
+<%@ page import="java.util.List" %>
+<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
+<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
+<%@ page import="org.jboss.soa.esb.services.registry.ServiceNotFoundException" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
+<%@ page import="java.net.URI" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
+<%@ page import="org.jboss.soa.esb.actions.soap.WebserviceContractPublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
+<%
+ List publishers = ServicePublisher.getServicePublishers();
+ Registry registry = RegistryFactory.getRegistry();
+ String targetServiceCat = request.getParameter("serviceCat");
+ String targetServiceName = request.getParameter("serviceName");
+ String targetProtocol = request.getParameter("protocol");
+ ContractInfo contractInfo = null;
+ String contractData = null;
+ List eprs;
+
+ try {
+ List allEprs = (List) registry.findEPRs(targetServiceCat, targetServiceName);
+ eprs = new ArrayList(allEprs.size());
+
+ for (int i = 0; i < allEprs.size(); i++) {
+ EPR epr = (EPR) allEprs.get(i);
+ URI eprURI = URI.create(epr.getAddr().getAddress());
+ String protocol = eprURI.getScheme();
+
+ if (protocol.equalsIgnoreCase(targetProtocol)) {
+ eprs.add(epr);
+ }
+
+ }
+ } catch (ServiceNotFoundException e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ } catch (RegistryException e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ }
+
+ // JBESB-1547 - Contract console should generate HTTP 404 when asking for non-deployed service WSDL
+ if (eprs == null || eprs.isEmpty()) {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
+ return;
+ }
+
+ for (int i = 0; i < publishers.size() && contractInfo == null; i++) {
+ ServicePublisher publisher = (ServicePublisher) publishers.get(i);
+ String serviceCategory = publisher.getCategory();
+ String serviceName = publisher.getServiceName();
+
+ if (publisher.getContractPublisher() == null) {
+ continue;
+ } else if (!serviceCategory.equalsIgnoreCase(targetServiceCat) ||
+ !serviceName.equalsIgnoreCase(targetServiceName)) {
+ continue;
+ }
+
+ for (int ii = 0; ii < eprs.size(); ii++) {
+ EPR epr = (EPR) eprs.get(ii);
+
+ ContractPublisher contractPublisher = publisher.getContractPublisher();
+
+ if(contractPublisher instanceof WebserviceContractPublisher) {
+ contractInfo = ((WebserviceContractPublisher)contractPublisher).getContractInfo(epr, request);
+ } else {
+ contractInfo = contractPublisher.getContractInfo(epr);
+ }
+ break;
+ }
+
+ if (contractInfo != null && contractInfo.getData() != null) {
+ contractData = contractInfo.getData();
+ response.setContentType(contractInfo.getMimeType());
+ }
+ }
+
+ if (contractData == null) {
+ contractData = "<Unavailable/>";
+ response.setContentType("text/xml");
+ }
+%><%= contractData %>
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -21,6 +21,10 @@
value="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib">
<available type="dir" file="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib"/>
</condition>
+ <condition property="esb.lib.dir"
+ value="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib">
+ <available type="dir" file="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib"/>
+ </condition>
<condition property="esb.lib.dir"
value="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib">
<available type="dir" file="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib"/>
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -1,100 +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.monitoring.server;
-
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-
-import org.apache.log4j.Logger;
-import org.jboss.mx.util.MBeanServerLocator;
-
-/**
- * BeanRegistrationServlet registers the DataFilerSchedulerMBean. The
- * DataFilerSchedulerMBean contains information as to the frequency to
- * which to collect data, and on update, it reschedules a Quartz job
- * which fires it off at the selected interval.
- *
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- * @since Version 4.2
- */
-public class BeanRegistrationServlet extends HttpServlet {
- private static final long serialVersionUID = 5501281194727672262L;
-
- Logger logger = Logger.getLogger(BeanRegistrationServlet.class);
-
- public void init(ServletConfig config) throws ServletException {
- MBeanServer mbeanServer = null;
- ObjectName dataSchedulerName = null;
- try {
- mbeanServer = MBeanServerLocator.locateJBoss();
- } catch (IllegalStateException ise) {
- logger.error("", ise);
- return;
- }
-
- try {
- dataSchedulerName = new ObjectName("jboss.esb:service=DataFilerScheduler");
- } catch (MalformedObjectNameException e) {
- logger.error("", e);
- } catch (NullPointerException e) {
- logger.error("", e);
- }
-
- if (mbeanServer.isRegistered(dataSchedulerName)) {
- try {
- mbeanServer.unregisterMBean(dataSchedulerName);
- } catch (InstanceNotFoundException e) {
- logger.error("", e);
- } catch (MBeanRegistrationException e) {
- logger.error("", e);
- }
- }
-
- // Grab initial poll minute frequency from web.xml
- String pollString = config.getInitParameter("pollMinuteFrequency");
- int pollMinuteFrequency = Integer.parseInt(pollString);
-
- try {
- DataFilerScheduler dfs = new DataFilerScheduler();
- dfs.start();
- dfs.setPollMinuteFrequency(pollMinuteFrequency);
- mbeanServer.registerMBean(dfs, dataSchedulerName);
- } catch (InstanceAlreadyExistsException e) {
- logger.error("", e);
- } catch (MBeanRegistrationException e) {
- logger.error("", e);
- } catch (NotCompliantMBeanException e) {
- logger.error("", e);
- } catch (Exception e) {
- logger.error("", e);
- }
-
- }
-}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java 2008-07-05 09:19:14 UTC (rev 20915)
@@ -53,25 +53,32 @@
return pollMinuteFrequency;
}
- public void create() throws Exception {
- super.create();
+ public void start() throws Exception {
+ super.start();
SchedulerFactory schedulerFactory = new StdSchedulerFactory();
scheduler = schedulerFactory.getScheduler();
+ schedule() ;
}
- public void destroy() {
- super.destroy();
+ public void stop() {
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) {
pollMinuteFrequency = f_pollMinuteFrequency;
+ if (scheduler != null) {
+ schedule() ;
+ }
+ }
+
+ private void schedule() {
long ctime = System.currentTimeMillis();
try {
@@ -80,7 +87,7 @@
JobDetail jobDetail = new JobDetail(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME, DataFilerJob.class);
final JobDataMap datamap = new JobDataMap() ;
- datamap.put(ClassLoader.class.getName(), Thread.currentThread().getContextClassLoader()) ;
+ datamap.put(ClassLoader.class.getName(), Thread.currentThread().getContextClassLoader()) ;
jobDetail.setJobDataMap(datamap) ;
SimpleTrigger simpleTrigger = new SimpleTrigger(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME);
@@ -96,7 +103,4 @@
logger.error("", e);
}
}
-
-
-
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/resources/oracle/monitoring-mappings.hbm.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/resources/oracle/monitoring-mappings.hbm.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management/src/main/resources/oracle/monitoring-mappings.hbm.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -53,7 +53,7 @@
</generator>
</id>
<property name="objectname" type="java.lang.String" column="objectname"/>
- <property name="operation" type="java.lang.String" column="attribute"/>
+ <property name="operation" type="java.lang.String" column="operation"/>
<property name="description" type="java.lang.String" column="description"/>
<property name="returntype" type="java.lang.String" column="returntype"/>
<property name="servername" type="java.lang.String" column="servername"/>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -81,6 +81,7 @@
<filter token="database.depends" value="${database.depends}"/>
<filter token="db.datasource" value="${db.datasource}"/>
<filter token="connection.datasource" value="${connection.datasource}"/>
+ <filter token="pollMinuteFrequency" value="${pollMinuteFrequency}"/>
</filterset>
</copy>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -3,6 +3,11 @@
<server>
<classpath codebase="deploy" archives="management.esb"/>
<classpath codebase="deploy/jbossesb.sar/lib" archives="jbossesb-rosetta.jar"/>
+ <mbean code="org.jboss.soa.esb.monitoring.server.DataFilerScheduler"
+ name="jboss.esb:service=DataFilerScheduler">
+ <attribute name="PollMinuteFrequency">@pollMinuteFrequency@</attribute>
+ </mbean>
+
<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
name="jboss.esb:service=ManagementDatabaseInitializer">
<attribute name="Datasource">@connection.datasource@</attribute>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/create_database.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/create_database.sql 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/create_database.sql 2008-07-05 09:19:14 UTC (rev 20915)
@@ -8,8 +8,8 @@
create table JMXATTRIBUTE (
statid number(19,0),
- objectname varchar2(255 char),
- attribute varchar2(255 char),
+ objectname varchar2(2000 char),
+ attribute varchar2(2000 char),
primary key (statid)
);
@@ -20,32 +20,32 @@
STATDATE timestamp,
timevalue float,
countvalue number(10,0),
- textvalue varchar2(255 char),
+ textvalue varchar2(2000 char),
primary key (id)
);
- CREATE TABLE JMXOPERATION (
- OPID number(19,0),
- OBJECTNAME VARCHAR2(255 char) NOT NULL,
- OPERATION VARCHAR2(255 char) NOT NULL,
- DESCRIPTION VARCHAR2(255) NOT NULL,
- RETURNTYPE VARCHAR2(255 char) NOT NULL,
- SERVERNAME VARCHAR2(255 char) NOT NULL,
- ACTIVEFLAG NUMBER(1) NOT NULL,
- primary key (opid)
- );
+ CREATE TABLE JMXOPERATION (
+ OPID number(19,0),
+ OBJECTNAME VARCHAR2(2000 char) NOT NULL,
+ OPERATION VARCHAR2(255 char) NOT NULL,
+ DESCRIPTION VARCHAR2(2000) NOT NULL,
+ RETURNTYPE VARCHAR2(255 char) NOT NULL,
+ SERVERNAME VARCHAR2(255 char) NOT NULL,
+ ACTIVEFLAG NUMBER(1) NOT NULL,
+ primary key (opid)
+ );
- CREATE TABLE JMXOPERATIONRESULT (
- ID number(19,0),
- OPID number(19,0),
- SERVER VARCHAR(255),
- STATDATE TIMESTAMP,
- RESULT VARCHAR(255),
- primary key(id)
- );
+ CREATE TABLE JMXOPERATIONRESULT (
+ ID number(19,0),
+ OPID number(19,0),
+ SERVER VARCHAR(255),
+ STATDATE TIMESTAMP,
+ RESULT VARCHAR(255),
+ primary key(id)
+ );
CREATE SEQUENCE SEQ_JMX_ATTRIBUTE START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
CREATE SEQUENCE SEQ_JMX_DATA START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
CREATE SEQUENCE SEQ_JMX_PATTERN START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
- CREATE SEQUENCE SEQ_JMX_OPERATION START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
- CREATE SEQUENCE SEQ_JMX_OPERATION_RESULT START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+ CREATE SEQUENCE SEQ_JMX_OPERATION START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
+ CREATE SEQUENCE SEQ_JMX_OPERATION_RESULT START WITH 1 MINVALUE 1 INCREMENT BY 1 NOCYCLE;
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/management-ds.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/management-ds.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-esb/src/main/resources/oracle/management-ds.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -14,8 +14,8 @@
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<!-- The login and password -->
- <user-name>vfafacility</user-name>
- <password>vfa</password>
+ <user-name>oracle</user-name>
+ <password>oracle</password>
<!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
<min-pool-size>5</min-pool-size>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/build.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/build.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -23,12 +23,7 @@
<mkdir dir="${mgmt.web.dir}/build"/>
<copy file="${mgmt.web.dir}/web.xml"
todir="${mgmt.web.dir}/build"
- overwrite="true">
- <filterset>
- <filter token="pollMinuteFrequency"
- value="${pollMinuteFrequency}"/>
- </filterset>
- </copy>
+ overwrite="true"/>
</target>
<target name="war" depends="create-webxml,build-jar"
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,4 +4,5 @@
<jboss-web>
<depends>jboss.esb:service=ManagementDatabaseInitializer</depends>
+ <depends>jboss.esb:service=DataFilerScheduler</depends>
</jboss-web>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/web.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/web.xml 2008-07-05 05:36:58 UTC (rev 20914)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_FP/product/tools/console/management-web/web.xml 2008-07-05 09:19:14 UTC (rev 20915)
@@ -4,20 +4,4 @@
<web-app>
<display-name>Archetype Created Web Application</display-name>
-
- <servlet>
- <servlet-name>BeanRegistration</servlet-name>
- <servlet-class>org.jboss.soa.esb.monitoring.server.BeanRegistrationServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- <init-param>
- <param-name>pollMinuteFrequency</param-name>
- <param-value>@pollMinuteFrequency@</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>BeanRegistration</servlet-name>
- <url-pattern>/beanregistrationservlet</url-pattern>
- </servlet-mapping>
-
</web-app>
More information about the jboss-svn-commits
mailing list