db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.Narayanan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3574) With client, attempting to get the lob length after commit or connection close if there was a call to length() before commit does not throw an exception
Date Tue, 08 Apr 2008 06:09:24 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586667#action_12586667
] 

V.Narayanan commented on DERBY-3574:
------------------------------------

while working on Derby-694 I understood that Lob implemented Event
callback methods in the UnitOfWorkListener interface. The methods
are 

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

agent_.connection_.CommitAndRollbackListeners_.put(this,null);

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.

> With client, attempting to get the lob length after commit  or connection close if there
 was a call to length() before commit does not throw an exception
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3574
>                 URL: https://issues.apache.org/jira/browse/DERBY-3574
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client, Newcomer
>    Affects Versions: 10.5.0.0
>            Reporter: Kathey Marsden
>            Assignee: Tiago R. Espinha
>            Priority: Trivial
>         Attachments: derby-3574.patch, TestLobLength.java
>
>
> Attempting to get call Blob/Clob.length() after commit or connection close does not fail
if there was a previous call to length().  If no previous call was made an exception is thrown
as expected.
> See attached program TestLobLength for repro with commit.  If you comment out the two
lines to get the length before the commit we get the expected exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message