Laurence Weil
2012-02-08 12:53:43 UTC
Hi,
I've configured a flow that starts a transaction on receiving a message, the message is passed off to a component which transforms & saves the message into a temporary store using hibernate.
Finally a webservice is called to run some business processes.
If the webservice fails I want the data that was saved in the component to be rolled back. However I'm not finding a way of getting this to work yet.
My config is as follows:
<flow name="ProcessDDIRecordCreate">
<inbound-endpoint ref="ddiRequest">
<jms:transaction action="ALWAYS_BEGIN" />
</inbound-endpoint>
<component>
<method-entry-point-resolver>
<include-entry-point method="transformAndSave" />
</method-entry-point-resolver>
<spring-object bean="transformer" />
</component>
<outbound-endpoint ref="businessProcessWebservice" exchange-pattern="request-response">
<cxf:jaxws-client serviceClass="an.other.BusinessProcess" operation="runUpdateProcess" />
</outbound-endpoint>
<default-exception-strategy>
<rollback-transaction exception-pattern="*"/>
<outbound-endpoint ref="error" />
</default-exception-strategy>
</flow>
The following error is printed out:
WARN JmsTransaction - Transaction rollback attempted, but no resource bound to ***@bc8fc985-524b-11e1-9c17-e51694736e2c[status=STATUS_MARKED_ROLLBACK, key=null, resource=null]
Have tried this with the XA tx manager as well and no joy.
My hibernate transaction is marked up in the transformer class using the @Transactional annotation.
How can I get my component class to take part in the transaction?
Thanks
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I've configured a flow that starts a transaction on receiving a message, the message is passed off to a component which transforms & saves the message into a temporary store using hibernate.
Finally a webservice is called to run some business processes.
If the webservice fails I want the data that was saved in the component to be rolled back. However I'm not finding a way of getting this to work yet.
My config is as follows:
<flow name="ProcessDDIRecordCreate">
<inbound-endpoint ref="ddiRequest">
<jms:transaction action="ALWAYS_BEGIN" />
</inbound-endpoint>
<component>
<method-entry-point-resolver>
<include-entry-point method="transformAndSave" />
</method-entry-point-resolver>
<spring-object bean="transformer" />
</component>
<outbound-endpoint ref="businessProcessWebservice" exchange-pattern="request-response">
<cxf:jaxws-client serviceClass="an.other.BusinessProcess" operation="runUpdateProcess" />
</outbound-endpoint>
<default-exception-strategy>
<rollback-transaction exception-pattern="*"/>
<outbound-endpoint ref="error" />
</default-exception-strategy>
</flow>
The following error is printed out:
WARN JmsTransaction - Transaction rollback attempted, but no resource bound to ***@bc8fc985-524b-11e1-9c17-e51694736e2c[status=STATUS_MARKED_ROLLBACK, key=null, resource=null]
Have tried this with the XA tx manager as well and no joy.
My hibernate transaction is marked up in the transformer class using the @Transactional annotation.
How can I get my component class to take part in the transaction?
Thanks
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email