When I try to do like the code below, I get this error:
com.evermind[Orion/1.5.2 (build 10460)].server.rmi.OrionRemoteException:
Recursive call to non-reentrant bean
Is there any other way to do this? I don't want to invoke the methods
directly, since I want to make use of container managed transactions.
/**
* @ejb:ejb-name Foo
* @ejb:stateful-session
*/
public class FooBean extends SessionBean
{
private Foo me;
/**
* @ejb:create-method
*/
public void ejbCreate()
{
me = (Foo)PortableRemoteObject.narrow(
sessionContext.getEJBObject(),
Foo.class);
}
/**
* @ejb:remote-method
*/
public void foo()
{
// do something interesting
me.bar();
// do something interesting
}
/**
* @ejb:remote-method
*/
public void bar()
{
// do something interesting
}
}