|
| Cannot bind Proxy to JNDI Context in WL9/10 |
 |
Wed, 13 Feb 2008 09:49:47 -080 |
We are in the process of upgrading from WebLogic 8 to WebLogic 9.2 (or 10) and
have come across an error. We have a series of Remote Interfaces that we expose
for RMI calls. We wrap the remote implementations in a proxy and bind the proxy,
which allows us to perform work before and after the transaction. While this
all worked in WebLogic 8/JVM1.4, upon upgrading to WL9/JVM1.5 we get the
following error:
java.lang.ClassCastException: $Proxy73
at
weblogic.rmi.extensions.server.ServerHelper.replaceAndResolveRemoteOb
ject(ServerHelper.java:417)
at
weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextIm
pl.java:377)
at
weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.jav
a:276)
at javax.naming.InitialContext.bind(InitialContext.java:359)^M
at
com.cox.webdev.csapi.InterfaceBroker.bindAll(InterfaceBroker.java:164
)
at
com.cox.webdev.csapi.app.CsapiApplication.configureInterfaces(CsapiAp
plication.java:481)
How do we get around this issue? Binding the implementation works, but we lose
a lot of our security and statistics layer.
The proxy is created through:
RemoteInterfaceInvocationHandler handler =
new RemoteInterfaceInvocationHandler( imp );
Object prox =
Proxy.newProxyInstance(
imp.getClass().getClassLoader(),
imp.getClass().getInterfaces(),
|
| Post Reply
|
|
|
|
|
|
|
|
|
|