JBoss Community

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

created by Christian Groove in EJB3 - View the full discussion

Salut 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

Start a new discussion in EJB3 at Community