wood burning stoves
The moose likes EJB and other Java EE Technologies and the fly likes Instance variables on MDB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Instance variables on MDB" Watch "Instance variables on MDB" New topic
Author

Instance variables on MDB

Doron Orbach
Greenhorn

Joined: May 05, 2002
Posts: 8
I know that mdb is stateless.
But, If I use instance variables just for
one invocation of the mdb, for saving me passing parameters to methods, is it ok, or the bean can be used again even if the onMessage method did not finish?
Priyank RASTOGI
Greenhorn

Joined: Mar 29, 2001
Posts: 6
One instance is used to serve one onMessage()... it is safe to use instance variables for a single invocation... but not safe to use these variables for multiple invocations as different invocations might be served by different instances...
Doron Orbach
Greenhorn

Joined: May 05, 2002
Posts: 8
Thanks
 
wood burning stoves
 
subject: Instance variables on MDB