Add jpa config to test spring contexts
This commit is contained in:
parent
994c7cb42f
commit
45b429e778
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<bean name="authenticator#user-manager" class="org.apache.archiva.redback.authentication.users.UserManagerAuthenticator">
|
||||
|
@ -35,4 +35,30 @@
|
|||
|
||||
<alias name="userManager#configurable" alias="userManager#default"/>
|
||||
|
||||
<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 />
|
||||
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<bean name="userManager#cached" class="org.apache.archiva.redback.users.cached.CachedUserManager">
|
||||
|
@ -46,4 +46,37 @@
|
|||
<alias name="userConfiguration#redback" alias="userConfiguration#default"/>
|
||||
|
||||
<alias name="userManager#configurable" alias="userManager#default"/>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
|
||||
</beans>
|
|
@ -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">
|
||||
|
||||
<context:property-placeholder system-properties-mode="OVERRIDE"/>
|
||||
|
||||
|
@ -49,4 +49,35 @@
|
|||
|
||||
<alias name="userConfiguration#redback" alias="userConfiguration#default"/>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
</beans>
|
|
@ -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">
|
||||
|
||||
<context:property-placeholder system-properties-mode="OVERRIDE"/>
|
||||
|
||||
|
@ -57,4 +57,36 @@
|
|||
|
||||
<alias name="userConfiguration#redback" alias="userConfiguration#default"/>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<bean name="userConfiguration#default" class="org.apache.archiva.redback.configuration.DefaultUserConfiguration"
|
||||
init-method="initialize">
|
||||
|
@ -46,4 +46,36 @@
|
|||
|
||||
<alias name="userManager#configurable" alias="userManager#default"/>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||
default-lazy-init="false">
|
||||
|
||||
<bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DefaultConfigurableJdoFactory">
|
||||
|
@ -80,5 +80,36 @@
|
|||
<property name="timeToLiveSeconds" value="600"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DefaultConfigurableJdoFactory">
|
||||
<property name="driverName" value="org.hsqldb.jdbcDriver"/>
|
||||
|
@ -41,6 +41,38 @@
|
|||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
|
||||
<bean name="userConfiguration#default" class="org.apache.archiva.redback.configuration.DefaultUserConfiguration">
|
||||
<property name="registry" ref="test-conf"/>
|
||||
</bean>
|
||||
|
|
|
@ -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="false">
|
||||
|
||||
<context:property-placeholder system-properties-mode="OVERRIDE"/>
|
||||
|
@ -123,5 +123,35 @@
|
|||
<property name="timeToLiveSeconds" value="600"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DefaultConfigurableJdoFactory">
|
||||
<property name="driverName" value="org.hsqldb.jdbcDriver"/>
|
||||
|
@ -47,6 +47,36 @@
|
|||
<alias name="commons-configuration" alias="test-conf"/>
|
||||
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||
default-lazy-init="false">
|
||||
|
||||
|
||||
|
@ -72,4 +72,35 @@
|
|||
<alias name="templateProcessor#memory" alias="roleTemplateProcessor"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
*** jpa init ***
|
||||
Needed because of the dependency redback-user-cache -> redback-user-jpa
|
||||
***
|
||||
-->
|
||||
<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 />
|
||||
<!-- **** jpa init *** -->
|
||||
</beans>
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DefaultConfigurableJdoFactory">
|
||||
<property name="driverName" value="org.hsqldb.jdbcDriver"/>
|
||||
|
@ -36,6 +36,32 @@
|
|||
</property>
|
||||
</bean>
|
||||
|
||||
<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 />
|
||||
|
||||
<bean name="userConfiguration#default" class="org.apache.archiva.redback.configuration.DefaultUserConfiguration">
|
||||
<property name="registry" ref="test-conf"/>
|
||||
</bean>
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
~ under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<bean name="userManager#cached" class="org.apache.archiva.redback.users.cached.CachedUserManager">
|
||||
|
@ -46,4 +46,30 @@
|
|||
|
||||
<alias name="userManager#configurable" alias="userManager#default"/>
|
||||
|
||||
<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 />
|
||||
|
||||
</beans>
|
Loading…
Reference in New Issue