public String updateCustMobile(String mobileNo, String custId)
{ Map m = new HashMap();
m.put("custId",custId);
m.put("mobileNo",mobileNo);
SqlMapClient sqlMap;
try { sqlMap = getSqlMapClientTemplate().getSqlMapClient();
sqlMap.startTransaction();
// Set commit to false for rollback if any exception
sqlMap.getCurrentConnection().setAutoCommit(false);
sqlMap.update("xmlSQL.updateCust", m);
.....
.....
sqlMap.endTransaction();
} catch(Exception e)
{
e.printStackTrace();
} finally {
if(!(sqlMap == null)) sqlMap.endTransaction();
}
return status;
}
No comments:
Post a Comment