Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Entity Bean Container Responsibility

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic