dcsimg
Where can we use getEJBObject in Session Bean?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Deepak_Kalra
Posted On:   Sunday, March 7, 2004 07:41 AM

Hi All, I am having Session Bean A which calls Session Bean B method.I am also passing the Remote reference from Session Bean A to method of Session Bean B. When I am trying to call Session Bean A method from Session B, Its giving me an error. Session Bean A TraderBean { UserInfo.verify(param1, (Trader) ctx.getEJBOject()) } Trader{ methodofA() } Session Bean B UserInfoBean { verify(param, Trader trader) //Error Point    More>>

Hi All, I am having Session Bean A which calls Session Bean B method.I am also passing the Remote reference from Session Bean A to method of Session Bean B. When I am trying to call Session Bean A method from Session B, Its giving me an error.






Session Bean A




TraderBean {





UserInfo.verify(param1, (Trader) ctx.getEJBOject())






}




Trader{




methodofA()




}






Session Bean B




UserInfoBean {




verify(param, Trader trader)




//Error Point



trader.methodofA()

}






Now I know loopback call is not possible in case of Session Bean.Then where can we use getEJBObject() ??

   <<Less

Re: Where can we use getEJBObject in Session Bean?

Posted By:   R_H  
Posted On:   Friday, March 19, 2004 05:15 PM

You must declare that B will reference A too. ( define reference in ejb-jar.xml ). But best way is declare it, and lookup again - if both objects are stateless.
About | Sitemap | Contact