User: d_jencks
Date: 02/04/14 19:48:53
Modified: src/main/org/jboss/deployment DeploymentInfo.java
MainDeployer.java SARDeployer.java
Log:
Changed to use UnifiedLoaderRepository and UnifiedClassLoader from jbossmx. Removed
ServiceLibraries, UnifiedClassLoader, and MBeanClassLoader from jboss-system
Revision Changes Path
1.5 +20 -10 jboss-system/src/main/org/jboss/deployment/DeploymentInfo.java
Index: DeploymentInfo.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/DeploymentInfo.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DeploymentInfo.java 3 Apr 2002 08:18:59 -0000 1.4
+++ DeploymentInfo.java 15 Apr 2002 02:48:53 -0000 1.5
@@ -26,6 +26,7 @@
import java.util.jar.JarFile;
import java.util.jar.Manifest;
+import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.xml.parsers.DocumentBuilder;
@@ -36,8 +37,11 @@
import org.xml.sax.SAXException;
import org.jboss.logging.Logger;
-import org.jboss.system.ServiceLibraries;
-import org.jboss.system.UnifiedClassLoader;
+//import org.jboss.system.ServiceController;
+//import org.jboss.system.UnifiedClassLoader;
+import org.jboss.mx.loading.UnifiedClassLoader;
+import org.jboss.mx.server.ServerConstants;
+import org.jboss.util.jmx.ObjectNameFactory;
/**
* Service Deployment Info .
@@ -53,7 +57,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel Schulze</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>
- * @version $Revision: 1.4 $ <p>
+ * @version $Revision: 1.5 $ <p>
*
* @todo implement type-safe enum for status.
*
@@ -69,6 +73,9 @@
*/
public class DeploymentInfo
{
+
+ public static final ObjectName DEFAULT_LOADER_REPOSITORY =
ObjectNameFactory.create(ServerConstants.DEFAULT_LOADER_NAME);
+ //public static final ObjectName DEFAULT_LOADER_REPOSITORY =
ServiceController.DEFAULT_LOADER_REPOSITORY;
// Variables ------------------------------------------------------------
public static HashMap deployments = new HashMap();
@@ -176,7 +183,7 @@
}
- public void createClassLoaders()
+ public void createClassLoaders(MBeanServer server) throws Exception
{
if (isXML)
{
@@ -191,7 +198,7 @@
localCl = new URLClassLoader(new URL[] {localUrl});
// the classes are passed to a UCL that will share the classes with the
whole base
- ucl = new UnifiedClassLoader(localUrl);
+ ucl = new UnifiedClassLoader(localUrl, server, DEFAULT_LOADER_REPOSITORY);
}
}
@@ -224,6 +231,14 @@
public void cleanup(Logger log)
{
+ if (!isXML)
+ {
+ //ServiceLibraries.getLibraries().removeClassLoader((UnifiedClassLoader)
ucl);
+ ((UnifiedClassLoader)ucl).unregister();
+ }
+
+ subDeployments.clear();
+ mbeans.clear();
if (localUrl == null || localUrl.equals(url))
{
log.info("not deleting localUrl, it is null or not a copy: " + localUrl);
@@ -237,11 +252,6 @@
log.info("could not delete directory " + localUrl.toString()+" restart
will delete it");
}
- if (!isXML)
- ServiceLibraries.getLibraries().removeClassLoader((UnifiedClassLoader)
ucl);
-
- subDeployments.clear();
- mbeans.clear();
}
private boolean recursiveDelete(File f)
1.28 +2 -16 jboss-system/src/main/org/jboss/deployment/MainDeployer.java
Index: MainDeployer.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/MainDeployer.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- MainDeployer.java 14 Apr 2002 20:19:53 -0000 1.27
+++ MainDeployer.java 15 Apr 2002 02:48:53 -0000 1.28
@@ -58,7 +58,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
- * @version $Revision: 1.27 $
+ * @version $Revision: 1.28 $
*
* @jmx:mbean name="jboss.system:service=MainDeployer"
* extends="org.jboss.system.ServiceMBean,
org.jboss.deployment.DeployerMBean"
@@ -532,21 +532,7 @@
{
makeLocalCopy(deployment);
// initialize the unified classloaders for this deployment
- deployment.createClassLoaders();
- //See if this lets us deploy any waiting configurations.
- try
- {
- getServer().invoke(ServiceControllerMBean.OBJECT_NAME,
- "newClassLoaderNotification",
- new Object[] {},
- new String[] {}
- );
- }
- catch (Exception e)
- {
- log.info("Exception notifying classloader added", e);
- }
- //serviceController.newClassLoaderNotification();
+ deployment.createClassLoaders(getServer());
} // end of if ()
// What deployer is able to deploy this file
1.8 +1 -2 jboss-system/src/main/org/jboss/deployment/SARDeployer.java
Index: SARDeployer.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/SARDeployer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SARDeployer.java 14 Apr 2002 01:19:54 -0000 1.7
+++ SARDeployer.java 15 Apr 2002 02:48:53 -0000 1.8
@@ -53,7 +53,6 @@
import org.jboss.system.Service;
import org.jboss.system.ServiceControllerMBean;
-import org.jboss.system.ServiceLibraries;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.util.jmx.MBeanProxy;
@@ -72,7 +71,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">David Maplesden</a>
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*
* <p><b>20010830 marc fleury:</b>
* <ul>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development