Using the Database for Job Storage

The persistent JobStores in Quartz are sometimes referred to as JDBC JobStores because of their unmistaken dependency on a JDBC driver to communicate with a relational database. The persistent JobStores use many of the features of JDBC, including support for transactions, locking, and isolation levels, just to name a few.

Because the persistent JobStores in Quartz are dependent on JDBC, you must ensure that your platform supports JDBC.

What if my Database Doesn t Support JDBC?

If your database doesn't support JDBC, you most certainly have a problem. You're not completely out of luck, but you have a lot more work ahead of you. You would be better off switching to one of the supported database platforms. If your database doesn't support JDBC, you'll need to create a new implementation that implements the JobStore interface. You might want to check with users on the Quartz user forum to see if anyone has already done the work and is willing to share codeor at least an approach.

 

Databases Supported by Persistent JobStores

The persistent JobStores in Quartz are designed to be used with the following database platforms:

Persistent Storage in a Stand-Alone Environment

The JobStoreTX class is designed to be used in a stand-alone environment. By "stand-alone," we mean an environment in which there is no transactional integration with an application container. This doesn't mean that you can't use the JobStoreTX within a containerjust that it's not designed to have its transactions managed by the container. The difference is whether Quartz transactions should participate in the transaction of the container.

Persistent Storage in an Application Container

The JobStoreCMT class is designed to be used when you want the application container to manage the transactions for your JobStore and those transactions should participate within the transactional boundaries that are managed by the container. This should be obvious from the "Container Managed Transactions (CMT)" in the name.

Категории