Quartz scheduler not inserting its scheduler details in their configured database

Discussão em 'StackOverflow' iniciado por Stack, Dezembro 30, 2020.

  1. Stack

    Stack Membro Participativo

    I'm using JBoss Application Server, I have two nodes of JBoss AS on different machines, on each node I have deployed two different EARs which contain different quartz.properties, and each EAR has its own database.

    EAR 1 quartz.properties file configuration


    org.quartz.scheduler.instanceName = Scheduler1
    org.quartz.scheduler.instanceId = AUTO
    org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool.threadCount = 1
    org.quartz.threadPool.threadPriority = 5
    org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
    org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
    org.quartz.jobStore.tablePrefix = QRTZ_
    org.quartz.jobStore.isClustered = true
    org.quartz.jobStore.clusterCheckinInterval = 20000
    org.quartz.jobStore.dataSource = CI
    org.quartz.dataSource.CI.jndiURL = java:jboss/datasources/CI
    org.quartz.jobStore.dataSource = nonManagedTX
    org.quartz.dataSource.nonManagedTX.jndiURL = java:jboss/datasources/CI
    org.quartz.jobStore.nonManagedTXDataSource = nonManagedTX

    EAR 2 quartz.properties file configuration


    org.quartz.scheduler.instanceName = Scheduler2
    org.quartz.scheduler.instanceId = AUTO
    org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool.threadCount = 1
    org.quartz.threadPool.threadPriority = 5
    org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
    org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
    org.quartz.jobStore.tablePrefix = QRTZ_
    org.quartz.jobStore.isClustered = true
    org.quartz.jobStore.clusterCheckinInterval = 20000
    org.quartz.jobStore.dataSource = CE
    org.quartz.dataSource.CE.jndiURL = java:jboss/datasources/CE
    org.quartz.jobStore.dataSource = nonManagedTX
    org.quartz.dataSource.nonManagedTX.jndiURL = java:jboss/datasources/CE
    org.quartz.jobStore.nonManagedTXDataSource = nonManagedTX


    The problem is when I deployed EAR1 and EAR2 on JBoss AS, all configurations of EAR1 will be inserted into EAR2 database and vice versa, below are the tables in which Quartz data are stored.

    1. QRTZ_CRON_TRIGGERS
    2. QRTZ_JOB_DETAILS
    3. QRTZ_LOCKS
    4. QRTZ_SCHEDULER_STATE
    5. QRTZ_SIMPLE_TRIGGERS
    6. QRTZ_TRIGGERS

    I have rechecked all the configurations like jndiURL and datasource name etc, but no luck.

    Can anyone please tell me why this is happening? How Quartz scheduler inserts triggers of one EAR to another EAR database, if I have different configurations in both the EARs, and how can I resolve this issue?

    Continue reading...

Compartilhe esta Página