riftsaw SVN: r1172 - branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 04:51:27 -0500 (Wed, 01 Dec 2010)
New Revision: 1172
Modified:
branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java
Log:
* remove the unused methods.
Modified: branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2010-12-01 08:55:19 UTC (rev 1171)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2010-12-01 09:51:27 UTC (rev 1172)
@@ -64,26 +64,6 @@
public MBeanServerConnection getServer() throws NamingException {
return RiftSawTestHelper.getServer();
}
-
- /** Deploy the given archive
- */
- public void deploy(String archive) throws Exception {
- delegate.deploy(getTestSuiteName(), archive);
- }
-
- /** Undeploy the given archive
- */
- public void undeploy(String archive) throws Exception {
- delegate.undeploy(getTestSuiteName(), archive);
- }
-
- public File getTestFile(String filename) {
- return delegate.getTestFile(getTestSuiteName(), filename);
- }
-
- public URL getTestFileURL(String filename) throws MalformedURLException {
- return delegate.getTestFileURL(getTestSuiteName(), filename);
- }
protected void assertMessageFromFile(String message, String mesgFile) throws Exception {
String mesgpath=System.getProperty("test.dir")+java.io.File.separator+getTestSuiteName()+
14 years
riftsaw SVN: r1171 - in trunk: integration-tests/src/test/java/org/jboss/soa/bpel/tests and 7 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 03:55:19 -0500 (Wed, 01 Dec 2010)
New Revision: 1171
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java
trunk/integration-tests/src/test/resources/management/
trunk/integration-tests/src/test/resources/management/RiftSaw_238/
trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/
trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel
trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl
trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml
trunk/integration-tests/src/test/resources/management/RiftSaw_238/build.xml
trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/
trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml
trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml
trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml
trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml
Modified:
trunk/integration-tests/build.xml
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
Log:
*RIFTSAW-238, added test case and the fix.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-12-01 08:49:27 UTC (rev 1170)
+++ trunk/integration-tests/build.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -19,11 +19,21 @@
</condition>
<condition property="is.db2.driver.available">
- <available file="${db2.driver.path}" />
+ <or>
+ <not>
+ <equals arg1="db2" arg2="${database}" />
+ </not>
+ <available file="${db2.driver.path}" />
+ </or>
</condition>
<condition property="is.oracle.driver.available">
- <available file="${oracle.driver.path}" />
+ <or>
+ <not>
+ <equals arg1="oracle" arg2="${database}" />
+ </not>
+ <available file="${oracle.driver.path}" />
+ </or>
</condition>
<condition property="is.replace.qa.jdbc">
@@ -191,6 +201,8 @@
<ant antfile="src/test/resources/testcases/RiftSaw_299_peer/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_299_ws/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_312/build.xml" />
+
+ <ant antfile="src/test/resources/management/RiftSaw_238/build.xml" />
<ant antfile="src/test/resources/tutorials/BluePrint1/build.xml" />
<ant antfile="src/test/resources/tutorials/BluePrint2/build.xml" />
Modified: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java 2010-12-01 08:49:27 UTC (rev 1170)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java 2010-12-01 08:55:19 UTC (rev 1171)
@@ -93,7 +93,7 @@
}
}
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
List<URL> clientJars = new ArrayList<URL>();
for (int i = 0; i < archives.length; i++)
@@ -143,7 +143,7 @@
}
- protected void tearDown() throws Exception
+ public void tearDown() throws Exception
{
// Temporarily move the deployed files - this is to ensure the server actually undeploys
Added: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java (rev 0)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.management;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+/**
+ * Test case for Retire process test case
+ */
+public class RiftSaw238TestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "RiftSaw_238";
+
+ private RiftSawTestSetup firstArtifact;
+
+ private RiftSawTestSetup secondArtifact;
+
+ public RiftSaw238TestCase() {
+ super(TEST_NAME);
+ }
+
+ public void setUp() throws Exception {
+ firstArtifact = new RiftSawTestSetup(RiftSaw238TestCase.class, TEST_NAME, "RiftSaw_238-1.jar");
+ secondArtifact = new RiftSawTestSetup(RiftSaw238TestCase.class, TEST_NAME, "RiftSaw_238-2.jar");
+ }
+
+ public void testSendHello() throws Exception {
+
+ firstArtifact.setUp();
+
+ synchronized(this) {
+ wait(2 * 60 * 1000);
+ }
+
+ String result=sendSOAPMessage("hello_request1.xml", "http://localhost:8080/RiftSaw_238WS");
+
+ result = processResult(result);
+ assertMessageFromFile(result, "hello_response1.xml");
+
+ secondArtifact.setUp();
+
+ synchronized(this) {
+ wait(2 * 60 * 1000);
+ }
+
+ secondArtifact.tearDown();
+
+ synchronized(this) {
+ wait(1 * 60 * 1000);
+ }
+
+ String result2 = sendSOAPMessage("goodbye_request1.xml", "http://localhost:8080/RiftSaw_238WS");
+ result2 = processResult(result2);
+ assertMessageFromFile(result2, "goodbye_response1.xml");
+
+ firstArtifact.tearDown();
+
+ }
+
+}
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,112 @@
+<!--
+ ~ 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.
+ -->
+<process name="HelloGoodbye"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="HelloGoodbye.wsdl"
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloGoodbyePartnerLink"
+ partnerLinkType="intf:HelloGoodbyePartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <correlationSets xmlns:cor="http://example.com/supplyCorrelation">
+ <correlationSet name="Session"
+ properties="intf:SessionID" />
+ </correlationSets>
+
+ <variables>
+ <variable name="myHelloVar" messageType="intf:HelloMessage"/>
+ <variable name="myGoodbyeVar" messageType="intf:GoodbyeMessage"/>
+ <variable name="mesgVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="hello"
+ variable="myHelloVar"
+ createInstance="yes">
+ <correlations>
+ <correlation set="Session" initiate="yes" />
+ </correlations>
+ </receive>
+
+ <assign name="assignHelloMesg">
+ <copy>
+ <from variable="myHelloVar" part="Message"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' World')</from>
+ <to variable="myHelloVar" part="Message"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="hello"
+ variable="myHelloVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </reply>
+ <receive
+ name="start"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="goodbye"
+ variable="myGoodbyeVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </receive>
+
+ <assign name="assignGoodbyeMesg">
+ <copy>
+ <from variable="myGoodbyeVar" part="Message"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' World')</from>
+ <to variable="myGoodbyeVar" part="Message"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="goodbye"
+ variable="myGoodbyeVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </reply>
+ </sequence>
+</process>
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ 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.
+ -->
+<wsdl:definitions
+ targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:types="http://www.jboss.org/bpel/examples/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.jboss.org/bpel/examples/xsd">
+ <xsd:complexType name="SessionIdentity">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="ID" type="types:SessionIdentity"/>
+ <wsdl:part name="Message" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:message name="GoodbyeMessage">
+ <wsdl:part name="ID" type="types:SessionIdentity"/>
+ <wsdl:part name="Message" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloGoodbyePortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="HelloIn"/>
+ <wsdl:output message="tns:HelloMessage" name="HelloOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="goodbye">
+ <wsdl:input message="tns:GoodbyeMessage" name="GoodbyeIn"/>
+ <wsdl:output message="tns:GoodbyeMessage" name="GoodbyeOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloGoodbyeSoapBinding" type="tns:HelloGoodbyePortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="goodbye">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloGoodbyeService">
+ <wsdl:port name="HelloGoodbyePort" binding="tns:HelloGoodbyeSoapBinding">
+ <soap:address location="http://localhost:8080/RiftSaw_238WS"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloGoodbyePartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloGoodbyePortType"/>
+ <plnk:role name="you" portType="tns:HelloGoodbyePortType"/>
+ </plnk:partnerLinkType>
+
+ <vprop:property name="SessionID" type="xsd:int" />
+
+ <vprop:propertyAlias propertyName="tns:SessionID"
+ messageType="tns:HelloMessage" part="ID">
+ <vprop:query>id</vprop:query>
+ </vprop:propertyAlias>
+
+ <vprop:propertyAlias propertyName="tns:SessionID"
+ messageType="tns:GoodbyeMessage" part="ID">
+ <vprop:query>id</vprop:query>
+ </vprop:propertyAlias>
+
+
+</wsdl:definitions>
+
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,29 @@
+<!--
+ ~ 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.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:bpl="http://www.jboss.org/bpel/examples"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl">
+
+ <process name="bpl:HelloGoodbye">
+ <active>true</active>
+ <provide partnerLink="helloGoodbyePartnerLink">
+ <service name="intf:HelloGoodbyeService" port="HelloGoodbyePort"/>
+ </provide>
+ </process>
+</deploy>
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/build.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/build.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,33 @@
+<project name="RiftSaw_238" default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="version" value="1" />
+ <property name="2ndVersion" value="2" />
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir" value="${basedir}/src/test/resources/management/${ant.project.name}"/>
+
+ <property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
+ <property name="newsample.jar.name" value="${ant.project.name}-${2ndVersion}.jar" />
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <jar basedir="${test.dir}/bpel" destfile="${deploy.dir}/${ant.project.name}/${sample.jar.name}" />
+ <jar basedir="${test.dir}/bpel" destfile="${deploy.dir}/${ant.project.name}/${newsample.jar.name}" />
+
+ <copy todir="${deploy.dir}/${ant.project.name}">
+ <fileset dir="${test.dir}/messages"/>
+ </copy>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ <delete file="${deploy.dir}/${newsample.jar.name}" />
+ </target>
+</project>
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:goodbye>
+ <ID>
+ <id>12</id>
+ </ID>
+ <Message>Goodbye</Message>
+ </wsdl:goodbye>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,3 @@
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><odens:goodbyeResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><ID>
+ <id>12</id>
+ </ID><Message>Goodbye World</Message></odens:goodbyeResponse></env:Body></env:Envelope>
\ No newline at end of file
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:hello>
+ <ID>
+ <id>12</id>
+ </ID>
+ <Message>Hello</Message>
+ </wsdl:hello>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added: trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml 2010-12-01 08:55:19 UTC (rev 1171)
@@ -0,0 +1,3 @@
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><odens:helloResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><ID>
+ <id>12</id>
+ </ID><Message>Hello World</Message></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-12-01 08:49:27 UTC (rev 1170)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-12-01 08:55:19 UTC (rev 1171)
@@ -649,10 +649,17 @@
break;
case DISABLED:
case UNDEPLOYED:
- _bpelServer.unregister(pse.pid);
+ _bpelServer.unregister(pse.pid);
if (pconf != null) {
_bpelServer.cleanupProcess(pconf);
}
+
+ String retiredProcess = _store.getLatestPackageVersion(pse.deploymentUnit);
+ if (retiredProcess != null) {
+ _store.setRetiredPackage(retiredProcess, false);
+ _store.setRetiredPackage(retiredProcess, true);
+ }
+
break;
default:
__log.debug("Ignoring store event: " + pse);
14 years
riftsaw SVN: r1170 - in branches/ODE/RiftSaw-ODE-trunk: bpel-store/src/main/java/org/apache/ode/store and 2 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 03:49:27 -0500 (Wed, 01 Dec 2010)
New Revision: 1170
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
branches/ODE/RiftSaw-ODE-trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/.project
branches/ODE/RiftSaw-ODE-trunk/dao-jpa-ojpa/.project
Log:
* RIFTSAW-238, fix the undeployment mechanism.
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java 2010-12-01 07:09:11 UTC (rev 1169)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java 2010-12-01 08:49:27 UTC (rev 1170)
@@ -271,8 +271,8 @@
return new PartnerRoleMessageExchangeImpl(this, mexdao, ptype, op, null, plink.hasMyRole() ? process
.getInitialMyRoleEPR(plink) : null, process.getPartnerRoleChannel(plink));
}
-
- BpelProcess unregisterProcess(QName process) {
+
+ public BpelProcess unregisterProcess(QName process) {
BpelProcess p = _activeProcesses.remove(process);
__log.debug("Unregister process: serviceId=" + process + ", process=" + p);
if (p != null) {
@@ -289,9 +289,9 @@
}
}
}
-
+
// unregister the services provided by the process
- p.deactivate();
+ p.deactivate();
// release the resources held by this process
p.dehydrate();
// update the process footprints list
@@ -312,18 +312,14 @@
* Register a process with the engine.
* @param process the process to register
*/
- void registerProcess(BpelProcess process) {
+ public void registerProcess(BpelProcess process) {
_activeProcesses.put(process.getPID(), process);
for (Endpoint e : process.getServiceNames()) {
__log.debug("Register process: serviceId=" + e + ", process=" + process);
List<BpelProcess> processes = _serviceMap.get(e.serviceName);
if (processes == null) {
processes = new ArrayList<BpelProcess>();
- // https://jira.jboss.org/browse/RIFTSAW-155
- // this is the "incomplete.patch" from
- // https://issues.apache.org/jira/browse/ODE-697
- if (process.getConf().getState() == ProcessState.ACTIVE)
- _serviceMap.put(e.serviceName, processes);
+ _serviceMap.put(e.serviceName, processes);
}
// Remove any older version of the process from the list
Iterator<BpelProcess> processesIter = processes.iterator();
@@ -333,7 +329,7 @@
if (cachedVersion.getProcessType().equals(process.getProcessType())) {
//Check for versions to retain newer one
if (cachedVersion.getVersion() > process.getVersion()) {
- __log.debug("removing current version");
+ __log.debug("deactivating current version");
process.activate(this);
process.deactivate();
return;
@@ -345,11 +341,9 @@
}
}
- // https://jira.jboss.org/browse/RIFTSAW-155
- // this is the "incomplete.patch" from
- // https://issues.apache.org/jira/browse/ODE-697
- if (process.getConf().getState() == ProcessState.ACTIVE)
- processes.add(process);
+
+
+ processes.add(process);
}
process.activate(this);
}
@@ -739,7 +733,7 @@
}
}
faultQName = constants.qnRetiredProcess;
- faultDetail.setTextContent("The process you're trying to instantiate has been retired.");
+ faultDetail.setTextContent("The process you are trying to instantiate has been retired. Retired process can not take any new instance creation.");
break;
case InvalidProcessException.DEFAULT_CAUSE_CODE:
default:
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java 2010-12-01 07:09:11 UTC (rev 1169)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java 2010-12-01 08:49:27 UTC (rev 1170)
@@ -627,27 +627,21 @@
}
void deactivate() {
- // the BindingContext contains only the endpoints for the latest process version
- if (org.apache.ode.bpel.iapi.ProcessState.ACTIVE.equals(_pconf.getState())) {
- // Deactivate all the my-role endpoints.
- for (Endpoint endpoint : _myEprs.keySet()) {
- // Deactivate the EPR only if there are no more references
- // to this endpoint from any (active) BPEL process.
- if (isShareable(endpoint)) {
- if(__log.isDebugEnabled()) __log.debug("deactivating shared endpoint " + endpoint+ " for pid "+ _pid);
- if (!_sharedEps.decrementReferenceCount(endpoint)) {
- _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
- _sharedEps.removeEndpoint(endpoint);
- }
- } else {
- if(__log.isDebugEnabled()) __log.debug("deactivating non-shared endpoint " + endpoint + " for pid "+ _pid);
- _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
- }
- }
- // TODO Deactivate all the partner-role channels
- } else {
- if(__log.isDebugEnabled()) __log.debug("pid "+_pid+" is not ACTIVE, no endpoints to deactivate");
- }
+ // Deactivate all the my-role endpoints.
+ for (Endpoint endpoint : _myEprs.keySet()) {
+ // Deactivate the EPR only if there are no more references
+ // to this endpoint from any (active) BPEL process.
+ if (isShareable(endpoint)) {
+ if(__log.isDebugEnabled()) __log.debug("deactivating shared endpoint " + endpoint+ " for pid "+ _pid);
+ if (!_sharedEps.decrementReferenceCount(endpoint)) {
+ _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
+ _sharedEps.removeEndpoint(endpoint);
+ }
+ } else {
+ if(__log.isDebugEnabled()) __log.debug("deactivating non-shared endpoint " + endpoint + " for pid "+ _pid);
+ _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
+ }
+ }
}
private boolean isShareable(Endpoint endpoint) {
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java 2010-12-01 07:09:11 UTC (rev 1169)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java 2010-12-01 08:49:27 UTC (rev 1170)
@@ -338,23 +338,10 @@
// is different from ODE.
protected void retirePreviousPackageVersions(DeploymentUnitDir du) {
//retire all the other versions of the same DU
- String[] nameParts = du.getName().split("/");
- /* Replace the version number (if any) with regexp to match any version number */
- nameParts[0] = nameParts[0].replaceAll("([-\\Q.\\E](\\d)+)?\\z", "");
- nameParts[0] += "([-\\Q.\\E](\\d)+)?";
- StringBuilder duNameRegExp = new StringBuilder(du.getName().length() * 2);
- for (int i = 0, n = nameParts.length; i < n; i++) {
- if (i > 0) duNameRegExp.append("/");
- duNameRegExp.append(nameParts[i]);
+ List<String> deployedDUNames = getPreviousPackageVersions(du.getName());
+ for (String deployedDUName : deployedDUNames) {
+ setRetiredPackage(deployedDUName, true);
}
-
- Pattern duNamePattern = Pattern.compile(duNameRegExp.toString());
- for (String deployedDUname : _deploymentUnits.keySet()) {
- Matcher matcher = duNamePattern.matcher(deployedDUname);
- if (matcher.matches()) {
- setRetiredPackage(deployedDUname, true);
- }
- }
}
public Collection<QName> undeploy(final File dir) {
@@ -492,6 +479,49 @@
setState(toPid(processName, duDir.getVersion()), retired ? ProcessState.RETIRED : ProcessState.ACTIVE);
}
}
+
+
+ public String getLatestPackageVersion(String duName) {
+ List<String> packages = getPreviousPackageVersions(duName);
+ if (packages.size() < 1) {
+ return null;
+ }
+ String result = null;
+ long version = -1;
+ for (String theDUName : packages) {
+ DeploymentUnitDir duDir = _deploymentUnits.get(theDUName);
+ if (duDir.getVersion() > version) {
+ version = duDir.getVersion();
+ result = theDUName;
+ }
+ }
+ return result;
+ }
+
+ public List<String> getPreviousPackageVersions(String duName) {
+ List<String> duNames = new ArrayList<String>();
+ String[] nameParts = duName.split("/");
+ /* Replace the version number (if any) with regexp to match any version number */
+ nameParts[0] = nameParts[0].replaceAll("([-\\Q.\\E](\\d)+)?\\z", "");
+ nameParts[0] += "([-\\Q.\\E](\\d)+)?";
+ StringBuilder duNameRegExp = new StringBuilder(duName.length() * 2);
+ for (int i = 0, n = nameParts.length; i < n; i++) {
+ if (i > 0) {
+ duNameRegExp.append("/");
+ }
+ duNameRegExp.append(nameParts[i]);
+ }
+
+ Pattern duNamePattern = Pattern.compile(duNameRegExp.toString());
+ for (String deployedDUname : _deploymentUnits.keySet()) {
+ Matcher matcher = duNamePattern.matcher(deployedDUname);
+ if (matcher.matches()) {
+ duNames.add(deployedDUname);
+ }
+ }
+
+ return duNames;
+ }
public ProcessConf getProcessConfiguration(final QName processId) {
_rw.readLock().lock();
Modified: branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/.project
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/.project 2010-12-01 07:09:11 UTC (rev 1169)
+++ branches/ODE/RiftSaw-ODE-trunk/dao-jpa-hibernate/.project 2010-12-01 08:49:27 UTC (rev 1170)
@@ -1,6 +1,6 @@
<projectDescription>
<name>riftsaw-dao-jpa-hibernate</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <comment>RiftSaw - the JBoss BPEL engine. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects>
<project>riftsaw-bpel-api</project>
<project>riftsaw-bpel-dao</project>
Modified: branches/ODE/RiftSaw-ODE-trunk/dao-jpa-ojpa/.project
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/dao-jpa-ojpa/.project 2010-12-01 07:09:11 UTC (rev 1169)
+++ branches/ODE/RiftSaw-ODE-trunk/dao-jpa-ojpa/.project 2010-12-01 08:49:27 UTC (rev 1170)
@@ -1,6 +1,6 @@
<projectDescription>
<name>riftsaw-dao-jpa-ojpa</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <comment>RiftSaw - the JBoss BPEL engine. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects>
<project>riftsaw-bpel-api</project>
<project>riftsaw-bpel-dao</project>
14 years
riftsaw SVN: r1169 - in branches/RiftSaw-2.2.x: integration-tests/src/test/java/org/jboss/soa/bpel/tests and 7 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 02:09:11 -0500 (Wed, 01 Dec 2010)
New Revision: 1169
Added:
branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/
branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/build.xml
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml
branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml
Modified:
branches/RiftSaw-2.2.x/integration-tests/build.xml
branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java
branches/RiftSaw-2.2.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
Log:
*RIFTSAW-238, added the test case and the fix.
Modified: branches/RiftSaw-2.2.x/integration-tests/build.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/build.xml 2010-12-01 07:07:21 UTC (rev 1168)
+++ branches/RiftSaw-2.2.x/integration-tests/build.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -19,11 +19,21 @@
</condition>
<condition property="is.db2.driver.available">
- <available file="${db2.driver.path}" />
+ <or>
+ <not>
+ <equals arg1="db2" arg2="${database}" />
+ </not>
+ <available file="${db2.driver.path}" />
+ </or>
</condition>
<condition property="is.oracle.driver.available">
- <available file="${oracle.driver.path}" />
+ <or>
+ <not>
+ <equals arg1="oracle" arg2="${database}" />
+ </not>
+ <available file="${oracle.driver.path}" />
+ </or>
</condition>
<condition property="is.replace.qa.jdbc">
@@ -191,6 +201,8 @@
<ant antfile="src/test/resources/testcases/RiftSaw_299_peer/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_299_ws/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_312/build.xml" />
+
+ <ant antfile="src/test/resources/management/RiftSaw_238/build.xml" />
<ant antfile="src/test/resources/tutorials/BluePrint1/build.xml" />
<ant antfile="src/test/resources/tutorials/BluePrint2/build.xml" />
Modified: branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java 2010-12-01 07:07:21 UTC (rev 1168)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestSetup.java 2010-12-01 07:09:11 UTC (rev 1169)
@@ -93,7 +93,7 @@
}
}
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
List<URL> clientJars = new ArrayList<URL>();
for (int i = 0; i < archives.length; i++)
@@ -143,7 +143,7 @@
}
- protected void tearDown() throws Exception
+ public void tearDown() throws Exception
{
// Temporarily move the deployed files - this is to ensure the server actually undeploys
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/java/org/jboss/soa/bpel/tests/management/RiftSaw238TestCase.java 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.management;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+/**
+ * Test case for Retire process test case
+ */
+public class RiftSaw238TestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "RiftSaw_238";
+
+ private RiftSawTestSetup firstArtifact;
+
+ private RiftSawTestSetup secondArtifact;
+
+ public RiftSaw238TestCase() {
+ super(TEST_NAME);
+ }
+
+ public void setUp() throws Exception {
+ firstArtifact = new RiftSawTestSetup(RiftSaw238TestCase.class, TEST_NAME, "RiftSaw_238-1.jar");
+ secondArtifact = new RiftSawTestSetup(RiftSaw238TestCase.class, TEST_NAME, "RiftSaw_238-2.jar");
+ }
+
+ public void testSendHello() throws Exception {
+
+ firstArtifact.setUp();
+
+ synchronized(this) {
+ wait(2 * 60 * 1000);
+ }
+
+ String result=sendSOAPMessage("hello_request1.xml", "http://localhost:8080/RiftSaw_238WS");
+
+ result = processResult(result);
+ assertMessageFromFile(result, "hello_response1.xml");
+
+ secondArtifact.setUp();
+
+ synchronized(this) {
+ wait(2 * 60 * 1000);
+ }
+
+ secondArtifact.tearDown();
+
+ synchronized(this) {
+ wait(1 * 60 * 1000);
+ }
+
+ String result2 = sendSOAPMessage("goodbye_request1.xml", "http://localhost:8080/RiftSaw_238WS");
+ result2 = processResult(result2);
+ assertMessageFromFile(result2, "goodbye_response1.xml");
+
+ firstArtifact.tearDown();
+
+ }
+
+}
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.bpel 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,112 @@
+<!--
+ ~ 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.
+ -->
+<process name="HelloGoodbye"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="HelloGoodbye.wsdl"
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloGoodbyePartnerLink"
+ partnerLinkType="intf:HelloGoodbyePartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <correlationSets xmlns:cor="http://example.com/supplyCorrelation">
+ <correlationSet name="Session"
+ properties="intf:SessionID" />
+ </correlationSets>
+
+ <variables>
+ <variable name="myHelloVar" messageType="intf:HelloMessage"/>
+ <variable name="myGoodbyeVar" messageType="intf:GoodbyeMessage"/>
+ <variable name="mesgVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="hello"
+ variable="myHelloVar"
+ createInstance="yes">
+ <correlations>
+ <correlation set="Session" initiate="yes" />
+ </correlations>
+ </receive>
+
+ <assign name="assignHelloMesg">
+ <copy>
+ <from variable="myHelloVar" part="Message"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' World')</from>
+ <to variable="myHelloVar" part="Message"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="hello"
+ variable="myHelloVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </reply>
+ <receive
+ name="start"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="goodbye"
+ variable="myGoodbyeVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </receive>
+
+ <assign name="assignGoodbyeMesg">
+ <copy>
+ <from variable="myGoodbyeVar" part="Message"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' World')</from>
+ <to variable="myGoodbyeVar" part="Message"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloGoodbyePartnerLink"
+ portType="intf:HelloGoodbyePortType"
+ operation="goodbye"
+ variable="myGoodbyeVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </reply>
+ </sequence>
+</process>
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/HelloGoodbye.wsdl 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ 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.
+ -->
+<wsdl:definitions
+ targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:types="http://www.jboss.org/bpel/examples/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.jboss.org/bpel/examples/xsd">
+ <xsd:complexType name="SessionIdentity">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="ID" type="types:SessionIdentity"/>
+ <wsdl:part name="Message" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:message name="GoodbyeMessage">
+ <wsdl:part name="ID" type="types:SessionIdentity"/>
+ <wsdl:part name="Message" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloGoodbyePortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="HelloIn"/>
+ <wsdl:output message="tns:HelloMessage" name="HelloOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="goodbye">
+ <wsdl:input message="tns:GoodbyeMessage" name="GoodbyeIn"/>
+ <wsdl:output message="tns:GoodbyeMessage" name="GoodbyeOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloGoodbyeSoapBinding" type="tns:HelloGoodbyePortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="goodbye">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloGoodbyeService">
+ <wsdl:port name="HelloGoodbyePort" binding="tns:HelloGoodbyeSoapBinding">
+ <soap:address location="http://localhost:8080/RiftSaw_238WS"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloGoodbyePartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloGoodbyePortType"/>
+ <plnk:role name="you" portType="tns:HelloGoodbyePortType"/>
+ </plnk:partnerLinkType>
+
+ <vprop:property name="SessionID" type="xsd:int" />
+
+ <vprop:propertyAlias propertyName="tns:SessionID"
+ messageType="tns:HelloMessage" part="ID">
+ <vprop:query>id</vprop:query>
+ </vprop:propertyAlias>
+
+ <vprop:propertyAlias propertyName="tns:SessionID"
+ messageType="tns:GoodbyeMessage" part="ID">
+ <vprop:query>id</vprop:query>
+ </vprop:propertyAlias>
+
+
+</wsdl:definitions>
+
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/bpel/deploy.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,29 @@
+<!--
+ ~ 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.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:bpl="http://www.jboss.org/bpel/examples"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl">
+
+ <process name="bpl:HelloGoodbye">
+ <active>true</active>
+ <provide partnerLink="helloGoodbyePartnerLink">
+ <service name="intf:HelloGoodbyeService" port="HelloGoodbyePort"/>
+ </provide>
+ </process>
+</deploy>
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/build.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/build.xml (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/build.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,33 @@
+<project name="RiftSaw_238" default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="version" value="1" />
+ <property name="2ndVersion" value="2" />
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir" value="${basedir}/src/test/resources/management/${ant.project.name}"/>
+
+ <property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
+ <property name="newsample.jar.name" value="${ant.project.name}-${2ndVersion}.jar" />
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <jar basedir="${test.dir}/bpel" destfile="${deploy.dir}/${ant.project.name}/${sample.jar.name}" />
+ <jar basedir="${test.dir}/bpel" destfile="${deploy.dir}/${ant.project.name}/${newsample.jar.name}" />
+
+ <copy todir="${deploy.dir}/${ant.project.name}">
+ <fileset dir="${test.dir}/messages"/>
+ </copy>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ <delete file="${deploy.dir}/${newsample.jar.name}" />
+ </target>
+</project>
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_request1.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:goodbye>
+ <ID>
+ <id>12</id>
+ </ID>
+ <Message>Goodbye</Message>
+ </wsdl:goodbye>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/goodbye_response1.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,3 @@
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><odens:goodbyeResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><ID>
+ <id>12</id>
+ </ID><Message>Goodbye World</Message></odens:goodbyeResponse></env:Body></env:Envelope>
\ No newline at end of file
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_request1.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:hello>
+ <ID>
+ <id>12</id>
+ </ID>
+ <Message>Hello</Message>
+ </wsdl:hello>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added: branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml
===================================================================
--- branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml (rev 0)
+++ branches/RiftSaw-2.2.x/integration-tests/src/test/resources/management/RiftSaw_238/messages/hello_response1.xml 2010-12-01 07:09:11 UTC (rev 1169)
@@ -0,0 +1,3 @@
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><odens:helloResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><ID>
+ <id>12</id>
+ </ID><Message>Hello World</Message></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file
Modified: branches/RiftSaw-2.2.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
--- branches/RiftSaw-2.2.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-12-01 07:07:21 UTC (rev 1168)
+++ branches/RiftSaw-2.2.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-12-01 07:09:11 UTC (rev 1169)
@@ -648,10 +648,17 @@
break;
case DISABLED:
case UNDEPLOYED:
- _bpelServer.unregister(pse.pid);
+ _bpelServer.unregister(pse.pid);
if (pconf != null) {
_bpelServer.cleanupProcess(pconf);
}
+
+ String retiredProcess = _store.getLatestPackageVersion(pse.deploymentUnit);
+ if (retiredProcess != null) {
+ _store.setRetiredPackage(retiredProcess, false);
+ _store.setRetiredPackage(retiredProcess, true);
+ }
+
break;
default:
__log.debug("Ignoring store event: " + pse);
14 years
riftsaw SVN: r1168 - in branches/RiftSaw-ODE-2.2.x: bpel-store/src/main/java/org/apache/ode/store and 2 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 02:07:21 -0500 (Wed, 01 Dec 2010)
New Revision: 1168
Modified:
branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
branches/RiftSaw-ODE-2.2.x/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
branches/RiftSaw-ODE-2.2.x/dao-jpa-hibernate/.project
branches/RiftSaw-ODE-2.2.x/dao-jpa-ojpa/.project
Log:
* RIFTSAW-238, fix the process undeployment mechanism.
Modified: branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
===================================================================
--- branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java 2010-11-29 03:32:46 UTC (rev 1167)
+++ branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java 2010-12-01 07:07:21 UTC (rev 1168)
@@ -271,8 +271,8 @@
return new PartnerRoleMessageExchangeImpl(this, mexdao, ptype, op, null, plink.hasMyRole() ? process
.getInitialMyRoleEPR(plink) : null, process.getPartnerRoleChannel(plink));
}
-
- BpelProcess unregisterProcess(QName process) {
+
+ public BpelProcess unregisterProcess(QName process) {
BpelProcess p = _activeProcesses.remove(process);
__log.debug("Unregister process: serviceId=" + process + ", process=" + p);
if (p != null) {
@@ -289,9 +289,9 @@
}
}
}
-
+
// unregister the services provided by the process
- p.deactivate();
+ p.deactivate();
// release the resources held by this process
p.dehydrate();
// update the process footprints list
@@ -312,18 +312,14 @@
* Register a process with the engine.
* @param process the process to register
*/
- void registerProcess(BpelProcess process) {
+ public void registerProcess(BpelProcess process) {
_activeProcesses.put(process.getPID(), process);
for (Endpoint e : process.getServiceNames()) {
__log.debug("Register process: serviceId=" + e + ", process=" + process);
List<BpelProcess> processes = _serviceMap.get(e.serviceName);
if (processes == null) {
processes = new ArrayList<BpelProcess>();
- // https://jira.jboss.org/browse/RIFTSAW-155
- // this is the "incomplete.patch" from
- // https://issues.apache.org/jira/browse/ODE-697
- if (process.getConf().getState() == ProcessState.ACTIVE)
- _serviceMap.put(e.serviceName, processes);
+ _serviceMap.put(e.serviceName, processes);
}
// Remove any older version of the process from the list
Iterator<BpelProcess> processesIter = processes.iterator();
@@ -333,7 +329,7 @@
if (cachedVersion.getProcessType().equals(process.getProcessType())) {
//Check for versions to retain newer one
if (cachedVersion.getVersion() > process.getVersion()) {
- __log.debug("removing current version");
+ __log.debug("deactivating current version");
process.activate(this);
process.deactivate();
return;
@@ -345,11 +341,9 @@
}
}
- // https://jira.jboss.org/browse/RIFTSAW-155
- // this is the "incomplete.patch" from
- // https://issues.apache.org/jira/browse/ODE-697
- if (process.getConf().getState() == ProcessState.ACTIVE)
- processes.add(process);
+
+
+ processes.add(process);
}
process.activate(this);
}
@@ -739,7 +733,7 @@
}
}
faultQName = constants.qnRetiredProcess;
- faultDetail.setTextContent("The process you're trying to instantiate has been retired.");
+ faultDetail.setTextContent("The process you are trying to instantiate has been retired. Retired process can not take any new instance creation.");
break;
case InvalidProcessException.DEFAULT_CAUSE_CODE:
default:
Modified: branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
===================================================================
--- branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java 2010-11-29 03:32:46 UTC (rev 1167)
+++ branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java 2010-12-01 07:07:21 UTC (rev 1168)
@@ -627,27 +627,21 @@
}
void deactivate() {
- // the BindingContext contains only the endpoints for the latest process version
- if (org.apache.ode.bpel.iapi.ProcessState.ACTIVE.equals(_pconf.getState())) {
- // Deactivate all the my-role endpoints.
- for (Endpoint endpoint : _myEprs.keySet()) {
- // Deactivate the EPR only if there are no more references
- // to this endpoint from any (active) BPEL process.
- if (isShareable(endpoint)) {
- if(__log.isDebugEnabled()) __log.debug("deactivating shared endpoint " + endpoint+ " for pid "+ _pid);
- if (!_sharedEps.decrementReferenceCount(endpoint)) {
- _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
- _sharedEps.removeEndpoint(endpoint);
- }
- } else {
- if(__log.isDebugEnabled()) __log.debug("deactivating non-shared endpoint " + endpoint + " for pid "+ _pid);
- _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
- }
- }
- // TODO Deactivate all the partner-role channels
- } else {
- if(__log.isDebugEnabled()) __log.debug("pid "+_pid+" is not ACTIVE, no endpoints to deactivate");
- }
+ // Deactivate all the my-role endpoints.
+ for (Endpoint endpoint : _myEprs.keySet()) {
+ // Deactivate the EPR only if there are no more references
+ // to this endpoint from any (active) BPEL process.
+ if (isShareable(endpoint)) {
+ if(__log.isDebugEnabled()) __log.debug("deactivating shared endpoint " + endpoint+ " for pid "+ _pid);
+ if (!_sharedEps.decrementReferenceCount(endpoint)) {
+ _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
+ _sharedEps.removeEndpoint(endpoint);
+ }
+ } else {
+ if(__log.isDebugEnabled()) __log.debug("deactivating non-shared endpoint " + endpoint + " for pid "+ _pid);
+ _engine._contexts.bindingContext.deactivateMyRoleEndpoint(endpoint);
+ }
+ }
}
private boolean isShareable(Endpoint endpoint) {
Modified: branches/RiftSaw-ODE-2.2.x/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
===================================================================
--- branches/RiftSaw-ODE-2.2.x/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java 2010-11-29 03:32:46 UTC (rev 1167)
+++ branches/RiftSaw-ODE-2.2.x/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java 2010-12-01 07:07:21 UTC (rev 1168)
@@ -338,23 +338,10 @@
// is different from ODE.
protected void retirePreviousPackageVersions(DeploymentUnitDir du) {
//retire all the other versions of the same DU
- String[] nameParts = du.getName().split("/");
- /* Replace the version number (if any) with regexp to match any version number */
- nameParts[0] = nameParts[0].replaceAll("([-\\Q.\\E](\\d)+)?\\z", "");
- nameParts[0] += "([-\\Q.\\E](\\d)+)?";
- StringBuilder duNameRegExp = new StringBuilder(du.getName().length() * 2);
- for (int i = 0, n = nameParts.length; i < n; i++) {
- if (i > 0) duNameRegExp.append("/");
- duNameRegExp.append(nameParts[i]);
+ List<String> deployedDUNames = getPreviousPackageVersions(du.getName());
+ for (String deployedDUName : deployedDUNames) {
+ setRetiredPackage(deployedDUName, true);
}
-
- Pattern duNamePattern = Pattern.compile(duNameRegExp.toString());
- for (String deployedDUname : _deploymentUnits.keySet()) {
- Matcher matcher = duNamePattern.matcher(deployedDUname);
- if (matcher.matches()) {
- setRetiredPackage(deployedDUname, true);
- }
- }
}
public Collection<QName> undeploy(final File dir) {
@@ -492,6 +479,49 @@
setState(toPid(processName, duDir.getVersion()), retired ? ProcessState.RETIRED : ProcessState.ACTIVE);
}
}
+
+
+ public String getLatestPackageVersion(String duName) {
+ List<String> packages = getPreviousPackageVersions(duName);
+ if (packages.size() < 1) {
+ return null;
+ }
+ String result = null;
+ long version = -1;
+ for (String theDUName : packages) {
+ DeploymentUnitDir duDir = _deploymentUnits.get(theDUName);
+ if (duDir.getVersion() > version) {
+ version = duDir.getVersion();
+ result = theDUName;
+ }
+ }
+ return result;
+ }
+
+ public List<String> getPreviousPackageVersions(String duName) {
+ List<String> duNames = new ArrayList<String>();
+ String[] nameParts = duName.split("/");
+ /* Replace the version number (if any) with regexp to match any version number */
+ nameParts[0] = nameParts[0].replaceAll("([-\\Q.\\E](\\d)+)?\\z", "");
+ nameParts[0] += "([-\\Q.\\E](\\d)+)?";
+ StringBuilder duNameRegExp = new StringBuilder(duName.length() * 2);
+ for (int i = 0, n = nameParts.length; i < n; i++) {
+ if (i > 0) {
+ duNameRegExp.append("/");
+ }
+ duNameRegExp.append(nameParts[i]);
+ }
+
+ Pattern duNamePattern = Pattern.compile(duNameRegExp.toString());
+ for (String deployedDUname : _deploymentUnits.keySet()) {
+ Matcher matcher = duNamePattern.matcher(deployedDUname);
+ if (matcher.matches()) {
+ duNames.add(deployedDUname);
+ }
+ }
+
+ return duNames;
+ }
public ProcessConf getProcessConfiguration(final QName processId) {
_rw.readLock().lock();
Modified: branches/RiftSaw-ODE-2.2.x/dao-jpa-hibernate/.project
===================================================================
--- branches/RiftSaw-ODE-2.2.x/dao-jpa-hibernate/.project 2010-11-29 03:32:46 UTC (rev 1167)
+++ branches/RiftSaw-ODE-2.2.x/dao-jpa-hibernate/.project 2010-12-01 07:07:21 UTC (rev 1168)
@@ -1,6 +1,6 @@
<projectDescription>
<name>riftsaw-dao-jpa-hibernate</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <comment>RiftSaw - the JBoss BPEL engine. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects>
<project>riftsaw-bpel-api</project>
<project>riftsaw-bpel-dao</project>
Modified: branches/RiftSaw-ODE-2.2.x/dao-jpa-ojpa/.project
===================================================================
--- branches/RiftSaw-ODE-2.2.x/dao-jpa-ojpa/.project 2010-11-29 03:32:46 UTC (rev 1167)
+++ branches/RiftSaw-ODE-2.2.x/dao-jpa-ojpa/.project 2010-12-01 07:07:21 UTC (rev 1168)
@@ -1,6 +1,6 @@
<projectDescription>
<name>riftsaw-dao-jpa-ojpa</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <comment>RiftSaw - the JBoss BPEL engine. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects>
<project>riftsaw-bpel-api</project>
<project>riftsaw-bpel-dao</project>
14 years