rmi 服務2

<bean id="transactionManager"
  class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  <property name="sessionFactory" ref="sessionFactory" />
 </bean>

 <bean id="transactionTemplate"
  class="org.springframework.transaction.support.TransactionTemplate">
  <property name="transactionManager" ref="transactionManager" />
 </bean>

 <tx:advice id="txAdvice" transaction-manager="transactionManager">
  <tx:attributes>
   <tx:method name="get*" propagation="SUPPORTS" read-only="true" />
   <tx:method name="query*" propagation="SUPPORTS" read-only="true" />
   <tx:method name="find*" propagation="SUPPORTS" read-only="true" />
   <tx:method name="search*" propagation="SUPPORTS" read-only="true" />
   <tx:method name="*" propagation="REQUIRED" />
  </tx:attributes>
 </tx:advice>

 <aop:config proxy-target-class="true">
  <aop:pointcut id="interceptorPointCuts"
   expression="execution(* com.hs.ism..*Service.*(..))" />
  <aop:advisor advice-ref="txAdvice" pointcut-ref="interceptorPointCuts" />
 </aop:config>


 <!-- DAO服務引用 -->
 <osgi:reference id="moDao" interface="com.hs.ism.cbb.base.dao.IMoDao" />

 <!-- 分域服務引用 -->
 <osgi:reference id="scopeManager"
  interface="com.hs.ism.cbb.base.sdk.service.IScopeManager" />

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章