Advertisement
Guest User

Objectify Spring Transaction Configuration

a guest
Sep 20th, 2012
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.05 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
  4.        xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
  5.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:batch="http://www.springframework.org/schema/batch"
  6.        xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  7.                http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8.                http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  9.                http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
  10.                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  11.                http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd
  12.                ">
  13.         <!--ObjectifyのEntityを読み込む -->
  14.         <bean id="objectifyManager" class="ex.objectify.spring.ObjectifyManager">
  15.                 <property name="basePackage" value="gso.model" />
  16.         </bean>
  17.  
  18.         <!-- Objectifyインスタンスを管理する -->
  19.         <bean id="objectifyFactory" class="ex.objectify.spring.ObjectifyFactoryBean">
  20.                 <property name="manager" ref="objectifyManager" />
  21.         </bean>
  22.         <!-- ObjectifyとSpringの宣言的Transaction機能を連携させる -->
  23.         <bean id="transactionManager" class="ex.objectify.spring.ObjectifyTransactionManager">
  24.                 <property name="manager" ref="objectifyManager" />
  25.         </bean>
  26.         <!-- アノテーションによるトランザクションを有効にする -->
  27.         <tx:annotation-driven />
  28.  
  29. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement