Closing database connections?

Discussions

EJB programming & troubleshooting: Closing database connections?

  1. Closing database connections? (2 messages)

      Hi,

      I use the ATG Dynamo Application Server.
      It provides a pool of database connections.
      My Beans (Stateless Session) access the connections via the Data Source provided by the container. The question is: if I close the connection {con.close()}, the connection is closed or not? I think that no. I think that the connection just returns to the data-source, that is, to the pool.

      Thanks,

      AHAL
      ahal at sefin dot pb dot gov.br

    Threaded Messages (2)

  2. Closing database connections?[ Go to top ]

    I have the same doubt. I think it does not return connection to connection pool. Connection pool wil have one unusable connection. I don't know how to get around this problem.
  3. Closing database connections?[ Go to top ]

    There are 2 things that you must remember first.

    First is the pool of connections that you have configured for your application server

    Secondly closing a connection will return your connection back to the pool only. It will be unused till the threshhold value is not reached.

    Say you have configured 50 connections configured at the application server, so when the database server starts up it will create those 50 and keep it for you.

    As you use and close, those connections are returned back to the pool.

    Hope i answered ur query