|
|
|
|
![]() ![]() |
Mar 3 2005, 10:54 AM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 3 Joined: 3-March 05 Member No.: 2,870 |
Hi All,
there's a question on ejb that i need to ask, the question is as follows: Is it necessary for an entity bean to protect itself against concurrent access from multiple transactions? Regards, Leo This post has been edited by microscopic^earthling: Apr 19 2005, 04:01 PM |
|
|
|
Mar 3 2005, 12:03 PM
Post
#2
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 21 Joined: 2-March 05 From: Auckland, New Zealand Member No.: 2,849 |
Hope this answers your question:
QUOTE In Entity bean deployment descriptor, we can define whether the bean is-reentrant or non-reentrant. If we define the entity bean as being reentrant, multiple clients can connect to the Entity bean & execute methods within the entity bean concurrently. Container takes care of synchronization. If we define the entity bean as non-reentrant and many clients connect to it concurrently to execute a method, exception is thrown. Read complete discussion: http://www.jguru.com/faq/view.jsp?EID=35269 |
|
|
|
May 14 2005, 04:39 PM
Post
#3
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 27 Joined: 14-May 05 From: Hong Kong Member No.: 5,054 |
For transaction control in entity bean, it depends on whether you use CMT or BMT. If you use CMT (container-managed transaction), you need to write deployment descriptor on the concurrency access model for the container to use. This setting haven't specified in EJB spec, so it is now container specific (Websphere, Weblogic, JBoss... all use different descriptor syntax to deal with this). If you use BMT, you need to control it using JTA UserTransaction object, which is obtained from JNDI.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th December 2008 - 11:51 AM |