db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
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 GMT
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 <codeph>d
 <codeph>derbyclient.jar</codeph>) and to the application code that calls
 <codeph>Connection.abort()</codeph>. Do not grant this permission to application
 code unless you are certain that only superusers can invoke the code.</dd>
+</dlentry><dlentry>
+<dt>permission java.sql.SQLPermission "deregisterDriver";</dt>
+<dd>Allows <ph conref="../conrefs.dita#prod/productshortname"></ph> 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
+<i>deregister=false</i> connection URL attribute (see the
+<ph conref="../conrefs.dita#pub/citref"></ph> for details).
+</dd>
 </dlentry>
 </dl> </section>
 <section><title>Combining permissions</title><p>You might grant one
<i>FilePermission</i> 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 
 ----------------------------------------------------------------</codeblock>
+<p>If you are running with a security manager on JDK 8 or higher, you must grant
+<ph conref="../conrefs.dita#prod/productshortname"></ph> permission to
+deregister the embedded driver in order to fully shut down the system. See
+<xref href="cdevbabejgjd.dita#cdevbabejgjd"></xref> for details.</p>
 <p>Typically,
 an application using an embedded <ph conref="../conrefs.dita#prod/productshortname"></ph>
engine
 shuts down <ph conref="../conrefs.dita#prod/productshortname"></ph> 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 Derby<indexterm>using database conn
 <context> <codeblock>jdbc:derby:;<ph>shutdown=true</ph></codeblock><p>A
successful
 shutdown always results in an <i>SQLException</i> to indicate that <ph conref="../conrefs.dita#prod/productshortname"></ph>
has
 shut down and that there is no other exception.</p>
+<p>If you are running with a security manager on JDK 8 or higher, you must grant
+<ph conref="../conrefs.dita#prod/productshortname"></ph> permission to
+deregister the embedded driver in order to fully shut down the system. See
+<xref href="cdevbabejgjd.dita#cdevbabejgjd"></xref> for details.</p>
 <p>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
 <ph conref="../conrefs.dita#prod/productshortname"></ph> 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 <i>d
 shutting down a single database, it lets <ph conref="../conrefs.dita#prod/productshortname"></ph>
perform
 a final checkpoint on the database.</p> <p>When you are shutting down a system,
 it lets <ph conref="../conrefs.dita#prod/productshortname"></ph> 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 <i><xref href="rrefattribderegister.dita#rrefattribderegister">deregister=false</xref></i>),
+and shut down within the JVM before the JVM exits. A successful shutdown always
 results in an <i>SQLException</i> indicating that <ph conref="../conrefs.dita#prod/productshortname"></ph>
has
 shut down and that there is no connection. Once <ph conref="../conrefs.dita#prod/productshortname"></ph>
is
 shut down, you can restart it by reloading the driver. For details on restarting <ph
@@ -56,7 +57,7 @@ system only when it is embedded in an ap
 the <i>DriverManager</i> with a <i>shutdown=true</i> attribute raises
an exception.</note></p> </section>
 <section><title>Combining with other attributes</title>
 <p>This attribute may be combined with the  
-<i><xref href="rrefattribderegister.dita#rrefattribderegister">deregister=true</xref></i>
+<i><xref href="rrefattribderegister.dita#rrefattribderegister">deregister=false</xref></i>
 attribute.</p>
 <p>When you shut down a database, if authentication is turned on, you must
 specify this attribute in conjunction with the <i><xref

Modified: db/derby/docs/trunk/src/ref/rrefattribderegister.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefattribderegister.dita?rev=1533453&r1=1533452&r2=1533453&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefattribderegister.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefattribderegister.dita Fri Oct 18 13:52:51 2013
@@ -34,6 +34,18 @@ attribute</indexterm>
 JDBC driver from the <i>DriverManager</i> after a shutdown, so that the
 <ph conref="../conrefs.dita#prod/productshortname"></ph> classes can be
 garbage-collected.</p>
+<p>If you are running with a security manager on JDK 8 or higher, you must grant
+the following permission to <i>derby.jar</i> to allow the JDBC driver to be
+deregistered:</p>
+<codeblock>permission java.sql.SQLPermission "deregisterDriver";</codeblock>
+<p>See "Granting permissions to
+<ph conref="../conrefs.dita#prod/productshortname"></ph>" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph> for details. If you do not
grant
+this permission when using a security manager, an error message and stack trace
+will appear in <i>derby.log</i> on shutdown, and the embedded JDBC driver
+will remain registered.</p>
+<p>If you are running with a security manager on JDK 7 or earlier, you do not
+need to set this permission.</p> 
 <p>You initially register the embedded driver by doing one of the following:</p>
 <ul>
 <li>Call the method



Mime
View raw message