users@glassfish.java.net

Binding POJO to JNDI causes ClassCastException on narrow

From: <glassfish_at_javadesktop.org>
Date: Mon, 05 Mar 2007 03:17:11 PST

Hi,

I have a problem with JNDI binding since I've moved from SJSAS8.2 to Glassfish U1 P01. I have a POJO that extends PortableRemoteObject and implements an interface that extends java.rmi.Remote. This object is created and bound to the JNDI tree and acts as a clusterable singleton.

In 8.2 when I lookup the bound object it returns the objects dynamic stub, but in Glassfish the actual object is returned. This causes a ClassCastException when I try and narrow it on any server or in any container other than the one it was actually created in.

Does anyone know why this changed from 8.2 to Glassfish might have occured and what I can do about it?

Thanks in advance.
[Message sent by forum member 'xerces' (xerces)]

http://forums.java.net/jive/thread.jspa?messageID=206181