synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irantha" <iran...@wso2.com>
Subject Re: Commons JMS transport diffs for JTA transactions
Date Mon, 10 Nov 2008 16:56:22 GMT
Andreas,

1. Yes, at the moment. Pool is used to avoid creating a thread per 
destination and later we can change this to get more parallelism. We can 
easily get even greater level of parallelism if we use JTA features to 
detach transactions off the associated thread. What do you think about using 
transaction suspend and resume?

2. we can better structure the code.

3. JMS implementations allow users to specify a redelivery policy. Which 
include redelivery delay, limit and dead letter queue/topic. So I don't 
think we need to handle this in code.



-Irantha



----- Original Message ----- 
From: "Andreas Veithen" <andreas.veithen@gmail.com>
To: <dev@synapse.apache.org>
Sent: Monday, November 10, 2008 7:00 PM
Subject: Re: Commons JMS transport diffs for JTA transactions


> Irantha,
>
> I have three comments here:
>
> 1. The solution is essentially single threaded: at any given moment
> there is at most one thread that is receiving or processing a message
> (for a given destination). Do we really want this? If yes, do we need
> a worker pool for this?
> 2. I think we are trying to pack too much different things into the
> same piece of code (JMSMessageReceiver and JMSMessageReceiver.Worker).
> If we use MessageConsumer#receive, then it doesn't make sense to
> instantiate a JMSMessageReceiver, which is an implementation of
> MessageListener. I think that in order to support
> MessageConsumer#receive, we should first refactor the existing code to
> better separate the part that is concerned with message
> reception/acknowledgement and transactions from the part that really
> processes the message.
> 3. If we rollback messages, this means that at some point they will be
> received again (retry). How does your solution behave with respect to
> this?
>
> Regards,
>
> Andreas
>
> On Mon, Nov 10, 2008 at 13:06, Irantha <irantha@wso2.com> wrote:
>> Attched  commons JMS transport diffs to support JTA User Transactions.
>> axis2.xml transport receiver configuration is as following,
>>
>> <transportReceiver name="jms"
>> class="org.apache.synapse.transport.jms.JMSListener">
>>     <parameter name="default">
>>        <parameter
>> name="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</parameter>
>>        <parameter 
>> name="java.naming.provider.url">localhost:1099</parameter>
>>        <parameter
>> name="transport.jms.ConnectionFactoryJNDIName">java:JmsXA</parameter>
>>         <parameter
>> name="transport.jms.UserTransactionJNDIName">UserTransaction</parameter
>>        <parameter name="transport.jms.AutoCommit">true</parameter>
>>       <parameter name="transport.jms.ConnectionFactoryType"
>> locked="false">queue</parameter>
>>    </parameter>
>> </transportReceiver>
>>
>> -Irantha
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message