� It is the responsibility of the Container to throw the java.lang.IllegalStateException
if an attempt is made to modify a container-managed collection corresponding to a multivalued
cmr-field using the java.util.Collection API outside of the transaction
context in which the collection object was initially materialized.
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
What is meant by "the transaction context in which the collection object was initially materialized?"
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
I suppose it will be my birthday in France(you are in France, aren't you) before America.
I'm still a little confused. Why can the collection be modified in a new transaction context? For example,
- a collection is created in transaction context A
- transaction context A completes
- transaction context B initiates
- why can't the collection be modified now? It is in a valid transaction context.
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
• It is the responsibility of the Container to throw the java.lang.IllegalStateException
if an attempt is made to modify a container-managed collection corresponding to a multivalued
cmr-field using the java.util.Collection API outside of the transaction
context in which the collection object was initially materialized.
Why is it mandetory that reading a multivalued cmr-field collection has to be in a transaction? I think the readonly access shd be allowed w/o the transaction.
Why is it mandetory that reading a multivalued cmr-field collection has to be in a transaction? I think the readonly access shd be allowed w/o the transaction.
--------------------------------------------------------------------------------
Because what's you read must be in synch with the DB. And as synchronization with the DB happens within transactions...
Originally posted by Keith Rosenfield:
This point is unclear to me. What is meant by "the transaction context in which the collection object was initially materialized?" Can you describe a scenario where this might happen. Why is this not permitted?
Reid - SCJP2 (April 2002)
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
|