Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Android Security Essentials Live Lessons this week in the Android 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB 2- Stateless session bean problem
 
Similar Threads
What does remove() means for a stateless session bean?
Pro JPA 2 - Question
Change Stateful session bean to stateless
Is the Bean Pool a model for our after life?
Setting the Transaction Time