| Author |
Message |
|
|
|
Sounds like you are using Spring with Quartz. When you define your "SchedulerFactoryBean", ensure you set "overwriteExistingJobs=true" to achieve what you want.
|
 |
|
|
Why you create 5 schedulers and not just 5 jobs? A scheduler instance should let you run thousands of jobs together, so no reason to create one each job.
Create one scheduler and also set your db connection pool size max to the limit of what you desire. (Usually set to # of concurrent jobs you want + 1)
|
 |
|
|
Thanks for the kind words mpvvs!
|
 |
|
|
|
The startTime tells the CronTrigger when to start "calculating" the first next fire time. For cron, just because you starts calculating now, doesn't mean you will fire immediately. It's depended on your expression. So in your case, after the start time, your cron expression evaluated the next fire time to be 7:13:00am. Just as expected.
|
 |
|
|
You can just wrap any DataSource implementation with it and return an connection object.
Out of the box, Quartz already provided PoolingConnectionProvider that wraps a c3p0 pooled DataSource. I assume that this doesn't fit what you need. In that case you simply create your own ConnectionProvider that wraps your DataSource object.
|
 |
|
|
Can you verify that your webapp started without problem before the Quartz even loaded? Perhaps you need to set your logger to include tomcat's package as well to troubleshoot.
Also, I am always skeptic when using space in Windows directory. Perhaps you can try running it under "C:\tomcat" to see if it helps.
You may even try the MySchedule.war below and see if it works in your tomcat env. It's pre-packaged and tested to work on many env already.
|
 |
|
|
I already said you should use whatever package name you used in your MOCK_Scheduler.java file. Look for the first line that starts with "package <name.blah>;", and "name.blah" is you should be using.
These are basic Java issues, not quartz related.
|
 |
|
|
Quartz simply use plain JDBC to query table/column names, so if Oracle Synonyms works with JDBC then I see no reason why it doesn't work.
The error you are getting sounds more like a bad driver, that it can not write Blob data. What you verify that you are using the right driver? What's your DataSource URL look like in your Quartz config for production? Ensure that this URL is loading the right Oracle driver, and the you have set the correct Quartz config for the right delegate driver class name.
|
 |
|
|
|
Quartz allows you to change connection provider. See "org.quartz.dataSource.NAME.connectionProvider.class" from http://quartz-scheduler.org/documentation/quartz-2.1.x/configuration/ConfigDataSources
|
 |
|
|
|
The interface method name should be self explanatory. One is to capture callback when trigger is fired, and other is when a job is invoked. Sometimes you may have triggers fired, but job did not invoked etc.
|
 |
|
|
|
I am not familiar with commonj, but quartz has many listeners callback that you may want to explore: SchedulerListener, TriggerListener and JobListener. See the API for details.
|
 |
|
|
Your job is free to do anything you want, and you may use java.net API to capture the IP where your job is running and record it.
If you want to try out MySchedule link below, it has a plugin that records Job history, and IP is recorded along with it.
|
 |
|
|
|
Quartz does not use Hibernate. Just FYI, Spring 3.x might have switched to Quartz 2.x (not 1.8.x) already, so check with their doc for sure. Other than that, quartz works fine in Spring env, and their forums is your best place to troubleshoot their wrapper class such as SchedulerFactoryBean.
|
 |
|
|
@rajoshi,
Quartz is just a Java library, and I don't see why it won't run/supported under JBoss7. What makes you say that?
@mahadla,
Your job error indicate that you can't access to the UserTransaction object in the JDNI service in JBoss server. So how did you deploy the quartz?
You may want to try MySchedule to help you get Quartz started or even troubleshoot. Simply drop the myschedule.war file into JBoss 7 server deploy directory. It provides a scripting console that let you execute code dynamically and you may try to see if you can lookup JNDI resource successfully just as if your job would run inside the .war.
|
 |
|
|
Does your command work in a prompt by invoking them manually?
You might not have the correct package name to your main class. You should use same package as you declare it in the source. Eg, maybe it should have been:
"java" -cp %QUARTZ_CP% %LOG4J_PROPS% scheduler.MOCK_Scheduler
|
 |
|
|