org.drools.persistence.jpa.JDKCallableJobCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of drools-persistence-jpa Show documentation
Show all versions of drools-persistence-jpa Show documentation
JPA implementation for Drools
package org.drools.persistence.jpa;
import org.drools.core.command.impl.GenericCommand;
import org.kie.internal.command.Context;
public class JDKCallableJobCommand
implements
GenericCommand {
private static final long serialVersionUID = 4L;
private JpaTimerJobInstance job;
public JDKCallableJobCommand(JpaTimerJobInstance job) {
this.job = job;
}
public Void execute(Context context) {
try {
return job.internalCall();
} catch ( Exception e ) {
e.printStackTrace();
}
return null;
}
}