[ 
https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lily Wei updated DERBY-2905:
----------------------------

    Attachment: DERBY-2905_part2_2_2.diff

Thanks Dag for reviewing the patch.

I read through the latest patch, some small nits and possible a test bug: 

* In AutoloadedDriver, typo in new comment: 
  > //This flag is set is deregister attribute is set by user, 
                     ** "if" instead of second "is" 
  > //default is true (DERBY-2905) 
>>I change the typo in DERBY-2905_part2_2_2.diff
  
  Better insert space after "//" too, for readability. 
  If I understand this correctly, if the default is "true", a more 
  correct comment would perhaps be: 

  "This flag is true unless the deregister attribute has been set to 
  false by the user (DERBY-2905)." 
>>Add the space and change the commend.

* InternalDriver, new comment: 
   
  > // DERBY-2905, allow users to provide deregister attribute to 
  > // left AutoloadedDriver in DriverManager, default value is true 

  "left AutoloadedDriver" -> "leave AutoloadedDriver registered" 
>>Change the comment in the new patch.

* AutoloadTest 

  Typo in comment: 

  > * the AutoloadDriver is dergistered from DriverManager. 
                                            *** "dergistered" 

>>Change in the patch
  This looks like a test bug: 

  > //Case 1: Test the deregister attribute error 
  > JDBCDataSource.setBeanProperty(ds, "connectionAttributes", 
  > "shutdown=true;deregiste=false"); 
                             ** missing "r" in "deregister" ? 
>>This is the desire test. The typo is by design. I believe the behavior is 
>>expected.
When I run in ij, I got:
ij> connect 'jdbc:derby:system/wombat;shutdown=true;deregiste=false';
URL Attribute [deregiste=false]
   Attribute is unknown to Derby.
ERROR 08006: Database 'system/wombat' shutdown.

  The extraneous blank inside "true" below looks suspicious, not sure 
  if it works as expected: 
  
  > JDBCDataSource.setBeanProperty(ds, "connectionAttributes", 
  > "shutdown=tru e;deregister=false"); 
                     *** "tru e" 
>>The space is taking out with the new patch.


> Shutting down embedded Derby does not remove all code, the AutoloadDriver is 
> left registered in the DriverManager.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2905
>                 URL: https://issues.apache.org/jira/browse/DERBY-2905
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.1.3
>            Reporter: Daniel John Debrunner
>            Assignee: Lily Wei
>         Attachments: DERBY-2905-2.diff, DERBY-2905_1.diff, DERBY-2905_3.diff, 
> DERBY-2905_part2_1.diff, DERBY-2905_part2_2.diff, DERBY-2905_part2_2_1.diff, 
> DERBY-2905_part2_2_2.diff, DERBY-2905v0.diff, DERBY-2905v0.stat, 
> DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, 
> Main.java, Mainv1.java, Repro2905.java, ww.java
>
>
> After a shutdown of the embedded driver the AutoloadDriver is not 
> unregistered from DriverManager. However it does not support any future 
> loading of connections so it has no value in remaining registered. Since the 
> DriverManager class will remain forever, this means the Derby code will 
> remain forever in the JVM, even if Derby was loaded by a separate class 
> loader.
> Regression from 10.1 since before the AutoloadedDriver the internal driver 
> did unregister itself from the DriverManager on a shutdown.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to