[jboss-user] [EJB3] - Re: Is it possible to attach an object to active stateless session bean

Christian Groove do-not-reply at jboss.com
Sat Jan 22 08:35:59 EST 2011


Christian Groove [http://community.jboss.org/people/TheGroove] created the discussion

"Re: Is it possible to attach an object to active stateless session bean"

To view the discussion, visit: http://community.jboss.org/message/582499#582499

--------------------------------------------------------------
Salut Ilya,

thanks for your immediate reply.

Maybe you misunderstood me or (possible) my description was not
clear enough. The obhect should only be accessible whiile the 
session-ejb method is running. When the EJB invocation is finished
an the control flow will go back to the caller, the assigned object
gets invalid.

There is nothing to save between two call,. therefore the stateful session
bean would be a overcastet. 

=>1)
The object might get assigned, when a request will call an EJB method.
Image your EJB-method saveContract has been invoked. In series some
other methods are called where one will try to get the assigned object
by calling.
     SessElm.getMyObject().

In other words: You may also abuse me, not to  pass a ctx handle as
a parameter for each subsequent method invocation !!!

=>2) Since the assigned objects lifetime is limited to the duration of
a EJB-sesssion-method, there is no demmand for a cluster safe solution.

3) It should run also on other app servers
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/582499#582499]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110122/4e2ebb3f/attachment.html 


More information about the jboss-user mailing list