9.5 Settings for using the CDI (Changing the security settings)

This section describes the changing of security settings required for using the CDI.

To use the CDI, you must change the security settings with one of the following methods:

The description of the methods is as follows:

Organization of this section
(1) Changing the security policy settings
(2) Releasing SecurityManager

(1) Changing the security policy settings

Add permission java.security.AllPermission; in server.policy. The following is an example of editing the settings:

// Grant minimal permissions to everything else:
// EJBs
// client implementation classes
grant {
permission java.util.PropertyPermission "*", "read";
permission java.lang.RuntimePermission "queuePrintJob";
permission java.net.SocketPermission "*", "connect";
permission java.security.AllPermission;
};

Specify server.policy after you set up the J2EE server.

(2) Releasing SecurityManager

Specify the -nosecurity option for the cjstartsv command when you start the J2EE server to release SecurityManager.

# cjstartsv server-name -nosecurity