package org.zttc.itat.template; /** * 基于继承实现模板设计模式 * ...public abstract boolean isLog(); public void execute() { beginConnection..
itatis模板方法的设计模式希望能解答下
package org.zttc.itat.template; /** * 基于继承实现模板设计模式 * ...public abstract boolean isLog(); public void execute() { beginConnection..
protected TransactionStatus startTransactionSilently() , { ,try, { ,DefaultTransactionDefinition def = new DefaultTransactionDefinition(); ,def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); ,return txManager.getTransaction(def); , } ,catch (TransactionException e) , { ,LOG.error(
"cannot start transaction for
" + this.getClass(), e); ,return null; , } , } ,protected void commitTransactionSilently(final TransactionStatus transaction) , { ,if (null != transaction) , { ,try, { ,txManager.commit(transaction); , } ,catch (TransactionException e) , { ,LOG.error(
"cannot commit transaction for
" + this.ge