History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-325
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: James House
Reporter: Jasper Rosenberg
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

Code Cleanups

Created: 21/Feb/06 03:55 PM   Updated: 24/Dec/07 01:30 AM
Component/s: None
Affects Version/s: 1.6, 1.5.2
Fix Version/s: 1.6


 Description  « Hide
1. QuartzService.java
    a. unbind is writing NamingException to stderr rather than the log. Replace with: log.warn("Failed to unbind scheduler with jndiName: " + jndiName, e);
    b. Throw specfic exceptions in rebind()
    c. Replace captureStackTrace() with use of logger's support for logging Throwables
    d. Make sure all rethrown exceptions include cause

2. CronTrigger.java
    a. getTimeAfter(Date) is the only place not being defensive about a possibly null cronEx. It is used by getFireTimeAfter(), and I believe it should return null in this case.
    b. getTimeBefore(Date) should be: return (cronEx == null) ? null : cronEx.getTimeBefore(endTime), so that when it is implemented in CronExpression, CronTrigger will not need to be modified.

3. JobRunShell.java
    a. initialize() - Exception is a subclass of Throwable, and the processing is identical between the two catch blocks (other than a small discrepency in how the exception is passed to the logger), so I would suggest just replacing Exception with Throwable and deleting the redundant Throwable block.

4. JobStoreCMT.java
    a. getNonManagedTXConnection() - The only (application) Exception that can be thrown by setAutoCommit/setTransactionIsolation is SQLException so was the intent to catch Throwable instead of Exception? Also, should probably log at least a WARN if do get a SQLException since could cause some user confusion if setting autocommit/transisolation fails silently. Also, split apart so can throw a JobPersistenceException rather than a SQLException that is immediately wrapped in a JobPersistenceException anyway (with redundant exception messages).

5. JobStoreSupport.java
    a. getConnection() - Same comment as for 5a. (Just noticed "ingore" typo in both as well)

6. CronExpression.java
    a. Remove unused method: protected Date getTime(int sc, int mn, int hr, int dayofmn, int mon)

 All   Comments   Change History      Sort Order:
Jasper Rosenberg - [14/Apr/06 11:55 AM ]
Also in CronExpression, fix the javadoc comments for timezone set/get.