Hello,
I try to register a
PostUpdateEventListener via the hibernate.cfg.xml. Everything works fine but some values I get with the
PostUpdateEvent object are at least strange.
The one thing which is most critical to my intended use is the
getOldState method always returns null. I searched around and found other places where people ran into the same issue but without a hint to a solution.
This must be working somewhere - but there seems to be a certain setup where this does not work. Also JavaDoc unfortunately is quite thin in this area. Might be I just miss the right pointer?
Also the timestamp returned from
PostUpdateEvent#getSession()#getTimestamp() should be 'System time before the start of the transaction' returns a strange (far to low) value, at least when I interpret it as
milliseconds since 1970. This is not critical to me but it might be a hint to the issue.
I can not say much about the other fields except that the PostUpdateEvent#getState() seems to be populated as expected as the PostUpdateEvent#getPersister() returns (at least some) valid data.
I'm using Hibernate 3.2.6.GA in a IBM Websphere 6.0.2 on a 1.4.2 IBM JDK with a jta based session context backed by an Oracle 10g. The issue also occurs in the test setup where ThreadLocalSessionContext is used.
Any hint is welcome,
Kind Regards, Andreas.