Previous Topic: MESSAGECLASS Statement—Specify the Java Class of the JMS MessageNext Topic: METHODNAME Statement—Specify the Method to be Invoked Remotely


METHOD Statement—Specify the Method to be Invoked Remotely

The METHOD statement specifies the method to be invoked remotely in a job.

Supported Job Types

This statement is required for the following job types:

Syntax

This statement has the following format:

METHOD method
method

Specifies the method to be invoked remotely. In a Session Bean or Entity Bean job, it specifies the method to be invoked on the application server. In a POJO job, it specifies the Java method to call on the instance of the Java object. In a RMI job, it specifies the method of the remote Java class to invoke.

Limits: Up to 1024 characters; case-sensitive

Examples: hello, concat

Notes:

Example: Invoke a Method on a Stateless Session Bean

Suppose that you want to invoke the reverse method on the CybEJBTestBean stateless session bean. The reverse method has one parameter, with type java.lang.String and value a23. The output from the reverse method is saved to the C:\Makapt15 file. The initial context factory supplied by the JNDI service provider is com.ibm.websphere.naming.WsnInitialContextFactory. The service provider's URL is iiop://172.24.0.0:2809, where 172.24.0.0 is the IP address of the WebSphere application server and 2809 is the ORB port. When the job runs, the output of the reverse method is stored in the output destination file.

AGENT APPAGENT
INITIAL_CONTEXT com.ibm.websphere.naming.WsnInitialContextFactory
LOCATION iiop://172.24.0.0:2809
BEAN CybEJBTestBean
METHOD reverse
DESTINATION C:\Makapt15
JNDIUSER cyberuser
PARAMETER TYPE(java.lang.String) VALUE(a23)