Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 2- Stateless session bean problem

 
Baskar Sikkayan
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 171
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the problems you have faced on ?
 
Baskar Sikkayan
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic