Announcement Announcement Module
Collapse
No announcement yet.
Transaction Problem with JDBC DAOs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction Problem with JDBC DAOs

    Hi,

    I'm trying to define my application transaction in a declarative way, but i'm having problems with a PROPAGATION_REQUIRES_NEW method since it is executed in current transaction and not in a new one.

    I'm using the following class as transaction manager since i'm using the weblogic 8.1.4 as aplication server.

    Code:
    org.springframework.transaction.jta.WebLogicJtaTransactionManager
    My application context is:
    Code:
    <beans>
    	<bean id="productManagerTarget" class="bus.ProductManagerImpl">
    		<property name="contadorDao"><ref bean="contadorDao"/></property>
          	<property name="productManagerDao"><ref bean="productManagerDao"/></property>
        </bean>
    
    	<bean id="productManager" 
    		class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
      		<property name="transactionManager"><ref bean="transactionManager"/></property>
          	<property name="target"><ref bean="productManagerTarget"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="getProximoID">PROPAGATION_REQUIRES_NEW</prop>
    				<prop key="storeProduct">PROPAGATION_REQUIRED</prop>
    				<prop key="increasePrice">PROPAGATION_REQUIRED</prop>
    				<prop key="set*">PROPAGATION_REQUIRED</prop>
    				<prop key="getProd*">PROPAGATION_NOT_SUPPORTED</prop>
    			</props>
    		</property>
    	</bean>
    </beans>
    And the PROPAGATION_REQUIRES_NEW method is the getProximoID wich is called from method storeProduct.

    Thanks in advanced,
    rjc
Working...
X