|
The
object is the same instance.
I
first tried AutoStore to true but it didn't work.
Basically what we are doing is importing data from a
system, data comes in the form of xml files.
These
XML files contain update/add/change records. Each file is processed within
one transaction.
There
is one main EJB method that is the main loop and calls 2 or 3 other EJBs to
insert/update/delete as dictated by the xml file.
Each
EJB uses a castor utility class that contains the JDO object as a static
member.
I've
tried a very simple case, 2 ejbs say A and B.
EJB B
has one method: UpdateRecord(Object foo)
UpdateRecord gets the an object from castor using a
castor utility.find(String query) method.
It
then sets all the properties of foo to this object obtained from castor. If have
verified that the object returned by the query is the same if called multiple
times for the same key.
EJB A,
creates 2 Objects with the same properties, and calls B.UpdateRecord()
twice. The second fails.
We are
using oracle and have our database in JNDI, and connectionPooling is set to
true.
Everything works if I comment out this
line:
throw
new DuplicateIdentityException( "update object which is already in the
transaction" ); in TransactionConext.java.
We
have imported over 700 files so far and have had no data problems with this
fix.
|
Title: Issue with 2 updates on a record in the same transaction...
