Results 1 to 2 of 2

Thread: Single DataSource Connection

  1. #1
    Join Date
    Oct 2004
    Location
    Laguna Beach, CA
    Posts
    16

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    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
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Similar Threads

  1. Replies: 3
    Last Post: Aug 2nd, 2005, 03:43 AM
  2. Odd behaviour when injecting TransactionTemplate
    By damon311 in forum Container
    Replies: 3
    Last Post: Jul 23rd, 2005, 11:21 AM
  3. stale Oracle processes
    By compostellas in forum Data
    Replies: 7
    Last Post: Jun 27th, 2005, 12:14 PM
  4. Calling procedure when connection is 'got'
    By mlythgoe in forum Data
    Replies: 10
    Last Post: May 6th, 2005, 04:01 AM
  5. Connection DataSource
    By andrea_z in forum Data
    Replies: 2
    Last Post: Mar 22nd, 2005, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •