[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 14:57:52 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/582522#582522

--------------------------------------------------------------
Salut  http://community.jboss.org/people/ilya40umov Ilya

> 1) How much time is your method going to be executed?
frequently

> 2) Do you need this object to be accessible from another ejbs?

no. The object assignment is needed for one method. The method
is acting like a basket, where subsequent calls of that method put
in an drop some things.
Outside of the bean and outside of this window this specific object
assinment ist not used.

>3) Are you going to use this object as a status of your method execution?
>it is only used inside the execution of the methode, so it does not have
>a state in the way you would have one wiht stateful session beans.

> P.S. EJB is designed to be thread safe and easy for clustering. I think 
> that your solution is going to break these things. And even if you will 
> find a workaround I guess that it can cost you a lot of time in the future.

It does not, cause the object assignment will be dissolved when the
control flow leaver my code and will never be reestablished.
--------------------------------------------------------------

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

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/e4beffd6/attachment.html 


More information about the jboss-user mailing list