[jboss-cvs] JBossAS SVN: r82161 - in projects/aop/trunk: asintegration-core/src/tests/org/jboss/test/aop/classpool/test and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 9 16:38:13 EST 2008
Author: kabir.khan at jboss.com
Date: 2008-12-09 16:38:13 -0500 (Tue, 09 Dec 2008)
New Revision: 82161
Added:
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/AbstractClassPoolDomain.java
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/BasicClassPoolDomain.java
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomainInternal.java
Removed:
projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/UclClassPoolDomain.java
Modified:
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomain.java
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolToClassPoolDomainAdapter.java
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/DelegatingClassPool.java
projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/ClassPoolTest.java
projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/IsLocalResourcePluginFactoryTestCase.java
projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/JBossUclClassPoolFactory.java
projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolDomain.java
projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolFactory.java
Log:
[JBAOP-666] Refactor the classpool domains to use interfaces
Added: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/AbstractClassPoolDomain.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/AbstractClassPoolDomain.java (rev 0)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/AbstractClassPoolDomain.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.aop.classpool;
+
+import javassist.ClassPool;
+import javassist.CtClass;
+import javassist.NotFoundException;
+
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractClassPoolDomain implements ClassPoolDomainInternal
+{
+ protected CtClass getCachedOrCreateFromPoolParent(BaseClassPool initiatingPool, String classname, boolean create)
+ {
+ if (initiatingPool == null)
+ {
+ return null;
+ }
+ ClassPool parentPool = initiatingPool.getParent();
+ if (parentPool == null)
+ {
+ return null;
+ }
+
+ if (parentPool instanceof BaseClassPool)
+ {
+ return getCachedOrCreate((BaseClassPool)parentPool, classname, create);
+ }
+ else
+ {
+ return getCachedOrCreate(parentPool, classname, create);
+ }
+ }
+
+ protected CtClass getCachedOrCreate(BaseClassPool parentPool, String classname, boolean create)
+ {
+ if (parentPool == null)
+ {
+ return null;
+ }
+
+ CtClass clazz = null;
+ if (!parentPool.childFirstLookup)
+ {
+ clazz = getCachedOrCreateFromPoolParent(parentPool, classname, create);
+ }
+
+ //We can use the exposed methods directly to avoid the overhead of NotFoundException
+ clazz = parentPool.getCached(classname);
+ if (clazz == null && create)
+ {
+ clazz = parentPool.createCtClass(classname, true);
+ }
+
+ if (clazz == null && !parentPool.childFirstLookup)
+ {
+ clazz = getCachedOrCreateFromPoolParent(parentPool, classname, create);
+ }
+ return clazz;
+ }
+
+ protected CtClass getCachedOrCreate(ClassPool parentPool, String classname, boolean create)
+ {
+ try
+ {
+ //This will check the parents
+ return parentPool.get(classname);
+ }
+ catch(NotFoundException e)
+ {
+ return null;
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/BasicClassPoolDomain.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/BasicClassPoolDomain.java (rev 0)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/BasicClassPoolDomain.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -0,0 +1,143 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.aop.classpool;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javassist.CtClass;
+
+import org.jboss.aop.util.ClassLoaderUtils;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class BasicClassPoolDomain extends AbstractClassPoolDomain implements ClassPoolDomainInternal
+{
+ private String domainName;
+
+ private ClassPoolDomainInternal parent;
+
+ private List<DelegatingClassPool> delegatingPools = new ArrayList<DelegatingClassPool>();
+
+ private boolean parentFirst;
+
+ public BasicClassPoolDomain(String domainName, ClassPoolDomain parent)
+ {
+ if (parent != null && parent instanceof ClassPoolDomainInternal == false)
+ {
+ throw new IllegalArgumentException("Parent must implement ClassPoolDomainInternal");
+ }
+ this.parent = (ClassPoolDomainInternal)parent;
+ this.domainName = domainName;
+
+ if (parent == null)
+ {
+ this.parent = createParentClassPoolToClassPoolDomainAdaptor();
+ if (this.parent == null)
+ {
+ throw new IllegalStateException("No ClassPoolToClassPool");
+ }
+ }
+ }
+
+ protected ClassPoolToClassPoolDomainAdapter createParentClassPoolToClassPoolDomainAdaptor()
+ {
+ return new ClassPoolToClassPoolDomainAdapter();
+ }
+
+ public String getDomainName()
+ {
+ return domainName;
+ }
+
+ public boolean isParentFirst()
+ {
+ return parentFirst;
+ }
+
+ public void setParentFirst(boolean parentFirst)
+ {
+ this.parentFirst = parentFirst;
+ }
+
+ public synchronized void addClassPool(DelegatingClassPool pool)
+ {
+ if (!delegatingPools.contains(pool))
+ {
+ delegatingPools.add(pool);
+ }
+ }
+
+ public synchronized void removeClassPool(DelegatingClassPool pool)
+ {
+ delegatingPools.remove(pool);
+ }
+
+ public synchronized CtClass getCachedOrCreate(DelegatingClassPool initiatingPool, String classname, boolean create)
+ {
+ CtClass clazz = getCachedOrCreateInternal(classname, create);
+
+ if (clazz == null)
+ {
+ clazz = getCachedOrCreateFromPoolParent(initiatingPool, classname, create);
+ }
+ return clazz;
+ }
+
+ public CtClass getCachedOrCreateInternal(String classname, boolean create)
+ {
+ CtClass clazz = null;
+ if (parentFirst && parent!= null)
+ {
+ clazz = parent.getCachedOrCreateInternal(classname, create);
+ }
+ if (clazz == null)
+ {
+ String resourceName = delegatingPools.size() > 0 ? ClassLoaderUtils.getResourceName(classname) : null;
+ for (DelegatingClassPool pool : delegatingPools)
+ {
+ if (pool.isLocalResource(resourceName))
+ {
+ clazz = pool.getCachedLocally(classname);
+ if (clazz == null && create)
+ {
+ clazz = pool.createCtClass(classname, true);
+ }
+ }
+ }
+ }
+ if (clazz == null && parent != null && !parentFirst)
+ {
+ clazz = parent.getCachedOrCreateInternal(classname, create);
+ }
+ return clazz;
+ }
+
+ public String toString()
+ {
+ return super.toString() + "[" + domainName + "]";
+ }
+
+}
Modified: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomain.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomain.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomain.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -21,189 +21,21 @@
*/
package org.jboss.aop.classpool;
-import java.util.ArrayList;
-import java.util.List;
-
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.NotFoundException;
-
-import org.jboss.aop.util.ClassLoaderUtils;
-
-
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class ClassPoolDomain
+public interface ClassPoolDomain
{
- private String domainName;
-
- private ClassPoolDomain parent;
-
- private List<DelegatingClassPool> delegatingPools = new ArrayList<DelegatingClassPool>();
-
- private boolean parentFirst;
-
- public ClassPoolDomain(String domainName, ClassPoolDomain parent)
- {
- this.parent = parent;
- this.domainName = domainName;
-
- if (parent == null)
- {
- this.parent = createParentClassPoolToClassPoolDomainAdaptor();
- if (this.parent == null)
- {
- throw new IllegalStateException("No ClassPoolToClassPool");
- }
- }
- }
-
- protected ClassPoolDomain()
- {
- }
-
- protected ClassPoolToClassPoolDomainAdapter createParentClassPoolToClassPoolDomainAdaptor()
- {
- return new ClassPoolToClassPoolDomainAdapter();
- }
-
- public String getDomainName()
- {
- return domainName;
- }
+ String getDomainName();
- public boolean isParentFirst()
- {
- return parentFirst;
- }
+ boolean isParentFirst();
- public void setParentFirst(boolean parentFirst)
- {
- this.parentFirst = parentFirst;
- }
+ void setParentFirst(boolean parentFirst);
- synchronized void addClassPool(DelegatingClassPool pool)
- {
- if (!delegatingPools.contains(pool))
- {
- delegatingPools.add(pool);
- }
- }
+ void addClassPool(DelegatingClassPool pool);
- synchronized void removeClassPool(DelegatingClassPool pool)
- {
- delegatingPools.remove(pool);
- }
-
- synchronized CtClass getCachedOrCreate(DelegatingClassPool initiatingPool, String classname, boolean create)
- {
- CtClass clazz = getCachedOrCreateInternal(classname, create);
-
- if (clazz == null)
- {
- clazz = getCachedOrCreateFromPoolParent(initiatingPool, classname, create);
- }
- return clazz;
- }
-
-
- private CtClass getCachedOrCreateFromPoolParent(BaseClassPool initiatingPool, String classname, boolean create)
- {
- if (initiatingPool == null)
- {
- return null;
- }
- ClassPool parentPool = initiatingPool.getParent();
- if (parentPool == null)
- {
- return null;
- }
-
- if (parentPool instanceof BaseClassPool)
- {
- return getCachedOrCreate((BaseClassPool)parentPool, classname, create);
- }
- else
- {
- return getCachedOrCreate(parentPool, classname, create);
- }
- }
-
-
- protected CtClass getCachedOrCreateInternal(String classname, boolean create)
- {
- CtClass clazz = null;
- if (parentFirst && parent!= null)
- {
- clazz = parent.getCachedOrCreateInternal(classname, create);
- }
- if (clazz == null)
- {
- String resourceName = delegatingPools.size() > 0 ? ClassLoaderUtils.getResourceName(classname) : null;
- for (DelegatingClassPool pool : delegatingPools)
- {
- if (pool.isLocalResource(resourceName))
- {
- clazz = pool.getCachedLocally(classname);
- if (clazz == null && create)
- {
- clazz = pool.createCtClass(classname, true);
- }
- }
- }
- }
- if (clazz == null && parent != null && !parentFirst)
- {
- clazz = parent.getCachedOrCreateInternal(classname, create);
- }
- return clazz;
- }
+ void removeClassPool(DelegatingClassPool pool);
- protected CtClass getCachedOrCreate(BaseClassPool parentPool, String classname, boolean create)
- {
- if (parentPool == null)
- {
- return null;
- }
-
- CtClass clazz = null;
- if (!parentPool.childFirstLookup)
- {
- clazz = getCachedOrCreateFromPoolParent(parentPool, classname, create);
- }
-
- //We can use the exposed methods directly to avoid the overhead of NotFoundException
- clazz = parentPool.getCached(classname);
- if (clazz == null && create)
- {
- clazz = parentPool.createCtClass(classname, true);
- }
-
- if (clazz == null && !parentPool.childFirstLookup)
- {
- clazz = getCachedOrCreateFromPoolParent(parentPool, classname, create);
- }
- return clazz;
- }
-
- protected CtClass getCachedOrCreate(ClassPool parentPool, String classname, boolean create)
- {
- try
- {
- //This will check the parents
- return parentPool.get(classname);
- }
- catch(NotFoundException e)
- {
- return null;
- }
- }
-
- public String toString()
- {
- return super.toString() + "[" + domainName + "]";
- }
}
Added: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomainInternal.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomainInternal.java (rev 0)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolDomainInternal.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.aop.classpool;
+
+import javassist.CtClass;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+interface ClassPoolDomainInternal extends ClassPoolDomain
+{
+ CtClass getCachedOrCreateInternal(String classname, boolean create);
+ CtClass getCachedOrCreate(DelegatingClassPool initiatingPool, String classname, boolean create);
+}
Modified: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolToClassPoolDomainAdapter.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolToClassPoolDomainAdapter.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/ClassPoolToClassPoolDomainAdapter.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -29,7 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class ClassPoolToClassPoolDomainAdapter extends ClassPoolDomain
+public class ClassPoolToClassPoolDomainAdapter extends AbstractClassPoolDomain implements ClassPoolDomainInternal
{
protected ClassPool pool;
@@ -47,15 +47,13 @@
return ClassPool.getDefault();
}
- @Override
- synchronized void addClassPool(DelegatingClassPool pool)
+ public void addClassPool(DelegatingClassPool pool)
{
throw new IllegalStateException("Cannot add pools to the domain adaptor");
}
- @Override
- protected synchronized CtClass getCachedOrCreateInternal(String classname, boolean create)
+ public synchronized CtClass getCachedOrCreateInternal(String classname, boolean create)
{
if (pool instanceof BaseClassPool)
{
@@ -67,34 +65,34 @@
}
}
- @Override
public String getDomainName()
{
return null;
}
- @Override
public boolean isParentFirst()
{
return !pool.childFirstLookup;
}
- @Override
- synchronized void removeClassPool(DelegatingClassPool pool)
+ public void removeClassPool(DelegatingClassPool pool)
{
throw new IllegalStateException("Cannot remove pools from the domain adaptor");
}
- @Override
public void setParentFirst(boolean parentFirst)
{
throw new IllegalStateException("Cannot change the parent first setting in the domain adaptor");
}
- @Override
public String toString()
{
return "ClassPoolToDomainAdapter[" + System.identityHashCode(this) + " " + pool.toString() + "]";
}
+ public CtClass getCachedOrCreate(DelegatingClassPool initiatingPool, String classname, boolean create)
+ {
+ throw new IllegalStateException("Should never be called");
+ }
+
}
Modified: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/DelegatingClassPool.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/DelegatingClassPool.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/classpool/DelegatingClassPool.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -37,21 +37,23 @@
public class DelegatingClassPool extends BaseClassPool
{
private final static Logger logger = Logger.getLogger(DelegatingClassPool.class);
- private final ClassPoolDomain domain;
+ private final ClassPoolDomainInternal domain;
private boolean closed;
public DelegatingClassPool(ClassPoolDomain domain, ClassLoader cl, ClassPool parent, ScopedClassPoolRepository repository, boolean isTemp)
{
- super(cl, parent, repository);
- this.domain = domain;
- domain.addClassPool(this);
+ this(domain, cl, parent, repository);
}
protected DelegatingClassPool(ClassPoolDomain domain, ClassLoader cl, ClassPool parent, ScopedClassPoolRepository repository)
{
super(cl, parent, repository);
- this.domain = domain;
+ if (domain instanceof ClassPoolDomainInternal == false)
+ {
+ throw new IllegalArgumentException("domain must implement ClassPoolDomainInternal");
+ }
+ this.domain = (ClassPoolDomainInternal)domain;
domain.addClassPool(this);
}
Modified: projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/ClassPoolTest.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/ClassPoolTest.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/ClassPoolTest.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -30,6 +30,7 @@
import javassist.ClassPool;
import org.jboss.aop.classpool.AOPClassPoolRepository;
+import org.jboss.aop.classpool.BasicClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomain;
import org.jboss.aop.classpool.DelegatingClassPool;
import org.jboss.test.AbstractTestCaseWithSetup;
@@ -81,7 +82,7 @@
protected static ClassPoolDomain createClassPoolDomain(String name, ClassPoolDomain parent, boolean parentFirst)
{
- ClassPoolDomain domain = new ClassPoolDomain(name, parent);
+ ClassPoolDomain domain = new BasicClassPoolDomain(name, parent);
domain.setParentFirst(parentFirst);
return domain;
}
Modified: projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/IsLocalResourcePluginFactoryTestCase.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/IsLocalResourcePluginFactoryTestCase.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/classpool/test/IsLocalResourcePluginFactoryTestCase.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -26,8 +26,12 @@
import java.net.URLClassLoader;
import javassist.ClassPool;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
import org.jboss.aop.classpool.AOPClassPoolRepository;
+import org.jboss.aop.classpool.BasicClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomain;
import org.jboss.aop.classpool.DefaultClassLoaderIsLocalResourcePlugin;
import org.jboss.aop.classpool.DefaultClassLoaderIsLocalResourcePluginFactory;
@@ -41,10 +45,6 @@
import org.jboss.aop.classpool.URLClassLoaderIsLocalResourcePluginFactory;
import org.jboss.util.loading.Translatable;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
@@ -52,7 +52,7 @@
*/
public class IsLocalResourcePluginFactoryTestCase extends TestCase
{
- final static ClassPoolDomain DOMAIN = new ClassPoolDomain("Test", null);
+ final static ClassPoolDomain DOMAIN = new BasicClassPoolDomain("Test", null);
final static URL[] URLS;
static
{
Modified: projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/JBossUclClassPoolFactory.java
===================================================================
--- projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/JBossUclClassPoolFactory.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/JBossUclClassPoolFactory.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -31,6 +31,7 @@
import javassist.scopedpool.ScopedClassPoolRepository;
import org.jboss.aop.classpool.AbstractJBossClassPoolFactory;
+import org.jboss.aop.classpool.BasicClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomainRegistry;
import org.jboss.aop.classpool.NonDelegatingClassPool;
@@ -81,7 +82,7 @@
if (loaderRepository instanceof HeirarchicalLoaderRepository3)
{
- domain = new UclClassPoolDomain("Scoped" + System.identityHashCode(loaderRepository), mainDomain);
+ domain = new BasicClassPoolDomain("Scoped" + System.identityHashCode(loaderRepository), mainDomain);
boolean parentFirst = ((HeirarchicalLoaderRepository3)loaderRepository).getUseParentFirst();
domain.setParentFirst(parentFirst);
}
@@ -89,7 +90,7 @@
{
if (mainDomain == null)
{
- domain = new UclClassPoolDomain(ServerConstants.DEFAULT_LOADER_NAME, null);
+ domain = new BasicClassPoolDomain(ServerConstants.DEFAULT_LOADER_NAME, null);
mainDomain = domain;
}
else
Deleted: projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/UclClassPoolDomain.java
===================================================================
--- projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/UclClassPoolDomain.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-jmx/src/main/org/jboss/aop/classpool/ucl/UclClassPoolDomain.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -1,38 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.aop.classpool.ucl;
-
-import org.jboss.aop.classpool.ClassPoolDomain;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class UclClassPoolDomain extends ClassPoolDomain
-{
- public UclClassPoolDomain(String domainName, ClassPoolDomain parent)
- {
- // FIXME UclClassPoolDomain constructor
- super(domainName, parent);
- }
-}
Modified: projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolDomain.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolDomain.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolDomain.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -21,6 +21,7 @@
*/
package org.jboss.aop.classpool.jbosscl;
+import org.jboss.aop.classpool.BasicClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolToClassPoolDomainAdapter;
@@ -29,7 +30,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class JBossClClassPoolDomain extends ClassPoolDomain
+public class JBossClClassPoolDomain extends BasicClassPoolDomain
{
public JBossClClassPoolDomain(String domainName, ClassPoolDomain parent)
{
Modified: projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolFactory.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolFactory.java 2008-12-09 20:48:57 UTC (rev 82160)
+++ projects/aop/trunk/asintegration-mc/src/main/org/jboss/aop/classpool/jbosscl/JBossClClassPoolFactory.java 2008-12-09 21:38:13 UTC (rev 82161)
@@ -30,6 +30,7 @@
import org.jboss.aop.asintegration.jboss5.DomainRegistry;
import org.jboss.aop.classpool.AbstractJBossClassPoolFactory;
+import org.jboss.aop.classpool.BasicClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomain;
import org.jboss.aop.classpool.ClassPoolDomainRegistry;
import org.jboss.aop.classpool.NonDelegatingClassPool;
@@ -96,7 +97,7 @@
}
parentPoolDomain = ClassPoolDomainRegistry.getInstance().getDomain(parentDomain);
}
- poolDomain = new ClassPoolDomain(domain.getName(), parentPoolDomain);
+ poolDomain = new BasicClassPoolDomain(domain.getName(), parentPoolDomain);
//The determination of parentFirst/-Last might need revisiting
poolDomain.setParentFirst(domain.getParentPolicy() == ParentPolicy.BEFORE);
More information about the jboss-cvs-commits
mailing list