[ 
http://issues.apache.org/jira/browse/DERBY-803?page=comments#action_12430273 ] 
            
Fernanda Pizzorno commented on DERBY-803:
-----------------------------------------

I have tested the solution using the rollbackAndClose() method (semantically 
equal to the forceClose() method discussed in DERBY-1020) and it actually does 
not help avoiding any of the exceptions seen in this issue from happening.

The rollbackAndClose() method checks that the connection is open, rolls back 
and closes the connection synchronized on the connection. This does not prevent 
the exceptions from happening because the connection is being closed implicitly 
when the server shutdown stops the InternalDriver and/or the Database. Since 
the connection is being closed using its close method, the synchronization that 
was added does not prevent the connection from being closed by the shutdown 
(since that does not synchronize on the connection object).

In my opinion there are two possible solutions for this issue: (1) change the 
test so that the set of exceptions will either not happen or does not show in 
the diff; (2) distinguish the exceptions that happen because the server was 
shut down from those happening for other reasons (Kathey Marsden has enumerated 
the scenarios in DERBY-1020), and ignore those that happen because the server 
was shut down.

I think that (2) is a better solution, and I was wondering whether we can say 
that exceptions that happen during rollbackAndClose() can be considered as 
exceptions that happen due to a server shutdown iff (i)the connection is closed 
at the time the exception happens, and (ii)the session is being closed because 
the client left? For example, is there any other way to stop InternalDriver 
and/or the Database than a shutdown?

> derbynet/DerbyNetAutoStart.java test fails intermittently with 
> org.apache.derby.iapi.services.context.ShutdownException
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-803
>                 URL: http://issues.apache.org/jira/browse/DERBY-803
>             Project: Derby
>          Issue Type: Test
>          Components: Network Server, Regression Test Failure
>    Affects Versions: 10.2.1.0
>            Reporter: Kathey Marsden
>         Attachments: suggestion-803.diff, suggestion-803.stat
>
>
> DerbyNetAutoStart fails intermittently with the following diff:
> This issue is likely related to DERBY-1020
> ********* Diff file 
> derbyall/derbynetmats/DerbyNet/derbynetmats/DerbyNetAutoStart.diff
> *** Start: DerbyNetAutoStart jdk1.4.2 DerbyNet derbynetmats:derbynetmats 
> 2006-01-05 23:39:40 ***
> 1a2,3
> > org.apache.derby.iapi.services.context.ShutdownException: 
> >     at org.apache.derby.impl.drda.Session.close(Unknown 
> > Source)agentThread[DRDAConnThread_3,5,derby.daemons]
> Test Failed.
> *** End:   DerbyNetAutoStart jdk1.4.2 DerbyNet derbynetmats:derbynetmats 
> 2006-01-05 23:41:10 ***

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to