| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |
InitialContext ctxt = new InitialContext();
Hashtable env = new Hashtable();
env.put (Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "corbaloc:rir:/NameServiceCellRoot");
ctxt = new InitialContext(env);
// in order to lookup the Long Running Scheduler EJB from the cell context in the namespace,
// the name context to the application server or cluster to which the Long Running Scheduler
// application is deployed has to be provided.
// Eg: "nodes/myNode/servers/myServer" or "clusters/myCluster".
String longRunningContext = clusters/myCluster;
JobSchedulerHome zjsHome = (JobSchedulerHome) ctxt.lookup(longRunningContext +
"/ejb/com/ibm/websphere/longrun/JobSchedulerHome");
JobScheduler js = zjsHome.create();
Method Summary | |
---|---|
public
String | submitJobFromRepository(java.lang.String)
|
public
String | submitJob(java.lang.String)
|
public
String | saveJobToRepositoryAndSubmit(java.lang.String, java.lang.String, boolean)
submits the job specified by the xJCL passed in to the long running scheduler and
saves the xJCL to the xJCL repository.
|
public
void | purgeJob(java.lang.String)
purges the job identified by the job id from the long running scheduler.
|
public
void | cancelJob(java.lang.String)
|
public
void | restartJob(java.lang.String)
restarts the job identified by the job id.
|
public
int | getJobStatus(java.lang.String)
returns the job status for the given job id. Look at the jobStatus api for comparing the integer.
|
public
String | getJobOutput(java.lang.String)
Returns the output for a given job id that displays the job's progress.
|
public
String | getJobDetails(java.lang.String)
returns the job details for the given job id. Look at the jobDetails api for the details of the details.
|
public
void | saveJobToRepository(java.lang.String, java.lang.String, boolean)
Saves the xJCL passed in to the xJCL Repository.
|
public
String | showJobFromRepository(java.lang.String)
Returns the xJCL from xJCL repository for the given job name.
|
public
void | removeJobFromRepository(java.lang.String)
|
public
String | showAllJobs()
|
public
void | suspendJob(java.lang.String, java.lang.String)
suspends the specified job for the number of seconds specified. Once the time period is up, the job automatically.
|
public
void | resumeJob(java.lang.String)
resumes specified job.
|
public
int | getBatchJobRC(java.lang.String)
returns the return code of the Batch job.
|
public
String | submitDelayedJob(java.lang.String, java.lang.String)
|
public
String | submitDelayedJobFromRepository(java.lang.String, java.lang.String)
|
public
String | saveDelayedJobToRepositoryAndSubmit(java.lang.String, java.lang.String, boolean, java.lang.String)
|
public
void | submitRecurringRequest(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
public
void | submitRecurringRequestFromRepository(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
public
void | cancelRecurringRequest(java.lang.String)
|
public
String | getRecurringRequestDetails(java.lang.String)
|
public
void | modifyRecurringRequest(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
public
String | showAllRecurringRequests()
|
public
String | showRecurringJobs(java.lang.String)
|
Methods inherited from javax.ejb.EJBObject |
---|
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
Method Detail |
public String submitJobFromRepository( | String job )
|
job
-
The name of job that was stored to the xJCL repository
InvalidJobNameException
SchedulerException
JCLException
JobSubmissionException
public String submitJob( | String xJCL )
|
xJCL
-
The xJCL for the job
SchedulerException
JCLException
JobSubmissionException
public String saveJobToRepositoryAndSubmit( | String xJCL , | String job ,
| boolean replace )
|
xJCL
-
The xJCL for the job
job
-
The name given to the saved job in xJCL repository. This name can be used when invoking the submitJobFromRepository
method.
replace
-
A boolean indicating if the xJCL in the repository should be replaced, in case a job by that name already exists
in the xJCL repository.
InvalidOperationException
SchedulerException
JCLException
JobSubmissionException
public void purgeJob( | String jobid )
|
jobid
-
The id of the job
InvalidJobIDException
SchedulerException
public void cancelJob( | String jobid )
|
jobid
-
The id of the job
InvalidOperationException
InvalidJobIDException
SchedulerException
public void restartJob( | String jobid )
|
jobid
-
The id of the job
InvalidJobIDException
InvalidOperationException
SchedulerException
JCLException
JobSubmissionException
public int getJobStatus( | String jobid )
|
InvalidJobIDException
SchedulerException
public String getJobOutput( | String jobid )
|
InvalidJobIDException
SchedulerException
public String getJobDetails( | String jobid )
|
InvalidJobIDException
SchedulerException
public void saveJobToRepository( | String xJCL , | String job ,
| boolean replace )
|
xJCL
-
The xJCL for the job
job
-
The name given to the saved job in xJCL repository. This name can be used when invoking the submitJobFromRepository
method.
replace
-
A boolean indicating if the xJCL in the repository should be replaced, in case a job by that name already exists
in the xJCL repository.
InvalidOperationException
SchedulerException
JCLException
public String showJobFromRepository( | String job )
|
job
-
The name given to the saved job in xJCL repository. This name can be used when invoking the submitJobFromRepository
method.
InvalidJobNameException
SchedulerException
public void removeJobFromRepository( | String job )
|
job
-
The name given to the saved job in xJCL repository.
InvalidJobNameException
SchedulerException
public String showAllJobs( | ) |
SchedulerException
public void suspendJob( | String jobid , | String seconds )
|
InvalidJobIDException
InvalidOperationException
SchedulerException
SchedulerException
public void resumeJob( | String jobid )
|
jobid
-
The id of the job to resume
InvalidJobIDException
InvalidOperationException
SchedulerException
public int getBatchJobRC( | String jobid )
|
jobid
-
The id of the job
InvalidJobIDException
InvalidOperationException
SchedulerException
public String submitDelayedJob( | String xJCL , | String startTime )
|
xJCL
-
The xJCL for the job
startTime
-
The time where the job will get submitted.
SchedulerException
JCLException
JobSubmissionException
InvalidStartDateTimeFormatException
StaleTimeException
RemoteException
public String submitDelayedJobFromRepository( | String job , | String startTime )
|
job
-
The name of job that was stored to the job repository
startTime
-
The time where the job will get submitted.
InvalidJobNameException
SchedulerException
JCLException
JobSubmissionException
InvalidStartDateTimeFormatException
StaleTimeException
RemoteException
public String saveDelayedJobToRepositoryAndSubmit( | String xJCL , | String job ,
| boolean replace ,
| String startTime )
|
xJCL
-
The xJCL for the job
job
-
The time where the job will get submitted.
replace
-
The name of job that was stored to the job repository
startTime
-
A boolean indicating if the xJCL in the repository should be replaced, in case a job by that name already exists
in the job repository.
InvalidOperationException
SchedulerException
JCLException
JobSubmissionException
InvalidStartDateTimeFormatException
StaleTimeException
RemoteException
public void submitRecurringRequest( | String reqId , | String xJCL ,
| String startTime ,
| String interval )
|
reqId
-
The name of the recurring job request
xJCL
-
The xJCL for the job
startTime
-
The time where the job will get submitted.
interval
-
The time interval between jobs
InvalidOperationException
SchedulerException
JCLException
InvalidStartDateTimeFormatException
StaleTimeException
InvalidIntervalException
RemoteException
public void submitRecurringRequestFromRepository( | String jobName , | String reqId ,
| String startTime ,
| String interval )
|
jobName
-
The name of job that was stored to the job repository
reqId
-
The name of the recurring job request
startTime
-
The time where the job will get submitted.
interval
-
The time interval between jobs
InvalidOperationException
SchedulerException
JCLException
InvalidStartDateTimeFormatException
StaleTimeException
InvalidIntervalException
InvalidJobNameException
RemoteException
public void cancelRecurringRequest( | String reqId )
|
reqId
-
The name of the recurring job request
InvalidOperationException
SchedulerException
RemoteException
public String getRecurringRequestDetails( | String reqId )
|
reqId
-
The name of the recurring job request
SchedulerException
RemoteException
public void modifyRecurringRequest( | String reqId , | String xJCL ,
| String startTime ,
| String interval )
|
reqId
-
The name of the recurring job request
xJCL
-
The xJCL for the job
startTime
-
The time where the job will get submitted.
interval
-
The time interval between jobs
SchedulerException
JCLException
InvalidOperationException
InvalidStartDateTimeFormatException
StaleTimeException
InvalidIntervalException
RemoteException
public String showAllRecurringRequests( | ) |
SchedulerException
RemoteException
public String showRecurringJobs( | String reqId )
|
reqId
-
the name of the recurring job request
SchedulerException
RemoteException
| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |