diff options
author | Martin Stockhammer <martin_s@apache.org> | 2017-05-18 21:47:01 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2017-05-20 23:15:10 +0200 |
commit | acc02bf9620de9e82ae36fbb3867e84a1bd1ccf1 (patch) | |
tree | 583ef9e1a7756264f465d8e74eaf5a50cb69ae61 /archiva-modules/archiva-base/archiva-proxy | |
parent | 053315826d996288174fb65f51e2f0b04ef88cde (diff) | |
parent | dd311845e13f46062251744f7cc2cfd21e2e5cf4 (diff) | |
download | archiva-acc02bf9620de9e82ae36fbb3867e84a1bd1ccf1.tar.gz archiva-acc02bf9620de9e82ae36fbb3867e84a1bd1ccf1.zip |
[MRM-1942] Merge branch 'jpa' into master
Removing JDO and add JPA backend.
Diffstat (limited to 'archiva-modules/archiva-base/archiva-proxy')
-rw-r--r-- | archiva-modules/archiva-base/archiva-proxy/pom.xml | 6 | ||||
-rwxr-xr-x | archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml | 36 |
2 files changed, 40 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml index c55a1f350..a474f97e8 100644 --- a/archiva-modules/archiva-base/archiva-proxy/pom.xml +++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml @@ -209,6 +209,12 @@ <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <scope>test</scope> + </dependency> + </dependencies> <build> <plugins> diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml index ee094eaf1..5815e0338 100755 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml @@ -20,11 +20,11 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:context="http://www.springframework.org/schema/context" + xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context-3.0.xsd" + http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" default-lazy-init="true"> <context:annotation-config/> @@ -85,4 +85,36 @@ <alias name="userConfiguration#redback" alias="userConfiguration#default"/> + <!-- *** + JPA settings + *** --> + <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> + <property name="jpaVendorAdapter" > + <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" /> + </property> + <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" /> + <property name="jpaPropertyMap"> + <map> + <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" /> + <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" /> + <entry key="openjpa.ConnectionUserName" value="sa" /> + <entry key="openjpa.ConnectionPassword" value="" /> + <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" /> + <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" /> + <entry key="openjpa.jdbc.MappingDefaults" + value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/> + </map> + </property> + + </bean> + + <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" > + <property name="entityManagerFactory" ref="entityManagerFactory" /> + </bean> + + <tx:annotation-driven /> + <!-- *** + End of JPA settings + *** --> + </beans>
\ No newline at end of file |