Re: Re-entrant EntityBeans
John Harby <[email protected]> Tue, 17 Feb 2004 15:04:14 +0000
| Newsgroups | gmane.comp.java.sun.ejb.general |
|---|---|
| Message-ID | <[email protected]> |
Some of us were once playing around with the introduction of a semaphore/locking concept for components. The component itself would contain an array of "switches" of sorts to enable fine-grained lock management. >From: Doug Bateman <[email protected]> >Reply-To: Doug Bateman <[email protected]> >To: [email protected] >Subject: Re: Re-entrant EntityBeans >Date: Mon, 16 Feb 2004 14:37:29 -0700 > >On Thu, 5 Feb 2004 11:31:06 +0530, Alok_Band <[email protected]> wrote: > > > >What are anomalies of Re-entrant EntityBeans? > >Excellent question. > >According to the EJB Specification (EJB 2.0 Spec, Section 10.5.11, Page >189), the real danger appears when there is a chance that 2 seperate >threads, each part of the SAME transaction, attempted to use the same >entity at the same time, which could lead to nasty race conditions. The >EJB container may not be able to distinguish between this scenerio and a >reentrant scenerio. The operative piece here is that for this scenerio to >occur, the two threads must share a transaction context (otherwise the >container could detect the condition and prevent it). > _________________________________________________________________ Dream of owning a home? Find out how in the First-time Home Buying Guide. http://special.msn.com/home/firsthome.armx =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [email protected] and include in the body of the message "help".