motogp46
Jan 3rd, 2010, 04:37 PM
Hello,
I am in the process of intergrating Quartz with my Spring application. It will required the use of persistent jobs and thus Quartz will be configured to use the data source that the rest of my current Spring application is using.
Currently, my Spring application is configured with a jdbc data source, Hibernate and transactions. From an application standpoint, this is all working properly. By this I mean that we are a way into the application development where we have established services that communicate with the RDBMS, in this example Oracle, and entities are being created properly.
The app is divided into roughly 4 bundles:
1) database bundle - exposed the data source
2) dao bundle - defines the persistence unit and exposes out all the dao's for the entities
3) service bundle - the business logic and the transaction layer
4) web bundle - exposes out the web services and communicates with the service bundle to execute the web service operations.
Now, through a command line, I ran the oracle script that creates all the tables for Quartz with the same schema that my current application runs in.
I then modified by service bundle to instantiate a scheduler via the following bean:
<bean id="schedulerFactoryBean"
class="org.springframework.scheduling.quartz.SchedulerFac toryBean"
>
<property name="dataSource" ref="testDataSource"/>
<property name="schedulerName">
<value>
Testing123
</value>
</property>
<property name="transactionManager" ref="testTransactionManager"/>
</bean>
The data source and the transaction manager are the same ones used elsewhere in the service bundle and I know those are working properly.
Now, when i start up my application, it all seems to start up fine, i.e. no exceptions are thrown in any of the trace files.
But, when examining the QRTZ_SCHEDULER_STATE table, it's empty. I would have expected to see my Testing123 scheduler in there. Am I missing something?
I purposely haven't taken it any further and tried to schedule jobs or anything since I don't want to get to far and find out I am doing it wrong.
Anyways, if anybody knows what I may be doing wrong or if my expectation of seeing something in that table is incorrect please let me know.
Thanks!
Mauro
I am in the process of intergrating Quartz with my Spring application. It will required the use of persistent jobs and thus Quartz will be configured to use the data source that the rest of my current Spring application is using.
Currently, my Spring application is configured with a jdbc data source, Hibernate and transactions. From an application standpoint, this is all working properly. By this I mean that we are a way into the application development where we have established services that communicate with the RDBMS, in this example Oracle, and entities are being created properly.
The app is divided into roughly 4 bundles:
1) database bundle - exposed the data source
2) dao bundle - defines the persistence unit and exposes out all the dao's for the entities
3) service bundle - the business logic and the transaction layer
4) web bundle - exposes out the web services and communicates with the service bundle to execute the web service operations.
Now, through a command line, I ran the oracle script that creates all the tables for Quartz with the same schema that my current application runs in.
I then modified by service bundle to instantiate a scheduler via the following bean:
<bean id="schedulerFactoryBean"
class="org.springframework.scheduling.quartz.SchedulerFac toryBean"
>
<property name="dataSource" ref="testDataSource"/>
<property name="schedulerName">
<value>
Testing123
</value>
</property>
<property name="transactionManager" ref="testTransactionManager"/>
</bean>
The data source and the transaction manager are the same ones used elsewhere in the service bundle and I know those are working properly.
Now, when i start up my application, it all seems to start up fine, i.e. no exceptions are thrown in any of the trace files.
But, when examining the QRTZ_SCHEDULER_STATE table, it's empty. I would have expected to see my Testing123 scheduler in there. Am I missing something?
I purposely haven't taken it any further and tried to schedule jobs or anything since I don't want to get to far and find out I am doing it wrong.
Anyways, if anybody knows what I may be doing wrong or if my expectation of seeing something in that table is incorrect please let me know.
Thanks!
Mauro