Announcement Announcement Module
Collapse
No announcement yet.
Single DataSource Connection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Single DataSource Connection

    I have a funky database (actually a JDBC/ODBC driver to an ISAM file based dataset) which doesn't like repeated open / closure of DB connections. After a while the servers send an error messages saying that we have exceeded the maximum number of connections.

    I am looking for a way to keep a single connection open. I am using Spring with iBatis 2.0.8. Right now I moved the dataSource definition in the sqlMapConfig of iBatis and this seems to work.

    What do I lose from moving the dataSource and transaction manager to iBatis. Is there a bean definition in the ApplicationContext that I could use that do the same?

    TIA

    Pascal

  • #2
    Pascal,
    Spring has a build-in SingleConnectionDataSource that may be used in your special case. Please note that this DataSource is note thread safe and not sweetable for production environments. For more information, take a look at javadoc.
    HTH

    Comment

    Working...
    X