Bug 52024 - Custom interceptor to support automatic failover of mirrored database
Summary: Custom interceptor to support automatic failover of mirrored database
Status: NEEDINFO
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 14:20 UTC by Chris Abrams
Modified: 2012-03-20 17:02 UTC (History)
0 users



Attachments
Adds a new interceptor class (3.91 KB, application/octet-stream)
2011-10-13 14:20 UTC, Chris Abrams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Abrams 2011-10-13 14:20:30 UTC
Created attachment 27771 [details]
Adds a new interceptor class

Custom Tomcat JDBC Pool interceptor which reconnects a JDBC Connection on 
failure. This was written to support automatic failover of a SQL Server database configured with database mirroring and using the Microsoft SQL Server JDBC driver, configured to support failover. It is hoped this interceptor may be more generally useful for supporting reconnection on failure but is untested on any database other than SQL Server 2008 R2.
Comment 1 Filip Hanik 2012-03-20 17:02:34 UTC
I like the idea, but it's not fine grained enough. What if I do

1 con = getConnection();
2 con.close();
3 con.executeQuery();

on step 3 we reconnect the connection only to fail identically again.