aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-security
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-05-18 21:47:01 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-05-20 23:15:10 +0200
commitacc02bf9620de9e82ae36fbb3867e84a1bd1ccf1 (patch)
tree583ef9e1a7756264f465d8e74eaf5a50cb69ae61 /archiva-modules/archiva-web/archiva-security
parent053315826d996288174fb65f51e2f0b04ef88cde (diff)
parentdd311845e13f46062251744f7cc2cfd21e2e5cf4 (diff)
downloadarchiva-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-web/archiva-security')
-rw-r--r--archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml36
1 files changed, 34 insertions, 2 deletions
diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
index 486850de9..08e98f648 100644
--- a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-security/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">
<bean name="securitySystem#testable" class="org.apache.archiva.redback.system.DefaultSecuritySystem">
@@ -120,4 +120,36 @@
<alias name="userConfiguration#redback" alias="userConfiguration#default"/>
<alias name="authorizer#rbac" alias="authorizer#default"/>
<alias name="userManager#configurable" alias="userManager#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