Hello,

I now have spent a lot of time debugging 2 batch processing.
First processing creates a simple 1-n couple of object (consider that class
UnityCar refers a class Unity with 1-n relation) . Creation is done like
this :

- tx.begin()
- Unity u = new Unity()
- tx.lock(u, Transaction.WRITE);
- UnityCar uc = new UnityCar();
- uc.setUnity(u);
- tx.lock(uc, Transaction.WRITE);
- tx.commit();

Note that we have wrotten a lot a code working perfectly like this one.
Chance !

My problem occurs when a second processing read a Unity class. With the
auto-retrieve of the collection ( we need cache speed),  OJB should send me
a collection of 1 UnityCar, but it do this only a good while after first
processing !! Immediately after first processing, I have
NullPointerException getting the collection unityCars. I known that my
object is bad-loaded (no collection on unity.getUnityCars() ) and if a wait
( a probably cache expiration ) , that same objet is right loaded, with the
good collection !!

I tried a lot of solutions :
- mark first created object dirty with markDirty. No way.
- reload object (with getByIdentity)  after materialization. No way.
- checkpoint and reload. No way.
- restart. Yes of corse it works. But i definitely can't !!

-hum, does i have severals objects, many as Transactions !!? after commit ,
no ??

Working with OJB Version 1.0.1. I known it's old, but it works not so bad
for all we all have done at this day.

Does someone can explain that ? Help !!
Migration to 1.0.3 ? to 1.0.4 ?! Which one ? what is supposed to be
rewrotten ?

Thanks a lot to help me.


Sorry for my poor bad english.

Reply via email to