Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client Responsibilities?

 
Simon Ingram
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Spec 21.5 defines the following rule:
if transactional requests within a single transaction arrive from multiple clients (this could happen if there are intermediary objects or programs in the transaction call chain), all requests within the same transaction must be associated with the same security context


My question here is how can requests from multiple clients occur within the same transaction? A transaction is owned by a client. How can other clients get inside my transaction?

If the bean calls two methods (A and B) one after the other and the bean is being accessed by multiple clients, each client will call both methods. Are we saying that if client 1 calls method A, client 2 may then call method B and if the method attribute of B is Required, that method B occurs within the same transaction as method A?

Also, I am assuming that the bean can only be an entity bean, since this is the only been that allows concurrent access by multiple clients.

Is this understanding correct?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was actually a great discussion on this about a month or so ago. The term somebody came up with was that of a "pink" bean. A pink bean is one that was involved in attempting to be invoked by a client, but is already involved in an open transaction by the same client. Think in terms of trans-attribs like "RequiresNew", etc.

You can search the past forum posts to find it.
 
Simon Ingram
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nathaniel,

I searched for "pink bean" couldn't find anything. Any idea on what to search for?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/159374/java-EJB-SCBCD/certification/clarification-transaction

Also, here is a topic on nested transactions:
http://www.coderanch.com/t/314143/EJB-JEE/java/EJB-Transaction-Rollback-JBDC
[ June 07, 2004: Message edited by: Roger Chung-Wee ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic