[Jboss-cvs] JBossAS SVN: r56764 - in branches/MC_VDF_WORK: aspects cluster connector deployment ejb3 hibernate-int iiop security server system system/src/main/org/jboss system/src/tests/org/jboss/test system-jmx system-jmx/src/main/org/jboss/deployment system-jmx/src/main/org/jboss/system system-jmx/src/main/org/jboss/system/deployers testsuite tomcat varia

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 12 08:32:02 EDT 2006


Author: adrian at jboss.org
Date: 2006-09-12 08:31:28 -0400 (Tue, 12 Sep 2006)
New Revision: 56764

Added:
   branches/MC_VDF_WORK/system-jmx/${build.gen.test}/
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceClassLoaderDeployer.java
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployment.java
Removed:
   branches/MC_VDF_WORK/system/src/main/org/jboss/deployers/
   branches/MC_VDF_WORK/system/src/tests/org/jboss/test/deployers/
Modified:
   branches/MC_VDF_WORK/aspects/.classpath
   branches/MC_VDF_WORK/aspects/build-retro.xml
   branches/MC_VDF_WORK/aspects/build-test.xml
   branches/MC_VDF_WORK/aspects/build.xml
   branches/MC_VDF_WORK/cluster/.classpath
   branches/MC_VDF_WORK/cluster/build.xml
   branches/MC_VDF_WORK/connector/.classpath
   branches/MC_VDF_WORK/connector/build.xml
   branches/MC_VDF_WORK/deployment/.classpath
   branches/MC_VDF_WORK/deployment/build.xml
   branches/MC_VDF_WORK/ejb3/.classpath
   branches/MC_VDF_WORK/hibernate-int/.classpath
   branches/MC_VDF_WORK/hibernate-int/build.xml
   branches/MC_VDF_WORK/iiop/.classpath
   branches/MC_VDF_WORK/iiop/build.xml
   branches/MC_VDF_WORK/security/.classpath
   branches/MC_VDF_WORK/security/build.xml
   branches/MC_VDF_WORK/server/.classpath
   branches/MC_VDF_WORK/server/build.xml
   branches/MC_VDF_WORK/system-jmx/.classpath
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/DeploymentException.java
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/SARDeployer.java
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/ServiceController.java
   branches/MC_VDF_WORK/system/.classpath
   branches/MC_VDF_WORK/testsuite/.classpath
   branches/MC_VDF_WORK/tomcat/.classpath
   branches/MC_VDF_WORK/tomcat/build.xml
   branches/MC_VDF_WORK/varia/.classpath
Log:
[JBMICROCONT-5] - Partial integration of jboss-deployers.
Need to complete the SAR Deployer and update the profile service
to use it.

Modified: branches/MC_VDF_WORK/aspects/.classpath
===================================================================
--- branches/MC_VDF_WORK/aspects/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/aspects/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry excluding="|org/jboss/aop/microcontainer/prototype/AnnotationDependencyLister.java|org/jboss/aspects/Current.java|org/jboss/aspects/Injected.java|org/jboss/aspects/asynch/AsynchExecutor.java|org/jboss/aspects/asynch/Asynchronous.java|org/jboss/aspects/asynch/ThreadPoolExecutor.java|org/jboss/aspects/asynchronous/aspects/jboss/Asynchronous.java|org/jboss/aspects/dbc/Dbc.java|org/jboss/aspects/dbc/Invariant.java|org/jboss/aspects/dbc/PostCond.java|org/jboss/aspects/dbc/PreCond.java|org/jboss/aspects/dbc/StaticInvariant.java|org/jboss/aspects/jmx/MBean.java|org/jboss/aspects/patterns/readwritelock/readLockOperation.java|org/jboss/aspects/patterns/readwritelock/writeLockOperation.java|org/jboss/aspects/security/Exclude.java|org/jboss/aspects/security/Permissions.java|org/jboss/aspects/security/RunAs.java|org/jboss/aspects/security/SecurityDomain.java|org/jboss/aspects/security/Unchecked.java|org/jboss/aspects/tx/Tx.java|org/jboss/aspects/tx/TxLocal.java|org/jbo!
 ss/aspects/tx/TxType.java|org/jboss/aspects/txlock/TxSynchronized.java" kind="src" path="src/main"/>
+	<classpathentry excluding="org/jboss/aop/microcontainer/prototype/AnnotationDependencyLister.java|org/jboss/aspects/Current.java|org/jboss/aspects/Injected.java|org/jboss/aspects/asynch/AsynchExecutor.java|org/jboss/aspects/asynch/Asynchronous.java|org/jboss/aspects/asynch/ThreadPoolExecutor.java|org/jboss/aspects/asynchronous/aspects/jboss/Asynchronous.java|org/jboss/aspects/dbc/Dbc.java|org/jboss/aspects/dbc/Invariant.java|org/jboss/aspects/dbc/PostCond.java|org/jboss/aspects/dbc/PreCond.java|org/jboss/aspects/dbc/StaticInvariant.java|org/jboss/aspects/jmx/MBean.java|org/jboss/aspects/patterns/readwritelock/readLockOperation.java|org/jboss/aspects/patterns/readwritelock/writeLockOperation.java|org/jboss/aspects/security/Exclude.java|org/jboss/aspects/security/Permissions.java|org/jboss/aspects/security/RunAs.java|org/jboss/aspects/security/SecurityDomain.java|org/jboss/aspects/security/Unchecked.java|org/jboss/aspects/tx/Tx.java|org/jboss/aspects/tx/TxLocal.java|org/jbos!
 s/aspects/tx/TxType.java|org/jboss/aspects/txlock/TxSynchronized.java" kind="src" path="src/main"/>
 	<classpathentry kind="src" path="src/jdk15"/>
 	<classpathentry kind="lib" path="src/resources"/>
 	<classpathentry excluding="org/jboss/test/aop/test/AOPTestSetup.java|org/jboss/test/asynch/" kind="src" path="src/test"/>
@@ -29,5 +29,6 @@
 	<classpathentry sourcepath="/javassist" kind="lib" path="/thirdparty/javassist/lib/javassist.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/aspects/build-retro.xml
===================================================================
--- branches/MC_VDF_WORK/aspects/build-retro.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/aspects/build-retro.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -76,6 +76,7 @@
          <path refid="beanshell.beanshell.classpath"/>
          <path refid="jboss.remoting.classpath"/>
          <path refid="apache.xerces.classpath"/>
+         <path refid="jboss.microcontainer.classpath"/>
       </path>
 
       <!-- Configure modules -->

Modified: branches/MC_VDF_WORK/aspects/build-test.xml
===================================================================
--- branches/MC_VDF_WORK/aspects/build-test.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/aspects/build-test.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -91,6 +91,7 @@
          <path refid="apache.log4j.classpath"/>
          <path refid="jboss.remoting.classpath"/>
          <path refid="apache.xerces.classpath"/>
+         <path refid="jboss.microcontainer.classpath"/>
       </path>
 
       <!-- ======= -->

Modified: branches/MC_VDF_WORK/aspects/build.xml
===================================================================
--- branches/MC_VDF_WORK/aspects/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/aspects/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -76,6 +76,7 @@
          <path refid="beanshell.beanshell.classpath"/>
          <path refid="jboss.remoting.classpath"/>
          <path refid="apache.xerces.classpath"/>
+         <path refid="jboss.microcontainer.classpath"/>
       </path>
 
       <!-- Configure modules -->

Modified: branches/MC_VDF_WORK/cluster/.classpath
===================================================================
--- branches/MC_VDF_WORK/cluster/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/cluster/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -17,5 +17,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/remoting/lib/jboss-remoting.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/cluster/build.xml
===================================================================
--- branches/MC_VDF_WORK/cluster/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/cluster/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -80,6 +80,7 @@
       <path refid="jboss.cache.classpath"/>
       <path refid="oswego.concurrent.classpath"/>
       <path refid="jboss.remoting.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/connector/.classpath
===================================================================
--- branches/MC_VDF_WORK/connector/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/connector/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -18,5 +18,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/serialization/lib/jboss-serialization.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/connector/build.xml
===================================================================
--- branches/MC_VDF_WORK/connector/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/connector/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -79,6 +79,7 @@
       <path refid="oswego.concurrent.classpath"/>
        <path refid="sun.javamail.classpath"/>
        <path refid="quartz.quartz.classpath"/>
+       <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/deployment/.classpath
===================================================================
--- branches/MC_VDF_WORK/deployment/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/deployment/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -8,5 +8,6 @@
 	<classpathentry kind="lib" path="/thirdparty/dom4j/lib/dom4j.jar"/>
 	<classpathentry kind="src" path="/j2se"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/deployment/build.xml
===================================================================
--- branches/MC_VDF_WORK/deployment/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/deployment/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -69,6 +69,7 @@
     <!-- The combined library classpath -->
     <path id="library.classpath">
       <path refid="dom4j.dom4j.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/ejb3/.classpath
===================================================================
--- branches/MC_VDF_WORK/ejb3/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/ejb3/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -91,5 +91,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jacorb/lib/jacorb.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/hibernate-int/.classpath
===================================================================
--- branches/MC_VDF_WORK/hibernate-int/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/hibernate-int/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -14,5 +14,6 @@
 	<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/hibernate-int/build.xml
===================================================================
--- branches/MC_VDF_WORK/hibernate-int/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/hibernate-int/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -76,6 +76,7 @@
       <path refid="hibernate3.classpath"/>
       <path refid="odmg.classpath"/>
       <path refid="cglib.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/iiop/.classpath
===================================================================
--- branches/MC_VDF_WORK/iiop/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/iiop/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -16,5 +16,6 @@
 	<classpathentry kind="src" path="/transaction"/>
 	<classpathentry kind="src" path="/j2se"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/iiop/build.xml
===================================================================
--- branches/MC_VDF_WORK/iiop/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/iiop/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -79,6 +79,7 @@
       <path refid="junit.junit.classpath"/>
       <path refid="jacorb.jacorb.classpath"/>
       <path refid="oswego.concurrent.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/security/.classpath
===================================================================
--- branches/MC_VDF_WORK/security/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/security/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -20,5 +20,6 @@
 	<classpathentry kind="lib" path="/thirdparty/sun-xacml/lib/sunxacml-support.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/security/build.xml
===================================================================
--- branches/MC_VDF_WORK/security/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/security/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -76,6 +76,7 @@
       <path refid="javassist.classpath"/>
       <path refid="sun.xacml.classpath"/>
       <path refid="jboss.jbossxb.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/server/.classpath
===================================================================
--- branches/MC_VDF_WORK/server/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/server/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -26,5 +26,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/hibernate-entitymanager/lib/ejb3-persistence.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/server/build.xml
===================================================================
--- branches/MC_VDF_WORK/server/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/server/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -86,6 +86,7 @@
       <path refid="sun.servlet.classpath"/>
       <path refid="jboss.remoting.classpath"/>
       <path refid="jboss.jbossxb.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/system/.classpath
===================================================================
--- branches/MC_VDF_WORK/system/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -15,5 +15,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/system-jmx/.classpath
===================================================================
--- branches/MC_VDF_WORK/system-jmx/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -22,5 +22,6 @@
 	<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/jmx"/>
 	<classpathentry kind="lib" path="output/test-lib"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/DeploymentException.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/DeploymentException.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/DeploymentException.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -43,7 +43,7 @@
     * @param t the throwable
     * @throws DeploymentException always
     */
-   public static void rethrowAsDeploymentException(String message, Throwable t)
+   public static DeploymentException rethrowAsDeploymentException(String message, Throwable t)
       throws DeploymentException
    {
       if (t instanceof DeploymentException)

Modified: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/SARDeployer.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/SARDeployer.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/SARDeployer.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -21,46 +21,49 @@
  */
 package org.jboss.deployment;
 
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Serializable;
 import java.net.URL;
+import java.net.URLClassLoader;
 import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
 import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.jboss.deployers.plugins.AbstractAspectDeployer;
-import org.jboss.deployers.spi.DeploymentContext;
-import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.mx.loading.LoaderRepositoryFactory;
-import org.jboss.mx.loading.RepositoryClassLoader;
 import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
 import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.mx.util.MBeanServerLocator;
 import org.jboss.net.protocol.URLLister;
 import org.jboss.net.protocol.URLListerFactory;
-import org.jboss.system.ServiceController;
 import org.jboss.system.ServiceControllerMBean;
+import org.jboss.system.server.ServerConfig;
+import org.jboss.system.server.ServerConfigLocator;
 import org.jboss.util.StringPropertyReplacer;
+import org.jboss.util.Strings;
+import org.jboss.util.stream.Streams;
 import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.vfs.spi.VirtualFile;
-import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 
+import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+
 /**
- * This is the legacy Service Deployer. This is a compatibility deployer that
- * bridges between the old mbean service(*-service.xml) deployments and the
- * MC BeanDeployer(*-beans.xml).
+ * This is the main Service Deployer API.
  *
  * @see org.jboss.system.Service
  *
@@ -73,7 +76,8 @@
  * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis<a/>
  * @version $Revision$
  */
-public class SARDeployer extends AbstractAspectDeployer
+public class SARDeployer extends SubDeployerSupport
+   implements SARDeployerMBean
 {
    /** The suffixes we accept, along with their relative order */
    private static final String[] DEFAULT_ENHANCED_SUFFIXES = new String[] {
@@ -84,27 +88,28 @@
    };
    
    /** The deployment descriptor to look for */
-   public static final String SAR_DESCRIPTOR = "META-INF/jboss-service.xml";
+   private static final String JBOSS_SERVICE = "META-INF/jboss-service.xml";
 
-   /** The MBeanServer for the jmx bus of the ServiceController */
-   private MBeanServer server;
-   /** The ServiceController. */
+   /** A proxy to the ServiceController. */
    private ServiceControllerMBean serviceController;
 
+   /** The server data directory. */
+   private File dataDir;
+
    /** The server configuration base URL. For example,
     file:/<jboss_dist_root>/server/default. Relative service
     descriptor codebase elements are relative to this URL.
     */
    private URL serverHomeURL;
 
-   /** A Map<ObjectName, DeploymentContext> for the deployed services */
-   private Map<ObjectName, DeploymentContext> serviceDeploymentMap = new ConcurrentHashMap<ObjectName, DeploymentContext>();
-
+   /** A HashMap<ObjectName, DeploymentInfo> for the deployed services */
+   private HashMap serviceDeploymentMap = new HashMap();
+   
    /**
     * A Map<String, List<String>> of the suffix to accepted archive META-INF descriptor name
     * @todo externalize this
     */
-   private Map<String, List<String>> suffixToDescriptorMap = new ConcurrentHashMap<String, List<String>>();
+   private Map suffixToDescriptorMap = new ConcurrentReaderHashMap();
 
    /** A flag indicating if the parser used for the service descriptor should be configured for namespaces */
    private boolean useNamespaceAwareParser;
@@ -114,20 +119,14 @@
     */
    public SARDeployer()
    {
-      super("SARDeployer");
       setEnhancedSuffixes(DEFAULT_ENHANCED_SUFFIXES);
       // Add the .har to META-INF/{jboss-service.xml,hibernate-service.xml} mapping
       ArrayList tmp = new ArrayList();
-      tmp.add(SAR_DESCRIPTOR);
+      tmp.add(JBOSS_SERVICE);
       tmp.add("META-INF/hibernate-service.xml");
       suffixToDescriptorMap.put(".har", tmp);
    }
 
-   public String getType()
-   {
-      return "sar";
-   }
-
    public boolean isUseNamespaceAwareParser()
    {
       return useNamespaceAwareParser;
@@ -138,24 +137,6 @@
       this.useNamespaceAwareParser = useNamespaceAwareParser;
    }
 
-   public ServiceControllerMBean getServiceController()
-   {
-      return serviceController;
-   }
-   public void setServiceController(ServiceControllerMBean controller)
-   {
-      this.serviceController = controller;
-   }
-
-   public MBeanServer getServer()
-   {
-      return server;
-   }
-   public void setServer(MBeanServer server)
-   {
-      this.server = server;
-   }
-
    /**
     * Get the associated service DeploymentInfo if found, null otherwise
     * 
@@ -163,154 +144,113 @@
     * @return The associated service DeploymentInfo if found, null otherwise
     * @jmx.managed-operation
     */
-   public DeploymentContext getService(ObjectName serviceName)
+   public DeploymentInfo getService(ObjectName serviceName)
    {
-      DeploymentContext ctx = serviceDeploymentMap.get(serviceName);
-      return ctx;
-   }
-
-   /**
-    * Start the deployer.
-    */
-   @Override
-   public void start() throws Exception
-   {
-      if( server == null )
+      DeploymentInfo di = null;
+      synchronized( serviceDeploymentMap )
       {
-         // Locate the jboss domain server
-         server = MBeanServerLocator.locateJBoss();
+         di = (DeploymentInfo) serviceDeploymentMap.get(serviceName);
       }
-      // Register with the MainDeployer
-      super.start();
+      return di;
    }
 
    /**
-    * Analyze a deployment for sar artifacts. 
-    * @param ctx - the current deployment to validate as a sar and analyze
-    * @throws DeploymentException - throw if ctx is a sar and we fail to
-    *    analyze it.
+    * Describe <code>init</code> method here.
+    *
+    * @param di a <code>DeploymentInfo</code> value
+    * @exception DeploymentException if an error occurs
+    * @jmx.managed-operation
     */
-   @Override
-   public boolean analyze(DeploymentContext ctx) throws DeploymentException
+   public void init(DeploymentInfo di)
+      throws DeploymentException
    {
-      boolean isSARDeployment = false;
-      String basename = ctx.getFile().getName();
-      VirtualFile vf = ctx.getFile();
-      if (endsWithOneOfTheSuffixes(basename))
+      try
       {
-         isSARDeployment = true;
-
-         try
+         if (di.url.getPath().endsWith("/"))
          {
-            try
-            {
-               // If the context contains a SAR_DESCRIPTOR its a sar archive
-               @SuppressWarnings("unused")
-               VirtualFile descriptor = vf.findChild(SAR_DESCRIPTOR);
-               log.debug("Found "+SAR_DESCRIPTOR+": "+descriptor);
-               ctx.putContextData(getClass(), SAR_DESCRIPTOR, Boolean.TRUE);
-               // add deployment base to the classpath
-               ctx.addClasspathEntry("");
-            }
-            catch(IOException ignore)
-            {
-               // The deployment context has no service descriptor
-               log.debug("No "+SAR_DESCRIPTOR+", assuming *-service.xml");
-            }
-   
-            // Get the document if not already present
-            parseDocument(ctx);
-   
-            // In case there is a dependent classpath defined parse it
-            parseXMLClasspath(ctx);
-   
-            /* TODO: Copy local directory if local-directory element is present
-            NodeList lds = ctx.document.getElementsByTagName("local-directory");
-            log.debug("about to copy " + lds.getLength() + " local directories");
-   
-            for (int i = 0; i< lds.getLength(); i++)
-            {
-               Element ld = (Element)lds.item(i);
-               String path = ld.getAttribute("path");
-               log.debug("about to copy local directory at " + path);
-   
-               // Get the url of the local copy from the classloader.
-               log.debug("copying from " + ctx.localUrl + path + " -> " + dataDir);
-   
-               inflateJar(ctx.localUrl, dataDir, path);
-            }
-            */
-            // Call super to pickup any abstract deployer context data
-            super.analyze(ctx);
+            // the URL is a unpacked collection, watch the deployment descriptor
+            di.watch = new URL(di.url, JBOSS_SERVICE);
          }
-         catch (DeploymentException de)
+         else
          {
-            throw de;
+            // just watch the original URL
+            di.watch = di.url;
          }
-         catch (Exception e)
+
+         // Get the document if not already present
+         parseDocument(di);
+
+         // Check for a custom loader-repository for scoping
+         NodeList loaders = di.document.getElementsByTagName("loader-repository");
+         if( loaders.getLength() > 0 )
          {
-            throw new DeploymentException(e);
+            Element loader = (Element) loaders.item(0);
+            LoaderRepositoryConfig config = LoaderRepositoryFactory.parseRepositoryConfig(loader);
+            di.setRepositoryInfo(config);
          }
-      } // if endsWithOneOfTheSuffixes
 
-      return isSARDeployment;
-   }
+         // In case there is a dependent classpath defined parse it
+         parseXMLClasspath(di);
 
-   /**
-    * Return the profileservice managed object for the given ctx.
-    * TODO: need to define how a sar expresses its managed properties
-    */
-   public Object getManagedObject(DeploymentContext ctx)
-   {
-      return null;
+         // Copy local directory if local-directory element is present
+         NodeList lds = di.document.getElementsByTagName("local-directory");
+         log.debug("about to copy " + lds.getLength() + " local directories");
+
+         for (int i = 0; i< lds.getLength(); i++)
+         {
+            Element ld = (Element)lds.item(i);
+            String path = ld.getAttribute("path");
+            log.debug("about to copy local directory at " + path);
+
+            // Get the url of the local copy from the classloader.
+            log.debug("copying from " + di.localUrl + path + " -> " + dataDir);
+
+            inflateJar(di.localUrl, dataDir, path);
+         }
+      }
+      catch (DeploymentException de)
+      {
+         throw de;
+      }
+      catch (Exception e)
+      {
+         throw new DeploymentException(e);
+      }
+
+      // invoke super-class initialization
+      super.init(di);
    }
 
    /**
-    * deploy all mbeans in the sar deployment context.
+    * Describe <code>create</code> method here.
     *
-    * @param ctx - deployment context to deploy
+    * @param di a <code>DeploymentInfo</code> value
     * @exception DeploymentException if an error occurs
+    * @jmx.managed-operation
     */
-   public void deploy(DeploymentContext ctx) throws DeploymentException
+   public void create(DeploymentInfo di)
+      throws DeploymentException
    {
-      log.debug("Deploy, "+ctx);
       try
       {
-         // Check for a custom loader-repository for scoping
-         Document document = (Document) ctx.getContextData(getClass(), "document");
-         NodeList loaders = document.getElementsByTagName("loader-repository");
-         LoaderRepositoryConfig config = null;
-         if( loaders.getLength() > 0 )
-         {
-            Element loader = (Element) loaders.item(0);
-            config = LoaderRepositoryFactory.parseRepositoryConfig(loader);
-         }
+         // install the MBeans in this descriptor
+         log.debug("Deploying SAR, create step: url " + di.url);
 
-         // Create the legacy UCL
-         RepositoryClassLoader ucl = createClassLoaders(ctx, config);
          // Register the SAR UCL as an mbean so we can use it as the service loader
-         ObjectName uclName = ucl.getObjectName();
-         if( server.isRegistered(uclName) == false )
+         ObjectName uclName = di.ucl.getObjectName();
+         if( getServer().isRegistered(uclName) == false )
          {
             log.debug("Registering service UCL="+uclName);
-            server.registerMBean(ucl, uclName);
+            getServer().registerMBean(di.ucl, uclName);
          }
 
-         List<ObjectName> mbeans = (List<ObjectName>) ctx.getContextData(getClass(), "mbeans");
-         if( mbeans == null )
-         {
-            mbeans = new ArrayList<ObjectName>();
-            ctx.putContextData(getClass(), "mbeans", mbeans);
-         }
-         // If we allow an external mbeans, why clear it here?
+         List mbeans = di.mbeans;
          mbeans.clear();
-         // Have the service controller parse the jboss-service.xml
-         // TODO: should port to jbossxb
-         List descriptorMbeans = serviceController.install(document.getDocumentElement(), uclName);
+         List descriptorMbeans = serviceController.install(di.document.getDocumentElement(), uclName);
          mbeans.addAll(descriptorMbeans);
 
          // create the services
-         for (Iterator<ObjectName> iter = mbeans.iterator(); iter.hasNext(); )
+         for (Iterator iter = di.mbeans.iterator(); iter.hasNext(); )
          {
             ObjectName service = (ObjectName)iter.next();
 
@@ -318,43 +258,72 @@
             serviceController.create(service);
             synchronized( this.serviceDeploymentMap )
             {
-               serviceDeploymentMap.put(service, ctx);
+               serviceDeploymentMap.put(service, di);
             }
          }
 
-         // TODO: Generate a JMX notification for the create stage
-         // super.create(ctx);
+         // Generate a JMX notification for the create stage
+         super.create(di);
+      }
+      catch(DeploymentException e)
+      {
+         log.debug("create operation failed for package "+ di.url, e);
+         destroy(di);
+         throw e;
+      }
+      catch (Exception e)
+      {
+         log.debug("create operation failed for package "+ di.url, e);
+         destroy(di);
+         throw new DeploymentException("create operation failed for package "
+            + di.url, e);
+      }
+   }
 
-         for (Iterator<ObjectName> iter = mbeans.iterator(); iter.hasNext(); )
+   /**
+    * The <code>start</code> method starts all the mbeans in this DeploymentInfo..
+    *
+    * @param di a <code>DeploymentInfo</code> value
+    * @exception DeploymentException if an error occurs
+    * @jmx.managed-operation
+    */
+   public void start(DeploymentInfo di) throws DeploymentException
+   {
+      log.debug("Deploying SAR, start step: url " + di.url);
+      try
+      {
+         // start the services
+
+         for (Iterator iter = di.mbeans.iterator(); iter.hasNext(); )
          {
-            ObjectName service = iter.next();
+            ObjectName service = (ObjectName)iter.next();
 
             // The service won't be started until explicitely dependent mbeans are started
             serviceController.start(service);
          }
-         // TODO: Generate a JMX notification for the start stage
-         // super.start(ctx);
+         // Generate a JMX notification for the start stage
+         super.start(di);
       }
       catch (Exception e)
       {
-         throw new DeploymentException("Failed to deploy SAR: "+ctx, e);
+         stop(di);
+         destroy(di);
+         throw new DeploymentException("start operation failed on package "
+            + di.url, e);
       }
-
-      // Generate a notification for the undeploy
-      generateDeployerEvent(ctx, DeploymentEvent.DEPLOY);
    }
 
    /** The stop method invokes stop on the mbeans associatedw ith the deployment
     * in reverse order relative to create.
     *
-    * @param ctx the <code>DeploymentInfo</code> value to stop.
+    * @param di the <code>DeploymentInfo</code> value to stop.
     * @jmx.managed-operation
     */
-   public void undeploy(DeploymentContext ctx) throws DeploymentException
+   public void stop(DeploymentInfo di)
    {
-      log.debug("Undeploy, " + ctx);
+      log.debug("undeploying document " + di.url);
 
-      List<ObjectName> services = (List<ObjectName>) ctx.getContextData(getClass(), "mbeans");
+      List services = di.mbeans;
       int lastService = services.size();
 
       // stop services in reverse order.
@@ -372,24 +341,160 @@
          } // end of try-catch
       }
 
-      // Generate a notification for the undeploy
-      generateDeployerEvent(ctx, DeploymentEvent.UNDEPLOY);
+      // Generate a JMX notification for the stop stage
+      try
+      {
+         super.stop(di);
+      }
+      catch(Exception ignore)
+      {
+      }
    }
 
+   /** The destroy method invokes destroy on the mbeans associated with
+    * the deployment in reverse order relative to create.
+    *
+    * @param di a <code>DeploymentInfo</code> value
+    * @jmx.managed-operation
+    */
+   public void destroy(DeploymentInfo di)
+   {
+      List services = di.mbeans;
+      int lastService = services.size();
+
+      for (ListIterator i = services.listIterator(lastService); i.hasPrevious();)
+      {
+         ObjectName name = (ObjectName)i.previous();
+         log.debug("destroying mbean " + name);
+         synchronized( serviceDeploymentMap )
+         {
+            serviceDeploymentMap.remove(name);
+         }
+
+         try
+         {
+            serviceController.destroy(name);
+         }
+         catch (Exception e)
+         {
+            log.error("Could not destroy mbean: " + name, e);
+         } // end of try-catch
+      }
+
+      for (ListIterator i = services.listIterator(lastService); i.hasPrevious();)
+      {
+         ObjectName name = (ObjectName)i.previous();
+         log.debug("removing mbean " + name);
+         try
+         {
+            serviceController.remove(name);
+         }
+         catch (Exception e)
+         {
+            log.error("Could not remove mbean: " + name, e);
+         } // end of try-catch
+      }
+
+      // Unregister the SAR UCL
+      try
+      {
+         ObjectName uclName = di.ucl.getObjectName();
+         if( getServer().isRegistered(uclName) == true )
+         {
+            log.debug("Unregistering service UCL="+uclName);
+            getServer().unregisterMBean(uclName);
+         }
+      }
+      catch(Exception ignore)
+      {
+      }
+
+      // Generate a JMX notification for the destroy stage
+      try
+      {
+         super.destroy(di);
+      }
+      catch(Exception ignore)
+      {
+      }
+   }
+
+   // ServiceMBeanSupport overrides  --------------------------------
+   
+   /**
+    * The startService method gets the mbeanProxies for MainDeployer
+    * and ServiceController, used elsewhere.
+    *
+    * @exception Exception if an error occurs
+    */
+   protected void startService() throws Exception
+   {
+      super.startService();
+
+      // get the controller proxy
+      serviceController = (ServiceControllerMBean)
+         MBeanProxyExt.create(ServiceControllerMBean.class,
+            ServiceControllerMBean.OBJECT_NAME, server);
+
+      // Get the data directory, install url & library url
+      ServerConfig config = ServerConfigLocator.locate();
+      dataDir = config.getServerDataDir();
+      serverHomeURL = config.getServerHomeURL();
+   }
+
+   /**
+    * This method stops all the applications in this server.
+    */
+   protected void stopService() throws Exception
+   {
+      // deregister with MainDeployer
+      super.stopService();
+      
+      // Help GC
+      serviceController = null;      
+      serverHomeURL = null;
+      dataDir = null;
+   }
+
+   
+   protected ObjectName getObjectName(MBeanServer server, ObjectName name)
+      throws MalformedObjectNameException
+   {
+      return name == null ? OBJECT_NAME : name;
+   }
+   
    // Protected -----------------------------------------------------
    
+   protected File[] listFiles(final String urlspec) throws Exception
+   {
+      URL url = Strings.toURL(urlspec);
+
+      // url is already canonical thanks to Strings.toURL
+      File dir = new File(url.getFile());
+
+      File[] files = dir.listFiles(new java.io.FileFilter()
+         {
+            public boolean accept(File pathname)
+            {
+               String name = pathname.getName().toLowerCase();
+               return (name.endsWith(".jar") || name.endsWith(".zip"));
+            }
+         });
+
+      return files;
+   }
+
    /**
-    * @param ctx
+    * @param di
     * @throws Exception
     */
-   protected void parseXMLClasspath(DeploymentContext ctx)
+   protected void parseXMLClasspath(DeploymentInfo di)
       throws Exception
    {
-      ArrayList<URL> classpath = new ArrayList<URL>();
+      ArrayList classpath = new ArrayList();
       URLListerFactory listerFactory = new URLListerFactory();
 
-      Document document = (Document) ctx.getContextData(getClass(), "document");
-      NodeList children = document.getDocumentElement().getChildNodes();
+      NodeList children = di.document.getDocumentElement().getChildNodes();
       for (int i = 0; i < children.getLength(); i++)
       {
          if (children.item(i).getNodeType() == Node.ELEMENT_NODE)
@@ -425,7 +530,7 @@
                URL codebaseUrl;
                if (".".equals(codebase))
                {
-                  codebaseUrl = ctx.getFile().toURL();
+                  codebaseUrl = new URL(di.url, "./");
                }
                else
                {
@@ -458,86 +563,66 @@
       } //end of for
 
       // Ok, now we've found the list of urls we need... deploy their classes.
-      Iterator<URL> jars = classpath.iterator();
-      URL vfsRootURL = ctx.getVFS().getRootURL();
-      String vfsRoot = vfsRootURL.getPath();
+      Iterator jars = classpath.iterator();
       while (jars.hasNext())
       {
-         URL jar = jars.next();
-         String jarPath = jar.getPath();
-         if( jarPath.startsWith(vfsRoot) )
-         {
-            String path = jarPath.substring(vfsRoot.length());
-            ctx.addClasspathEntry(path);
-         }
-         else
-         {
-            log.warn("Don't know how to deal with classpath outside of VFS: "+jar);
-         }
+         URL neededURL = (URL) jars.next();
+         di.addLibraryJar(neededURL);
+         log.debug("deployed classes for " + neededURL);
       }
    }
 
    /** Parse the META-INF/jboss-service.xml descriptor
     */
-   protected void parseDocument(DeploymentContext ctx)
+   protected void parseDocument(DeploymentInfo di)
       throws Exception
    {
       InputStream stream = null;
       try
       {
-         Document document = (Document) ctx.getContextData(getClass(), "document");
-         if (document == null)
+         if (di.document == null)
          {
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             factory.setNamespaceAware(useNamespaceAwareParser);
             DocumentBuilder parser = factory.newDocumentBuilder();
-            VirtualFile docFile = null;
+            URL docURL = di.localUrl;
+            URLClassLoader localCL = di.localCl;
             // Load jboss-service.xml from the jar or directory
-            Boolean isJAR = (Boolean) ctx.getContextData(getClass(), SAR_DESCRIPTOR);
-            if ( isJAR != null && isJAR )
+            if (di.isXML == false)
             {
                // Check the suffix to descriptor mapping
-               VirtualFile ctxFile = ctx.getFile();
-               String[] descriptors = getDescriptorName(ctx);
+               String[] descriptors = getDescriptorName(di);
                for(int n = 0; n < descriptors.length; n ++)
                {
                   String descriptor = descriptors[n];
-                  docFile = ctxFile.findChild(descriptor);
-                  if( docFile != null )
+                  docURL = localCL.findResource(descriptor);
+                  if( docURL != null )
                   {
                      // If this is a unpacked deployment, update the watch url
-                     if (ctxFile.isDirectory())
+                     if (di.url.getPath().endsWith("/"))
                      {
-                        ctx.setWatchFile(docFile);
-                        log.debug("Updated watch URL to: "+docFile);
+                        di.watch = new URL(di.url, descriptor);
+                        log.debug("Updated watch URL to: "+di.watch);
                      }
                      break;
                   }
                }
                // No descriptors, use the default META-INF/jboss-service.xml
-               if( docFile == null )
-                  docFile = ctxFile.findChild(SAR_DESCRIPTOR);
+               if( docURL == null )
+                  docURL = localCL.findResource(JBOSS_SERVICE);
             }
-            else
-            {
-               docFile = ctx.getFile();
-            }
             // Validate that the descriptor was found
-            if (docFile == null)
-               throw new DeploymentException("Failed to find META-INF/jboss-service.xml for archive: " + ctx);
+            if (docURL == null)
+               throw new DeploymentException("Failed to find META-INF/jboss-service.xml for archive " + di.shortName);
 
-            stream = docFile.openStream();
+            stream = docURL.openStream();
             InputSource is = new InputSource(stream);
-            is.setSystemId(docFile.toURL().toString());
+            is.setSystemId(docURL.toString());
             parser.setEntityResolver(new JBossEntityResolver());
-            document = parser.parse(is);
-            // TODO: Need remove this dependency on org.w3c.dom.Document
-            Serializable serialDoc = (Serializable) document;
-            ctx.putContextData(getClass(), "document", serialDoc);
+            di.document = parser.parse(is);
          }
          else
          {
-            // TODO: when was this used?
             log.debug("Using existing deployment.document");
          }
       }
@@ -554,6 +639,55 @@
       }
    }
 
+   /**
+    * The <code>inflateJar</code> copies the jar entries
+    * from the jar url jarUrl to the directory destDir.
+    * It can be used on the whole jar, a directory, or
+    * a specific file in the jar.
+    *
+    * @param url    the <code>URL</code> if the directory or entry to copy.
+    * @param destDir   the <code>File</code> value of the directory in which to
+    *                  place the inflated copies.
+    *
+    * @exception DeploymentException if an error occurs
+    * @exception IOException if an error occurs
+    */
+   protected void inflateJar(URL url, File destDir, String path)
+      throws DeploymentException, IOException
+   {
+      String filename = url.getFile();
+      JarFile jarFile = new JarFile(filename);
+      try
+      {
+         for (Enumeration e = jarFile.entries(); e.hasMoreElements(); )
+         {
+            JarEntry entry = (JarEntry)e.nextElement();
+            String name = entry.getName();
+
+            if (path == null || name.startsWith(path))
+            {
+               File outFile = new File(destDir, name);
+               if (!outFile.exists())
+               {
+                  if (entry.isDirectory())
+                  {
+                     outFile.mkdirs();
+                  }
+                  else
+                  {
+                     Streams.copyb(jarFile.getInputStream(entry),
+                                   new FileOutputStream(outFile));
+                  }
+               } // end of if (outFile.exists())
+            } // end of if (matches path)
+         }
+      }
+      finally
+      {
+         jarFile.close();
+      }
+   }
+
    // Private -------------------------------------------------------
    
    /**
@@ -565,10 +699,10 @@
     * there is no suffix to descriptor mapping, the default of {JBOSS_SERVICE} will be
     * returned.
     */
-   private String[] getDescriptorName(DeploymentContext ctx)
+   private String[] getDescriptorName(DeploymentInfo sdi)
    {
-      String[] descriptorNames = {SAR_DESCRIPTOR};
-      String shortName = ctx.getFile().getName();
+      String[] descriptorNames = {JBOSS_SERVICE};
+      String shortName = sdi.shortName;
       int dot = shortName.lastIndexOf('.');
       if( dot >= 0 )
       {
@@ -582,78 +716,4 @@
       }
       return descriptorNames;
    }
-
-   /** Create a UnifiedClassLoader for the deployment that loads from
-   the localUrl and uses its parent deployments url as its orignal
-   url. Previously xml descriptors simply used the TCL but since the UCLs
-   are now registered as mbeans each must be unique.
-   TODO: this needs to be ported to use the VFSClassLoader or class loader
-      created by the ClassLoadingDeployer.
-   */
-  private RepositoryClassLoader createClassLoaders(DeploymentContext ctx,
-        LoaderRepositoryConfig repositoryConfig) throws Exception
-  {
-     /* Walk the deployment tree to find the parent deployment and obtain its
-      url to use as our URL from which this deployment unit originated. This
-      is used to determine permissions using the original URL namespace.
-      Also pick up the LoaderRepository from the topmost ancestor.
-     */
-     DeploymentContext current = ctx;
-     while (current.getParentContext() != null)
-     {
-        current = current.getParentContext();
-     }
-
-     RepositoryClassLoader ucl = null;
-     DeploymentContext parent = ctx.getParentContext();
-     URL ctxURL = ctx.getFile().toURL();
-     if( parent == null )
-     {
-        if( repositoryConfig == null )
-           repositoryConfig = new LoaderRepositoryConfig();
-        // Make sure the specified LoaderRepository exists.
-        LoaderRepositoryFactory.createLoaderRepository(server, repositoryConfig);
-        log.debug("createLoaderRepository from config: "+repositoryConfig);
-        // the classes are passed to a UCL that will share the classes with the whole base
-        boolean isXML = ctx.getFile().getName().endsWith(".xml");
-        Object[] args = { isXML ? null : ctxURL, ctxURL, Boolean.TRUE };
-        String[] sig =  { "java.net.URL", "java.net.URL", "boolean" };
-        ucl = (RepositoryClassLoader) server.invoke(repositoryConfig.repositoryName,
-           "newClassLoader",args, sig);
-        ctx.putContextData(getClass(), "ucl", ucl);
-        // TODO: add sar classpath jars
-        List<String> cp = ctx.getClasspath();
-        for(int n = 0; n < cp.size(); n ++)
-        {
-           URL pathURL = new URL(ctxURL, cp.get(n));
-           ucl.addURL(pathURL);
-        }
-     }
-     else
-     {
-        // Add a reference to the LoaderRepository
-        LoaderRepositoryFactory.createLoaderRepository(server, repositoryConfig);
-        // Add the deployment URL to the parent UCL
-        ucl = (RepositoryClassLoader) parent.getContextData(getClass(), "ucl");
-        if( ucl != null )
-        {
-           ucl.addURL(ctxURL);
-           List<String> cp = ctx.getClasspath();
-           for(int n = 0; n < cp.size(); n ++)
-           {
-              URL pathURL = new URL(ctxURL, cp.get(n));
-              ucl.addURL(pathURL);
-           }
-        }
-        /* TODO: there is a problem if parent ucl is null because its not a sar
-           for example. 
-        */
-        else
-        {
-           log.warn("Null parent ucl for sar: "+ctx);
-        }
-     }
-     return ucl;
-  }
-
 }

Modified: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/ServiceController.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/ServiceController.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/ServiceController.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -223,14 +223,10 @@
          di.state = state;
    }
 
-   public List<ObjectName> install(Element config, ObjectName loaderName) throws DeploymentException
+   public List<ObjectName> install(List<ServiceMetaData> metaDatas, ObjectName loaderName) throws DeploymentException
    {
       KernelController controller = kernel.getController();
 
-      // Parse the xml
-      ServiceMetaDataParser parser = new ServiceMetaDataParser(config);
-      List<ServiceMetaData> metaDatas = parser.parse();
-
       // Track the registered mbeans both for returning the result
       // and uninstalling in the event of an error
       List<ObjectName> result = new ArrayList<ObjectName>(metaDatas.size());
@@ -261,6 +257,14 @@
       }
       return result;
    }
+
+   public List<ObjectName> install(Element config, ObjectName loaderName) throws DeploymentException
+   {
+      // Parse the xml
+      ServiceMetaDataParser parser = new ServiceMetaDataParser(config);
+      List<ServiceMetaData> metaDatas = parser.parse();
+      return install(metaDatas, loaderName);
+   }
    
    /**
     * Install an MBean without any meta data

Added: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -0,0 +1,132 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.system.deployers;
+
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.jboss.deployers.plugins.deployers.helpers.AbstractParsingDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.mx.loading.LoaderRepositoryFactory;
+import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.virtual.VirtualFile;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * SARDeployer.<p>
+ * 
+ * This deployer is responsible for looking for -service.xml
+ * and creating the metadata object.<p>
+ * 
+ * The {@link ServiceClassLoaderDeployer} and {@link ServiceDeployer} does the real work of deployment.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class SARDeployer extends AbstractParsingDeployer<ServiceDeployment>
+{
+   /**
+    * Create a new SARDeployer.
+    * 
+    * @throws IllegalArgumentException for a null kernel
+    */
+   public SARDeployer()
+   {
+      super(ServiceDeployment.class);
+   }
+
+   public int getRelativeOrder()
+   {
+      return 1000;
+   }
+
+   protected ServiceDeployment parse(DeploymentUnit unit, VirtualFile file) throws Exception
+   {
+      if (file == null)
+         throw new IllegalArgumentException("Null file");
+      
+      ServiceDeployment parsed = new ServiceDeployment();
+      String name = file.toURI().toString();
+      parsed.setName(name);
+      InputStream is = file.openStream();
+      try
+      {
+         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+         // TODO factory.setNamespaceAware(useNamespaceAwareParser);
+         DocumentBuilder parser = factory.newDocumentBuilder();
+         InputSource source = new InputSource(is);
+         source.setSystemId(parsed.getName());
+         parser.setEntityResolver(new JBossEntityResolver());
+         Document document = parser.parse(is);
+
+         // In case there is a dependent classpath defined parse it
+         // TODO parseXMLClasspath(di);
+
+         // Check for a custom loader-repository for scoping
+         NodeList loaders = document.getElementsByTagName("loader-repository");
+         if( loaders.getLength() > 0 )
+         {
+            Element loader = (Element) loaders.item(0);
+            LoaderRepositoryConfig config = LoaderRepositoryFactory.parseRepositoryConfig(loader);
+            parsed.setRepositoryInfo(config);
+         }
+
+         // We can't parse the services yet, because it requires the classloader
+         parsed.setConfig(document.getDocumentElement());
+      }
+      finally
+      {
+         try
+         {
+            is.close();
+         }
+         catch (Exception ignored)
+         {
+         }
+      }
+      if (parsed == null)
+         throw new DeploymentException("The xml " + file.getPathName() + " is not well formed!");
+      return parsed;
+   }
+
+   // TODO make this optional
+   protected void init(DeploymentUnit unit, ServiceDeployment metaData, VirtualFile file) throws Exception
+   {
+   }
+
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      createMetaData(unit, null, "-service.xml");
+   }
+
+   // TODO make this optional
+   public void undeploy(DeploymentUnit unit)
+   {
+   }
+}

Added: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceClassLoaderDeployer.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceClassLoaderDeployer.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceClassLoaderDeployer.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -0,0 +1,106 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.system.deployers;
+
+import java.util.Set;
+
+import javax.management.MBeanServer;
+
+import org.jboss.deployers.plugins.deployers.helpers.AbstractRealDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.system.ServiceController;
+
+/**
+ * ServiceClassLoaderDeployer.<p>
+ * 
+ * This deployer is responsible for creating classloaders for services of
+ * type {@link ServiceDeployment}.
+ * 
+ * TODO make this work
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceClassLoaderDeployer extends AbstractRealDeployer<ServiceDeployment>
+{
+   /** The service controller */
+   private final ServiceController controller;
+
+   /**
+    * Create a new ServiceDeployer.
+    * 
+    * @param controller the service controller
+    * @throws IllegalArgumentException for a null controller
+    */
+   public ServiceClassLoaderDeployer(ServiceController controller)
+   {
+      super(ServiceDeployment.class);
+      if (controller == null)
+         throw new IllegalArgumentException("Null kernel");
+      this.controller = controller;
+   }
+   
+   public int getRelativeOrder()
+   {
+      return 2000;
+   }
+
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      MBeanServer server = controller.getMBeanServer();
+      Set<ServiceDeployment> deployments = getAllMetaData(unit);
+      for (ServiceDeployment deployment : deployments)
+      {
+         try
+         {
+            /* TODO Create ClassLoader 
+            ObjectName uclName = di.ucl.getObjectName();
+            if (server.isRegistered(uclName) == false )
+            {
+               log.debug("Registering service UCL="+uclName);
+               server.registerMBean(di.ucl, uclName);
+            }
+            */
+         }
+         catch (Throwable t)
+         {
+            throw DeploymentException.rethrowAsDeploymentException("Error creating classloader: " + deployment.getName(), t);
+         }
+      }
+   }
+
+   public void undeploy(DeploymentUnit unit)
+   {
+      Set<ServiceDeployment> deployments = getAllMetaData(unit);
+      for (ServiceDeployment deployment : deployments)
+      {
+         try
+         {
+            //TODO remove classloader
+         }
+         catch (Throwable t)
+         {
+            log.warn("Error removing classloader:" + deployment.getName(), t);
+         }
+      }
+   }
+}

Added: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -0,0 +1,182 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.system.deployers;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.deployers.plugins.deployers.helpers.AbstractRealDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.system.ServiceController;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.w3c.dom.Element;
+
+/**
+ * ServiceDeployer.<p>
+ * 
+ * This deployer is responsible for deploying services of
+ * type {@link ServiceDeployment}.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceDeployer extends AbstractRealDeployer<ServiceDeployment>
+{
+   /** The service controller */
+   private final ServiceController controller;
+   
+   /**
+    * Create a new ServiceDeployer.
+    * 
+    * @param controller the service controller
+    * @throws IllegalArgumentException for a null controller
+    */
+   public ServiceDeployer(ServiceController controller)
+   {
+      super(ServiceDeployment.class);
+      if (controller == null)
+         throw new IllegalArgumentException("Null controller");
+      this.controller = controller;
+   }
+
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      Set<ServiceDeployment> deployments = getAllMetaData(unit);
+      for (ServiceDeployment deployment : deployments)
+      {
+         try
+         {
+            ObjectName loaderName = deployment.getLoaderName();
+            List<ServiceMetaData> services = deployment.getServices();
+            Element config = deployment.getConfig();
+            List<ObjectName> names = null;
+            if (services != null)
+               names = controller.install(services, loaderName);
+            else if (config != null)
+               names = controller.install(config, loaderName);
+            else
+            {
+               log.debug("Service deployment has no services: " + deployment.getName());
+               continue;
+            }
+            
+            deployment.setServiceNames(names);
+            try
+            {
+               create(names);
+               try
+               {
+                  start(names);
+               }
+               catch (Throwable t)
+               {
+                  stop(names);
+                  throw t;
+               }
+            }
+            catch (Throwable t)
+            {
+               destroy(names);
+            }
+         }
+         catch (Throwable t)
+         {
+            throw DeploymentException.rethrowAsDeploymentException("Error deploying: " + deployment.getName(), t);
+         }
+      }
+   }
+
+   public void undeploy(DeploymentUnit unit)
+   {
+      Set<ServiceDeployment> deployments = getAllMetaData(unit);
+      for (ServiceDeployment deployment : deployments)
+      {
+         List<ObjectName> names = deployment.getServiceNames();
+         if (names == null)
+            continue;
+         
+         stop(names);
+         destroy(names);
+         remove(names);
+      }
+   }
+   
+   protected void create(List<ObjectName> names) throws Exception
+   {
+      for (ObjectName name : names)
+         controller.create(name);
+   }
+   
+   protected void start(List<ObjectName> names) throws Exception
+   {
+      for (ObjectName name : names)
+         controller.start(name);
+   }
+   
+   protected void stop(List<ObjectName> names)
+   {
+      for (ObjectName name : names)
+      {
+         try
+         {
+            controller.stop(name);
+         }
+         catch (Throwable t)
+         {
+            log.warn("Error during stop for " + name, t);
+         }
+      }
+   }
+   
+   protected void destroy(List<ObjectName> names)
+   {
+      for (ObjectName name : names)
+      {
+         try
+         {
+            controller.destroy(name);
+         }
+         catch (Throwable t)
+         {
+            log.warn("Error during destroy for " + name, t);
+         }
+      }
+   }
+   
+   protected void remove(List<ObjectName> names)
+   {
+      for (ObjectName name : names)
+      {
+         try
+         {
+            controller.remove(name);
+         }
+         catch (Throwable t)
+         {
+            log.warn("Error during remove for " + name, t);
+         }
+      }
+   }
+}

Added: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployment.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployment.java	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployment.java	2006-09-12 12:31:28 UTC (rev 56764)
@@ -0,0 +1,177 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.system.deployers;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.w3c.dom.Element;
+
+/**
+ * ServiceDeployment.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceDeployment
+{
+   /** The deployment name */
+   private String name;
+   
+   /** The service names */
+   private List<ObjectName> serviceNames;
+
+   /** The services */
+   private List<ServiceMetaData> services;
+   
+   /** The loader object name */
+   private ObjectName loaderName;
+   
+   /** The repository info */
+   private LoaderRepositoryConfig repositoryInfo;
+   
+   /** The config */
+   private Element config;
+   
+   /**
+    * Get the name.
+    * 
+    * @return the name.
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * Set the name.
+    * 
+    * @param name the name.
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * Get the serviceNames.
+    * 
+    * @return the serviceNames.
+    */
+   public List<ObjectName> getServiceNames()
+   {
+      return serviceNames;
+   }
+
+   /**
+    * Set the serviceNames.
+    * 
+    * @param serviceNames the serviceNames.
+    */
+   public void setServiceNames(List<ObjectName> serviceNames)
+   {
+      this.serviceNames = serviceNames;
+   }
+
+   /**
+    * Get the services.
+    * 
+    * @return the services.
+    */
+   public List<ServiceMetaData> getServices()
+   {
+      return services;
+   }
+
+   /**
+    * Set the services.
+    * 
+    * @param services the services.
+    */
+   public void setServices(List<ServiceMetaData> services)
+   {
+      this.services = services;
+   }
+
+   /**
+    * Get the loaderName.
+    * 
+    * @return the loaderName.
+    */
+   public ObjectName getLoaderName()
+   {
+      return loaderName;
+   }
+
+   /**
+    * Set the loaderName.
+    * 
+    * @param loaderName the loaderName.
+    */
+   public void setLoaderName(ObjectName loaderName)
+   {
+      this.loaderName = loaderName;
+   }
+
+   /**
+    * Get the repositoryInfo.
+    * 
+    * @return the repositoryInfo.
+    */
+   public LoaderRepositoryConfig getRepositoryInfo()
+   {
+      return repositoryInfo;
+   }
+
+   /**
+    * Set the repositoryInfo.
+    * 
+    * @param repositoryInfo the repositoryInfo.
+    */
+   public void setRepositoryInfo(LoaderRepositoryConfig repositoryInfo)
+   {
+      this.repositoryInfo = repositoryInfo;
+   }
+
+   /**
+    * Get the config.
+    * 
+    * @return the config.
+    */
+   public Element getConfig()
+   {
+      return config;
+   }
+
+   /**
+    * Set the config.
+    * 
+    * @param config the config.
+    */
+   public void setConfig(Element config)
+   {
+      this.config = config;
+   }
+}

Modified: branches/MC_VDF_WORK/testsuite/.classpath
===================================================================
--- branches/MC_VDF_WORK/testsuite/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/testsuite/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -67,5 +67,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-container.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/tomcat/.classpath
===================================================================
--- branches/MC_VDF_WORK/tomcat/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/tomcat/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -34,5 +34,6 @@
 	<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/MC_VDF_WORK/tomcat/build.xml
===================================================================
--- branches/MC_VDF_WORK/tomcat/build.xml	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/tomcat/build.xml	2006-09-12 12:31:28 UTC (rev 56764)
@@ -60,6 +60,7 @@
       <path refid="jgroups.jgroups.classpath"/>
       <path refid="apache.modeler.classpath"/>
       <path refid="jboss.jbossxb.classpath"/>
+      <path refid="jboss.microcontainer.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: branches/MC_VDF_WORK/varia/.classpath
===================================================================
--- branches/MC_VDF_WORK/varia/.classpath	2006-09-12 12:22:07 UTC (rev 56763)
+++ branches/MC_VDF_WORK/varia/.classpath	2006-09-12 12:31:28 UTC (rev 56764)
@@ -35,5 +35,6 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/juddi/lib/juddi.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>




More information about the jboss-cvs-commits mailing list