Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Instance variables in MDB

 
Viktor Sadovnikov
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The EJB 2.0 specs state
A message-driven bean instance has no state for a specific client. However, the instance variables of the
message-driven bean instance can contain state across the handling of client messages. Examples of
such state include an open database connection and an object reference to an EJB object.

The table with allowed operations in the same specs tells that "Enterprise bean access" is possible from onMessage() only. Do you know how and when to get the reference to a session bean object and keep during the MDB life-time?
Thanks, Viktor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic