You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/04/04 11:41:21 UTC

svn commit: r391262 - in /incubator/servicemix/trunk/servicemix-core/src: main/java/org/apache/servicemix/client/ main/java/org/apache/servicemix/jbi/container/ main/java/org/apache/servicemix/jbi/framework/ main/java/org/apache/servicemix/jbi/util/ te...

Author: gnodet
Date: Tue Apr  4 02:41:18 2006
New Revision: 391262

URL: http://svn.apache.org/viewcvs?rev=391262&view=rev
Log:
Enhance framework to be able to register components and service assemblies not deployed using ServiceMix own services (for Geronimo deployer).
All directory related informations should be stored and retrieved from the ComponentEnvironment and ServiceAssemblyEnvironment classes that can be given when registering a component or a service assembly.

Added:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java
Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/client/RemoteServiceMixClient.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ComponentEnvironment.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java
    incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/client/RemoteServiceMixClient.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/client/RemoteServiceMixClient.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/client/RemoteServiceMixClient.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/client/RemoteServiceMixClient.java Tue Apr  4 02:41:18 2006
@@ -15,13 +15,13 @@
  */
 package org.apache.servicemix.client;
 
-import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean;
+import javax.jbi.JBIException;
 
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow;
 
-import javax.jbi.JBIException;
+import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * Provides remote access to ServiceMix JBI Containers running on the JMS NMR Flow
@@ -44,7 +44,7 @@
      * 
      */
     public RemoteServiceMixClient(){
-        this("peer://org.apache.servicemix");
+        this("peer://org.apache.servicemix?persistent=false");
     }
 
     /**
@@ -104,7 +104,6 @@
      */
     public void stop() throws javax.jbi.JBIException{
         super.stop();
-        container.stop();
     }
 
     /**
@@ -113,7 +112,7 @@
      * @exception javax.jbi.JBIException
      *                if the item fails to shut down.
      */
-    public void shutDown() throws javax.jbi.JBIException{
+    public void shutDown() throws javax.jbi.JBIException {
         super.shutDown();
         container.shutDown();
     }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ComponentEnvironment.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ComponentEnvironment.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ComponentEnvironment.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ComponentEnvironment.java Tue Apr  4 02:41:18 2006
@@ -31,10 +31,14 @@
  * @version $Revision$
  */
 public class ComponentEnvironment {
+    
     private static final Log log = LogFactory.getLog(ComponentEnvironment.class);
+    
     private File installRoot;
     private File workspaceRoot;
     private File componentRoot;
+    private File stateFile;
+    private File statsFile;
     private PrintWriter statsWriter;
     private ComponentMBeanImpl localConnector;
 
@@ -95,6 +99,20 @@
     }
 
     /**
+     * @return Returns the stateFile.
+     */
+    public File getStateFile() {
+        return stateFile;
+    }
+
+    /**
+     * @param stateFile The stateFile to set.
+     */
+    public void setStateFile(File stateFile) {
+        this.stateFile = stateFile;
+    }
+    
+    /**
      * close this environment
      */
     public synchronized void close() {
@@ -109,9 +127,8 @@
     public synchronized void dumpStats() {
         if (componentRoot != null && componentRoot.exists()) {
             try {
-                if (statsWriter == null) {
-                    File file = new File(componentRoot, "Stats.csv");
-                    FileOutputStream fileOut = new FileOutputStream(file);
+                if (statsWriter == null && statsFile != null) {
+                    FileOutputStream fileOut = new FileOutputStream(statsFile);
                     statsWriter = new PrintWriter(fileOut, true);
                     statsWriter.println(localConnector.getComponentNameSpace().getName() + ":");
                     statsWriter.println("inboundExchanges,inboundExchangeRate,outboundExchanges,outboundExchangeRate");
@@ -128,4 +145,19 @@
             }
         }
     }
+
+    /**
+     * @return Returns the statsFile.
+     */
+    public File getStatsFile() {
+        return statsFile;
+    }
+
+    /**
+     * @param statsFile The statsFile to set.
+     */
+    public void setStatsFile(File statsFile) {
+        this.statsFile = statsFile;
+    }
+
 }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java Tue Apr  4 02:41:18 2006
@@ -38,7 +38,18 @@
 import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean;
 
 /**
- * Holder for environment infomation
+ * Holder for environment information
+ * 
+ * <component-name> (component root dir)
+ *   |-> version_X (versionned dir)
+ *   \-> workspace (workspace dir)
+ *   
+ * ServiceAssembly root
+ *   \-> version_X (versionned dir)
+ *     |-> install (unzip dir)
+ *     \-> sus (service units dir)
+ *       |-> <component-name>
+ *         |-> <service-unit-name>
  * 
  * @version $Revision$
  */
@@ -50,7 +61,7 @@
     private File installationDir;
     private File deploymentDir;
     private File sharedLibDir;
-    private File serviceAssembliesDirectory;
+    private File serviceAssembliesDir;
     private File tmpDir;
     private int statsInterval = 5;
     private Map envMap = new ConcurrentHashMap();
@@ -139,8 +150,8 @@
     /**
      * @return Returns service asseblies directory
      */
-    public File getServiceAssembliesDirectory(){
-        return serviceAssembliesDirectory;
+    public File getServiceAssembliesDir(){
+        return serviceAssembliesDir;
     } 
    
 
@@ -263,8 +274,7 @@
      * @throws JBIException
      */
     public ComponentEnvironment registerComponent(ComponentMBeanImpl connector) throws JBIException {
-        ComponentEnvironment result = new ComponentEnvironment();
-        return registerComponent(result,connector);
+        return registerComponent(null, connector);
     }
     
     /**
@@ -286,20 +296,32 @@
             // add workspace root and stats root ..
             try {
                 String name = connector.getComponentNameSpace().getName();
-                File componentRoot = getComponentRootDirectory(name);
-                FileUtil.buildDirectory(componentRoot);
-                File privateWorkspace = createWorkspaceDirectory(name);
-                result.setWorkspaceRoot(privateWorkspace);
-                result.setComponentRoot(componentRoot);
+                if (result.getComponentRoot() == null) {
+                    File componentRoot = getComponentRootDir(name);
+                    FileUtil.buildDirectory(componentRoot);
+                    result.setComponentRoot(componentRoot);
+                }
+                if (result.getWorkspaceRoot() == null) {
+                    File privateWorkspace = createWorkspaceDirectory(name);
+                    result.setWorkspaceRoot(privateWorkspace);
+                }
+                if (result.getStateFile() == null) {
+                    File stateFile = FileUtil.getDirectoryPath(result.getComponentRoot(), "state.xml");
+                    result.setStateFile(stateFile);
+                }
             } catch (IOException e) {
                 throw new JBIException(e);
             }
         }
+        if (result.getStatsFile() == null) {
+            File statsFile = FileUtil.getDirectoryPath(result.getComponentRoot(), "stats.cvs");
+            result.setStatsFile(statsFile);
+        }
         result.setLocalConnector(connector);
         envMap.put(connector, result);
         return result;
 	}
-
+    
     /**
      * Get root directory for a Component
      * 
@@ -307,7 +329,7 @@
      * @return directory for deployment/workspace etc
      * @throws IOException
      */
-    public File getComponentRootDirectory(String componentName) {
+    public File getComponentRootDir(String componentName) {
         if (getComponentsDir() == null) {
             return null;
         }
@@ -322,7 +344,7 @@
      * @return directory for deployment/workspace etc
      * @throws IOException
      */
-    public File createComponentRootDirectory(String componentName) throws IOException {
+    public File createComponentRootDir(String componentName) throws IOException {
         if (getComponentsDir() == null) {
             return null;
         }
@@ -337,8 +359,8 @@
      * @return
      * @throws IOException
      */
-    public File getNewInstallationDirectory(String componentName) throws IOException {
-        File result = getComponentRootDirectory(componentName);
+    public File getNewComponentInstallationDir(String componentName) throws IOException {
+        File result = getComponentRootDir(componentName);
         // get new version dir
         result = FileVersionUtil.getNewVersionDirectory(result);
         return result;
@@ -351,92 +373,71 @@
      * @return directory to deploy in
      * @throws IOException
      */
-    public File getInstallationDirectory(String componentName) throws IOException {
-        File result = getComponentRootDirectory(componentName);
-        // get the version directory
-        result = FileVersionUtil.getLatestVersionDirectory(result);
-        return result;
-    }
-    
-    /**
-     * Get the file holding running state infomation for a Component
-     * @param componentName
-     * @return the state file
-     * @throws IOException 
-     */
-    public File getComponentStateFile(String componentName) {
-        File result = getComponentRootDirectory(componentName);
-        if (result == null) {
-            return null;
-        }
-        FileUtil.buildDirectory(result);
-        result = new File(result,"state.xml");
-        return result;
-    }
-    
-    /**
-     * Get the root directory for a Service Assembly
-     * @param saName 
-     * 
-     * @return directory for deployment/workspace etc
-     * @throws IOException
-     */
-    public File getSARootDirectory(String saName) {
-        if (getServiceAssembliesDirectory() == null) {
-            return null;
-        }
-        File result = FileUtil.getDirectoryPath(getServiceAssembliesDirectory(), saName);
+    public File getComponentInstallationDir(String componentName) throws IOException {
+        File result = getComponentRootDir(componentName);
         // get the version directory
         result = FileVersionUtil.getLatestVersionDirectory(result);
         return result;
     }
     
-    /**
-     * Create root directory for a Service Assembly
-     * @param saName 
-     * 
-     * @return directory for deployment/workspace etc
-     * @throws IOException
-     */
-    public File createSARootDirectory(String saName) throws IOException{
-        if(getServiceAssembliesDirectory()==null){
-            return null;
-        }
-        File result=FileUtil.getDirectoryPath(getServiceAssembliesDirectory(),saName);
-        // get the version directory
-        result=FileVersionUtil.getNewVersionDirectory(result);
-        return result;
-    }
-    
-       
-    /**
-     * Remove a Service Assembly directory
-     * @param saName
-     * @return true if successful
-     * @throws IOException
-     */
-    public boolean removeSARootDirectory(String saName) throws IOException{
-        File result = FileUtil.getDirectoryPath(getServiceAssembliesDirectory(), saName);
-        //get the version directory
-        result=FileVersionUtil.getLatestVersionDirectory(result);
-        return FileUtil.deleteFile(result);
-    }
-    
-    /**
-     * Get the file holding running state infomation for a Service Assembly
-     * @param saName 
-     * @return the state file
-     * @throws IOException 
-     */
-    public File getServiceAssemblyStateFile(String saName) {
-        File result = getSARootDirectory(saName);
-        result = result.getParentFile();
-        FileUtil.buildDirectory(result);
-        result = new File(result,"state.xml");
-        return result;
+    public ComponentEnvironment getNewComponentEnvironment(String compName) throws IOException {
+        File rootDir   = FileUtil.getDirectoryPath(getComponentsDir(), compName);
+        File instDir   = FileVersionUtil.getNewVersionDirectory(rootDir);
+        File workDir   = FileUtil.getDirectoryPath(rootDir, "workspace");
+        File stateFile = FileUtil.getDirectoryPath(rootDir, "state.xml");
+        File statsFile = FileUtil.getDirectoryPath(rootDir, "stats.cvs");
+        ComponentEnvironment env = new ComponentEnvironment();
+        env.setComponentRoot(rootDir);
+        env.setInstallRoot(instDir);
+        env.setWorkspaceRoot(workDir);
+        env.setStateFile(stateFile);
+        env.setStatsFile(statsFile);
+        return env;
+    }
+    
+    public ComponentEnvironment getComponentEnvironment(String compName) throws IOException {
+        File rootDir   = FileUtil.getDirectoryPath(getComponentsDir(), compName);
+        File instDir   = FileVersionUtil.getLatestVersionDirectory(rootDir);
+        File workDir   = FileUtil.getDirectoryPath(rootDir, "workspace");
+        File stateFile = FileUtil.getDirectoryPath(rootDir, "state.xml");
+        File statsFile = FileUtil.getDirectoryPath(rootDir, "stats.cvs");
+        ComponentEnvironment env = new ComponentEnvironment();
+        env.setComponentRoot(rootDir);
+        env.setInstallRoot(instDir);
+        env.setWorkspaceRoot(workDir);
+        env.setStateFile(stateFile);
+        env.setStatsFile(statsFile);
+        return env;
+    }
+    
+    public ServiceAssemblyEnvironment getNewServiceAssemblyEnvironment(String saName) throws IOException {
+        File rootDir   = FileUtil.getDirectoryPath(getServiceAssembliesDir(), saName);
+        File versDir   = FileVersionUtil.getNewVersionDirectory(rootDir);
+        File instDir   = FileUtil.getDirectoryPath(versDir, "install");
+        File susDir    = FileUtil.getDirectoryPath(versDir, "sus");
+        File stateFile = FileUtil.getDirectoryPath(rootDir, "state.xml");
+        ServiceAssemblyEnvironment env = new ServiceAssemblyEnvironment();
+        env.setRootDir(rootDir);
+        env.setInstallDir(instDir);
+        env.setSusDir(susDir);
+        env.setStateFile(stateFile);
+        return env;
+    }
+    
+    public ServiceAssemblyEnvironment getServiceAssemblyEnvironment(String saName) {
+        File rootDir   = FileUtil.getDirectoryPath(getServiceAssembliesDir(), saName);
+        File versDir   = FileVersionUtil.getLatestVersionDirectory(rootDir);
+        File instDir   = FileUtil.getDirectoryPath(versDir, "install");
+        File susDir    = FileUtil.getDirectoryPath(versDir, "sus");
+        File stateFile = FileUtil.getDirectoryPath(rootDir, "state.xml");
+        ServiceAssemblyEnvironment env = new ServiceAssemblyEnvironment();
+        env.setRootDir(rootDir);
+        env.setInstallDir(instDir);
+        env.setSusDir(susDir);
+        env.setStateFile(stateFile);
+        return env;
     }
     
-
     /**
      * Create workspace directory for a Component
      * 
@@ -452,35 +453,6 @@
     }
     
     /**
-     * Create a SU directory for a Component
-     * @param componentName
-     * @param suName
-     * @param saName
-     * @return directory
-     * @throws IOException
-     */
-    public File getServiceUnitDirectory(String componentName, String suName, String saName) {
-        File result = getSARootDirectory(saName);
-        result = FileUtil.getDirectoryPath(result, componentName);
-        result = FileUtil.getDirectoryPath(result, suName);
-        FileUtil.buildDirectory(result);
-        return result;
-    }
-    
-    /**
-     * Remove a SU directory
-     * @param componentName
-     * @param suName
-     * @param saName
-     * @return true if successful
-     * @throws IOException
-     */
-    public boolean removeServiceUnitDirectory(String componentName, String suName, String saName) throws IOException {
-        File result = getServiceUnitDirectory(componentName, suName, saName);
-        return FileUtil.deleteFile(result);
-    }
-
-    /**
      * deregister the ComponentConnector
      * 
      * @param connector
@@ -499,7 +471,7 @@
      * @param componentName
      */
     public void removeComponentRootDirectory(String componentName) {
-        File file = getComponentRootDirectory(componentName);
+        File file = getComponentRootDir(componentName);
         if (file != null) {
             if (!FileUtil.deleteFile(file)) {
                 log.warn("Failed to remove directory structure for component [version]: " + componentName + " [" + file.getName() + ']');
@@ -560,14 +532,14 @@
             componentsDir = FileUtil.getDirectoryPath(jbiRootDir, "components").getCanonicalFile();
             tmpDir = FileUtil.getDirectoryPath(jbiRootDir, "tmp").getCanonicalFile();
             sharedLibDir = FileUtil.getDirectoryPath(jbiRootDir, "sharedlibs").getCanonicalFile();
-            serviceAssembliesDirectory = FileUtil.getDirectoryPath(jbiRootDir,"service-assemblies").getCanonicalFile();
+            serviceAssembliesDir = FileUtil.getDirectoryPath(jbiRootDir,"service-assemblies").getCanonicalFile();
             //actually create the sub directories
             FileUtil.buildDirectory(installationDir);
             FileUtil.buildDirectory(deploymentDir);
             FileUtil.buildDirectory(componentsDir);
             FileUtil.buildDirectory(tmpDir);
             FileUtil.buildDirectory(sharedLibDir);
-            FileUtil.buildDirectory(serviceAssembliesDirectory);
+            FileUtil.buildDirectory(serviceAssembliesDir);
         } catch (IOException e) {
             throw new JBIException(e);
         }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java Tue Apr  4 02:41:18 2006
@@ -786,7 +786,7 @@
     public void deactivateComponent(String name) throws JBIException {
         ComponentMBeanImpl component = registry.getComponent(name);
         if (component != null) {
-            component.shutDown();
+            component.doShutDown();
         	component.unregisterMbeans(managementContext);
             registry.deregisterComponent(component);
             environmentContext.unreregister(component);
@@ -982,7 +982,9 @@
         if (lcc != null) {
             lcc.setPojo(pojo);
             ComponentEnvironment env = environmentContext.registerComponent(context.getEnvironment(),lcc);
-            env.setInstallRoot(installationDir);
+            if (env.getInstallRoot() == null) {
+                env.setInstallRoot(installationDir);
+            }
             context.activate(component, env, activationSpec);
             lcc.setContext(context);
             lcc.setActivationSpec(activationSpec);

Added: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java?rev=391262&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java (added)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java Tue Apr  4 02:41:18 2006
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+package org.apache.servicemix.jbi.container;
+
+import java.io.File;
+
+import org.apache.servicemix.jbi.util.FileUtil;
+
+public class ServiceAssemblyEnvironment {
+
+    private File rootDir;
+    private File installDir;
+    private File susDir;
+    private File stateFile;
+    
+    public ServiceAssemblyEnvironment() {
+    }
+
+    /**
+     * @return Returns the installRoot.
+     */
+    public File getInstallDir() {
+        return installDir;
+    }
+
+    /**
+     * @param installRoot The installRoot to set.
+     */
+    public void setInstallDir(File installRoot) {
+        this.installDir = installRoot;
+    }
+
+    /**
+     * @return Returns the susRoot.
+     */
+    public File getSusDir() {
+        return susDir;
+    }
+
+    /**
+     * @param susRoot The susRoot to set.
+     */
+    public void setSusDir(File susRoot) {
+        this.susDir = susRoot;
+    }
+
+    /**
+     * @return Returns the stateFile.
+     */
+    public File getStateFile() {
+        return stateFile;
+    }
+
+    /**
+     * @param stateFile The stateFile to set.
+     */
+    public void setStateFile(File stateFile) {
+        this.stateFile = stateFile;
+    }
+
+    /**
+     * @return Returns the rootDir.
+     */
+    public File getRootDir() {
+        return rootDir;
+    }
+
+    /**
+     * @param rootDir The rootDir to set.
+     */
+    public void setRootDir(File rootDir) {
+        this.rootDir = rootDir;
+    }
+
+    public File getServiceUnitDirectory(String componentName, String suName) {
+        File compDir = FileUtil.getDirectoryPath(susDir, componentName);
+        File suDir = FileUtil.getDirectoryPath(compDir, suName);
+        return suDir;
+    }
+
+}

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java Tue Apr  4 02:41:18 2006
@@ -96,7 +96,6 @@
         this.service = service;
         this.componentStatsMBean = new ComponentStats(this);
         this.messagingStats = new MessagingStats(name.getName());
-        this.stateFile = container.getEnvironmentContext().getComponentStateFile(name.getName());
     }
 
     /**
@@ -136,6 +135,7 @@
      */
     public void setContext(ComponentContextImpl context) {
         this.context = context;
+        this.stateFile = context.getEnvironment().getStateFile();
     }
 
     /**
@@ -366,7 +366,7 @@
     /**
      * @return the current running state from disk
      */
-    String getRunningStateFromStore() {
+    public String getRunningStateFromStore() {
         String result = LifeCycleMBean.UNKNOWN;
         String componentName = getName();
         try {

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java Tue Apr  4 02:41:18 2006
@@ -37,6 +37,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.container.EnvironmentContext;
 import org.apache.servicemix.jbi.container.JBIContainer;
+import org.apache.servicemix.jbi.container.ServiceAssemblyEnvironment;
 import org.apache.servicemix.jbi.deployment.Descriptor;
 import org.apache.servicemix.jbi.deployment.DescriptorFactory;
 import org.apache.servicemix.jbi.deployment.ServiceAssembly;
@@ -235,14 +236,13 @@
             if (sa != null) {
                 String assemblyName = sa.getName();
                 registry.unregisterServiceAssembly(assemblyName);
-                File saDirectory = environmentContext.getSARootDirectory(assemblyName);
                 ServiceUnitLifeCycle[] sus = sa.getDeployedSUs();
                 if (sus != null) {
                     for (int i = 0;i < sus.length; i++) {
                         undeployServiceUnit(sus[i]);
                     }
                 }
-                FileUtil.deleteFile(saDirectory);
+                FileUtil.deleteFile(sa.getEnvironment().getRootDir());
             }
             return result;
         } catch (Exception e) {
@@ -450,14 +450,14 @@
      */
     protected String deployServiceAssembly(File tmpDir, ServiceAssembly sa) throws Exception {
         String assemblyName = sa.getIdentification().getName();
-        File oldSaDirectory = environmentContext.getSARootDirectory(assemblyName);
-        FileUtil.deleteFile(oldSaDirectory);
-        File saDirectory = environmentContext.createSARootDirectory(assemblyName);
+        ServiceAssemblyEnvironment env = environmentContext.getNewServiceAssemblyEnvironment(assemblyName);
+        File saDirectory = env.getInstallDir();
 
         // move the assembly to a well-named holding area
         if (log.isDebugEnabled()) {
             log.debug("Moving " + tmpDir.getAbsolutePath() + " to " + saDirectory.getAbsolutePath());
         }
+        saDirectory.getParentFile().mkdirs();
         if (!tmpDir.renameTo(saDirectory)) {
             throw ManagementSupport.failure("deploy", "Failed to rename " + tmpDir + " to " + saDirectory);
         }
@@ -503,7 +503,7 @@
                 // Unpack SU
                 try {
                     File artifactFile = new File(saDirectory, artifact);
-                    targetDir = environmentContext.getServiceUnitDirectory(componentName, suName, assemblyName);
+                    targetDir = env.getServiceUnitDirectory(componentName, suName);
                     if (log.isDebugEnabled()) {
                         log.debug("Unpack service unit archive " + artifactFile + " to " + targetDir);
                     }
@@ -534,7 +534,7 @@
                 }
                 if (success) {
                     nbSuccess++;
-                    suKeys.add(registry.registerServiceUnit(sus[i], assemblyName));
+                    suKeys.add(registry.registerServiceUnit(sus[i], assemblyName, targetDir));
                 } else {
                     nbFailures++;
                 }
@@ -565,7 +565,7 @@
         else {
             // Register SA
             String[] deployedSUs = (String[]) suKeys.toArray(new String[suKeys.size()]);
-            ServiceAssemblyLifeCycle salc = registry.registerServiceAssembly(sa, deployedSUs);
+            ServiceAssemblyLifeCycle salc = registry.registerServiceAssembly(sa, deployedSUs, env);
             salc.writeRunningState();
             // Build result string
             if (nbFailures > 0) {
@@ -682,7 +682,7 @@
     protected void buildState() {
         log.info("Restoring service assemblies");
         // walk through deployed SA's
-        File top = environmentContext.getServiceAssembliesDirectory();
+        File top = environmentContext.getServiceAssembliesDir();
         if (top != null && top.exists() && top.isDirectory()) {
             File[] files = top.listFiles();
             if (files != null) {
@@ -691,12 +691,12 @@
                     if (files[i].isDirectory()) {
                         String assemblyName = files[i].getName();
                         try {
-                        	File assemblyDir = environmentContext.getSARootDirectory(assemblyName);
-	                        Descriptor root = DescriptorFactory.buildDescriptor(assemblyDir);
+                            ServiceAssemblyEnvironment env = environmentContext.getServiceAssemblyEnvironment(assemblyName);
+	                        Descriptor root = DescriptorFactory.buildDescriptor(env.getInstallDir());
 	                        if (root != null) {
 	                            ServiceAssembly sa = root.getServiceAssembly();
 	                            if (sa != null && sa.getIdentification() != null) {
-	                                registry.registerServiceAssembly(sa);
+	                                registry.registerServiceAssembly(sa, env);
 	                            }
 	                        }
                         } catch(Exception e) {

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java Tue Apr  4 02:41:18 2006
@@ -153,7 +153,7 @@
     }
     
     private InstallerMBeanImpl createInstaller(String componentName) throws IOException, DeploymentException {
-        File installationDir = environmentContext.getInstallationDirectory(componentName);
+        File installationDir = environmentContext.getComponentInstallationDir(componentName);
         Descriptor root = DescriptorFactory.buildDescriptor(installationDir);
         Component descriptor = root.getComponent();
 
@@ -169,7 +169,7 @@
             installationContext.setClassPathElements(cp.getPathElements());
         }
         // now build the ComponentContext
-        File componentRoot = environmentContext.getComponentRootDirectory(componentName);
+        File componentRoot = environmentContext.getComponentRootDir(componentName);
         ComponentContextImpl context = buildComponentContext(componentRoot, componentName);
         installationContext.setContext(context);
         InstallationDescriptorExtension desc = descriptor.getDescriptorExtension();
@@ -460,14 +460,14 @@
         InstallerMBeanImpl result=null;
         String name=descriptor.getIdentification().getName();
         try{
-            File oldInstallationDir=environmentContext.getInstallationDirectory(name);
+            File oldInstallationDir=environmentContext.getComponentInstallationDir(name);
             // try and delete the old version ? - maybe should leave around ??
             if(!FileUtil.deleteFile(oldInstallationDir)){
                 log.warn("Failed to delete old installation directory: " + oldInstallationDir.getPath());
             }
-            File componentRoot=environmentContext.createComponentRootDirectory(name);
+            File componentRoot=environmentContext.createComponentRootDir(name);
             // this will get the new one
-            File installationDir=environmentContext.getNewInstallationDirectory(name);
+            File installationDir=environmentContext.getNewComponentInstallationDir(name);
             tmpDirectory.renameTo(installationDir);
             if (log.isDebugEnabled()) {
                 log.debug("Moved " + tmpDirectory + " to " + installationDir);
@@ -613,8 +613,8 @@
             throws DeploymentException {
         try {
             String componentName = componentDirectory.getName();
-            File stateFile = container.getEnvironmentContext().getComponentStateFile(componentName);
-            if (!stateFile.exists()) {
+            ComponentEnvironment env = container.getEnvironmentContext().getComponentEnvironment(componentName);
+            if (!env.getStateFile().exists()) {
                 // An installer has been created but the component has not been installed
                 // So remove it
                 FileUtil.deleteFile(componentDirectory);

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java Tue Apr  4 02:41:18 2006
@@ -15,6 +15,7 @@
  */
 package org.apache.servicemix.jbi.framework;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -36,6 +37,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.EnvironmentContext;
+import org.apache.servicemix.jbi.container.ServiceAssemblyEnvironment;
 import org.apache.servicemix.jbi.container.SubscriptionSpec;
 import org.apache.servicemix.jbi.deployment.ServiceAssembly;
 import org.apache.servicemix.jbi.deployment.ServiceUnit;
@@ -462,19 +464,21 @@
      * @return true if not already registered
      * @throws DeploymentException 
      */
-    public ServiceAssemblyLifeCycle registerServiceAssembly(ServiceAssembly sa) throws DeploymentException{
-        return serviceAssemblyRegistry.register(sa);
+    public ServiceAssemblyLifeCycle registerServiceAssembly(ServiceAssembly sa,
+                                                            ServiceAssemblyEnvironment env) throws DeploymentException{
+        return serviceAssemblyRegistry.register(sa, env);
     }
     
     /**
      * Register a service assembly
      * @param sa
-     * @param sus list of deployed service units
      * @return true if not already registered
      * @throws DeploymentException 
      */
-    public ServiceAssemblyLifeCycle registerServiceAssembly(ServiceAssembly sa, String[] deployedSUs) throws DeploymentException{
-        return serviceAssemblyRegistry.register(sa, deployedSUs);
+    public ServiceAssemblyLifeCycle registerServiceAssembly(ServiceAssembly sa,
+                                                            String[] suKeys,
+                                                            ServiceAssemblyEnvironment env) throws DeploymentException{
+        return serviceAssemblyRegistry.register(sa, suKeys, env);
     }
     
     /**
@@ -572,8 +576,12 @@
      * @param serviceAssembly the service assembly the service unit belongs to 
      * @return the service unit key
      */
-    public String registerServiceUnit(ServiceUnit su, String serviceAssembly) {
-        ServiceUnitLifeCycle sulc = new ServiceUnitLifeCycle(su, serviceAssembly, this);
+    public String registerServiceUnit(ServiceUnit su, String saName, File suDir) {
+        ServiceUnitLifeCycle sulc = new ServiceUnitLifeCycle(
+                su, 
+                saName, 
+                this,
+                suDir);
         this.serviceUnits.put(sulc.getKey(), sulc);
         try {
             ObjectName objectName = getContainer().getManagementContext().createObjectName(sulc);

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java Tue Apr  4 02:41:18 2006
@@ -37,6 +37,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.jbi.container.ServiceAssemblyEnvironment;
 import org.apache.servicemix.jbi.deployment.Connection;
 import org.apache.servicemix.jbi.deployment.Consumes;
 import org.apache.servicemix.jbi.deployment.DescriptorFactory;
@@ -67,14 +68,14 @@
 
     private String currentState = SHUTDOWN;
 
-    private File stateFile;
-
     private ServiceUnitLifeCycle[] sus;
     
     private Registry registry;
 
     private PropertyChangeListener listener;
     
+    private ServiceAssemblyEnvironment env;
+    
     /**
      * Construct a LifeCycle
      * 
@@ -82,17 +83,15 @@
      * @param stateFile
      */
     public ServiceAssemblyLifeCycle(ServiceAssembly sa, 
-                                    String[] suKeys, 
-                                    File stateFile,
+                                    ServiceAssemblyEnvironment env,
                                     Registry registry) {
         this.serviceAssembly = sa;
-        this.stateFile = stateFile;
+        this.env = env;
         this.registry = registry;
-        this.sus = new ServiceUnitLifeCycle[suKeys.length];
-        for (int i = 0; i < suKeys.length; i++) {
-            this.sus[i] = registry.getServiceUnit(suKeys[i]);
-        }
-        
+    }
+    
+    protected void setServiceUnits(ServiceUnitLifeCycle[] sus) {
+        this.sus = sus;
     }
 
     /**
@@ -276,7 +275,7 @@
     }
     
     public String getDescriptor() {
-        File saDir = registry.getEnvironmentContext().getSARootDirectory(getName());
+        File saDir = env.getInstallDir();
         return DescriptorFactory.getDescriptorAsText(saDir);
     }
 
@@ -292,10 +291,12 @@
      */
     void writeRunningState() {
         try {
-            String currentState = getCurrentState();
-            Properties props = new Properties();
-            props.setProperty("state", currentState);
-            XmlPersistenceSupport.write(stateFile, props);
+            if (env.getStateFile() != null) {
+                String currentState = getCurrentState();
+                Properties props = new Properties();
+                props.setProperty("state", currentState);
+                XmlPersistenceSupport.write(env.getStateFile(), props);
+            }
         } catch (IOException e) {
             log.error("Failed to write current running state for ServiceAssembly: " + getName(), e);
         }
@@ -306,8 +307,8 @@
      */
     String getRunningStateFromStore() {
         try {
-            if (stateFile.exists()) {
-                Properties props = (Properties) XmlPersistenceSupport.read(stateFile);
+            if (env.getStateFile() != null && env.getStateFile().exists()) {
+                Properties props = (Properties) XmlPersistenceSupport.read(env.getStateFile());
                 return props.getProperty("state", SHUTDOWN);
             }
         } catch (Exception e) {
@@ -320,7 +321,7 @@
      * Restore this service assembly to its state at shutdown.
      * @throws Exception
      */
-    synchronized void restore() throws Exception {
+    public synchronized void restore() throws Exception {
         String state = getRunningStateFromStore();
         if (STARTED.equals(state)) {
             start(false);
@@ -471,7 +472,11 @@
         // TODO Auto-generated method stub
         return null;
     }
-
+    
+    public ServiceAssemblyEnvironment getEnvironment() {
+        return env;
+    }
+    
     protected void fireEvent(int type) {
         ServiceAssemblyEvent event = new ServiceAssemblyEvent(this, type);
         ServiceAssemblyListener[] listeners = (ServiceAssemblyListener[]) registry.getContainer().getListeners(ServiceAssemblyListener.class);

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java Tue Apr  4 02:41:18 2006
@@ -15,7 +15,6 @@
  */
 package org.apache.servicemix.jbi.framework;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -30,6 +29,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.jbi.container.ServiceAssemblyEnvironment;
 import org.apache.servicemix.jbi.deployment.ServiceAssembly;
 import org.apache.servicemix.jbi.deployment.ServiceUnit;
 
@@ -72,36 +72,17 @@
     public void shutDown(){
     }
 
-    /**
-     * Register the Service Assembly
-     * @param sa
-     * @return true if successful
-     * @throws DeploymentException 
-     */
-    public ServiceAssemblyLifeCycle register(ServiceAssembly sa) throws DeploymentException {
-        List sus = new ArrayList();
-        if (sa.getServiceUnits() != null) {
-            for (int i = 0; i < sa.getServiceUnits().length; i++) {
-                String suKey = registry.registerServiceUnit(
-                                        sa.getServiceUnits()[i], 
-                                        sa.getIdentification().getName());
-                sus.add(suKey);
-            }
-        }
-        return register(sa, (String[]) sus.toArray(new String[sus.size()]));
-    }
-    
-    /**
-     * Register the Service Assembly
-     * @param sa
-     * @return true if successful
-     * @throws DeploymentException 
-     */
-    public ServiceAssemblyLifeCycle register(ServiceAssembly sa, String[] sus) throws DeploymentException {
+    public ServiceAssemblyLifeCycle register(ServiceAssembly sa, 
+                                             String[] suKeys,
+                                             ServiceAssemblyEnvironment env) throws DeploymentException {
         String saName = sa.getIdentification().getName();
-        File stateFile = registry.getEnvironmentContext().getServiceAssemblyStateFile(saName);
         if (!serviceAssemblies.containsKey(saName)) {
-            ServiceAssemblyLifeCycle salc = new ServiceAssemblyLifeCycle(sa, sus, stateFile, registry);
+            ServiceAssemblyLifeCycle salc = new ServiceAssemblyLifeCycle(sa, env, registry);
+            List sus = new ArrayList();
+            for (int i = 0; i < suKeys.length; i++) {
+                sus.add(registry.getServiceUnit(suKeys[i]));
+            }
+            salc.setServiceUnits((ServiceUnitLifeCycle[]) sus.toArray(new ServiceUnitLifeCycle[sus.size()]));
             serviceAssemblies.put(saName, salc);
             try {
                 ObjectName objectName = registry.getContainer().getManagementContext().createObjectName(salc);
@@ -112,6 +93,23 @@
             return salc;
         }
         return null;
+    }
+    
+    public ServiceAssemblyLifeCycle register(ServiceAssembly sa, ServiceAssemblyEnvironment env) throws DeploymentException {
+        List sus = new ArrayList();
+        if (sa.getServiceUnits() != null) {
+            for (int i = 0; i < sa.getServiceUnits().length; i++) {
+                String suKey = registry.registerServiceUnit(
+                                        sa.getServiceUnits()[i],
+                                        sa.getIdentification().getName(),
+                                        env.getServiceUnitDirectory(sa.getServiceUnits()[i].getTarget().getComponentName(),
+                                                                    sa.getServiceUnits()[i].getIdentification().getName()));
+                sus.add(suKey);
+            }
+        }
+        return register(sa,
+                        (String[]) sus.toArray(new String[sus.size()]),
+                        env);
     }
     
     /**

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java Tue Apr  4 02:41:18 2006
@@ -53,12 +53,16 @@
     
     private Services services;
     
+    private File rootDir;
+    
     public ServiceUnitLifeCycle(ServiceUnit serviceUnit, 
                                 String serviceAssembly,
-                                Registry registry) {
+                                Registry registry,
+                                File rootDir) {
         this.serviceUnit = serviceUnit;
         this.serviceAssembly = serviceAssembly;
         this.registry = registry;
+        this.rootDir = rootDir;
         Descriptor d = DescriptorFactory.buildDescriptor(getServiceUnitRootPath());
         if (d != null) {
             services = d.getServices();
@@ -220,10 +224,7 @@
     }
     
     protected File getServiceUnitRootPath() {
-        String componentName = getComponentName();
-        String suName = getName();
-        File targetDir = registry.getEnvironmentContext().getServiceUnitDirectory(componentName, suName, serviceAssembly);
-        return targetDir;
+        return rootDir;
     }
     
     protected ServiceUnitManager getServiceUnitManager() {

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java Tue Apr  4 02:41:18 2006
@@ -59,7 +59,7 @@
     public static File getLatestVersionDirectory(File rootDirectory) {
         File result=null;
         int highestVersion=-1;
-        if(isVersioned(rootDirectory)){
+        if(rootDirectory != null && isVersioned(rootDirectory)){
             File[] files=rootDirectory.listFiles();
             for(int i=0;i<files.length;i++){
                 int version=getVersionNumber(files[i].getName());

Modified: incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java?rev=391262&r1=391261&r2=391262&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java Tue Apr  4 02:41:18 2006
@@ -114,7 +114,7 @@
         System.err.println(deployResult);
         startContainer(true);
         getContainer().activateComponent(component, "component1");
-        getContainer().getEnvironmentContext().createComponentRootDirectory("component1");
+        getContainer().getEnvironmentContext().createComponentRootDir("component1");
         File installSaUrl = createServiceAssemblyArchive("sa", "su", "component1");
         String result = getDeploymentService().deploy(installSaUrl.getAbsolutePath());
         System.err.println(result);
@@ -140,9 +140,9 @@
         System.err.println(deployResult2);
         startContainer(true);
         getContainer().activateComponent(component1, "component1");
-        getContainer().getEnvironmentContext().createComponentRootDirectory("component1");
+        getContainer().getEnvironmentContext().createComponentRootDir("component1");
         getContainer().activateComponent(component2, "component2");
-        getContainer().getEnvironmentContext().createComponentRootDirectory("component2");
+        getContainer().getEnvironmentContext().createComponentRootDir("component2");
         File installSaUrl = createServiceAssemblyArchive("sa", new String[] { "su1", "su2" }, new String[] { "component1", "component2"});
         String result = null;;
         try {