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

Stateful and entity bean must be in a TX?

 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stateful and entity bean must be in a TX?
Because the TX attributes that Stateful and entity bean can use are Require, RequireNew and Mansdatry only. I assume all Stateful and entity bean must be in a TX.right?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No you can have them without Transactions if you wish.
Mark
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you expain?
By the way, what do you mean by "If you can read this then you are too close. "?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An obvious example of an Entity Bean that is not involved in a transaction is a Read-Only Entity (which most app servers support). It makes no sense to throw in the added overhead for transactioning when you are only reading a snapshot of data.
An example of a non-transactional Stateful Session Bean is the typical Shopping Cart. If you don't implement it as an HttpSession but rather as a Stateful Session Bean it is doubtful you would want it involved in a transaction at any point except for checkout.
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can I specify the TX attribute in DD of entity bean? leave it blank?
[ April 03, 2002: Message edited by: Win Yu ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you don't incude it in the DTD. It is an optional tag.
The meaning of my Signature is taken from a car bumper sticker. Hence the funniness of it being out of place in my posts. It makes sense if you are in a car following my car that has that bumper sticker, because then it actually means that you are following my car too closely. But of course with posts you are not following, so it makes no sense, therefore funny. At least I hope.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic