Announcement Announcement Module
Collapse
No announcement yet.
Why are the commit / robback executed after the end of the struts action Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why are the commit / robback executed after the end of the struts action

    Hello,

    In my application, I can see that the robback / commits are executed after the mapping.forward of struts.

    I can't understand why. Do you ?

    Then I also post another subject, but after the end of the action, I can see several commit/roback/commit/rollback...

    Does somebody has an idea about that and what in my configuration file could involve this ?

    Thanks.

    Here is my configuration file :
    Code:
    	<!-- HibernateThrowsHandler  effectue un flush sur les sessions hibernate-->
    	<bean id="myFlushAdvisor"
    		class="sopra.twork.dao.hibernate.spring.HibernateFlushAdvice">
    		<property name="sessionFactory">
    			<ref local="sessionFactory" />
    		</property>
    		<property name="flush">
    			<value>true</value>
    		</property>
    	</bean>
    	
    	<!-- template for the dao Transactional proxy  -->
    	<bean id="templateDao" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    		<property name="transactionManager"><ref bean="transactionManager"/></property>
    		<property name="target"><ref bean="templateDaoImpl"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="delete*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="save*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="update*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="insert*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="replace*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="add*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="create*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="remove*">PROPAGATION_REQUIRED ,-DaoException</prop>
    				<prop key="*">PROPAGATION_SUPPORTS,-readOnly,-Exception</prop>
    			</props>
    		</property>
    		<property name="postInterceptors">
    			<list>
    				<ref bean="myThrowsAdvisor"/>
    				<ref bean="myFlushAdvisor" />
    			</list>
    		</property>				
    	</bean>
    	
    	<!-- template for the service Transactional proxy  -->
    	<bean id="templateService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    		<property name="transactionManager"><ref bean="transactionManager"/></property>
    		<property name="target"><ref bean="templateDaoImpl"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="find*,get*,select*">PROPAGATION_REQUIRED,-readOnly,-Exception</prop>
    				<prop key="*">PROPAGATION_REQUIRED,-Exception</prop>
    			</props>
    		</property>	
    		<property name="postInterceptors">
    			<list>
    				<ref bean="myThrowsAdvisor"/>
    				<ref bean="myFlushAdvisor" />
    			</list>
    		</property>			
    	</bean>
    Last edited by vincdel; Apr 29th, 2009, 08:20 AM.

  • #2
    OpenSessionInViewFilter might be involved in this problem

    I was just wondering if org.springframework.orm.hibernate.support.OpenSess ionInViewFilter
    might be involved in the fact that the commit/rollback/commit/rollback are executed at the end of the http session (after the mapping.forward)

    Comment

    Working...
    X