Package com. YC. ycportal. gywork;
Import java. SQL. callablestatement;
Import java. SQL. connection;
Import java. util. List;
Import javax. SQL .*;
Import org. Apache. commons. Logging. log;
Import org. Apache. commons. Logging. logfactory;
Import org. loushang. waf. componentfactory;
Public class exepro {
Private Static log = logfactory. getlog (exepro. Class );
Public String exepro (string proname ){
Datasource logdao = (datasource) componentfactory. getbean ("datasource ");
Connection con = NULL;
Callablestatement csmt = NULL;
try {
con = logdao. getconnection ();
log.info ("----------- kaishi");
con. setautocommit (true);
csmt = con. preparecall (proname);
csmt.exe cuteupdate ();
con. setautocommit (false);
con. commit ();
log.info ("----------- jieshu");
}catch (exception e) {
log. error ("resetrecord error:" + E. getmessage ();
return "error" + E. getmessage ();
}finally {
If (csmt! = NULL) {
try {
csmt. close ();
}catch (exception e) {
log. error ("An error occurred while disabling preparedstatement:" + E. getmessage ();
}< BR >}< br> If (con! = NULL) {
try {
con. close ();
}catch (exception e) {
log. error ("failed to close connection:" + E. getmessage ();
}< BR >}< br> return "success";
}< BR >}< br>