Running Quartz with JobStoreTX
Using Memory to Store Scheduler Information
Loading Jobs into the Database
Earlier in the section , "Using Memory to Store Scheduler Information," we talked about how to load job and trigger information into memory when using the RAMJobStore. So how are jobs and triggers loaded into the database? Several methods exist for getting job information into the database:
- Adding job information in your application
- Using the JobInitializationPlugin
- Using the Quartz Web application
We talked about the first two approaches back in the RAMJobStore section. When used with a JDBC JobStore, the approach is not much different, with a few exceptions. First, you need to understand that when using these two methods, the job information is in the database. Even if you stop the application, the information remains in the database. Even if you took the JobInitializationPlugin out of your application, the information would be in the database. In that sense, it is seeding the database with job information. Chapter 8 covers the JobInitializationPlugin and Quartz plug-ins in general.
The last approach is probably the most interesting one. We haven't yet talked about the Quartz Web application, but we do in Chapter 13, "Quartz and Web Applications." For now, you should know that the Quartz Web application is a browser-based GUI that is designed to manage the Quartz Scheduler. It was designed by Quartz users and presents a rather nice interface for adding jobs and triggers, starting and pausing the Scheduler, and delivering other functionality.
Using the JobStoreCMT
|