[jboss-user] [EJB 3.0 Users] - Re: JBoss 4.2.1 RemoteEJB Lookup ClassCastException

jaikiran do-not-reply at jboss.com
Thu Nov 12 14:23:23 EST 2009


"kyle.bober" wrote : What do you mean by @Service? Am I missing and annotation?

Ah, forget that @Service thing. I just mixed up another thread and also got confused by the interface names you had for those stateless beans. 

The important thing i was interested in knowing was :

"jaikiran" wrote : And you have the interfaces of the beans packaged in both the isolated EARs? 

Which you answered:

"kyle.bober" wrote : Yes, that is correct. 

So from what i see, this looks similar to EJBTHREE-1889 which we'll be fixing. 
>From what i have seen in that issue, i guess you do have a workaround for @Stateless beans. Instead of looking up the bean, try injecting it:

  | @Stateless
  | @LocalBinding(jndiBinding=IUserLocal.EJB_JNDI)
  | @RemoteBinding(jndiBinding=IUserRemote.EJB_JNDI)
  | public class Service2EJB implements IService2Local, IService2Remote {
  | 
  | @EJB (mappedName=IService1Remote.EJB_JNDI)
  | IService1Remote anotherBean;
  | 	
  | 	public void test() throws RemoteException {		
  | 		System.out.println("Remote Integer :: "+anotherBean.read());
  |  }





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

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



More information about the jboss-user mailing list