

Application Services Jobs › POJO Jobs
POJO Jobs
A Plain Old Java Object (POJO) is a Java object that follows the Java Language Specification only. All Java objects are POJOs.
The POJO job lets you instantiate a class to create a Java object and invoke a method on it. The job is restricted to classes that take constructors with no arguments (default constructors).
Note: To run these jobs, your system requires the following agents:
- CA WA Agent for UNIX, Linux, or Windows
- CA WA Agent for Application Services or CA WA Agent for Web Services
You can use the POJO job to invoke custom Java code on a local computer. POJO jobs support method calls that can involve passing parameters. The parameters can be actual values or a serialized Java object passed by another job. When the POJO job invokes a method on an object, the parameters, if any, are passed to the object and the returned values are stored in a Java serialized object file.
To define a POJO job, you require the class name and method you want to call on the instantiated object.
Notes:
- If you use custom Java code, verify that the required JAR file is in the jars subdirectory of the agent installation directory.
- By default, the oscomponent.classpath and oscomponent.javapath environment variables are set in the agentparm.txt file when you install the agent. You cannot modify environment variables using a POJO job. But you can run a batch file using a Windows job to set the CLASSPATH and JAVA_HOME environment variables, and then run the Java code.
- After you change or redeploy a class or JAR file in the agent installation directory, restart the agent. For more information about restarting the agent, see the CA Workload Automation Agent for UNIX, Linux, or Windows Implementation Guide.
- The JRE version of the agent that you use to run POJO jobs and the Java compiler on your computer must be the same. To find the JRE version of the agent, follow these steps:
- Change to the following directory at the command prompt:
- agent_install_dir
-
Specifies the agent installation directory.
- Enter the following command:
java.exe -version
Copyright © 2013 CA Technologies.
All rights reserved.
 
|
|