[jboss-remoting-commits] JBoss Remoting SVN: r4480 - remoting2/branches/2.x/src/main/org/jboss/remoting/marshal.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Sat Aug 9 04:01:20 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-08-09 04:01:20 -0400 (Sat, 09 Aug 2008)
New Revision: 4480
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderHandler.java
Log:
JBREM-1000: Replaced class repositories with classloaders.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderHandler.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderHandler.java 2008-08-09 07:59:47 UTC (rev 4479)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderHandler.java 2008-08-09 08:01:20 UTC (rev 4480)
@@ -53,13 +53,13 @@
{
private ServerInvoker invoker = null;
private MBeanServer server = null;
- private List repositories;
+ private List classLoaders;
protected final static Logger log = Logger.getLogger(MarshallerLoaderHandler.class);
- public MarshallerLoaderHandler(List repositories)
+ public MarshallerLoaderHandler(List classLoaders)
{
- this.repositories = repositories;
+ this.classLoaders = classLoaders;
}
/**
@@ -173,31 +173,18 @@
{
byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
- if (classDefinition == null && repositories != null)
+ if (classDefinition == null && classLoaders != null)
{
- Iterator it = repositories.iterator();
+ Iterator it = classLoaders.iterator();
while (it.hasNext())
{
- ObjectName name = (ObjectName) it.next();
- log.debug("searching repository " + name);
-
- try
+ ClassLoader cl = (ClassLoader) it.next();
+ log.debug("trying classLoader " + cl);
+ classDefinition = ClassUtil.getClassBytes(className, cl);
+ if (classDefinition != null)
{
- Object o = server.getAttribute(name, "Instance");
- LoaderRepository repository = (LoaderRepository) o;
- Class c = repository.getCachedClass(className);
- if (c == null)
- {
- continue;
- }
- log.debug("found class in repository " + name);
- RepositoryClassLoader cl = (RepositoryClassLoader) c.getClassLoader();
- classDefinition = loadByteCode(cl, className);
+ break;
}
- catch (Exception e)
- {
- log.debug("unable to get class from " + name + ": " + e.getMessage(), e);
- }
}
}
More information about the jboss-remoting-commits
mailing list