jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Bort" <guilla...@zenexity.fr>
Subject Re: Berkeleydb persistence, and Spring support
Date Thu, 21 Jul 2005 18:21:57 GMT
Brian,

> 1) you can either use jcr's regular jaas authentication or a
> pre-authenticated subject

Sounds interesting. I will take a look at your code for a
pre-authenticated subject.

> 2) the dao support class has only one callback method for both read-only
> and read-write access, and it does not require you to manually convert
> jcr exceptions.

Great. I have not implemented the callback and template parts of the
spring DAO support.

> perhaps we can merge the good ideas from both implementations and offer
> the final result as a contribution to spring? i'm not terribly
> interested in maintaining this code ;)

I'm agree.

> ps: is there a non-annotations way to specify transactions and/or a
> backport of annotations?

Yes, you can use declarative transactions without annotations support.

For example :

<bean id="transactionManager"
class="org.springframework.jcr.JcrTransactionManager">
    <property name="sessionFactory"><ref bean="sessionFactory" /></property>
</bean>

<bean id="myServiceTarget" class="serviceClass" />

<bean id="myService"
   class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    <property name="transactionManager"><ref
bean="transactionManager"/></property>
    <property name="target"><ref bean="myServiceTarget"/></property>
    <property name="transactionAttributes">
        <props>
            <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="store*">PROPAGATION_REQUIRED</prop>
        </props>
    </property>
</bean>

You can also use annotations with java 1.4 and apache commons-attributes
(spring support it natively) but you should compile them with an ant task.

And there is http://backport175.codehaus.org/. But i never tried.

guillaume

> Guillaume Bort wrote:
>
>> I have also worked on a jcr support for the spring framework. I think
>> that it's more a contribution to the spring project, but I'd like
>> feedback from the jackrabbit users first.
>> The spring support provides a jcr session factory bean, a jcr
>> transaction manager implementing the spring PlatformTransactionManager
>> and an exception translator that converts jcr exceptions to spring data
>> access exceptions.
>> It allows the use of spring declarative transactions for jcr operations.
>
> nice! i've done something similar, but with slightly different features:
>
> 1) you can either use jcr's regular jaas authentication or a
> pre-authenticated subject
>
> 2) the dao support class has only one callback method for both read-only
> and read-write access, and it does not require you to manually convert
> jcr exceptions.
>
> 3) transactions are not managed
>
> you can see the source code at
> <http://svn.osafoundation.org/server/commons/trunk/spring/>.
>
> perhaps we can merge the good ideas from both implementations and offer
> the final result as a contribution to spring? i'm not terribly
> interested in maintaining this code ;)
>
> ps: is there a non-annotations way to specify transactions and/or a
> backport of annotations?
>



Mime
View raw message