Loading ...
Sorry, an error occurred while loading the content.

3622Re: [xml-dbms] Reusing Connections

Expand Messages
  • Ronald Bourret
    Dec 2, 2004
    • 0 Attachment
      It reuses the connection. That is, the Transfer object holds the
      connection open and does not return it to the pool.

      The reason for this is so it can reuse prepared statements. If it
      returns the connection to the pool and then gets a new connection from
      the pool later, there is no guarantee that the new connection will have
      the prepared statements it needs.

      (If anybody can explain how prepared statements are supposed to work
      with pooled connections, I'd be happy to listen. What I've just
      described strikes me as wrong, but I can see no way around it. That is,
      I'd like to prepare my statements, leave them in a prepared state, but
      return the connection to the pool while I am not using it.)

      -- Ron

      holger.schimanski@... wrote:
      > If I call storeDocument(...) more than one time on a Transfer object myTransfer,
      > does myTransfer.storeDocument(...) reuse the connection, making a new connection
      > to the database or is he using a connection pool?
    • Show all 4 messages in this topic