Commits

masini  committed 1ed5610

Fixed bad implementation of transaction proxy. Now we have a fresh workflow instance for every invocation

  • Participants
  • Parent commits 6c11c71

Comments (0)

Files changed (1)

File src/test/new-osworkflow-spring.xml

 		<property name="factory"><ref local="workflowFactory"/></property>		
 	</bean>
 	
-	<bean id="workflow" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
+	<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
 		<property name="transactionManager"><ref local="transactionManager"/></property>
-		<property name="target"><ref local="workflowTarget"/></property>
 		<property name="transactionAttributes">
 			<props>
 				<prop key="*">PROPAGATION_REQUIRED</prop>
 		</property>
 	</bean>
 
+	<bean id="workflow" class="org.springframework.aop.framework.ProxyFactoryBean">
+		<property name="singleton">
+			<value>false</value>
+		</property>
+		<property name="proxyInterfaces">
+			<value>com.opensymphony.workflow.Workflow</value>
+		</property>
+		<property name="interceptorNames">
+			<list>
+				<value>transactionInterceptor</value>
+				<value>workflowTarget</value>
+			</list>
+		</property>
+	</bean>
+
 	<bean id="workflowTarget" class="com.opensymphony.workflow.basic.BasicWorkflow" singleton="false">
 		<constructor-arg><value>test</value></constructor-arg>
 		<property name="configuration"><ref local="osworkflowConfiguration"/></property>