[ http://issues.apache.org/jira/browse/DERBY-273?page=comments#action_12313462 ]
Tomohito Nakayama commented on DERBY-273: ----------------------------------------- Regarding modify-1, there was a wrong guess in my previous thought. I thought database was shutdown before closing connection , then connection remains in the dataSourcePermissions test. However, I found connection was closed before shutting down database in the test. To know why connection remains, I read the code around DRDAConnThread. http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java In last part of DRDAConnThread#run() , I found closing connection at server was caused by DRDAProtocolException that stands for disconnection. This exeption was caused in DDMReader and DDMWriter , calling DRDAConnThread#markCommunicationsFailure when catching IOException. http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java I guess client close the connection one-sidely and DRDAProtocolException representing disconnection happens in server , and rollback and close connection at server follows . Because client is one-side player , client doesn't know wheter server finished work of closing connection . Then ... how to ensure finishing closing connection before shutting down database ...? > The derbynet/dataSourcePermissions_net.java test fails intermittently > --------------------------------------------------------------------- > > Key: DERBY-273 > URL: http://issues.apache.org/jira/browse/DERBY-273 > Project: Derby > Type: Bug > Environment: 1.4.2 JVM (both Sun and IBM) > Reporter: Jack Klebanoff > Assignee: Tomohito Nakayama > > The test fails in the derbyall/derbynetclientmats/derbynetmats suite stack > with the following diff: > *** Start: dataSourcePermissions_net jdk1.4.2 DerbyNetClient > derbynetmats:derbynetmats 2005-05-11 04:24:11 *** > 17a18,19 > > org.apache.derby.iapi.services.context.ShutdownException: > > agentThread[DRDAConnThread_2,5,derby.daemons] > Test Failed. -- 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