Announcement Announcement Module
Collapse
No announcement yet.
Reconnect In Spring use BDCP&Mysql in iBatis Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reconnect In Spring use BDCP&Mysql in iBatis

    HI, Guys:

    In Spring Data Access Layer, how to set the BDCP to reconnect when the connection instance is closed in pool?
    In Jakarta documents find the removeAbandoned parameter for DBCP i am wonder that could it be work fine for my problem?

    any reply is appreciated, thanks.

    photonmen

  • #2
    How is the connection instance closed? Do you mean the connection has gone stale in the database side (in which case you should refer to the documentation for your pool as to how it copes with that scenario) or that application code has closed the connection? Calling close() on a pooled connection should not really close the connection, just return it to a pool. So well-behaved JDBC code like Spring's JDBC behaviour will never close the underlying connection, which you can only do if you use something like a Spring NativeJdbcExtractor to get the underlying connection and close it (very naughty).

    Comment

    Working...
    X