jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Dufour" <nrduf...@gmail.com>
Subject Re: Problem between Spring, Jackrabbit and JUnit
Date Mon, 16 Apr 2007 17:34:58 GMT
Responding to myself :)

It works if I put a normal RepositoryBean instead of a
TranscientRepositoryBean !

Nicolas

On 4/16/07, Nicolas Dufour <nrdufour@gmail.com> wrote:
>
> oops I forgot to put my bean file ;)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans "
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:aop="http://www.springframework.org/schema/aop "
>     xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>
>     <!-- JCR REPOSITORY BEANS -->
>
>     <bean id="repository"
>         class="
> org.springmodules.jcr.jackrabbit.TransientRepositoryFactoryBean ">
>         <property name="configuration" value="classpath:jcr/jackrabbit-
> repo.xml"/>
>         <property name="homeDir" value="/jcr/repository"/>
>     </bean>
>
>     <bean id="sessionFactory" class="tips.cma.jcr.TipsSessionFactory">
>         <property name="repository" ref="repository" />
>         <property name="credentials">
>             <bean class="javax.jcr.SimpleCredentials">
>                 <constructor-arg index="0" value="bogus" />
>                 <constructor-arg index="1" ref="password" />
>             </bean>
>         </property>
>     </bean>
>
>     <!-- create the password to return it as a char[] -->
>     <bean id="password" class="java.lang.String">
>         <constructor-arg index="0" value="pass" />
>     </bean>
>
>     <bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
>         <property name="sessionFactory" ref="sessionFactory" />
>         <property name="allowCreate" value="true" />
>     </bean>
>
>
> </beans>
>
> If the test is launched with only this file, the test will stay running
> ... !
>
> Nicolas
>
> On 4/16/07, Nicolas Dufour <nrdufour@gmail.com> wrote:
> >
> > Hello Guys
> >
> > I have written a bunch of test using the excellent class from Spring :
> > AbstractDependencyInjectionSpringContextTests to test my JCR Dao.
> > The problem is : when a test is launched, it doesnt want to exit. I have
> > to kill the program and then of course my .lock is deletable.
> >
> > Any idea ?
> >
> > Nicolas
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message