Policies

The following policies are available when you build a virtual application by using Application Pattern Type for Java™: JVM policy, Routing Policy, and Scaling Policy

JVM policy

A Java virtual machine (JVM) policy controls the features and the configuration of the underlying JVM. Attach the JVM policy to configure the Java runtime environment. For example, you can enable IBM® Monitoring and Diagnostic Tools for Java - Health Center, for monitoring the application, and you can debug the application by using an integrated development environment (IDE) such as IBM Rational® Application Developer.

The JVM policy has the following attributes:
Set minimum and maximum JVM heap size (in MB)
Specifies the minimum and maximum heap size of the JVM, in megabytes (MB).
Enable debug
Specifies whether the JVM is in debug mode.
Debug port
Specifies the port that the JVM uses to listen for remote connections. The default value is 7777. If you select Enable debug but do not specify a value for the debug port, the default value is used.
Client (IP or IP/netmask)
Specifies an optional address of the debug client. This setting is used to restrict source access to the debug port. The value is an IP address, for example 1.2.3.4, or a combination of an IP address and netmask, for example 1.2.0.0/255.255.0.0. This example combination of IP address and netmask matches anything in the 1.2. network.
Enable Health Center
Specifies whether the JVM is started with the Health Center monitoring agent enabled. The default value is true.
Health Center port
Specifies the port that the Health Center agent uses to listen for remote connections. The default value is 1972. If you select Enable Health Center but do not specify a value for the Health Center port, the default value is used.
Note: This value specifies the first port that the Health Center agent attempts to use. If the agent cannot use the port, it increments the port number and tries again. For more information, see the Health Center documentation in the IBM Monitoring and Diagnostic Tools for Java documentation.
Health Center Client (IP or IP/netmask)
Specifies an optional address of the Health Center client. This setting is used to restrict source access to the Health Center agent port. The value is an IP address, for example, 1.2.3.4, or a combination of an IP address and netmask, for example 1.2.0.0/255.255.0.0. This example combination of IP address and netmask matches anything in the 1.2. network.
Generic JVM arguments
Any additional JVM configuration arguments.

The applicable component, which you can attach this policy to, is Java application (IBM Java Runtime Version 7).

When you enable debugging, the JVM is started in debug mode, and is listening on the specified port. A debug program on any client machine can attach to the JVM by default. You can specify a client IP address, or a combination of IP address and netmask, to restrict access to the JVM. A client IP address, such as 10.2.3.5, allows a specific client machine to debug. An IP address and netmask combination, such as 10.2.3.5/255.255.0.0, allows any machine on the specified network, 10.2 in this example, to attach to the JVM.

Routing Policy

A routing policy can be assigned to the HTTP Listener component, which causes HTTP traffic for a specified context root on the server to be routed by using a proxy shared service that is running in the same cloud group for the given virtual host name. This policy can be used with a Scaling Policy applied to the Java application component to provide load balancing of HTTP traffic.
Note: There is no support for HTTPS.

The routing policy has the following attributes:

Type
Specifies the type of web traffic that is being routed by the HTTP Listener. Currently only HTTP traffic is supported. This attribute is required.
Virtual Hostname
Specifies the name of the virtual host for the routing policy. This attribute is required.
Context Root
Specifies the context root for the application that is being routed. This attribute is required.
Use ODR Load Balancer Service
Check this checkbox to use the ODR Load Balancer Service. Uncheck this box to use Elastic Load Balancer Proxy Service.

Scaling Policy

A Scaling Policy can be assigned to the Java application component. A scaling policy defines the ability for an application to add and remove instances of an application in response to load and responsiveness conditions. Currently only static (manual) scaling is supported.