[jboss-cvs] JBossAS SVN: r69616 - in trunk: aspects/src/test/org/jboss/test/proxyfactory/support and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 5 06:56:30 EST 2008
Author: kabir.khan at jboss.com
Date: 2008-02-05 06:56:30 -0500 (Tue, 05 Feb 2008)
New Revision: 69616
Modified:
trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java
trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java
trunk/aspects/src/test/org/jboss/test/proxyfactory/support/SimpleMixinWithConstructorAndDelegate.java
trunk/build/build-thirdparty.xml
Log:
Fix ScopedEarWithClassesInWebInfTestCase
Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java 2008-02-05 10:59:26 UTC (rev 69615)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java 2008-02-05 11:56:30 UTC (rev 69616)
@@ -31,6 +31,7 @@
import org.jboss.classloader.spi.ClassLoaderDomain;
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloader.spi.base.BaseClassLoader;
+import org.jboss.classloading.spi.RealClassLoader;
import org.jboss.deployers.plugins.classloading.Module;
import javassist.ClassPool;
import javassist.scopedpool.ScopedClassPool;
@@ -50,11 +51,11 @@
{
ClassPool parent = getCreateParentClassPools(cl, src, repository);
- if (cl instanceof BaseClassLoader)
+ Map props = ExtraClassPoolFactoryParameters.peekThreadProperties();
+ boolean isWebCl = props == null ? false : ((Boolean)props.get("IsWebCl")).booleanValue();
+ if (!isWebCl && cl instanceof RealClassLoader)
{
- Map props = ExtraClassPoolFactoryParameters.peekThreadProperties();
- Module module = (Module)props.get(Module.class);
-
+ Module module = props == null ? null : (Module)props.get(Module.class);
if (module != null && module.getParentDomain() != null)
{
//It is scoped
Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java 2008-02-05 10:59:26 UTC (rev 69615)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java 2008-02-05 11:56:30 UTC (rev 69616)
@@ -29,12 +29,11 @@
import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
import org.jboss.aop.classpool.ExtraClassPoolFactoryParameters;
import org.jboss.aop.domain.DomainInitializer;
-import org.jboss.aop.domain.DomainInitializerCallback;
-import org.jboss.aop.domain.DomainInitializerCallbackHandler;
import org.jboss.classloader.spi.ClassLoaderDomain;
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.deployers.plugins.classloading.Module;
import org.jboss.deployers.structure.spi.classloading.ClassLoaderMetaData;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
/**
@@ -47,15 +46,17 @@
static Logger log = Logger.getLogger(VFSClassLoaderScopingPolicy.class);
VFSClassLoaderDomainRegistry registry = new VFSClassLoaderDomainRegistry();
- public Domain initializeDomain(DomainInitializerCallbackHandler handler)
+ public Domain initializeDomain(VFSDeploymentUnit unit)
{
- DomainInitializerCallback<ClassLoader> loaderCb = new DomainInitializerCallback<ClassLoader>(ClassLoader.class);
- DomainInitializerCallback<Module> moduleCb = new DomainInitializerCallback<Module>(Module.class);
- DomainInitializerCallback[] callbacks = new DomainInitializerCallback[]{loaderCb, moduleCb};
- handler.handle(callbacks);
+ Module module = unit.getTopLevel().getAttachment(Module.class);
+ ClassLoader loader = unit.getClassLoader();
+ ClassLoader topLoader = unit.getTopLevel().getClassLoader();
- ClassLoader loader = loaderCb.getValue();
- Module module = moduleCb.getValue();
+ ClassLoaderMetaData topMetaData = unit.getTopLevel().getAttachment(ClassLoaderMetaData.class);
+ ClassLoaderMetaData myMetaData = unit.getAttachment(ClassLoaderMetaData.class);
+
+
+ boolean isWar = unit.isAttachmentPresent("org.jboss.metadata.web.jboss.JBossWebMetaData");
ScopedVFSClassLoaderDomain scopedDomain = (ScopedVFSClassLoaderDomain)registry.getRegisteredDomain(loader);
if (scopedDomain == null)
@@ -79,6 +80,7 @@
Map properties = new HashMap();
//The module is needed by the JBoss5ClassPoolFactory, the legacy JBossClassPoolFactory will ignore this
properties.put(Module.class, module);
+ properties.put("IsWebCl", isWar ? Boolean.TRUE : Boolean.FALSE);
ExtraClassPoolFactoryParameters.pushThreadProperties(properties);
try
{
@@ -91,7 +93,9 @@
}
return scopedDomain;
}
+
+
public Domain getDomain(ClassLoader classLoader, AspectManager parent)
{
//Check the stored domains
Modified: trunk/aspects/src/test/org/jboss/test/proxyfactory/support/SimpleMixinWithConstructorAndDelegate.java
===================================================================
--- trunk/aspects/src/test/org/jboss/test/proxyfactory/support/SimpleMixinWithConstructorAndDelegate.java 2008-02-05 10:59:26 UTC (rev 69615)
+++ trunk/aspects/src/test/org/jboss/test/proxyfactory/support/SimpleMixinWithConstructorAndDelegate.java 2008-02-05 11:56:30 UTC (rev 69616)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.proxyfactory.support;
+import org.jboss.aop.proxy.container.ContainerProxyCacheKey;
import org.jboss.aop.proxy.container.Delegate;
+import org.jboss.aop.proxy.container.MarshalledContainerProxy;
+import org.jboss.aop.proxy.container.MarshalledProxyAdvisor;
/**
* If using a constructor and passing "this" as the parameters, the proxy gets used. The delegate (instance wrapped by proxy) is not
@@ -55,4 +58,16 @@
{
SimpleMixinWithConstructorAndDelegate.delegate = delegate;
}
+
+ public void localUnmarshal(MarshalledContainerProxy proxy)
+ {
+ }
+
+ public void remoteUnmarshal(MarshalledContainerProxy proxy, MarshalledProxyAdvisor advisor)
+ {
+ }
+
+ public void setContainerProxyCacheKey(ContainerProxyCacheKey key)
+ {
+ }
}
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2008-02-05 10:59:26 UTC (rev 69615)
+++ trunk/build/build-thirdparty.xml 2008-02-05 11:56:30 UTC (rev 69616)
@@ -82,7 +82,7 @@
<componentref name="jacorb" version="2.3.0jboss.patch5-brew"/>
<componentref name="javassist" version="3.6.0.GA"/>
<componentref name="jaxen" version="1.1-brew"/>
- <componentref name="jboss/aop" version="2.0.0.CR3"/>
+ <componentref name="jboss/aop" version="2.0.0.CR5"/>
<componentref name="jboss/cache" version="2.1.0.CR3"/>
<componentref name="jboss/common-core" version="2.2.3.GA"/>
<componentref name="jboss/common-logging-jdk" version="2.0.2.GA"/>
More information about the jboss-cvs-commits
mailing list