public class Logic{
private Dao dao = new dao();
private static final Log logger = LogFactory.getLog(Logic.class);
public Dto selectProduct(final String productCode) throws Exception {
Dto dto = null;
try{
dto = dao.selectProduct(productCode);
}catch(Exception e){
logger.error(e);
throw e;
}
return product;
}
public int updateProduct(final Dto Dto) throws Exception{
UserTransaction utx = null;
int updateCpunt = 0;
try{
utx = DaoUtil.getUserTransaction();
utx.begin();
catch(Exception e){
logger.error(e);
if (utx != null){
try {
utx.rollback();
}catch(SystemException e2){
logger.error(e2);
}
}
throw e;
}
return uodateCount;
}
}
最終更新:2014年08月17日 20:51