Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jbpm.services.cdi.impl.store;
 
 import  javax.ejb.ConcurrencyManagement;
 import  javax.ejb.ConcurrencyManagementType;
 import  javax.ejb.Lock;
 import  javax.ejb.LockType;
import  javax.ejb.ScheduleExpression;
import  javax.ejb.Singleton;
import  javax.ejb.Startup;
import  javax.ejb.Timeout;
import  javax.ejb.Timer;
import  javax.ejb.TimerService;
import  javax.ejb.TransactionManagement;
import  javax.ejb.TransactionManagementType;
import  javax.inject.Inject;
import  org.jbpm.kie.services.impl.store.DeploymentSynchronizer;
@Singleton
@Startup
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
@Lock(LockType.WRITE)
@TransactionManagement(TransactionManagementType.BEAN)
	private Timer timer;
    private TimerService timerService;
	@Inject
	private DeploymentSynchronizer deploymentSynchronizer;
	public void configure() {
		if (DeploymentSynchronizer.DEPLOY_SYNC_ENABLED) {
			ScheduleExpression schedule = new ScheduleExpression();
			schedule.hour("*");
			schedule.minute("*");
			schedule.second("*/" + DeploymentSynchronizer.DEPLOY_SYNC_INTERVAL);
			 = .createCalendarTimer(schedule);
		}
	}
	public void shutdown() {
		if ( != null) {
			.cancel();
		}
	}
	@Timeout
	public void synchronize() {
		.synchronize();
	}
New to GrepCode? Check out our FAQ X