首页 试题广场 > 试题详情
多选题

【C015397】关于Spring配置声明式事务,下列说法和配置错误的是( )。

  • A.需要导入tx和aop命名空间
  • B.<!-- 配置事务管理器 -->
    <bean id="txManager"
    class="org.springframework.orm.hibernate3.TransactionManager">
    <property name="sessionFactory" ref="sessionFactory" />
    </bean>
  • C.<!-- 定义事务通知 -->
    <tx:advice id="txAdvice" transaction-manager="txManager">
    <tx:attributes>
    <tx:method name="get*" propagation="REQUIRED" read-only="true"/>
    <tx:method name="do*" propagation="REQUIRED"/>
    <tx:method name="*" propagation="REQUIRED" read-only="true"/>
    </tx:attributes>
    </tx:advice>
  • D.<!-- 配置事务切面 -->
    <aop:config>
    <aop:pointcut id="serviceMethod"
    expression="execution(* cn.jbit.service.*.*(..))"/>
    <aop:advisor advice="txAdvice" pointcut="serviceMethod"/>
    </aop:config>
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 3个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部