| <?xml version="1.0" encoding="UTF-8"?> |
| <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation=" |
| http://www.springframework.org/schema/beans |
| http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> |
| |
| <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
| <property name="location" value="appContext.properties" /> |
| </bean> |
| |
| <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
| <property name="persistenceUnitName" value="SpringContainerPu" /> |
| <property name="jpaVendorAdapter"> |
| <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"> |
| <property name="showSql" value="false" /> |
| <property name="generateDdl" value="true" /> |
| <property name="databasePlatform" value="${platform}" /> |
| </bean> |
| </property> |
| <property name="persistenceUnitManager" ref="persistenceUnitManager" /> |
| </bean> |
| |
| <bean id="persistenceUnitManager" class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager"> |
| <property name="defaultDataSource" ref="dataSource" /> |
| <property name="dataSources"> |
| <map> |
| <entry> |
| <key> |
| <value>jdbc/__default</value> |
| </key> |
| <ref bean="dataSource" /> |
| </entry> |
| <entry> |
| <key> |
| <value>jdbc/jta</value> |
| </key> |
| <ref bean="dataSource" /> |
| </entry> |
| </map> |
| </property> |
| <property name="loadTimeWeaver"> |
| <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> |
| </property> |
| </bean> |
| |
| <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> |
| <property name="driverClassName" value="${jdbc.driverClassName}" /> |
| <property name="url" value="${jdbc.url}" /> |
| <property name="username" value="${jdbc.username}" /> |
| <property name="password" value="${jdbc.password}" /> |
| </bean> |
| |
| <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> |
| <property name="entityManagerFactory" ref="entityManagerFactory" /> |
| </bean> |
| |
| <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" /> |
| |
| </beans> |