db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r629575 - in /db/derby/code/trunk/java/drda/org/apache/derby/drda: server.policy template.policy
Date Wed, 20 Feb 2008 19:04:42 GMT
Author: djd
Date: Wed Feb 20 11:04:32 2008
New Revision: 629575

URL: http://svn.apache.org/viewvc?rev=629575&view=rev
Log:
DERBY-1387 Add permissions to the default server policy file (and template) to
allow Derby to register its MBeans.
Contributed by John H. Embretsen Email: John dot Embretsen at Sun dot com

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

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy?rev=629575&r1=629574&r2=629575&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy Wed Feb 20 11:04:32
2008
@@ -36,6 +36,27 @@
   permission java.util.PropertyPermission "java.class.path", "read";
   permission java.lang.RuntimePermission "getProtectionDomain";
   permission java.io.FilePermission "<<ALL FILES>>", "read";
+
+//
+// Permissions needed for JMX based management and monitoring, which is only
+// available for JVMs supporting "platform management", that is J2SE 5.0 or better.
+// JMX management of Derby is NOT enabled by default; see also DERBY-1387.
+//
+// Allows this code to create an MBeanServer:
+//
+  permission javax.management.MBeanServerPermission "createMBeanServer";
+//
+// Allows access to Derby's built-in MBeans, within the domain org.apache.derby.
+// Derby must be allowed to register and unregister these MBeans.
+// To fine tune this permission, see the javadoc of javax.management.MBeanPermission
+// or the JMX Instrumentation and Agent Specification.
+//
+  permission javax.management.MBeanPermission "org.apache.derby.*#[org.apache.derby:*]","registerMBean,unregisterMBean";
+//
+// Trusts Derby code to be a source of MBeans and to register these in the MBean server.
+//
+  permission javax.management.MBeanTrustPermission "register";
+
 };
 
 grant codeBase "${derby.install.url}derbynet.jar"

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=629575&r1=629574&r2=629575&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 Wed Feb 20 11:04:32
2008
@@ -34,6 +34,29 @@
 //
   permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
 
+
+//
+// Permissions needed for JMX based management and monitoring, which is only
+// available for JVMs supporting "platform management", that is J2SE 5.0 or better.
+// JMX management of Derby is NOT enabled by default; see also DERBY-1387.
+//
+// Allows this code to create an MBeanServer:
+//
+  permission javax.management.MBeanServerPermission "createMBeanServer";
+//
+// Allows access to Derby's built-in MBeans, within the domain org.apache.derby.
+// Derby must be allowed to register and unregister these MBeans.
+// It is possible to allow access only to specific MBeans, attributes or 
+// operations. To fine tune this permission, see the javadoc of 
+// javax.management.MBeanPermission or the JMX Instrumentation and Agent 
+// Specification. 
+//
+  permission javax.management.MBeanPermission "org.apache.derby.*#[org.apache.derby:*]","registerMBean,unregisterMBean";
+//
+// Trusts Derby code to be a source of MBeans and to register these in the MBean server.
+//
+  permission javax.management.MBeanTrustPermission "register";
+
 };
 
 grant codeBase "${derby.install.url}derbynet.jar"



Mime
View raw message