6b5500c527cbf1ebb5f87c7a21fd829241e3242e
[JavaForFun] /
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <beans xmlns="http://www.springframework.org/schema/beans"\r
3        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
4        xmlns:util="http://www.springframework.org/schema/util"\r
5        xmlns:tx="http://www.springframework.org/schema/tx"\r
6        xmlns:jee="http://www.springframework.org/schema/jee"\r
7        xsi:schemaLocation="http://www.springframework.org/schema/beans\r
8         http://www.springframework.org/schema/beans/spring-beans.xsd\r
9         http://www.springframework.org/schema/util\r
10         http://www.springframework.org/schema/util/spring-util.xsd\r
11         http://www.springframework.org/schema/tx \r
12         http://www.springframework.org/schema/tx/spring-tx.xsd\r
13         http://www.springframework.org/schema/jee\r
14         http://www.springframework.org/schema/jee/spring-jee.xsd">\r
15 \r
16         \r
17         <!-- enable the configuration of transactional behavior based on annotations -->\r
18     <tx:annotation-driven transaction-manager="transactionManager"/>\r
19 \r
20 \r
21         <!-- Using external provided datasource (in my case the one from Tomcat) -->\r
22         <jee:jndi-lookup id="dataSource" jndi-name="jdbc/example" expected-type="javax.sql.DataSource"/>\r
23     \r
24     \r
25         <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">\r
26                 <property name="entityManagerFactory" ref="entityManagerFactory" />\r
27         </bean>\r
28         \r
29         <import resource="liquibase/liquibase.xml" />\r
30         \r
31 </beans>\r