tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo K. Shikida" <shik...@gmail.com>
Subject Are custom quartz schedulers persisted somewhere?
Date Wed, 16 Sep 2015 14:09:29 GMT
Hi

I am using a custom quartz scheduler in tomee 1.6.0 like this

@Startup
@Singleton
@DependsOn("SystemInitializerEJB")
public class TimerEJB{

    private Scheduler scheduler;

    @PostConstruct
    public void initialize() throws SchedulerException{
        log.info("Initialize "+this);
        StdSchedulerFactory factory = new StdSchedulerFactory();

factory.initialize(this.getClass().getResourceAsStream("my.quartz.properties"));
        scheduler = factory.getScheduler();
        scheduler.start();
        log.info("scheduler "+scheduler.getMetaData().getSchedulerName());
    }

(...)

Because I need to have full control over it and I don't want to mix it with
the default TomEE quartz scheduler.

I've noticed that sometimes, on server start, I get a message warning that
the scheduler already exists. But since it's a singleton, I am assuming it
will be created only once.

my.quartz.properties does not look special

#============================================================================
# Configure Main Scheduler Properties
#============================================================================

org.quartz.scheduler.instanceName = MyScheduler2
org.quartz.scheduler.instanceId = AUTO

#============================================================================
# Configure ThreadPool
#============================================================================

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 5

it does not define a jobStore or a data source

Does TomEE/Quartz serializes the scheduler or stores it somewhere?

[]

Leo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message