Hi,

You shouldn't need the Remote interface if your classes operate in the same JVM.

Not sure if this will help, but I had the same problem as you 
(java.lang.ClassCastException: $ProxyXXX) when I was trying to use a Stateless 
Session Bean from within a second Stateless Session Bean. 

Basically, my problem was that I was using the Session Bean's implementation 
class as the destination for my lookup - what I needed to use was the Local 
interface.

For example:
MySession -> Local interface for the MySession Stateless Session Bean
MySessionBean -> Contains the session bean's implementation code

I was doing:

  | InitialContext ctx = new InitialContext();
  | MySessionBean mySess = 
(MySessionBean)ctx.lookup(MySessionBean.class.getName());
  | 

which generated the ClassCastException.  I changed this to

  | InitialContext ctx = new InitialContext();
  | MySession mySess = (MySession)ctx.lookup(MySession.class.getName());
  | 

Its worth checking....

Cheers,

Jason

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918183#3918183

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918183


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to