Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4C9710CAF for ; Fri, 18 Oct 2013 13:53:20 +0000 (UTC) Received: (qmail 5262 invoked by uid 500); 18 Oct 2013 13:53:20 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 5190 invoked by uid 500); 18 Oct 2013 13:53:18 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 5170 invoked by uid 99); 18 Oct 2013 13:53:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Oct 2013 13:53:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Oct 2013 13:53:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A94A9238899C; Fri, 18 Oct 2013 13:52:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1533453 - in /db/derby/docs/trunk/src: devguide/cdevbabejgjd.dita devguide/tdevdvlp20349.dita devguide/tdevdvlp40464.dita ref/rrefattrib16471.dita ref/rrefattribderegister.dita Date: Fri, 18 Oct 2013 13:52:51 -0000 To: derby-commits@db.apache.org From: chaase3@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131018135251.A94A9238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chaase3 Date: Fri Oct 18 13:52:51 2013 New Revision: 1533453 URL: http://svn.apache.org/r1533453 Log: DERBY-6239 Document optional permission SQLPermission("deregisterDriver") Modified 2 Reference Manual topics and 3 Developer's Guide topics. Patch: DERBY-6239-2.diff Modified: db/derby/docs/trunk/src/devguide/cdevbabejgjd.dita db/derby/docs/trunk/src/devguide/tdevdvlp20349.dita db/derby/docs/trunk/src/devguide/tdevdvlp40464.dita db/derby/docs/trunk/src/ref/rrefattrib16471.dita db/derby/docs/trunk/src/ref/rrefattribderegister.dita Modified: db/derby/docs/trunk/src/devguide/cdevbabejgjd.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevbabejgjd.dita?rev=1533453&r1=1533452&r2=1533453&view=diff ============================================================================== --- db/derby/docs/trunk/src/devguide/cdevbabejgjd.dita (original) +++ db/derby/docs/trunk/src/devguide/cdevbabejgjd.dita Fri Oct 18 13:52:51 2013 @@ -161,6 +161,14 @@ JDBC driver (by granting it to d derbyclient.jar) and to the application code that calls Connection.abort(). Do not grant this permission to application code unless you are certain that only superusers can invoke the code. + +
permission java.sql.SQLPermission "deregisterDriver";
+
Allows to +deregister the driver. This permission is needed for system shutdown only on the +Java SE 8 platform and higher, if system shutdown is invoked without the +deregister=false connection URL attribute (see the + for details). +
Combining permissions

You might grant one FilePermission that Modified: db/derby/docs/trunk/src/devguide/tdevdvlp20349.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/tdevdvlp20349.dita?rev=1533453&r1=1533452&r2=1533453&view=diff ============================================================================== --- db/derby/docs/trunk/src/devguide/tdevdvlp20349.dita (original) +++ db/derby/docs/trunk/src/devguide/tdevdvlp20349.dita Fri Oct 18 13:52:51 2013 @@ -41,6 +41,10 @@ Shutting down instance a816c00e-0139-bfe database directory C:\sampledb with class loader sun.misc.Launcher$AppClassLoader@9931f5 ---------------------------------------------------------------- +

If you are running with a security manager on JDK 8 or higher, you must grant + permission to +deregister the embedded driver in order to fully shut down the system. See + for details.

Typically, an application using an embedded engine shuts down just before Modified: db/derby/docs/trunk/src/devguide/tdevdvlp40464.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/tdevdvlp40464.dita?rev=1533453&r1=1533452&r2=1533453&view=diff ============================================================================== --- db/derby/docs/trunk/src/devguide/tdevdvlp40464.dita (original) +++ db/derby/docs/trunk/src/devguide/tdevdvlp40464.dita Fri Oct 18 13:52:51 2013 @@ -34,6 +34,10 @@ down Derbyusing database conn jdbc:derby:;shutdown=true

A successful shutdown always results in an SQLException to indicate that has shut down and that there is no other exception.

+

If you are running with a security manager on JDK 8 or higher, you must grant + permission to +deregister the embedded driver in order to fully shut down the system. See + for details.

If you have enabled user authentication at the system level, you will need to specify credentials (that is, username and password) in order to shut down a system, and the Modified: db/derby/docs/trunk/src/ref/rrefattrib16471.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefattrib16471.dita?rev=1533453&r1=1533452&r2=1533453&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rrefattrib16471.dita (original) +++ db/derby/docs/trunk/src/ref/rrefattrib16471.dita Fri Oct 18 13:52:51 2013 @@ -43,8 +43,9 @@ if and only if you do not specify a d shutting down a single database, it lets perform a final checkpoint on the database.

When you are shutting down a system, it lets perform a -final checkpoint on all system databases, deregister the JDBC driver, and -shut down within the JVM before the JVM exits. A successful shutdown always +final checkpoint on all system databases, deregister the JDBC driver (if +permitted; see deregister=false), +and shut down within the JVM before the JVM exits. A successful shutdown always results in an SQLException indicating that has shut down and that there is no connection. Once is shut down, you can restart it by reloading the driver. For details on restarting DriverManager with a shutdown=true attribute raises an exception.

Combining with other attributes

This attribute may be combined with the -deregister=true +deregister=false attribute.

When you shut down a database, if authentication is turned on, you must specify this attribute in conjunction with the JDBC driver from the DriverManager after a shutdown, so that the classes can be garbage-collected.

+

If you are running with a security manager on JDK 8 or higher, you must grant +the following permission to derby.jar to allow the JDBC driver to be +deregistered:

+permission java.sql.SQLPermission "deregisterDriver"; +

See "Granting permissions to +" in the + for details. If you do not grant +this permission when using a security manager, an error message and stack trace +will appear in derby.log on shutdown, and the embedded JDBC driver +will remain registered.

+

If you are running with a security manager on JDK 7 or earlier, you do not +need to set this permission.

You initially register the embedded driver by doing one of the following:

  • Call the method