package com.easyplex.ejb3tests; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.jboss.annotation.ejb.ResourceAdapter; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import java.util.Date; // a Message Driven Bean, which is triggered by a Quartz Timer every 10 seconds @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0/10 * * * * ?"), @ActivationConfigProperty(propertyName = "durable", propertyValue = "true") }) @ResourceAdapter("deploy.last#quartz-ra.rar") public class TestJob implements Job { public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { System.out.println(new Date() + ": " + getClass().getSimpleName() + " was triggered!"); } }