db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1618881 - /db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy
Date Tue, 19 Aug 2014 15:01:35 GMT
Author: dag
Date: Tue Aug 19 15:01:35 2014
New Revision: 1618881

URL: http://svn.apache.org/r1618881
Log:
DERBY-6680 Other jar files may need to be granted permission to read derby.ui.* properties

Patch derby-6680 adds a caveat to the template policy file to help
users avoid the issue seen by the user.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy?rev=1618881&r1=1618880&r2=1618881&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy Tue Aug 19 15:01:35
2014
@@ -24,7 +24,20 @@ grant codeBase "${derby.install.url}derb
   // These permissions are needed for everyday, embedded Derby usage.
   //
   permission java.lang.RuntimePermission "createClassLoader";
+
+  // Next, the permission to read "derby.*" properties is granted to
+  // derby.jar. This is necessary for the engine to read derby properties.
+  // 
+  // NOTE: This works under the assumption that derby.jar precedes
+  // derbytools.jar (and possibly derbyclient.jar) - if present. If that is
+  // *not* the case, i.e. derby.jar follows any of those other jars, you will
+  // need to *also* grant this permission to the first of those jar files in
+  // your classpath. The reason is that some Derby properties (derby.ui.locale,
+  // derby.ui.codeset) are read by the class LocalizedResource which is present
+  // in more than one jar file. The the first jar in the path gets used to load
+  // the class and hence that jar needs the permission.
   permission java.util.PropertyPermission "derby.*", "read";
+
   permission java.util.PropertyPermission "user.dir", "read";
 
   // The next two properties are used to determine if the VM is 32 or 64 bit.



Mime
View raw message