[jboss-user] [EJB 3.0] - Re: java.lan.ClassCastException when casting to remote bean
jaikiran
do-not-reply at jboss.com
Thu Nov 20 08:53:47 EST 2008
+- simpleserver (class: org.jnp.interfaces.NamingContext)
| | +- SimpleStatefulBean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (class: java.lang.Object)
|
I setup a simple stateful session bean in a EAR on my local 4.2.3 GA setup and my JNDI tree too looked the same. I then looked up simpleserver/SimpleStatefulBean/remote through my code and casted it to my stateful remote interface. It worked. So i guess the JNDI tree output isn't something that we should be worried about.
The reason i was surprised when i saw this earlier was because the object bound at simpleserver/SimpleStatefulBean/remote does not show the interface types the proxy implements (unlike the stateless session beans). I guess its as per design.
Now let me try to introduce a separate WAR file into picture and try and get the classcast issue reproduced.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190890#4190890
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190890
More information about the jboss-user
mailing list