[ http://issues.apache.org/jira/browse/DERBY-930?page=all ]

Rick Hillegas updated DERBY-930:
--------------------------------

    Attachment: ClassloadingTest.jar

I have attached a jarred up experiment which demonstrates a 
SecurityManager-induced classloading issue which results in the silent failure 
to autoload the jdbc driver. The autoloading logic is using the thread context 
class loader to look in the classpath for all resources with the name 
META-INF/services/java.sql.Driver. If you run with a SecurityManager, the 
thread context class loader only finds one META-INF/services/java.sql.Driver, 
namely, the one in the jar file which contains the calling code. However, if 
you don't run with a SecurityManager, then the thread context class loader 
finds many META-INF/services/java.sql.Driver(s), one in each jar file on the 
classpath.

The experiment contains the following files:

o A.jar - Jar file holding the calling program and its own 
META-INF/services/java.sql.Driver
o B.jar - Jar file containing another META-INF/services/java.sql.Driver
o AB.policy - Security policy for both jar files
o autoloadslim - Driving script which runs the application both with and 
without a SecurityManager
o AutoloadClassloader.java - The application which looks for 
META-INF/services/java.sql.Driver using the thread context class loader


> Add support for autoloading of Derby client drivers
> ---------------------------------------------------
>
>          Key: DERBY-930
>          URL: http://issues.apache.org/jira/browse/DERBY-930
>      Project: Derby
>         Type: New Feature
>     Reporter: Rick Hillegas
>     Assignee: Rick Hillegas
>  Attachments: ClassloadingTest.jar, bug930.diff, bug930_problem.diff, 
> bug930_problem2.diff
>
> Write Derby's driver names into the correct spot in derby.jar and 
> derbyclient.jar so that the 1.6 vm autoloads Derby drivers. Section 10.2.1 of 
> the JDBC4 spec describes the details.

-- 
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