aspose file tools*
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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Instance variables on MDB
 
Similar Threads
MDB on error
instance variables in MDB
MDB in connection pool
MDB synchronize onMessage
MDB and Stateless session bean combination