Previous Topic: CHILDMONITOR Statement—Specify Whether to Monitor Children Jobs (SAP Jobs)Next Topic: CLPNAME Statement—Identify i5/OS Program to Run


CLASSNAME Statement—Specify a Class Name

The CLASSNAME statement specifies the name of the Java class to instantiate in a POJO job or the fully qualified Java class of the MBean object in a JMX-MBean Create Instance job.

Supported Job Types

This statement is required for the following job types:

Syntax

This statement has the following format:

CLASSNAME class
class

Specifies the Java class to instantiate in a POJO job or the fully qualified Java class of the MBean object in a JMX-MBean Create Instance job.

Limits: Up to 1024 characters; case-sensitive

Note: Enclose values that contain delimiters (such as spaces) in double quotation marks.

Example: Specify Java Class to Instantiate in a POJO Job

Suppose that you want to define a POJO job that creates a Java String with value "5" and calls the parseInt method with the created Java String object as an argument. The parseInt method returns a Java Integer object.

AGENT APPAGENT
CLASSNAME java.lang.Integer
METHOD parseInt
PARAMETER TYPE(java.lang.String) VALUE(5)

Example: Specify Java Class of the MBean Object

Suppose that you want to create an MBean instance on a JMX server. The job uses the cdc.jmx.SimpleDynamic class. The constructor of the class takes a single string parameter with the value "Hello".

AGENT APPAGENT
URL service:jmx:rmi:///jndi/rmi://agenttest:5099/jmxserver
MBEAN 'DefaultDomain:index=CreateIns1,type=cdc.jmx.SimpleDynamic'
CLASSNAME cdc.jmx.SimpleDynamic
PARAMETER TYPE(java.lang.String) VALUE(Hello)