Hi David,

You can do this, but you must invoke the method through a local reference to the bean obtained from the session/entity context that is passed to you in setSession/EntityContext of the EJB.

See javax.ejb.SessionContext.getEJBLocalObject and javax.ejb.EntityContext.getEJBLocalObject.

Cast the result of one of these calls to your local interface type and invoke the method.


Steve Coy



On Wednesday, August 6, 2003, at 05:07 PM, Davide Pozza wrote:


Hi all
I have a little question about the transaction attributes that an ejb
method can have; I know that if my BeanA has a method getA() with
RequiresNew attribute and my beanB invokes it (acting as a client for
BeanA), a new transaction starts for the duration of the getA()
execution.

But does the same thingh happen if the same BeanA calls getA() from
another method calculateA()? Can an EJB act as a client of itself ?

Thanks in advance

Davide




------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to