Hi all,

I'm experiencing something that I cannot understand when dealing with transaction. I've created a BusinessManager to collect all business methods, I mean all procedures that need to be run in a single transaction.
I've registered the Manager in applicationContext-service.xml:

    <bean id="businessManager" parent="txProxyTemplate">
        <property name="target">
            <bean class="it.app.service.impl.BusinessManagerImpl">
                <property name="userManager" ref="userManager"/>
                <property name="roleManager" ref="roleManager"/>
                <property name="mailEngine"  ref="mailEngine"/>
                <property name="message"     ref="mailMessage"/>
            </bean>
        </property>
        <property name="transactionAttributes">
            <props>
<prop key="process*">PROPAGATION_REQUIRED,- BusinessMethodException</prop> <prop key="save*">PROPAGATION_REQUIRED,- BusinessMethodException</prop>
                <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
            </props>
        </property>
    </bean>

What I cannot understand is that if an exception is thrown and catched (in my case, an ObjectRetrievalFailureException from a getObject() method) inside a method of BusinessManager different from declared BusinessMethodException, the transaction is marked for rollback and every subsequent operation fail. Is this the intended behaviour ? I think that only declared exception should rollback the transaction.

Thanks in advance for any tip.

--
"That's thirty minutes away. I'll be there in ten." -- Mr. Wolfe

Marco Papini <[EMAIL PROTECTED]>
CINETICA - via III settembre, 11 - 47891 Dogana (San Marino)
TEL: (+39) 0549 970848 - FAX: (+39) 0549 970849


Reply via email to