From 07b7dfd1a70ba222b899d9813f8c449dbf3b785f Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:07:28 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835124 13f79535-47bb-0310-9956-ffa450edef68 --- .../modules/implementation-bpel/DISCLAIMER | 8 - .../modules/implementation-bpel/LICENSE | 251 ----------- .../modules/implementation-bpel/NOTICE | 17 - .../modules/implementation-bpel/pom.xml | 477 --------------------- .../sca/implementation/bpel/BPELFactory.java | 41 -- .../implementation/bpel/BPELImplementation.java | 54 --- .../implementation/bpel/BPELProcessDefinition.java | 71 --- .../implementation/bpel/DefaultBPELFactory.java | 53 --- .../bpel/impl/BPELDocumentProcessor.java | 133 ------ .../bpel/impl/BPELImplementationImpl.java | 110 ----- .../bpel/impl/BPELImplementationProcessor.java | 207 --------- .../bpel/impl/BPELProcessDefinitionImpl.java | 110 ----- .../bpel/impl/ODEProcessException.java | 42 -- .../implementation/bpel/ode/EmbeddedODEServer.java | 240 ----------- .../implementation/bpel/ode/GeronimoTxFactory.java | 48 --- .../implementation/bpel/ode/ODEBindingContext.java | 63 --- .../sca/implementation/bpel/ode/ODEDeployment.java | 43 -- .../bpel/ode/ODEDeploymentException.java | 41 -- .../bpel/ode/ODEInitializationException.java | 41 -- .../bpel/ode/ODEMessageExchangeContext.java | 46 -- .../bpel/ode/ODEShutdownException.java | 41 -- .../bpel/provider/BPELImplementationProvider.java | 121 ------ .../BPELImplementationProviderFactory.java | 61 --- .../implementation/bpel/provider/BPELInvoker.java | 214 --------- ...ca.contribution.processor.StAXArtifactProcessor | 19 - ...sca.contribution.processor.URLArtifactProcessor | 19 - ...che.tuscany.sca.implementation.bpel.BPELFactory | 18 - ...cany.sca.provider.ImplementationProviderFactory | 19 - .../bpel/BPELDocumentProcessorTestCase.java | 67 --- .../bpel/BPELHelloWorldTestCase.java | 59 --- .../bpel/BPELImplementationProcessorTestCase.java | 122 ------ .../implementation/bpel/BPELPingPongTestCase.java | 60 --- .../sca/implementation/bpel/BPELPingTestCase.java | 63 --- .../sca/implementation/bpel/BPELPongTestCase.java | 62 --- .../bpel/EmbeddedODEServerTestCase.java | 128 ------ .../src/test/resources/helloworld/deploy.xml | 30 -- .../src/test/resources/helloworld/helloworld.bpel | 66 --- .../resources/helloworld/helloworld.componentType | 30 -- .../test/resources/helloworld/helloworld.composite | 29 -- .../src/test/resources/helloworld/helloworld.wsdl | 82 ---- .../src/test/resources/log4j.properties | 33 -- .../resources/ping-pong/ping-pong.componentType | 36 -- .../test/resources/ping-pong/ping-pong.composite | 36 -- .../src/test/resources/ping/deploy.xml | 35 -- .../src/test/resources/ping/ping.bpel | 124 ------ .../src/test/resources/ping/ping.componentType | 36 -- .../src/test/resources/ping/ping.composite | 29 -- .../src/test/resources/ping/ping.wsdl | 84 ---- .../src/test/resources/ping/pong.wsdl | 84 ---- .../src/test/resources/pong/deploy.xml | 31 -- .../src/test/resources/pong/pong.bpel | 84 ---- .../src/test/resources/pong/pong.componentType | 29 -- .../src/test/resources/pong/pong.composite | 30 -- .../src/test/resources/pong/pong.wsdl | 93 ---- 54 files changed, 4170 deletions(-) delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/DISCLAIMER delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/LICENSE delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/NOTICE delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/pom.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl (limited to 'branches/sca-java-1.1/modules/implementation-bpel') diff --git a/branches/sca-java-1.1/modules/implementation-bpel/DISCLAIMER b/branches/sca-java-1.1/modules/implementation-bpel/DISCLAIMER deleted file mode 100644 index d68a410903..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/DISCLAIMER +++ /dev/null @@ -1,8 +0,0 @@ -Apache Tuscany is an effort undergoing incubation at The Apache Software -Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is -required of all newly accepted projects until a further review indicates that -the infrastructure, communications, and decision making process have stabilized -in a manner consistent with other successful ASF projects. While incubation -status is not necessarily a reflection of the completeness or stability of the -code, it does indicate that the project has yet to be fully endorsed by the ASF. - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/LICENSE b/branches/sca-java-1.1/modules/implementation-bpel/LICENSE deleted file mode 100644 index baba9ca048..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/LICENSE +++ /dev/null @@ -1,251 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -=============================================================================================================== - -Apache Tuscany SCA for Java Subcomponents -=========================================: - -The Tuscany SCA for Java release includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -================================================================================================================= - -This module implementation-script temporarily includes one file under the following BSD license: - - Copyright (c) 2006, Sun Microsystems, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - - Neither the name of the Sun Microsystems, Inc. nor the names of - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - -================================================================================================================= diff --git a/branches/sca-java-1.1/modules/implementation-bpel/NOTICE b/branches/sca-java-1.1/modules/implementation-bpel/NOTICE deleted file mode 100644 index a2f696be26..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/NOTICE +++ /dev/null @@ -1,17 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -Unless otherwise indicated, all distribution made available by the Apache Software Foundation -is provided to you under the terms and conditions of the Apache License Version 2.0 ("AL"). -A copy of the AL is provided with this distribution as the LICENSE file present in the -root directory, and is also available at http://www.apache.org/licenses/. - -This product also includes software under the BSD license -(see the LICENSE file contained in this distribution), with -the following copyright: - -Copyright (c) 2006, Sun Microsystems, Inc. -All rights reserved. diff --git a/branches/sca-java-1.1/modules/implementation-bpel/pom.xml b/branches/sca-java-1.1/modules/implementation-bpel/pom.xml deleted file mode 100644 index cae5671f83..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/pom.xml +++ /dev/null @@ -1,477 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-modules - 1.1-incubating-SNAPSHOT - ../pom.xml - - tuscany-implementation-bpel - Apache Tuscany SCA BPEL Implementation Extension - - - org.apache.tuscany.sca - tuscany-assembly - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-core - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-interface - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-assembly-xml - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-contribution-impl - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-sca-api - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-databinding - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-interface-wsdl - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.1-incubating-SNAPSHOT - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.0-incubating - compile - - - org.apache.tuscany.sca - tuscany-wsdl2java - 1.1-incubating-SNAPSHOT - test - - - junit - junit - 3.8.1 - test - - - org.easymock - easymock - 2.2 - test - - - - - org.apache.ode - ode-bpel-epr - 1.1 - - - org.apache.ode - ode-bpel-store - 1.1 - - - org.apache.ode - ode-bpel-dao - 1.1 - - - org.apache.ode - ode-bpel-dao - 1.1 - - - org.apache.ode - ode-dao-jpa - 1.1 - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - - - org.apache.ode - ode-bpel-runtime - 1.1 - - - org.apache.ode - ode-bpel-api - 1.1 - - - org.apache.ode - ode-scheduler-simple - 1.1 - - - org.apache.ode - ode-utils - 1.1 - - - org.apache.ode - ode-bpel-compiler - 1.1 - - - org.apache.ode - ode-bpel-schemas - 1.1 - - - org.apache.ode - ode-bpel-obj - 1.1 - - - org.apache.ode - ode-jacob - 1.1 - - - org.apache.ode - ode-jacob-ap - 1.1 - - - - - commons-lang - commons-lang - 2.1 - - - commons-collections - commons-collections - 3.1 - - - org.apache.geronimo.specs - geronimo-jta_1.0.1B_spec - 1.0 - - - org.apache.geronimo.modules - geronimo-kernel - 1.2-beta - - - mx4j - mx4j - - - xpp3 - xpp3 - - - xstream - xstream - - - log4j - log4j - - - - - org.apache.geronimo.modules - geronimo-transaction - 1.2-beta - - - org.apache.geronimo.specs - geronimo-ejb_2.1_spec - - - ognl - ognl - - - - - org.apache.geronimo.specs - geronimo-ejb_3.0_spec - 1.0 - - - org.apache.geronimo.modules - geronimo-connector - 1.2-beta - - - xmlbeans - xbean - - - - - org.apache.derby - derby - 10.1.3.1 - - - tranql - tranql-connector - 1.1 - - - org.apache.openjpa - openjpa-all - 0.9.7-incubating - - - org.apache.openjpa - openjpa-lib - - - org.apache.openjpa - openjpa-kernel - - - org.apache.openjpa - openjpa-kernel-5 - - - org.apache.openjpa - openjpa-jdbc - - - org.apache.openjpa - openjpa-jdbc-5 - - - org.apache.openjpa - openjpa-persistence-jdbc - - - org.apache.openjpa - openjpa-xmlstore - - - - - net.sourceforge.serp - serp - 1.12.0 - - - xerces - xercesImpl - 2.8.1 - - - org.apache.xmlbeans - xmlbeans - 2.3.0 - - - net.sf.saxon - saxon - 8.7 - - - net.sf.saxon - saxon-dom - 8.7 - - - net.sf.saxon - saxon-xpath - 8.7 - - - log4j - log4j - 1.2.12 - - - commons-codec - commons-codec - 1.3 - - - commons-codec - commons-codec - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - test-compile - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.0-incubating - - - generate-bpel-helloworld - generate-sources - - ${basedir}/src/test/resources/helloworld/helloworld.wsdl - ${basedir}/target/wsdl2java-source - HelloWorld - true - true - true - - - generate - - - - - generate-bpel-ping - generate-sources - - ${basedir}/src/test/resources/ping/ping.wsdl - ${basedir}/target/wsdl2java-source - Ping - true - true - true - - - generate - - - - - generate-bpel-pong - generate-sources - - ${basedir}/src/test/resources/pong/pong.wsdl - ${basedir}/target/wsdl2java-source - Pong - true - true - true - - - generate - - - - - - - org.apache.tuscany.sca - tuscany-maven-wsdl2java - 1.1-incubating-SNAPSHOT - - - - - - ${basedir}/src/test/resources/helloworld/helloworld.wsdl - - - ${basedir}/src/test/resources/ping/ping.wsdl - - - ${basedir}/src/test/resources/pong/pong.wsdl - - - - - generate - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java deleted file mode 100644 index 2fb422c1b5..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -/** - * A factory for the BPEL implementation model. - * - * @version $Rev$ $Date$ - */ -public interface BPELFactory { - - /** - * Creates a new BPEL implementation. - * - * @return - */ - BPELImplementation createBPELImplementation(); - - /** - * Creates a new BPEL Process Definition - * @return - */ - BPELProcessDefinition createBPELProcessDefinition(); -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java deleted file mode 100644 index e18fabc484..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Implementation; - -/** - * The model representing the BPEL implementation in an SCA assembly model. - * - * @version $Rev$ $Date$ - */ -public interface BPELImplementation extends Implementation { - - /** - * Get the BPEL process Name - */ - QName getProcess(); - - /** - * Set the BPEL process Name - * @param processName process QName - */ - void setProcess(QName processName); - - /** - * Get the BPEL process definition - * @return - */ - BPELProcessDefinition getProcessDefinition(); - - /** - * Set the BPEL process definition - * @param processDefinition - */ - void setProcessDefinition(BPELProcessDefinition processDefinition); -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java deleted file mode 100644 index 3ff9e5fb06..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Base; - - -/** - * The BPEL process definition. - * - * @version $Rev$ $Date$ - */ -public interface BPELProcessDefinition extends Base { - - /** - * Get the BPEL process Name - */ - public QName getName(); - - /** - * Set the BPEL process Name - * @param processName process QName - */ - public void setName(QName name); - - /** - * Get BPEL process URI - * @return uri for the process - */ - public URI getURI(); - - /** - * Set the BPEL process URI - * @param uri for the process - */ - public void setURI(URI uri); - - /** - * Get the URL for the process location - * @return - */ - URL getLocation(); - - /** - * Set the URL for the process location - * @param url - */ - void setLocation(URL location); -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java deleted file mode 100644 index a0e9fd9c06..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationImpl; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELProcessDefinitionImpl; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory; - -/** - * A default factory for the BPEL implementation model. - * - * @version $Rev$ $Date$ - */ -public class DefaultBPELFactory implements BPELFactory { - - private AssemblyFactory assemblyFactory; - private WSDLFactory wsdlFactory; - - public DefaultBPELFactory(ModelFactoryExtensionPoint modelFactories) { - this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class); - } - - public BPELImplementation createBPELImplementation() { - return new BPELImplementationImpl(assemblyFactory, wsdlFactory); - } - - public BPELProcessDefinition createBPELProcessDefinition() { - return new BPELProcessDefinitionImpl(); - } - - - -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java deleted file mode 100644 index 8f25f63ff8..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.impl; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.implementation.bpel.BPELFactory; -import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition; - -/** - * BPEL document processor responsible for reading a BPEL file and producing necessary model info about it - * - * @version $Rev$ $Date$ - */ -public class BPELDocumentProcessor extends BaseStAXArtifactProcessor implements URLArtifactProcessor { - public final static QName BPEL_PROCESS_DEFINITION = new QName("http://schemas.xmlsoap.org/ws/2004/03/business-process/", "process"); - public final static QName BPEL_EXECUTABLE_DEFINITION = new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", "process"); - public final static String NAME_ELEMENT = "name"; - - private final static XMLInputFactory inputFactory = XMLInputFactory.newInstance(); - - private final BPELFactory factory; - - public BPELDocumentProcessor(ModelFactoryExtensionPoint modelFactories) { - this.factory = modelFactories.getFactory(BPELFactory.class); - } - - public String getArtifactType() { - return "*.bpel"; - } - - public Class getModelType() { - return BPELProcessDefinition.class; - } - - public BPELProcessDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException { - BPELProcessDefinition processDefinition = null; - try { - //for now we are just using process name - //and relying on componentType file for service definition - //so it's ok to set resolved for now - processDefinition = indexRead(artifactURL); - processDefinition.setURI(artifactURI); - processDefinition.setUnresolved(false); - } catch (Exception e) { - throw new ContributionReadException(e); - } - - return processDefinition; - } - - - public void resolve(BPELProcessDefinition model, ModelResolver resolver) throws ContributionResolveException { - - } - - /** - * Read the namespace for the WSDL definition and inline schemas - * - * @param doc - * @return - * @throws IOException - * @throws XMLStreamException - */ - protected BPELProcessDefinition indexRead(URL doc) throws Exception { - BPELProcessDefinition processDefinition = factory.createBPELProcessDefinition(); - processDefinition.setUnresolved(true); - processDefinition.setLocation(doc); - - InputStream is = doc.openStream(); - XMLStreamReader reader = null; - try { - reader = inputFactory.createXMLStreamReader(is); - int eventType = reader.getEventType(); - while (true) { - if (eventType == XMLStreamConstants.START_ELEMENT) { - QName elementName = reader.getName(); - if (BPEL_PROCESS_DEFINITION.equals(elementName) || BPEL_EXECUTABLE_DEFINITION.equals(elementName) ) { - QName processName = new QName(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.TARGET_NAMESPACE), getString(reader, NAME_ELEMENT)); - processDefinition.setName(processName); - break; - } - } - if (reader.hasNext()) { - eventType = reader.next(); - } else { - break; - } - } - } finally { - if(reader != null) { - reader.close(); - } - is.close(); - } - - return processDefinition; - } - - -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java deleted file mode 100644 index 9ec248cabe..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel.impl; - -import java.util.Collections; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.ConstrainingType; -import org.apache.tuscany.sca.assembly.Property; -import org.apache.tuscany.sca.assembly.impl.ComponentTypeImpl; -import org.apache.tuscany.sca.implementation.bpel.BPELImplementation; -import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory; - -/** - * The model representing a BPEL implementation in an SCA assembly model. - * - * @version $Rev$ $Date$ - */ -public class BPELImplementationImpl extends ComponentTypeImpl implements BPELImplementation { - - private QName _processName; - private BPELProcessDefinition _processDefinition; - - /** - * Constructs a new BPEL implementation. - */ - public BPELImplementationImpl(AssemblyFactory assemblyFactory, - WSDLFactory wsdlFactory) { - - } - - public QName getProcess() { - return _processName; - } - - public void setProcess(QName processName) { - _processName = processName; - } - - public BPELProcessDefinition getProcessDefinition() { - return this._processDefinition; - } - - public void setProcessDefinition(BPELProcessDefinition processDefinition) { - this._processDefinition = processDefinition; - } - - @Override - public String getURI() { - // The sample BPEL implementation does not have a URI - return null; - } - - @Override - public void setURI(String uri) { - // The sample BPEL implementation does not have a URI - } - - @Override - public ConstrainingType getConstrainingType() { - // The sample BPEL implementation does not support constrainingTypes - return null; - } - - @Override - public List getProperties() { - // The sample BPEL implementation does not support properties - return Collections.emptyList(); - } - - @Override - public int hashCode() { - return String.valueOf(this.getProcess()).hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else if (obj instanceof BPELImplementation) { - if (getProcess() != null) { - return getProcess().equals(((BPELImplementation)obj).getProcess()); - } else { - return ((BPELImplementation)obj).getProcess() == null; - } - } else { - return false; - } - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java deleted file mode 100644 index efc329af82..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel.impl; - -import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.assembly.Property; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.contribution.service.ContributionWriteException; -import org.apache.tuscany.sca.databinding.xml.DOMDataBinding; -import org.apache.tuscany.sca.implementation.bpel.BPELFactory; -import org.apache.tuscany.sca.implementation.bpel.BPELImplementation; -import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition; -import org.apache.tuscany.sca.implementation.bpel.DefaultBPELFactory; - -/** - * Implements a STAX artifact processor for BPEL implementations. - * - * The artifact processor is responsible for processing - * elements in SCA assembly XML composite files and populating the BPEL - * implementation model, resolving its references to other artifacts in the SCA - * contribution, and optionally write the model back to SCA assembly XML. - * - * @version $Rev$ $Date$ - */ -public class BPELImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor { - private static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel"); - - private AssemblyFactory assemblyFactory; - private BPELFactory bpelFactory; - - public BPELImplementationProcessor(ModelFactoryExtensionPoint modelFactories) { - this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - this.bpelFactory = new DefaultBPELFactory(modelFactories); - } - - public QName getArtifactType() { - // Returns the qname of the XML element processed by this processor - return IMPLEMENTATION_BPEL; - } - - public Class getModelType() { - // Returns the type of model processed by this processor - return BPELImplementation.class; - } - - public BPELImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - assert IMPLEMENTATION_BPEL.equals(reader.getName()); - - // Read an element - - // Read the process attribute. - QName process = getAttributeValueNS(reader, "process"); - - - // Create an initialize the BPEL implementation model - BPELImplementation implementation = bpelFactory.createBPELImplementation(); - implementation.setProcess(process); - implementation.setUnresolved(true); - - // Skip to end element - while (reader.hasNext()) { - if (reader.next() == END_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - return implementation; - } - - public void resolve(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException { - if( impl != null && impl.isUnresolved()) { - BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(impl, resolver); - if(processDefinition.isUnresolved()) { - throw new ContributionResolveException("Can't find BPEL Process : " + processDefinition.getName()); - } - - impl.setProcessDefinition(processDefinition); - - //resolve component type - mergeComponentType(resolver, impl); - - //set current implementation resolved - impl.setUnresolved(false); - } - - } - - public void write(BPELImplementation model, XMLStreamWriter outputSource) throws ContributionWriteException { - //FIXME Implement - } - - private BPELProcessDefinition resolveBPELProcessDefinition(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException { - QName processName = impl.getProcess(); - BPELProcessDefinition processDefinition = this.bpelFactory.createBPELProcessDefinition(); - processDefinition.setName(processName); - processDefinition.setUnresolved(true); - - return resolver.resolveModel(BPELProcessDefinition.class, processDefinition); - } - - - /** - * Merge the componentType from introspection and external file - * @param resolver - * @param impl - */ - private void mergeComponentType(ModelResolver resolver, BPELImplementation impl) { - // FIXME: Need to clarify how to merge - ComponentType componentType = getComponentType(resolver, impl); - if (componentType != null && !componentType.isUnresolved()) { - - Map refMap = new HashMap(); - for (Reference ref : impl.getReferences()) { - refMap.put(ref.getName(), ref); - } - for (Reference reference : componentType.getReferences()) { - refMap.put(reference.getName(), reference); - } - impl.getReferences().clear(); - impl.getReferences().addAll(refMap.values()); - - Map serviceMap = new HashMap(); - for (Service svc : impl.getServices()) { - if(svc != null) { - serviceMap.put(svc.getName(), svc); - } - } - for (Service service : componentType.getServices()) { - //set default dataBinding to DOM - service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME); - - serviceMap.put(service.getName(), service); - } - impl.getServices().clear(); - impl.getServices().addAll(serviceMap.values()); - - Map propMap = new HashMap(); - for (Property prop : impl.getProperties()) { - propMap.put(prop.getName(), prop); - } - } - } - - - private ComponentType getComponentType(ModelResolver resolver, BPELImplementation impl) { - String bpelProcessURI = impl.getProcessDefinition().getURI().toString(); - String componentTypeURI = bpelProcessURI.replace(".bpel", ".componentType"); - ComponentType componentType = assemblyFactory.createComponentType(); - componentType.setUnresolved(true); - componentType.setURI(componentTypeURI); - componentType = resolver.resolveModel(ComponentType.class, componentType); - if (!componentType.isUnresolved()) { - return componentType; - } - return null; - } - - private QName getAttributeValueNS(XMLStreamReader reader, String attribute) { - String fullValue = reader.getAttributeValue(null, "process"); - if (fullValue.indexOf(":") < 0) - throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue + - " in your composite should be prefixed (process=\"prefix:name\")."); - String prefix = fullValue.substring(0, fullValue.indexOf(":")); - String name = fullValue.substring(fullValue.indexOf(":") + 1); - String nsUri = reader.getNamespaceContext().getNamespaceURI(prefix); - if (nsUri == null) - throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue + - " in your composite has un unrecognized namespace prefix."); - return new QName(nsUri, name, prefix); - } - -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java deleted file mode 100644 index 98405c3489..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.impl; - -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition; - -/** - * The BPEL process definition implementation. - * - * @version $Rev$ $Date$ - */ -public class BPELProcessDefinitionImpl implements BPELProcessDefinition { - private QName name; - private URI uri; - private URL location; - private boolean unresolved; - - public QName getName() { - return name; - } - - public void setName(QName name) { - this.name = name; - } - - public URI getURI() { - return uri; - } - - public void setURI(URI uri) { - this.uri = uri; - } - - public URL getLocation() { - return location; - } - - public void setLocation(URL location) { - this.location = location; - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean undefined) { - this.unresolved = undefined; - } - - public void compile() { - /* - String bpelFile = reader.getAttributeValue(null, "file"); // FIXME: - - // Resolving the BPEL file and compiling it - URL bpelURL = getClass().getClassLoader().getResource(bpelFile); - if (bpelURL == null) - throw new ODEProcessException("Couldn't find referenced bpel file " + bpelFile); - BpelC bpelc = BpelC.newBpelCompiler(); - ByteArrayOutputStream compiledProcess = new ByteArrayOutputStream(); - bpelc.setOutputStream(compiledProcess); - try { - bpelc.compile(new File(bpelURL.getFile())); - } catch (IOException e) { - e.printStackTrace(); - } - */ - } - - @Override - public int hashCode() { - return String.valueOf(getName()).hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else if (obj instanceof BPELProcessDefinition) { - if (getName() != null) { - return getName().equals(((BPELProcessDefinition)obj).getName()); - } else { - return ((BPELProcessDefinition)obj).getName() == null; - } - } else { - return false; - } - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java deleted file mode 100644 index 017e3d85ef..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.impl; - -/** - * Thrown when a process can't be compiled properly or when its descriptors - * are invalid. - * - * @version $Rev$ $Date$ - */ -public class ODEProcessException extends RuntimeException { - private static final long serialVersionUID = 1047893235216756186L; - - public ODEProcessException(String message) { - super(message); - } - - public ODEProcessException(String message, Throwable cause) { - super(message, cause); - } - - public ODEProcessException(Throwable cause) { - super(cause); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java deleted file mode 100644 index 700fdddf9b..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.ode; - -import java.io.File; -import java.net.URL; -import java.util.Collection; -import java.util.Properties; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import javax.transaction.TransactionManager; -import javax.xml.namespace.QName; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC; -import org.apache.ode.bpel.engine.BpelServerImpl; -import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy; -import org.apache.ode.bpel.iapi.ProcessConf; -import org.apache.ode.bpel.iapi.ProcessStore; -import org.apache.ode.bpel.iapi.ProcessStoreEvent; -import org.apache.ode.bpel.iapi.ProcessStoreListener; -import org.apache.ode.bpel.iapi.Scheduler; -import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl; -import org.apache.ode.il.config.OdeConfigProperties; -import org.apache.ode.il.dbutil.Database; -import org.apache.ode.scheduler.simple.JdbcDelegate; -import org.apache.ode.scheduler.simple.SimpleScheduler; -import org.apache.ode.store.ProcessStoreImpl; -import org.apache.ode.utils.GUID; - -/** - * Embedded ODE process server - * - * @version $Rev$ $Date$ - */ -public class EmbeddedODEServer { - protected final Log __log = LogFactory.getLog(getClass()); - - private boolean _initialized; - - private OdeConfigProperties _config; - - private TransactionManager _txMgr; - - private Database _db; - - private File _workRoot; - - private BpelDAOConnectionFactoryJDBC _daoCF; - - private BpelServerImpl _bpelServer; - - protected ProcessStore store; - - private ExecutorService _executor; - - private Scheduler _scheduler; - - - public EmbeddedODEServer(TransactionManager txMgr) { - _txMgr = txMgr; - } - - public void init() throws ODEInitializationException { - Properties p = System.getProperties(); - p.put("derby.system.home", "target"); - - _config = new OdeConfigProperties(new Properties(), "ode-sca"); - - // Setting work root as the directory containing our database (wherever in the classpath) - URL dbLocation = getClass().getClassLoader().getResource("jpadb"); - if (dbLocation == null) - throw new ODEInitializationException("Couldn't find database in the classpath"); - _workRoot = new File(dbLocation.getFile()).getParentFile(); - - initTxMgr(); - initPersistence(); - initBpelServer(); - - try { - _bpelServer.start(); - } catch (Exception ex) { - String errmsg = "An error occured during the ODE BPEL server startup."; - __log.error(errmsg, ex); - throw new ODEInitializationException(errmsg, ex); - } - - __log.info("ODE BPEL server started."); - _initialized = true; - } - - private void initTxMgr() { - if(_txMgr == null) { - try { - GeronimoTxFactory txFactory = new GeronimoTxFactory(); - _txMgr = txFactory.getTransactionManager(); - } catch (Exception e) { - __log.fatal("Couldn't initialize a transaction manager using Geronimo's transaction factory.", e); - throw new ODEInitializationException("Couldn't initialize a transaction manager using " + "Geronimo's transaction factory.", e); - } - } - } - - private void initPersistence() { - _db = new Database(_config); - _db.setTransactionManager(_txMgr); - _db.setWorkRoot(_workRoot); - - try { - _db.start(); - _daoCF = _db.createDaoCF(); - } catch (Exception ex) { - String errmsg = "Error while configuring ODE persistence."; - __log.error(errmsg, ex); - throw new ODEInitializationException(errmsg, ex); - } - } - - private void initBpelServer() { - if (__log.isDebugEnabled()) { - __log.debug("ODE initializing"); - } - if (_config.getThreadPoolMaxSize() == 0) - _executor = Executors.newCachedThreadPool(); - else - _executor = Executors.newFixedThreadPool(_config.getThreadPoolMaxSize()); - - _bpelServer = new BpelServerImpl(); - _scheduler = createScheduler(); - _scheduler.setJobProcessor(_bpelServer); - - _bpelServer.setDaoConnectionFactory(_daoCF); - _bpelServer.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(_scheduler)); - // _bpelServer.setEndpointReferenceContext(new EndpointReferenceContextImpl(this)); - _bpelServer.setMessageExchangeContext(new ODEMessageExchangeContext(this)); - _bpelServer.setBindingContext(new ODEBindingContext(this)); - _bpelServer.setScheduler(_scheduler); - if (_config.isDehydrationEnabled()) { - CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy(); - _bpelServer.setDehydrationPolicy(dehy); - } - - store = new ProcessStoreImpl(_db.getDataSource(), "jpa", true); - store.registerListener(new ProcessStoreListener() { - public void onProcessStoreEvent(ProcessStoreEvent event) { - // bounce the process - _bpelServer.unregister(event.pid); - if (event.type != ProcessStoreEvent.Type.UNDEPLOYED) { - ProcessConf conf = (ProcessConf) store.getProcessConfiguration(event.pid); - // Test processes always run with in-mem DAOs - // conf.setTransient(true); //FIXME: what should we use for ProcessConfImpl - _bpelServer.register(conf); - } - } - }); - - _bpelServer.init(); - } - - public void stop() throws ODEShutdownException { - try { - _bpelServer.stop(); - } catch (Exception ex) { - String errmsg = "An error occured during the ODE BPEL server shutdown."; - __log.error(errmsg, ex); - throw new ODEInitializationException(errmsg, ex); - } - - _db.shutdown(); - } - - protected Scheduler createScheduler() { - SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),new JdbcDelegate(_db.getDataSource())); - scheduler.setTransactionManager(_txMgr); - - return scheduler; - } - - public boolean isInitialized() { - return _initialized; - } - - public BpelServerImpl getBpelServer() { - return _bpelServer; - } - - public Scheduler getScheduler() { - return _scheduler; - } - - public void deploy(ODEDeployment d) { - Collection procs; - - try { - procs = store.deploy(d.deployDir); - - // _deployed.add(d); - } catch (Exception ex) { - String errMsg = ">>> DEPLOY: Unexpected exception: " + ex.getMessage(); - __log.debug(errMsg, ex); - throw new ODEDeploymentException(errMsg,ex); - } - - try { - for (QName procName : procs) { - ProcessConf conf = (ProcessConf) store.getProcessConfiguration(procName); - // Test processes always run with in-mem DAOs - //conf.setTransient(true); //FIXME: what should we use for ProcessConfImpl - _bpelServer.register(conf); - } - } catch (Exception ex) { - String errMsg =">>>REGISTER: Unexpected exception: " + ex.getMessage(); - __log.debug(errMsg , ex); - throw new ODEDeploymentException(errMsg, ex); - } - } - - public void undeploy(ODEDeployment d) { - //TODO - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java deleted file mode 100644 index bf2f29c585..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.ode; - -import javax.transaction.TransactionManager; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Geronimo transaction factory - * - * @version $Rev$ $Date$ - */ -public class GeronimoTxFactory { - private static final Log __log = LogFactory.getLog(GeronimoTxFactory.class); - - /* Public no-arg contructor is required */ - public GeronimoTxFactory() { - } - - public TransactionManager getTransactionManager() { - __log.info("Using embedded Geronimo transaction manager"); - try { - Object obj = new org.apache.geronimo.transaction.manager.GeronimoTransactionManager(); - return (TransactionManager) obj; - } catch (Exception except) { - throw new IllegalStateException("Unable to instantiate Geronimo Transaction Manager", except); - } - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java deleted file mode 100644 index 459e9a652a..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel.ode; - -import javax.wsdl.PortType; -import javax.xml.namespace.QName; - -import org.apache.ode.bpel.iapi.BindingContext; -import org.apache.ode.bpel.iapi.Endpoint; -import org.apache.ode.bpel.iapi.EndpointReference; -import org.apache.ode.bpel.iapi.PartnerRoleChannel; -import org.w3c.dom.Document; - -/** - * Binding Context information - * - * @version $Rev: 573789 $ $Date: 2007-09-07 23:59:49 -0700 (Fri, 07 Sep 2007) $ - */ -public class ODEBindingContext implements BindingContext { - - private EmbeddedODEServer _server; - - public ODEBindingContext(EmbeddedODEServer _server) { - this._server = _server; - } - - public EndpointReference activateMyRoleEndpoint(QName pid, Endpoint endpoint) { - return new TuscanyEPR(); - } - - public void deactivateMyRoleEndpoint(Endpoint endpoint) { - // TODO - } - - public PartnerRoleChannel createPartnerRoleChannel(QName qName, PortType portType, Endpoint endpoint) { - // TODO - return null; - } - - // TODO This should hold something that makes sense for Tuscany so that the process has - // an address that makes sense from the outside world perspective - private class TuscanyEPR implements EndpointReference { - public Document toXML() { - return null; - } - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java deleted file mode 100644 index 2677f38c88..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.ode; - -import java.io.File; - -/** - * Deployment information - * - * @version $Rev$ $Date$ - */ -public class ODEDeployment { - /** The directory containing the deploy.xml and artefacts. */ - public File deployDir; - - /** If non-null the type of exception we expect to get when we deploy. */ - public Class expectedException = null; - - public ODEDeployment(File deployDir) { - this.deployDir = deployDir; - } - - public String toString() { - return "Deployment#" + deployDir; - } -} \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java deleted file mode 100644 index b03f69d9aa..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.ode; - -/** - * Thrown when ODE failed to shutdown. - * - * @version $Rev$ $Date$ - */ -public class ODEDeploymentException extends RuntimeException { - private static final long serialVersionUID = -2869674556330744215L; - - public ODEDeploymentException(Throwable cause) { - super(cause); - } - - public ODEDeploymentException(String message) { - super(message); - } - - public ODEDeploymentException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java deleted file mode 100644 index 3241dce387..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.ode; - -/** - * Thrown when ODE failed to initialize one if its needed resources. - * - * @version $Rev$ $Date$ - */ -public class ODEInitializationException extends RuntimeException { - private static final long serialVersionUID = -2869674556330744215L; - - public ODEInitializationException(Throwable cause) { - super(cause); - } - - public ODEInitializationException(String message) { - super(message); - } - - public ODEInitializationException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java deleted file mode 100644 index 58cdddb98e..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel.ode; - -import org.apache.ode.bpel.iapi.BpelEngineException; -import org.apache.ode.bpel.iapi.ContextException; -import org.apache.ode.bpel.iapi.MessageExchangeContext; -import org.apache.ode.bpel.iapi.MyRoleMessageExchange; -import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange; - -/** - * Message Exchange Context information - * - * @version $Rev: 573789 $ $Date: 2007-09-07 23:59:49 -0700 (Fri, 07 Sep 2007) $ - */ -public class ODEMessageExchangeContext implements MessageExchangeContext { - private EmbeddedODEServer _server; - - public ODEMessageExchangeContext(EmbeddedODEServer _server) { - this._server = _server; - } - - public void invokePartner(PartnerRoleMessageExchange partnerRoleMessageExchange) throws ContextException { - - } - - public void onAsyncReply(MyRoleMessageExchange myRoleMessageExchange) throws BpelEngineException { - - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java deleted file mode 100644 index a928379ba9..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.ode; - -/** - * Thrown when ODE failed to shutdown. - * - * @version $Rev$ $Date$ - */ -public class ODEShutdownException extends RuntimeException { - private static final long serialVersionUID = -2869674556330744215L; - - public ODEShutdownException(Throwable cause) { - super(cause); - } - - public ODEShutdownException(String message) { - super(message); - } - - public ODEShutdownException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java deleted file mode 100644 index a0105680fc..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel.provider; - -import java.io.File; -import java.net.URL; - -import javax.transaction.TransactionManager; - -import org.apache.tuscany.sca.implementation.bpel.BPELImplementation; -import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer; -import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment; -import org.apache.tuscany.sca.implementation.bpel.ode.ODEInitializationException; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * The model representing a sample CRUD implementation in an SCA assembly model. - * The sample CRUD implementation is not a full blown implementation, it only - * supports a subset of what a component implementation can support: - a single - * fixed service (as opposed to a list of services typed by different - * interfaces) - a directory attribute used to specify where a CRUD component is - * going to persist resources - no references or properties - no policy intents - * or policy sets - */ -public class BPELImplementationProvider implements ImplementationProvider { - - private RuntimeComponent component; - - private EmbeddedODEServer odeServer; - private TransactionManager txMgr; - - private BPELImplementation implementation; - - /** - * Constructs a new BPEL Implementation. - */ - public BPELImplementationProvider(RuntimeComponent component, - BPELImplementation implementation, - EmbeddedODEServer odeServer, - TransactionManager txMgr) { - this.component = component; - this.implementation = implementation; - this.odeServer = odeServer; - this.txMgr = txMgr; - } - - public Invoker createInvoker(RuntimeComponentService service, Operation operation) { - BPELInvoker invoker = new BPELInvoker(operation, odeServer, txMgr); - return invoker; - } - - public boolean supportsOneWayInvocation() { - return false; - } - - public void start() { - System.out.println("Starting " + component.getName()); - - try { - if (!odeServer.isInitialized()) { - // start ode server - odeServer.init(); - } - - URL deployURL = this.implementation.getProcessDefinition().getLocation(); - - File deploymentDir = new File(deployURL.toURI().getPath()).getParentFile(); - System.out.println(">>> Deploying : " + deploymentDir.toString()); - - // deploy the process - if (odeServer.isInitialized()) { - try { - txMgr.begin(); - odeServer.deploy(new ODEDeployment(deploymentDir)); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - } - - } catch (ODEInitializationException inite) { - throw new RuntimeException("BPEL Component Type Implementation : Error initializing embedded ODE server " + inite.getMessage(), inite); - } catch(Exception e) { - throw new RuntimeException("BPEl Component Type Implementation initialization failure : " + e.getMessage(), e); - } - } - - public void stop() { - System.out.println("Stopping " + component.getName()); - - if (odeServer.isInitialized()) { - // start ode server - odeServer.stop(); - } - - System.out.println("Stopped !!!"); - - } - -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java deleted file mode 100644 index cc485e7ad9..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.implementation.bpel.provider; - -import javax.transaction.TransactionManager; - -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.implementation.bpel.BPELImplementation; -import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer; -import org.apache.tuscany.sca.implementation.bpel.ode.GeronimoTxFactory; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.provider.ImplementationProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -/** - * BPEL Implementation provider factory - * - * We use the provider factory to instantiate a ODE server that is going to be injected in all BPEL components - */ -public class BPELImplementationProviderFactory implements ImplementationProviderFactory { - - private EmbeddedODEServer odeServer; - private TransactionManager txMgr; - - /** - * Default constructor receiving an extension point - * @param extensionPoints - */ - public BPELImplementationProviderFactory(ExtensionPointRegistry extensionPoints) { - GeronimoTxFactory txFactory = new GeronimoTxFactory(); - txMgr = txFactory.getTransactionManager(); - this.odeServer = new EmbeddedODEServer(txMgr); - } - - /** - * Creates a new BPEL Implementation and inject the EmbeddedODEServer - */ - public ImplementationProvider createImplementationProvider(RuntimeComponent component, BPELImplementation implementation) { - return new BPELImplementationProvider(component, implementation, odeServer, txMgr); - } - - public Class getModelType() { - return BPELImplementation.class; - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java deleted file mode 100644 index d5c6c4d3df..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel.provider; - -import java.lang.reflect.InvocationTargetException; -import java.util.concurrent.Future; - -import javax.transaction.SystemException; -import javax.transaction.TransactionManager; -import javax.wsdl.Part; -import javax.wsdl.Service; -import javax.xml.namespace.QName; - -import org.apache.ode.bpel.iapi.MyRoleMessageExchange; -import org.apache.ode.bpel.iapi.MessageExchange.Status; -import org.apache.ode.utils.DOMUtils; -import org.apache.ode.utils.GUID; -import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer; -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -/** - * Implements a target invoker for BPEL component implementations. - * - * The target invoker is responsible for dispatching invocations to the particular - * component implementation logic. In this example we are simply delegating the - * CRUD operation invocations to the corresponding methods on our fake - * resource manager. - */ -public class BPELInvoker implements Invoker { - private EmbeddedODEServer odeServer; - private TransactionManager txMgr; - - private Operation operation; - private QName bpelServiceName; - private String bpelOperationName; - private Part bpelOperationInputPart; - private Part bpelOperationOutputPart; - - public BPELInvoker(Operation operation, EmbeddedODEServer odeServer, TransactionManager txMgr) { - this.operation = operation; - this.bpelOperationName = operation.getName(); - this.odeServer = odeServer; - this.txMgr = txMgr; - - initializeInvocation(); - } - - - private void initializeInvocation() { - - Interface interfaze = operation.getInterface(); - if(interfaze instanceof WSDLInterface){ - WSDLInterface wsdlInterface = null; - wsdlInterface = (WSDLInterface) interfaze; - - Service serviceDefinition = (Service) wsdlInterface.getWsdlDefinition().getDefinition().getAllServices().values().iterator().next(); - bpelServiceName = serviceDefinition.getQName(); - - bpelOperationInputPart = (Part) wsdlInterface.getPortType().getOperation(bpelOperationName,null,null).getInput().getMessage().getParts().values().iterator().next(); - bpelOperationOutputPart = (Part) wsdlInterface.getPortType().getOperation(bpelOperationName,null,null).getOutput().getMessage().getParts().values().iterator().next(); - } - } - - public Message invoke(Message msg) { - try { - Object[] args = msg.getBody(); - Object resp = doTheWork(args); - msg.setBody(resp); - } catch (InvocationTargetException e) { - msg.setFaultBody(e.getCause()); - } - return msg; - } - - public Object doTheWork(Object[] args) throws InvocationTargetException { - Element response = null; - - if(! (operation.getInterface() instanceof WSDLInterface)) { - throw new InvocationTargetException(null,"Unsupported service contract"); - } - - org.apache.ode.bpel.iapi.MyRoleMessageExchange mex = null; - Future onhold = null; - - //Process the BPEL process invocation - try { - txMgr.begin(); - mex = odeServer.getBpelServer().getEngine().createMessageExchange(new GUID().toString(), - bpelServiceName, - bpelOperationName); - onhold = mex.invoke(createInvocationMessage(mex, args)); - - txMgr.commit(); - } catch (Exception e) { - try { - txMgr.rollback(); - } catch (SystemException se) { - - } - throw new InvocationTargetException(e, "Error invoking BPEL process : " + e.getMessage()); - } - - - // Waiting until the reply is ready in case the engine needs to continue in a different thread - if (onhold != null) { - try { - onhold.get(); - } catch (Exception e) { - throw new InvocationTargetException(e,"Error invoking BPEL process : " + e.getMessage()); - } - } - - //Process the BPEL invocation response - try { - txMgr.begin(); - // Reloading the mex in the current transaction, otherwise we can't - // be sure we have the "freshest" one. - mex = (MyRoleMessageExchange)odeServer.getBpelServer().getEngine().getMessageExchange(mex.getMessageExchangeId()); - - Status status = mex.getStatus(); - System.out.println("Status: " + status.name()); - Element invocationResponse = mex.getResponse().getMessage(); - System.out.println("Response: " + DOMUtils.domToString(invocationResponse)); - - //process the method invocation result - response = processResponse(invocationResponse); - - txMgr.commit(); - // end of transaction two - } catch (Exception e) { - try { - txMgr.rollback(); - } catch (SystemException se) { - - } - throw new InvocationTargetException(e, "Error retrieving BPEL process invocation status : " + e - .getMessage()); - } - - - return response; - } - - /** - * Create BPEL Invocation message - * - * BPEL invocation message like : - * - * - * Hello - * - * - * @param args - * @return - */ - private org.apache.ode.bpel.iapi.Message createInvocationMessage(org.apache.ode.bpel.iapi.MyRoleMessageExchange mex, Object[] args) { - Document dom = DOMUtils.newDocument(); - - Element contentMessage = dom.createElement("message"); - Element contentPart = dom.createElement(bpelOperationInputPart.getName()); - Element contentInvocation = (Element) args[0]; - - contentPart.appendChild(dom.importNode(contentInvocation, true)); - contentMessage.appendChild(contentPart); - dom.appendChild(contentMessage); - - System.out.println("::arg:::::: " + DOMUtils.domToString((Element) args[0])); - System.out.println("::message:: " + DOMUtils.domToString(dom.getDocumentElement())); - - org.apache.ode.bpel.iapi.Message request = mex.createMessage(new QName("", "")); - request.setMessage(dom.getDocumentElement()); - - return request; - } - - /** - * Process BPEL response - * - * - * - * World - * - * - * - * @param response - * @return - */ - private Element processResponse(Element response) { - return (Element) DOMUtils.findChildByName(response, new QName("",bpelOperationOutputPart.getName())); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 4763c69768..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#implementation.bpel,model=org.apache.tuscany.sca.implementation.bpel.BPELImplementation \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor deleted file mode 100644 index 066fdc864b..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor;type=.bpel,model=org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory deleted file mode 100644 index 53ffd1b72a..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -org.apache.tuscany.sca.implementation.bpel.DefaultBPELFactory diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory deleted file mode 100644 index b6481b1512..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the implementation extension -org.apache.tuscany.sca.implementation.bpel.provider.BPELImplementationProviderFactory;model=org.apache.tuscany.sca.implementation.bpel.BPELImplementation diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java deleted file mode 100644 index 6aba1f27d9..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor; -import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BPELDocumentProcessorTestCase extends TestCase { - - protected static final String BPEL_PROCESS_FILE = "helloworld/helloworld.bpel"; - - private ModelFactoryExtensionPoint modelFactories; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - modelFactories = new DefaultModelFactoryExtensionPoint(); - modelFactories.addFactory(new DefaultAssemblyFactory()); - modelFactories.addFactory(new DefaultWSDLFactory()); - - BPELFactory bpelFactory = new DefaultBPELFactory(modelFactories); - modelFactories.addFactory(bpelFactory); - } - - public void testLoadBPELProcessDefinition() throws Exception { - BPELDocumentProcessor bpelDocumentProcessor = new BPELDocumentProcessor(modelFactories); - - URI processURI = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE).toURI(); - URL processLocation = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE); - BPELProcessDefinition bpelProcessDefinition = bpelDocumentProcessor.read(null, processURI, processLocation); - - assertNotNull(bpelProcessDefinition); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), bpelProcessDefinition.getName()); - assertEquals(processLocation, bpelProcessDefinition.getLocation()); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java deleted file mode 100644 index 208af4ca2f..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELHelloWorldTestCase extends TestCase { - - private SCADomain scaDomain; - HelloPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld/helloworld.composite"); - bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() { - String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java deleted file mode 100644 index b52a75012f..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.io.StringReader; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamReader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationProcessor; -import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BPELImplementationProcessorTestCase extends TestCase { - - protected static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel"); - - private static final String COMPOSITE = - "" - + "" - + " " - + " " - + ""; - - private static final String COMPOSITE_INVALID = - "" - + "" - + " " - + " " - + ""; - - private XMLInputFactory xmlFactory; - private ModelFactoryExtensionPoint modelFactories; - - @Override - protected void setUp() throws Exception { - super.setUp(); - xmlFactory = XMLInputFactory.newInstance(); - - modelFactories = new DefaultModelFactoryExtensionPoint(); - AssemblyFactory assemblyFactory = new DefaultAssemblyFactory(); - modelFactories.addFactory(assemblyFactory); - JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(); - modelFactories.addFactory(javaFactory); - } - - /** - * Test parsing valid composite definition. Valid coposite populated with correct values expected. - * @throws Exception - */ - public void testLoadValidComposite() throws Exception { - XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(COMPOSITE)); - - BPELImplementationProcessor bpelProcessor = new BPELImplementationProcessor(modelFactories); - - while(true) { - int event = reader.next(); - if(event == XMLStreamConstants.START_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - BPELImplementation implementation = bpelProcessor.read(reader); - - assertNotNull(implementation); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), implementation.getProcess()); - } - - /** - * Test parsing invalid composite definition. Exception should be thrown - * @throws Exception - */ - public void testLoadInvalidComposite() throws Exception { - XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(COMPOSITE_INVALID)); - - BPELImplementationProcessor bpelProcessor = new BPELImplementationProcessor(modelFactories); - - while(true) { - int event = reader.next(); - if(event == XMLStreamConstants.START_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - try { - bpelProcessor.read(reader); - - fail("InvalidException should have been thrown"); - } catch(Exception e) { - assertTrue(true); - } - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java deleted file mode 100644 index 1ab2ba3d5d..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.ping.PingPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELPingPongTestCase extends TestCase { - - private SCADomain scaDomain; - PingPortType bpelPing = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - //scaDomain = SCADomain.newInstance("ping-pong/ping-pong.composite"); - //bpelPing = scaDomain.getService(PingPortType.class, "BPELPingPong-PingComponent/PingService"); - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - //scaDomain.close(); - } - - public void testPing() { - //String response = bpelPing.Ping("Ping"); - //System.out.println("response:" + response); - //assertNotNull(response); - // assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java deleted file mode 100644 index 34f82318a3..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.ping.PingPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELPingTestCase extends TestCase { - - private SCADomain scaDomain; - PingPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - //scaDomain = SCADomain.newInstance("ping/ping.composite"); - //bpelService = scaDomain.getService(PingPortType.class, "BPELPingComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - //scaDomain.close(); - } - - public void testInvoke() { - /* - String response = bpelService.Ping("Ping"); - System.out.println("response:" + response); - assertNotNull(response); - */ - // assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java deleted file mode 100644 index 313bd66850..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.pong.PongPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELPongTestCase extends TestCase { - - private SCADomain scaDomain; - PongPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("pong/pong.composite"); - bpelService = scaDomain.getService(PongPortType.class, "BPELPongComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() { - String response = bpelService.Pong("Pong"); - System.out.println("response:" + response); - assertNotNull(response); - - // assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java deleted file mode 100644 index 29f5cb74fc..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.io.File; -import java.net.URL; -import java.util.concurrent.Future; - -import javax.transaction.TransactionManager; -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.ode.bpel.iapi.Message; -import org.apache.ode.bpel.iapi.MyRoleMessageExchange; -import org.apache.ode.bpel.iapi.MessageExchange.Status; -import org.apache.ode.utils.DOMUtils; -import org.apache.ode.utils.GUID; -import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer; -import org.apache.tuscany.sca.implementation.bpel.ode.GeronimoTxFactory; -import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment; -import org.w3c.dom.Element; - -/** - * Test to Deploy and Invoke a HelloWorld BPEL process using EmbeddedODEServer - * - * @version $Rev$ $Date$ - */ -public class EmbeddedODEServerTestCase extends TestCase { - - private EmbeddedODEServer odeServer; - - private TransactionManager txMgr; - - @Override - protected void setUp() throws Exception { - GeronimoTxFactory txFactory = new GeronimoTxFactory(); - txMgr = txFactory.getTransactionManager(); - - this.odeServer = new EmbeddedODEServer(txMgr); - odeServer.init(); - } - - @Override - protected void tearDown() throws Exception { - odeServer.stop(); - } - - public void testProcessInvocation() throws Exception { - if (!odeServer.isInitialized()) { - fail("Server did not start !"); - } - - URL deployURL = getClass().getClassLoader().getResource("helloworld/deploy.xml"); - File deploymentDir = new File(deployURL.toURI().getPath()).getParentFile(); - System.out.println("Deploying : " + deploymentDir.toString()); - System.out.println(deploymentDir); - if (odeServer.isInitialized()) { - try { - txMgr.begin(); - odeServer.deploy(new ODEDeployment(deploymentDir)); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - - // transaction one - MyRoleMessageExchange mex = null; - Future onhold = null; - try { - // invoke the process - txMgr.begin(); - mex = odeServer.getBpelServer().getEngine().createMessageExchange(new GUID().toString(), - new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl", "HelloService"), "hello"); - - Message request = mex.createMessage(new QName("", "")); - request.setMessage(DOMUtils.stringToDOM("Hello")); - onhold = mex.invoke(request); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - // - end of transaction one - - // Waiting until the reply is ready in case the engine needs to continue in a different thread - if (onhold != null) - onhold.get(); - - // transaction two - try { - txMgr.begin(); - // Reloading the mex in the current transaction, otherwise we can't be sure we have - // the "freshest" one. - mex = (MyRoleMessageExchange) odeServer.getBpelServer().getEngine().getMessageExchange(mex.getMessageExchangeId()); - - Status status = mex.getStatus(); - System.out.println("Status: " + status.name()); - Element response = mex.getResponse().getMessage(); - System.out.println("Response: " + DOMUtils.domToString(response)); - txMgr.commit(); - // end of transaction two - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - } - } - -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml deleted file mode 100644 index 571aa37d58..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - true - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 8cf91adc2c..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType deleted file mode 100644 index 121064a475..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index 3593448c6c..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 1d71727b2d..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties deleted file mode 100644 index 01bf8d8bf5..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType deleted file mode 100644 index e4cbdfe89c..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite deleted file mode 100644 index a0eb4d0b5b..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml deleted file mode 100644 index 613ed9c491..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - true - - - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel deleted file mode 100644 index abda9e58d2..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - concat($pingRequest.body/ping:text, ' ping') - - - - - - - - - - - - $pongRequest.body - - - - $text - $pongRequest.body/pong:text - - - - - - - - $pongResponse.body/pong:text - $text - - - - - - - - - - - $pingResponse.body - - - - $text - $pingResponse.body/ping:text - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType deleted file mode 100644 index 7598a99d16..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite deleted file mode 100644 index 75eed03022..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl deleted file mode 100644 index 03e54c4de8..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl deleted file mode 100644 index 1f4c4a9aaa..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml deleted file mode 100644 index 1315ef47f0..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - true - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel deleted file mode 100644 index b5d84898c7..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($pongRequest.body/pong:text, ' pong') - $text - - - - - - - - - - - $pongResponse.body - - - - $text - $pongResponse.body/pong:text - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType deleted file mode 100644 index 2f8fd5d3de..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite deleted file mode 100644 index e40ce7ee45..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl deleted file mode 100644 index 21ee8b82f6..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3