while working on Derby-694 I understood that Lob implemented Event
callback methods in the UnitOfWorkListener interface. The methods
public void listenToUnitOfWork();
public void completeLocalCommit(java.util.Iterator listenerIterator);
public void completeLocalRollback(java.util.Iterator listenerIterator);
There are three implementations of the UnitOfWorkListener interface Lob,Statement
and ResultSet. Each time an object of this type is created they are register themselves
to the connection by doing the following
when a End Unit of Work Condition (ENDUOWRM) Reply Mesage is received
(see line no 738 NetConnectionReply.java) signifying that the unit of work has ended as a
result of the last command
a completeLocalCommit() or a completeLocalRollback() is called. These methods are
also called in other places. Please refer Derby-694 for more background.
Since the primary problem as pointed out is
>"Well the lobs are freed on the server with commit/rollback, just not marked invalid on the client."
Could these method implementations in Lob.java be used to invalidate the Lob
(isValid=false) when a commit or a rollback happens?
Not sure, but maybe we need to call free() here.