[jboss-dev-forums] [Design of EJB 3.0] - Re: Accessing stateful session beans from stateless session

winterer do-not-reply at jboss.com
Tue Jul 3 08:07:30 EDT 2007


(At least) since JBoss 4.2.0.GA, it is possible to query and return the remote interface of an existing (stateful) session bean:

@Stateful
  | @Remote( { MyRemoteInterface.class })
  | public class MyStatefulSessionBean implements MyRemoteInterface, MyLocalInterface {
  | 
  |   //... any remote/local methods ...
  | 
  |   // method defined in MyLocalInterface:
  |   public MyRemoteInterface getRemoteInterface() {
  |     Object obj = ctx.getBusinessObject(MyRemoteInterface.class);
  |     return (MyRemoteInterface)obj;
  |   }
  | }
  | 

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

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



More information about the jboss-dev-forums mailing list