Question

Examples of using Quartz within Seam 2 are shown with both JobStoreTX, JobStoreCMT and RAMJobStore.

Our project needs to persist jobs so we can do clustering, but I can't get JobStoreCMT to execute jobs. What is the difference between JobStoreCMT and JobStoreTX specifically for Seam?

Is it OK to use JobStoreTX in preference, just because it seams easier, or have I missed something crucial?

Was it helpful?

Solution

From the documentation for JobStoreCMT:

JobStoreCMT is meant to be used in an application-server environment that provides container-managed-transactions. No commit / rollback will be1 handled by this class.

If you need commit / rollback, use JobStoreTX instead.

and JobStoreTX:

JobStoreTX is meant to be used in a standalone environment. Both commit and rollback will be handled by this class.

If you need a JobStore class to use within an application-server environment, use JobStoreCMT instead.

So the answer to the question of which to use boils down to whether or not you want creation of triggers/etc to be a part of a larger transaction within your application, or if it should be standalone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top