[jboss-cvs] JBossAS SVN: r60179 - trunk/server/src/main/org/jboss/naming.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 1 23:38:16 EST 2007
Author: scott.stark at jboss.org
Date: 2007-02-01 23:38:16 -0500 (Thu, 01 Feb 2007)
New Revision: 60179
Modified:
trunk/server/src/main/org/jboss/naming/ExternalContext.java
Log:
JBAS-4048, look to all superclass interfaces when creating the proxy
Modified: trunk/server/src/main/org/jboss/naming/ExternalContext.java
===================================================================
--- trunk/server/src/main/org/jboss/naming/ExternalContext.java 2007-02-02 04:30:47 UTC (rev 60178)
+++ trunk/server/src/main/org/jboss/naming/ExternalContext.java 2007-02-02 04:38:16 UTC (rev 60179)
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Properties;
@@ -45,6 +46,7 @@
import javax.naming.spi.ObjectFactory;
import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.util.Classes;
/**
* A MBean that binds an arbitrary InitialContext into the JBoss default
@@ -514,7 +516,10 @@
static Context createProxyContext(Context ctx)
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Class[] interfaces = ctx.getClass().getInterfaces();
+ ArrayList<Class> ifaces = new ArrayList<Class>();
+ Classes.getAllInterfaces(ifaces, ctx.getClass());
+ Class[] interfaces = new Class[ifaces.size()];
+ ifaces.toArray(interfaces);
InvocationHandler handler = new CachedContext(ctx);
Context proxyCtx = (Context) Proxy.newProxyInstance(loader, interfaces, handler);
return proxyCtx;
More information about the jboss-cvs-commits
mailing list