• Post Reply Bookmark Topic Watch Topic
  • New Topic

Re-Entrant  RSS feed

 
Mohammad Jaber
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

What Exactly is the Definition of "Re-Entrant" on Stateless Session Bean (EJB 3.0) , and if Session A lookups during execution an Instance of Session A again , does this considered "Re-Entrant" , and is this BAD design and why !!??

Thanks
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Re-entrancy is when an instance of an object that is being invoked already exists on the call stack. Put another way, a method of that object has not yet completed, but has called out to another object and somewhere down in the calling sequence a call has been made back to the original blocked object.

It is generally quite difficult to actually get yourself into a re-entrant condition with stateless session beans, but if you do then the container should throw a ConcrrentAccessException. Simply looking up another bean of the same type is not re-entrancy. It is not necessarily good design, but because it will result in a new instance of the same bean type it will not be re-entrant.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!