Java service to create db connection pool

wMusers,

My client is using the following java code in a custom service to open a single connection to their oracle db (which then calls a proc and inserts a clob):

     getConnection123(dbServer , dbUserId, dbPasswd ,dbPort,dbName);  
     clob=getCLOB(it_xnldata);  
      CallableStatement cs = null;  
     String sql="begin  "+proName+"(?,?); end;" ;  
     cs = (CallableStatement)conn.prepareCall( sql);  
     cs.setObject(1,POG_ID);  
     cs.setObject(2,clob);  
     cs.execute();  
     conn.close();  

It works fine for the most part, but occasionally, they get a trigger (set to serial) deadlock:

    Thread Dump:  
    FOUND A JAVA LEVEL DEADLOCK:  
    ----------------------------  
    "ABIomsTAT.trigger:callSAPI7":  
    waiting to lock monitor 0x2ed20d0 (object 0x4e3d07d0, a  

oracle.jdbc.driver.OracleConnection),
which is locked by “HTTP Handler 167.116.201.59”
“HTTP Handler 167.116.201.59”:
waiting to lock monitor 0x2ed2050 (object 0x4e3d09c8, a
oracle.jdbc.ttc7.TTC7Protocol),
which is locked by “ABIomsTAT.trigger:callSAPI7”

causing them to have to restart their production IS. Because of other
reasons, they can’t use the standard IS JDBC adapter connection.

1- What causes could cause the deadlock here?
2- Do you have any sample java services to create a db connection pool? We think that creating a pool will remedy the deadlock issue.

Thank you.

John,

Here with uploading a custom JS code,for inserting Blobs(large xml files)to oracle DB using WmDB Alias and ConnectionManager.

Also you should place the code in the Shared tab,which there is an indication in the code SHARED.

So check the code and customize it accordingly, if at all helps.

insertBlob_JS
insertBlob_JS.txt (26.4 k)

HTH,
RMG.

RMG,
I have a similar problem but not able to open the attachment. Pls post that again.

Thanks in advance

RMG ,
Does this approach work for getting JDBC connections in webMethods.
is there any restrictions in wbmethods jdbc connection poll access from Java.