In JBoss (6.x) it is already in the environment and can be used within a Message driven bean.
My application generates a lot of "volatile" data that have to be removed from the database when it is old or it is already processed and re-aggregated.
@MessageDriven(activationConfig =
{@ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0,30 * * ? * *")})
@ResourceAdapter("quartz-ra.rar")
public class CreanerJob implements Job {
public void execute(JobExecutionContext arg0) {
System.out.println("JOB");
}
}
Nessun commento:
Posta un commento