oracle11g - Java block when execute Oracle Procedure -


i have problem can not solve ,i use ojdbc7 libraries connect java database oracle11g @ launch of procedure when ends java application not go forward without responce. tried change driver ojdbc nothing know give me ideas ? attaching code :

private static hashmap<string, connection> connessioni = new hashmap<>();  .... public static connection getconnectionistance(string connessione){         connection connection=null;         try{             if((connection=connessioni.get(connessione))==null){                                          class.forname("driver");                          connection=drivermanager.getconnection("urldb","userdb","pwddb");                      connection.setautocommit(false);                      connessioni.put(connessione, connection);              }         }catch(sqlexception e){             e.printstacktrace();         }catch(classnotfoundexception e){             e.printstacktrace();         }catch(exception e){             e.printstacktrace();         }          return connection;     } 

main

....

callablestatement callstatement=null; callstatement = connection.preparecall({call nomepkg.mainpkg(?)}); callstatement.registeroutparameter(1, types.integer);  system.out.println("start procedure");                 callstatement.execute(); system.out.println("end procedure"); 

the console never print "end procedure".

p.s. procedure takes hour , half

jdbc statements make java process wait result (or error). if want let application go on while executing database code, use backend thread call execute() method.

also know there may or may not timeouts @ database layer, methods not respond after while can time out; not return message jdbc layer , jdbc layer won't come back.

look @ oracle configuration timeout settings.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -