日期:2014-05-17 浏览次数:20902 次
<!-- TransactionManager --> <bean id="hibTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <tx:advice id="txAdvice" transaction-manager="hibTransactionManager"> <tx:attributes> <tx:method name="add*" propagation="REQUIRED" /> <tx:method name="del*" propagation="REQUIRED" /> <tx:method name="update*" propagation="REQUIRED" /> <tx:method name="select*" propagation="REQUIRED"/> <tx:method name="search*" propagation="REQUIRED"/> <tx:method name="insert*" propagation="REQUIRED" /> <tx:method name="do*" propagation="REQUIRED" /> <tx:method name="*" propagation="SUPPORTS" read-only="true" /> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut expression="execution(* biz.*.*(..))" id="bizMethods" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" /> </aop:config> <!-- ********************************我是很长的分割线******************************** --> <!-- Dao --> <bean id="petDiaryDao" class="dao.impl.hib.PetDiaryDaoHibImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean id="petInfoDao" class="dao.impl.hib.PetInfoDaoHibImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <!-- ********************************我是很长的分割线******************************** --> <!-- Biz --> <bean id="petDiaryBizTarget" class="biz.impl.PetDiaryBizImpl"> <property name="petDiaryDao" ref="petDiaryDao" /> </bean> <bean id="petInfoBizTarget" class="impl.PetInfoBizImpl"> <property name="petInfoDao" ref="petInfoDao" /> </bean> <!-- ********************************我是很长的分割线******************************** --> <!-- Advice --> <bean id="lotteryAdvice" class="advice.LotteryAdvice"> <property name="petInfoBiz" ref="petInfoBizTarget" /> </bean> <bean id="petInfoBiz" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="proxyInterfaces" value="biz.PetInfoBiz" /> <property name="interceptorNames" value="lotteryAdvice" /> <property name="target" ref="petInfoBizTarget" /> </bean> <bean id="petDiaryBiz" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="ProxyInterfaces" value="biz.PetDiaryBiz" /> <property name="interceptorNames" value="lotteryAdvice" /> <property name="target" ref="petDiaryBizTarget" /> </bean>
![]()
推荐阅读更多>
- 一个JAVA程序占多大内存?解决方法
- java 模拟Ping过程,用InetSocketAddress实现,该如何处理
- 关于JVM的64bit和32bit经典有关问题,大家讨论下,最好有人试验过
- java的socket,如何同时侦听双网卡?包括127.0.0.1
- SSH框架项目!解决方案
- 给女朋友送花,该怎么解决
- 高分,待,立即给分 :如果获取点击的链接来源地址的IP地址
- hibernate怎么读取ORACL中的blob数据
- myeclipse启动后 第一次访问页面 mysql进程会自动关闭,该如何解决
- compass 搜索引擎新手有关问题
- java可不可以用来做网络游戏,该如何处理
- 超弱有关问题:JAVA能执行select into sql语句嘛
- 输入某年某月某日,判断这一天是这一年的第几天,该如何解决
- Object的clone步骤
- 并行计算?该怎么处理
- hql两表查询如何写
- 想做一个全系统检索效能求方法求思路
- 求 精通EJB3.0 中文版 电子书 ~该如何解决
- jtable 怎么打印
- 怎样用android重写j2me,player里的createPlayer(InputStream stream, String type)解决方案