It is a simple custom Job written in JAVA (IDE: NetWeaver Developer Studio, deployed as EJB/EAR) using source code:
/** * Message-Driven Bean implementation class for: HelloJob * */ @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "JobDefinition=\'HelloJob\' AND ApplicationName=\'sample.com/utils~job~hellojob~ear\'") }) public class HelloJob extends MDBJobImplementation { /** * Default constructor. */ public HelloJob() { // TODO Auto-generated constructor stub } @Override public void onJob(JobContext jobContext) throws Exception { Logger log = jobContext.getLogger(); JobParameter jp = jobContext.getJobParameter("TSleep"); int time = Integer.valueOf(jp.toString()); log.info("Hello Job 01 exec at " + (new Date())); Thread.sleep(time * 1000); log.info("Hello Job 02 exec at " + (new Date())); } }
Using 2000 second the following error appears: