derek
Jun 29th, 2006, 09:47 AM
Going through the JCR chapter in the reference manual.
Not quite understanding the necessary configuration for a LocalTransactionManager.
My test program was working without transactions. Then added this to my config:
<bean id="jcrTransactionManager" class="org.springmodules.jcr.jackrabbit.LocalTransactionM anager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
and got:
java.lang.IllegalStateException: No session bound to thread, and configuration does not allow creation of non-transactional one here
Haven't quite understood the bit about ProviderManagers. The example doesn't work as JcrTemplate doesn't seem to have a providerManager property. Looking through the source, shouldn't that rather be set on the JcrSessionFactory using setSessionHolderProviderManager(...) ?
However, I don't quite understand what this ProviderManager does. Whether it is required. And if so, what I need to put into META-INF/services
The manual does say "JCR support contains (quite a lot of) classes to make this issue as painful as possible." but I'm sure that must be a typo :)
Appreciate any help.
Regards,
D.
Not quite understanding the necessary configuration for a LocalTransactionManager.
My test program was working without transactions. Then added this to my config:
<bean id="jcrTransactionManager" class="org.springmodules.jcr.jackrabbit.LocalTransactionM anager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
and got:
java.lang.IllegalStateException: No session bound to thread, and configuration does not allow creation of non-transactional one here
Haven't quite understood the bit about ProviderManagers. The example doesn't work as JcrTemplate doesn't seem to have a providerManager property. Looking through the source, shouldn't that rather be set on the JcrSessionFactory using setSessionHolderProviderManager(...) ?
However, I don't quite understand what this ProviderManager does. Whether it is required. And if so, what I need to put into META-INF/services
The manual does say "JCR support contains (quite a lot of) classes to make this issue as painful as possible." but I'm sure that must be a typo :)
Appreciate any help.
Regards,
D.