[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
JobStoreTX and a database server bounce  XML
Forum Index -> Quartz
Author Message
es5f

journeyman

Joined: 05/18/2012 06:45:30
Messages: 17
Offline

Last night, our admin bounced the database server without warning me. My quartz instance didn't handle it very well (stack attached). Is there any clean way to deal with this sort of thing? I don't mind Quartz blowing up when there's no database, but the database came back and Quartz never recovered. Once I reloaded the web application, and then it ran just fine.
 Filename log.txt [Disk] Download
 Description Log from the Quartz failure.
 Filesize 2189 Kbytes
 Downloaded:  67 time(s)

jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Online


Have you configured a validation query for the connection pool? That's what will trigger recovery of the connections when the db becomes available again.
es5f

journeyman

Joined: 05/18/2012 06:45:30
Messages: 17
Offline

I have now!

Thanks,
Eric
es5f

journeyman

Joined: 05/18/2012 06:45:30
Messages: 17
Offline

Hm. That change didn't help at all.

Tomcat 7 context.xml:
Code:
	<Resource name="jdbc/MyResource"
               auth="Container"
               factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
               type="javax.sql.DataSource" 
               driverClassName="net.sourceforge.jtds.jdbc.Driver"
               url="jdbc:jtds:sqlserver://ms-sql-database:1433/MyDatabase"
               username="some_user" 
               password="some_password" 
               maxActive="20" 
               maxIdle="10"
               maxWait="-1"
               validationQuery="select 1" />
 


Is that validationQuery line what you were talking about? I'm still seeing the exact same error messages after the database goes down and then up. Should I be harassing the Tomcat people instead?
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Online


> Should I be harassing the Tomcat people instead?

Probably.

But to be sure, can you post your full quartz.properties here?
es5f

journeyman

Joined: 05/18/2012 06:45:30
Messages: 17
Offline

Okay, I will do that. I don't think it's on Quartz because I have the same quartz.properties file in two environments, and one recovers properly while the other doesn't.

Code:
 org.quartz.scheduler.instanceName = MyScheduler
 org.quartz.threadPool.threadCount = 3
 
 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
 org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 org.quartz.jobStore.dataSource = EIM_REF
 
 org.quartz.dataSource.EIM_REF.jndiURL = java:comp/env/jdbc/Eim_Ref
 
 org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
 org.quartz.plugin.jobInitializer.fileNames = jobs.xml
 org.quartz.plugin.jobInitializer.failOnFileNotFound = true
 org.quartz.plugin.jobInitializer.scanInterval = 60
 org.quartz.plugin.jobInitializer.wrapInUserTransaction = false
 
 org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin
 org.quartz.plugin.shutdownhook.cleanShutdown = true
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Online

Yes, it seems pretty clear the problem is with the datasource/connection pool impl.
es5f

journeyman

Joined: 05/18/2012 06:45:30
Messages: 17
Offline

OK, thanks for the eyeballs. I'll take it up with them.

Eric
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team