[Jboss-cvs] JBossAS SVN: r55519 - branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 11 03:15:33 EDT 2006
Author: scott.stark at jboss.org
Date: 2006-08-11 03:15:31 -0400 (Fri, 11 Aug 2006)
New Revision: 55519
Modified:
branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/SARDeployer.java
Log:
Add the ctx classpath elements to the UCL
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-08-11 06:41:34 UTC (rev 55518)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/deployment/SARDeployer.java 2006-08-11 07:15:31 UTC (rev 55519)
@@ -58,9 +58,9 @@
import org.xml.sax.InputSource;
/**
- * This is the main Service Deployer API. This is a compatibility deployer that
+ * 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.
+ * MC BeanDeployer(*-beans.xml).
*
* @see org.jboss.system.Service
*
@@ -240,6 +240,8 @@
inflateJar(ctx.localUrl, dataDir, path);
}
*/
+ // Call super to pickup any abstract deployer context data
+ super.analyze(ctx);
}
catch (DeploymentException de)
{
@@ -295,7 +297,15 @@
}
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?
mbeans.clear();
+ // Have the service controller parse the jboss-service.xml
+ // TODO: should port to jbossxb
List descriptorMbeans = serviceController.install(document.getDocumentElement(), uclName);
mbeans.addAll(descriptorMbeans);
@@ -473,7 +483,7 @@
VirtualFile docFile = null;
// Load jboss-service.xml from the jar or directory
Boolean isJAR = (Boolean) ctx.getContextData(getClass(), SAR_DESCRIPTOR);
- if ( isJAR )
+ if ( isJAR != null && isJAR )
{
// Check the suffix to descriptor mapping
VirtualFile ctxFile = ctx.getFile();
@@ -566,6 +576,8 @@
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
@@ -599,6 +611,12 @@
"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
{
@@ -609,6 +627,12 @@
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.
More information about the jboss-cvs-commits
mailing list