WLOC Administration Console Online Help

    Previous Next  Open TOC in new window 
Content starts here

Defining variables for multiple Java processes


To simplify the task of creating multiple copies of Java processes in a service, WLOC provides the capability to define the common characteristics of the process in a template, and to use variables to replace common parameters. You can then use the template to generate multiple copies of the process without having to physically configure duplicates in the metadata configuration. When you create the template, you define the following:

Note: The number of values that you specify in the variables must be equal to the number of copies to be created.

To take advantage of the variable definitions, you can insert variable references into certain attributes of the jvm-instance definition. You can specify variables for the following attributes:

To define variables for a JVM process:

  1. Access the Variables page in any of the following ways:
    • When creating a service process from scratch, select a newly created process group in the Process Group table, and then click the Variables button on the ensuing Process Properties page (for editing processes specified for the service). See Define process groups for a service.
    • When adding more JVMs to a process group using a Service's Configured Process Groups table, click the Variables button on the Process Properties page. See Modify services, process groups, and instances.
    • When using the Inventory pane to manage a service, drill down to a configured JVM instance using either the Inventory tree or the Configured Process Groups table, and then click the Variables tab. See Grouping inventory components.

    The JVM variables that are currently defined are displayed.

  2. On the Variables page, click New.

    To modify an existing JVM variable, click on its name in the Variable table.

  3. On the Variable Properties page, set the JVM variable properties, as follows.
    Field Description

    Name

    Enter a name for the JVM variable.

    Value

    Enter the value of the JVM variable. There are two kinds of variables:

    • Scalar values that replace another value. For example, entering 9001 creates a variable of ${port}=9001, which could be used to represent that all instances use the same port.
    • Array values that provide a set of values for another value. You can specify array variables as follows:
      • As a single value to specify that all instances use the same value. For example, ${port}=9001.
      • In a comma-separated list. For example, entering 9001,9002,9003 creates a variable of ${ManagedPort}=9001,9002,9003, which means that three instances of the JVM should use ports 9001-9003.
      • As a range of values. For example, ${ManagedPort}=@range{9010,9013}.
  4. Click Save.

    The variable is saved and the following confirmation is displayed:

    New JVM Variable created
  5. Repeats steps 2-4 to create additional variables for the process group.
  6. If necessary, you may need to update the template definition after the variables are created. For more information, see the WLOC Configuration Guide.

After you finish

To delete variables, select the variable that you want to delete from the Variable Properties table and click Delete.


  Back to Top