Results 1 to 8 of 8

Thread: Connection is not closing

  1. #1
    Join Date
    Jul 2005
    Location
    COIMBATORE-INDIA
    Posts
    110

    Default Connection is not closing

    Hai braniees,
    i have 2 questions in which 1 is very important.

    1. i have followed the springmvc and in that i have used
    the common dbcp datasource instead for springdrivermanager.the examples works properly but the connection is not clossing in the server(db).

    If i stop the server the connection gets closed.I verified this using toad.What is the reason.

    2. What is the use of the transactionmanger.can anyone explain with simple example

    thanks
    anieshuk
    Have a Nice day

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    1. Are you using Spring JDBC? Can you please provide a short example of your configuration (datasource and transactionmanager and DAO only) and JDBC code.

    2. Spring Transaction Managers provide the ability to manage transaction boundaries, in the same way as other transactional APIs such as JTA, but in a wider range of environments. Transaction management concepts are the same, whatever the technology.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Jul 2005
    Location
    Stamford,CT
    Posts
    6

    Default

    how do u get to know tat the connection is not gettting closed?
    through TOAD for oracle, pls tell me the steps

  4. #4
    Join Date
    Feb 2005
    Location
    Rochester, NY
    Posts
    9

    Default

    Since the point of a connection pool (dbcp) is to not close your connections to save the time of recreating them, why are you expecting them to close?

  5. #5
    Join Date
    Jul 2005
    Location
    Stamford,CT
    Posts
    6

    Default

    What i understand,

    using DBCP u get a connection to a DataSource do a select in ur program and close it in ur application, then u do a insert into a DB and close it. Now our program is terminated.

    1. when u do a select and close the connection it closes locally, ie, in the pool, but the real the connection is open to the DB

    2. Now we open the conn from the pool and do a insert, and close it to the pool, and the program exists, now the real conn to the DB is closed automatically

    Now if we forgot to close the real connection to the DB, and our program exists, can we check in TOAD if the conn is still open, this is my question

    what i'm asking is when the JVM exists the real conn if close?

    Pls correct me if my assumptions are wrong............

  6. #6
    Join Date
    Apr 2005
    Location
    Philippines
    Posts
    35

    Default

    Quote Originally Posted by scsandur
    how do u get to know tat the connection is not gettting closed?
    through TOAD for oracle, pls tell me the steps
    You can try using the DBA menu of Toad, and clik Kill/Trace Session sub-menu.

  7. #7
    Join Date
    Jul 2005
    Location
    Stamford,CT
    Posts
    6

    Default

    i tried this "DBA menu of Toad, and click Kill/Trace Session sub-menu"
    did not find anything like Kill/Trace, i'm using TOAD 8.1
    Overworked ---> Developer

  8. #8
    Join Date
    Apr 2005
    Location
    Philippines
    Posts
    35

    Default

    Quote Originally Posted by scsandur
    i tried this "DBA menu of Toad, and click Kill/Trace Session sub-menu"
    did not find anything like Kill/Trace, i'm using TOAD 8.1
    I think you must install the Quest TOAD dba Module in order to have this.

Similar Threads

  1. database connection is not closing
    By anieshuk in forum Web
    Replies: 0
    Last Post: Jul 26th, 2005, 05:15 AM
  2. stale Oracle processes
    By compostellas in forum Data
    Replies: 7
    Last Post: Jun 27th, 2005, 12:14 PM
  3. Replies: 6
    Last Post: May 25th, 2005, 01:56 AM
  4. BatchSqlUpdate closing the Connection
    By jonnygraham in forum Data
    Replies: 1
    Last Post: Mar 7th, 2005, 07:27 PM
  5. Replies: 3
    Last Post: Sep 29th, 2004, 03:15 PM

Posting Permissions

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