Forum Discussion

Sudharshan's avatar
Sudharshan
New Contributor
8 years ago

database connection close

I have two JDBC steps in my test case. I have created a DB connection which is present in the Database tab near Environments.

My question is, how many times JDBC session will be opened (connected) and when it will be closed for the two JDBC steps. Is there way to close the session and JDBC connection when the query results are fetched.

2 Replies

  • Hi,

     

    Thank you for posting on our forum.

     

    For your questions:

    Is there a way to close the session and JDBC connection when the query results are fetched.

     

    Nothing that I know of. The JDBC test step is only used to fetch data from your database, so as long as your database is open/running the driver can connect ReadyAPI to your database and fetch the records per your query only if a request is sent.

     

    It will connect to the database as many times as the request hits the server.

     

    Best,

    Lakshmi

     

     

     

    • Sudharshan's avatar
      Sudharshan
      New Contributor

      Thanks,

       

      But i want to know if the connection or session is closed in each JDBC step. If it is not closed, it might lead to multiple open  sessions for each JDBC step.