日期:2014-05-19 浏览次数:20969 次
<Resource
name="jdbc/customermanage"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="......"
password="......"
driverClassName="oracle.jdbc.OracleDriver"
url=".................."/>
<aop:config>
<aop:pointcut id="logger" expression="execution(* com.chinaboxun.*.*.service.*(..))" />
<aop:aspect id="loggerAspect" ref="genericLogger">
<aop:around pointcut-ref="logger" method="invoke" />
</aop:aspect>
</aop:config>
<bean id="TransactionProxyFactory" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true">
<property name="transactionManager" ref="TransactionManager"/>
<property name="transactionAttributes">
<props>
<prop key="add*">PROPAGATION_REQUIRED</prop>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="del*">PROPAGATION_REQUIRED</prop>
<prop key="run">PROPAGATION_REQUIRED</prop>
<prop key="send*">PROPAGATION_REQUIRED</prop>
<prop key="doInit*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="is*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="edit*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
Object[] objs =customerManage.selectBymanage(......); //......
numbers = hqlDao.find(sqlCount.toString(), params); //......
//类继承了HibernateDaoSupport
private Session session = null;
public List<T> find(String hql, List<T> params, int pageRows, int pageIndex){
// TODO Auto-generated method stub
List result = null;
if (null !