• @jdbc -> As400 files in use

    By eros monzani 1 decade ago

    Hi,

    following the example for Oracle, i made a osgi plugin for the jdbc driver JTOpen 7.7.1
    Installed it without problems. I'm using it (dev server).

    The problem:

    >> using the @jdbcExecute

    It creates many connections as the number of queries on xpage, leaving them opened ("minor" problem).


    If you reload the page, it'll reuse the previous created connections, BUT leave the files/tables on the AS400 in use (huge problem).

    >> using the @jdbcGetConnection (doing the classic conn->stmt->rs -> rs.close->stmt.close->conn.close)

    It creates 1 connection (1 even if i call it many times -> conn.close is working correctly), BUT i'm seeing that the 1 connection remain opened in the end (??? i'm closing it), plus the previous huge problem: files remains in use.

    I'm doing something wrong ?

    Now i'm trying with an url like this "...;socket timeout=30000;threads used=false" (no results...)

     

    Thank You for any response or ideas.


    PS: on the production site, i'm using JTOpen for about 2 years (xpages first release) (pure java: java mgr -> js helper -> xpage) without problems, but it's slower than this one.

     

    • simple pool

      By eros_ monzani 1 decade ago

      Hi,

      i've found, in the bible, the settings for the "simple" pool, but the example is not correct (and not valid xml):

      if anyone need it, it's not


          com.ibm.as400.access.AS400JDBCDriver
          jdbc:as400://srvname;libraries=libs;access=read only;sort=hex;socket timeout=30000;thread used=false
          ***********
          ***********

          
          
              10
              20
              200
              0
              0
              0
              10000
          

      but


          com.ibm.as400.access.AS400JDBCDriver
          jdbc:as400://srvname;libraries=libs;access=read only;sort=hex;socket timeout=30000;thread used=false
          ***********
          ***********
          
          
              10
              20
              200
              0
              0
              0
              10000
          

      as described in the method loadXPagesConnection in the abstract class AbstractFileJdbcProvider

      ___________

      times are in ms ore seconds ???
      ___________

      for the proble of mine, i'll try later if the following settings can kill the connection after the use (connection must be close every time or it leave file in use on the as400 (bad thing!))

        
              0
              0
              200
              1
              30
              60
              20000
          

       

      thank you.

       

       

      • ???

        By eros_ monzani 1 decade ago

        I need to close the connection after 60 secs. So the page load, do some queries, reusing the same connection, after 1 min the conenction close freeing the files on the as400.

        I tried with

          
                0
                0
                200
                1
                30000
                60000
                20000
            

        but the connection is opened and closed for every queryAccigliato

        next tried with

          
                0
                1
                200
                1
                30000
                60000
                20000
            

        but the "1" connection remain open (= files opened = backup will fail).Accigliato

         

        suggestions ???

        thank you.