J2EE jobs
A J2EE job allows Java applications in the same network to send and receive messages from and to a JMS destination.
A description of the job properties and valid values are detailed in the context-sensitive help in the Dynamic Workload Console by clicking the question mark (?) icon in the top-right corner of the properties pane.Attribute | Description/value | Required |
---|---|---|
application name | j2ee | ✓ |
jms operation | The operation to be performed. Supported values
are:
|
|
timeout | The timeout, expressed in seconds, within which the task must complete. If you do not specify a timeout or set it to 0, the task continues indefinitely. | |
connectionURL | The URL of the WebSphere Application Server. | |
connFactory | An administered object that a client uses to create a connection to the JMS provider. To specify the connection factory, you can use a variable expression that can contain one or more variable references, such as ${var}, any character, and any string. | ✓ |
destination | An administered object that encapsulates the identity of a message destination, which is where messages are delivered and consumed. To specify the destination, you can use a variable expression that can contain one or more variable references, such as ${var}, any character, and any string. | ✓ |
message | The message to be sent. | ✓ Note: This attribute is required only
for the send task. |
Credentials | Specify the user name and the password to be
used when running the J2EE application. Use this field if global security
is enabled on WebSphere Application Server.
The user must be defined on WebSphere Application Server.
To specify these credentials, you can use variable expressions that
can contain one or more variable references such as ${var}, optionally
in association with any character or with a simple string. In addition,
you can parametrize in one of the following ways:
|
$JOBS
AGENT#JOB_NAME_JMS_SEND
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdlj="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlj" name="JMS_JOB_SEND">
<jsdl:application name="j2ee">
<jsdlj:j2ee>
<jsdlj:jms operation="send">
<jsdlj:connectionURL>corbaloc:iiop:washost.mydomain.com:2809</jsdlj:connectionURL>
<jsdlj:connFactory>jms/MyCF</jsdlj:connFactory>
<jsdlj:destination>jms/MyQueue</jsdlj:destination>
<jsdlj:message>Submission of jms job: SEND MESSAGE</jsdlj:message>
</jsdlj:jms>
<jsdlj:credentials>
<jsdlj:userName>jtwoeeuser</jsdlj:userName>
<jsdlj:password>${password:jtwoeeuser}</jsdlj:password>1
</jsdlj:credentials>
</jsdlj:j2ee>
</jsdl:application>
</jsdl:jobDefinition>
jtwoeeuser
was
defined on the HCL Workload Automation database
using the username user definition command. The associated
password, specified by the ${password:jtwoeeuser}
string
in the task, will be retrieved from the database at runtime.$JOBS
AGENT#JOB_NAME_JMS_RECEIVE
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdlj="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlj" name="JMS_JOB_RECEIVE">
<jsdl:application name="j2ee">
<jsdlj:j2ee>
<jsdlj:jms operation="receive" timeout="180">
<jsdlj:connFactory>jms/MyCF</jsdlj:connFactory>
<jsdlj:destination>jms/MyQueue</jsdlj:destination>
</jsdlj:jms>
<jsdlj:credentials>
<jsdlj:userName>userName</jsdlj:userName>
<jsdlj:password>password</jsdlj:password>
</jsdlj:credentials>
</jsdlj:j2ee>
</jsdl:application>
</jsdl:jobDefinition>
Scheduling and stopping the job in HCL Workload Automation
You schedule HCL Workload Automation J2EE jobs by defining them in job streams. Add the job to a job stream with all the necessary scheduling arguments and submit it.
You can submit jobs using the Dynamic Workload Console, Application Lab, or the conman command line.
After submission, when the job is running and is reported in EXEC status in HCL Workload Automation, you can stop it if necessary, by using the kill command from the Dynamic Workload Console. This action is not effective on the send operation, but it is supported on the receive operation, causing the Java application to stop waiting for messages.
Restarting the job
If the HCL Workload Automation agent stops when you submit the J2EE job or while the job is running, the job restarts automatically as soon as the agent restarts.
See also
From the Dynamic Workload Console you can perform the same task as described in
For more information about how to create and edit scheduling objects, see