• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Entity Bean Container Responsibility

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Reference EJB 2.0 Final Release
Page: 167
2'nd bullet


2'nd bullet (line 5,6,7) --> IF the container managed collection is returned as the result of local interface method with transaction attribute RequiresNew, and the client atempts to access the collection, the Container must throw the IllegalStateException.
I don't really understand why this should happen? Can someone exlplain this?
[ May 06, 2004: Message edited by: Santosh Ram ]
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IF the container managed collection is returned as the result of local interface method with transaction attribute RequiresNew, and the client atempts to access the collection, the Container must throw the IllegalStateException.
---------------------------------------------------------------------------------------------
For sure...the Container must throw the IllegalStateException.
Transaction attribute RequiresNew specifies that the called method starts a new transaction and the calling methods transaction is suspended until the called method transaction is completed. So Client cannot acess the collection.
Praveena
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My reading of this is that the problem arises because the cmr-field always runs in a transaction which is different to the calling transaction (because the transaction attribute is RequiresNew).
If I am correct, then should the calling method be in a transaction and if the cmr-field is run with the transaction attribute Required, Mandatory or Supports, then there would be no exception thrown.
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic