User development,
A new message was posted in the thread "How to initialize the State of an EJB3
Stateful Bean":
http://community.jboss.org/message/524703#524703
Author : Carlo de Wolf
Profile :
http://community.jboss.org/people/wolfc
Message:
--------------------------------------------------------------
Unless you go down the road of creating an EJB 2.1 view with a home interface with the
appropriate create methods, your 'hack' is the actual solution.
On lookup you get an 'empty' stateful bean which you need to fill in any way
confortable with you. If you want you can even create a regular create method which
mimicks the home interface:
interface MyRemote {
MyRemote create(String state);
}
class MyBean implement MyRemote {
MyRemote create(String state) {
this.state = state;
return ctx.getBusinessObject(MyRemote.class);
}
}
The only important thing to remember is that the initial lookup associates your stateful
session, instead of a create call on a (home) interface.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/524703#524703