5 Replies Latest reply: Dec 14, 2012 10:33 AM by Joe Weinstein-Oracle RSS

    Connections in thread

    WetterJiří
      Hello, is there any possibility to get information how many connections to the database is created and exists in specific thread?
      Can I get information which modul invoke the jdbc creation?


      Could you explain me please what does mean this line (all numbers):

      ####<6.12.2012 23:54:11 CET> <Debug> <JDBCConn> <acs-wls01.test.homecredit.net> <wl_cz_test_01_web> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3cd36e48bcc4252b:-42e193e7:13b726cd057:-7ffd-0000000000000002> <1354834451337> <BEA-000000> <find pingDatabase method on connection oracle.jdbc.driver.T4CConnection@1160b67a>

      Thank you.

      Edited by: Wetter Jiří on 7.12.2012 0:05
        • 1. Re: Connections in thread
          Joe Weinstein-Oracle
          is there any possibility to get information how many connections to the database is created?

          Yes, see the WLS console

          exists in specific thread?

          No, this isn't clear. Connections are usually independent of threads. They are certainly not contained in them.

          Could you explain me please what does mean this line (all numbers)?

          Yes, but then I'd have to kill you. ;) None of those numbers except the date would be of any possible use to you.
          Maybe to some Oracle tech support people, but trust me, you don't need them.
          • 2. Re: Connections in thread
            WetterJiří
            Joe Weinstein wrote:
            No, this isn't clear. Connections are usually independent of threads. They are certainly not contained in them.
            Could you provide me please any link to documentation what detaily describes this theory? I'm very intrested. Thank you ;-)
            • 3. Re: Connections in thread
              Joe Weinstein-Oracle
              Theory? I can point you to WebLogic documentation. A pool holds connections which can (in a controlled serial
              fashion) be used by applications running in any thread. An intelligent pool system like weblogic can even take
              a connection away, out from under an application that was perhaps using it too long or hoarding it past a timeout,
              or operating on a transaction that is being rolled back at a higher level, and the pool can give that connection to
              another requesting application running in another thread which may proceed to use it, all before the first application
              finds out.
              • 4. Re: Connections in thread
                WetterJiří
                It seems that our application use a lot of connections in same time (5+) in one thread. Which is bad. Can I to find something useful with any tool or tracing method and confirm my theory?

                Edited by: Wetter Jiří on 14.12.2012 11:04
                • 5. Re: Connections in thread
                  Joe Weinstein-Oracle
                  new Exception("DEBUG: " + Thread.currentThread() + " starts application " ).printStackTrace(System.out);

                  ...

                  new Exception("DEBUG: " + Thread.currentThread() + " obtains connection " + conn + " at " ).printStackTrace(System.out);


                  ...


                  new Exception("DEBUG: " + Thread.currentThread() + " closes connection " + conn + " at ").printStackTrace(System.out);

                  ....

                  new Exception("DEBUG: " + Thread.currentThread() + " exits application " ).printStackTrace(System.out);