servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r431769 - in /incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe: BPEDeployer.java BPEServiceUnit.java BPESpringComponent.java
Date Wed, 16 Aug 2006 02:28:11 GMT
Author: aco
Date: Tue Aug 15 19:28:10 2006
New Revision: 431769

URL: http://svn.apache.org/viewvc?rev=431769&view=rev
Log:
SM-542: Updated the BPE Deployer to store the definition keys in the BPE service unit, and
remove the keys during undeployment by retrieving them from the service unit.
- Added apache header to the BPESpringComponent.java

Modified:
    incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
    incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEServiceUnit.java
    incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPESpringComponent.java

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java?rev=431769&r1=431768&r2=431769&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
(original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
Tue Aug 15 19:28:10 2006
@@ -66,7 +66,6 @@
 public class BPEDeployer extends AbstractDeployer {
 
     protected FilenameFilter filter;
-    protected Collection defKeys;
     
     public BPEDeployer(BPEComponent component) {
 		super(component);
@@ -82,12 +81,13 @@
 		try {
 			EventDirector ed = ((BPEComponent) component).getEventDirector();
 			IDeployer deployer = ed.getDeployer(DeployTypeEnum.BPEL);
-			defKeys = deployer.loadDefinition(new FileSystemJarInputStream(new File(serviceUnitRootPath)),
false);
+			Collection defKeys = deployer.loadDefinition(new FileSystemJarInputStream(new File(serviceUnitRootPath)),
false);
 			// Build the Service Unit
 			BPEServiceUnit su = new BPEServiceUnit();
 			su.setComponent(component);
             su.setName(serviceUnitName);
             su.setRootPath(serviceUnitRootPath);
+            su.setDefinitionKeys(defKeys);
             Definition rootDef = loadMainWsdl(serviceUnitRootPath);
             checkDefinition(rootDef, true);
             su.setDefinition(rootDef);
@@ -120,9 +120,10 @@
 
     public void undeploy(ServiceUnit su) throws DeploymentException {
         try {
+            BPEServiceUnit bpeSU = (BPEServiceUnit)su;
             EventDirector ed = ((BPEComponent) component).getEventDirector();
             IDeployer deployer = ed.getDeployer(DeployTypeEnum.BPEL);
-            for (Iterator i = defKeys.iterator(); i.hasNext(); ) {
+            for (Iterator i = bpeSU.getDefinitionKeys().iterator(); i.hasNext(); ) {
                 deployer.removeDefinition(((BPELDefinitionKey)i.next()).getKey());
             }
             su.shutDown();

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEServiceUnit.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEServiceUnit.java?rev=431769&r1=431768&r2=431769&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEServiceUnit.java
(original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEServiceUnit.java
Tue Aug 15 19:28:10 2006
@@ -20,9 +20,12 @@
 
 import org.apache.servicemix.common.ServiceUnit;
 
+import java.util.Collection;
+
 public class BPEServiceUnit extends ServiceUnit {
 
     private Definition definition;
+    private Collection definitionKeys;
 
     /**
      * @return Returns the definition.
@@ -37,5 +40,19 @@
     public void setDefinition(Definition definition) {
         this.definition = definition;
     }
-    
+
+    /**
+     * @return Returns the definitions keys
+     */
+    public Collection getDefinitionKeys() {
+        return definitionKeys;
+    }
+
+    /**
+     * @param definitionKeys The definition keys to set
+     */
+    public void setDefinitionKeys(Collection definitionKeys) {
+        this.definitionKeys = definitionKeys;
+    }
+
 }

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPESpringComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPESpringComponent.java?rev=431769&r1=431768&r2=431769&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPESpringComponent.java
(original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPESpringComponent.java
Tue Aug 15 19:28:10 2006
@@ -1,3 +1,19 @@
+/*
+ * 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.servicemix.bpe;
 
 import java.io.File;



Mime
View raw message