Hi Ravi,

I can't find significant changes between 0.98 and 1.0.x. The main change
is, that the target object of the AfterLookupEvent Object was
immediately nullified after fire the event (because for better
performance OJB reuse the AfterLookupEvent Object and therefore the target object of the event will be nullified after the "fireEvent" method return).

class RsIterator:
// materialize object
...
// lookup reused event object and set current object as target
getAfterLookupEvent().setTarget(obj);
// fire event
getBroker().fireBrokerEvent(getAfterLookupEvent());
// nullify the target object to prepare event instance for reuse
getAfterLookupEvent().setTarget(null);
...

Thus, if you queue the AfterLookupEvent objects you will run into problems, e.g. NPE when try to use the target object. In this case you should store the target object in a separate "queue object" when the event is fired.

regards,
Armin


Ravi wrote:
Hello !

We are using OJB 0.9.8 for last two years and now when I upgrade it to OJB 1.0.3, I get nullPointerExceptions in our application.

After de-bugging a bit, I found that the afterLookUp() of PersistenceBrokerAware objects being called before other objects are materialised.

Not sure what has changed in this release that is causing this problem.
Can you please help?

Regards

Ravi




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to