client

Description

Connect to an Oddjob server. This job allows remote jobs to be monitored and controlled from a local Oddjob.

This job will run until it is manually stopped or until the remote server is stopped. If this job is stopped it's state will be COMPLETE, if the server stops this job's state will be NOT COMPLETE.

This job is Chainable and can link to another job in a org.oddjob.structural.ChainJob but the jobs it chains to are run before log remote log polling and so should be quick.

To access and control jobs on a server from within a configuration file this client job must have an id. If the client has an id of 'freds-pc' and the job on the server has an id of 'freds-job' the. be accessed using the path freds-pc/freds-job.

Properties

NameDescriptionRequired
name A name, can be any text. No.
url The JMX service URL. Yes.
maxLoggerLines The maximum number of log lines to retrieve for any component. No.
maxConsoleLines The maximum number of console lines to retrieve for any component. No.
logPollingInterval The number of milliseconds between polling for new log events. No.

Example

To create a connection to a remote server.

 <client id=name="Connection to Freds PC" 
            url="service:jmx:rmi:///jndi/rmi://pcfred/public-jobs"/>
 

Connect, run a remote job, and disconnect.

 <chain>
   <client id="freds-pc" name="Connection to Fred's PC" 
            url="service:jmx:rmi:///jndi/rmi://pcfred/public-jobs" />
   <sequential>
     <run job="${freds-pc/freds-job}" name="Run Fred's Job" />
     <wait for=${freds-pc/freds-job}" >
     <stop job="${freds-pc} name="Disconnect" /gt;
   <sequential>
 </chain>
 
Note that the wait job is needed because it can take a few seconds after the client connects for the information about all the jobs to arrive from the server.


(c) Rob Gordon 2005