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/522999#522999

Author  : Jerry Simone
Profile : http://community.jboss.org/people/jlsimone

Message:
--------------------------------------------------------------
In EJB2, you can pass the state to a stateful EJB using the home interface and 
the arguments that are defined for the ejbCreate method of the bean. This seems 
like it should be a simple thing do to, and I feel a little dumb asking the 
question, but how do you pass the state into an EJB3 stateful bean? All of the 
documentation that I have read so far assumes that the EJB creates its own 
state when the (no-arg) constructor is called. But in my case, the business 
logic of the application has already created a state (in the form of an object 
tree) that it needs to pass into the stateful bean. I have created what I 
consider a hack, which is to expose an "initialize" method in the remote/local 
interface. The initialize method  sends the state to the EJB in the arguments 
of the method arguments. What are the better options for doing this?
--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/522999#522999


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to