aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB 2- Stateless session bean problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB 2- Stateless session bean problem" Watch "EJB 2- Stateless session bean problem" New topic
Author

EJB 2- Stateless session bean problem

Baskar Sikkayan
Greenhorn

Joined: Oct 06, 2011
Posts: 16
Hi,
We have one EJB bean in our Application which is Stateful and we are facing many issues in production as the bean gets destroyed when it moves to passivation.
So we thought of changing it to stateless. As we have few instance variables in the EJB bean, changing it to stateless causing problem(kind of thread problems).
Now, we want it to be stateless but there shouldnt be any other problem. Could you please suggest me any other solution?

Thanks,
Baskar.S
Kumaravadivel Subramani
Ranch Hand

Joined: Jul 05, 2008
Posts: 166

What are the problems you have faced on ?


No pain, No gain.
OCJP 1.6
Baskar Sikkayan
Greenhorn

Joined: Oct 06, 2011
Posts: 16
When it was stateful, the values were null once the bean gets destroyed.
After changing it to stateless, the instance variables values seems to be the one that was set in the last request.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EJB 2- Stateless session bean problem