[
https://issues.apache.org/jira/browse/CXF-180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656918#action_12656918
]
Willem Jiang commented on CXF-180:
----------------------------------
Hi Christian,
You asked good questions for the jms transcation roll back.
If you just want to filter certain exception which you don't want to roll back
if the exception is thrown. You can configure the TranscationProxyFactoryBean
like this
{code}
<bean id="transactionalImplementor"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="jmsTransactionManager" />
<property name="target" ref="implementor" />
<property name="transactionAttributes">
<props>
<prop key="greetMe">PROPAGATION_REQUIRED</prop>
<!-- Commit if pingMe throw PingMeFault , the definition could
be "-ExceptionNameToRollbackOn" or "+ExceptionNameToCommitOn"-->
<prop key="pingMe">PROPAGATION_REQUIRED,+PingMeFault</prop>
</props>
</property>
</bean>
{code}
For the question of redeliver the message, I think we need to make the
implementor know if it can't recovery from certain failure, it should throw
some kind of fault instead of the runtime exception to break out the fault -
roll back cycle. If we want to use the dead letter queue for the bad message ,
we need to hack the TransactionTemplate to add our consumer solution.
> JMS Transport support for transaction
> -------------------------------------
>
> Key: CXF-180
> URL: https://issues.apache.org/jira/browse/CXF-180
> Project: CXF
> Issue Type: New Feature
> Components: Transports
> Affects Versions: 2.1
> Reporter: Willem Jiang
> Assignee: Willem Jiang
>
> Here are some points on the JMS Transport stuff:
> [ulhas]
> Currently JMS Session pool in Artix uses different Message Receiver
> acknowledgement mechanism than Celtix to provide Transaction support.
> (Celtix uses AUTO_ACKNOWLEDGEMENT) whereas Artix uses CLIENT_ACKNOWLEDGE
> for server side.
> [Willem]
> AUTO_ACKNOWLEDGMENT just make sure JMS broker client
> received the message, but not sure about the client had processed the message.
> If we want to support the Transaction in CXF, I think we need to change to
> CLIENT_ACKNOWLEDGE to make sure the message had been processed in
> message level.
> [ulhas]
> Second part of the transaction support is in current JMSServerTransport
> postDispatch code. This is the place where the server make sure that the
> message received can be processed and it is safe to send the
> Acknowledgement to JMS broker to remove the message from topic/queue and
> commit.
> [Willem]
> In current CXF JMS Transport implementation the transport just provide an
> channel
> to send and receive messages. All the message handling stuff need to play
> with the
> Stream. I think it is a good place in the OutputStream close method to send
> acknowledgment to JMS broker.
> So if we want to support local transaction in CXF JMS, we just need change
> the Session
> acknowledgment and the OutputStream close method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.