WebSphere Application Server - Message Listener Port parameters and TX timeout values.

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > January 2006 > Message Listener Port parameters and TX timeout values.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Message Listener Port parameters and TX timeout values.
smilie

2006-01-29, 9:47 pm

Hi -
this question is about MDB Message Listener Port configuration and corresponding server transaction time out value.

Suppose on a MDB Listener Port following are the settings:
Max Sessions -3
Max Messages -2

If I understand correctly, That means, at a given time, there will be 3 concurrent transactions launched via MDBs, each processing 2 messages at a time.

Suppose there is a chance that the transaction mentioned here takes time on a external I/O operation(for eg: writing/reading messages to another queue - via legacy code ) and max. wait time for that I/O is 120 Seconds. - that means a transaction may take
maximum 120 seconds in a worst case.

Now, what should be a server level transaction timeout value inorder to prevent Transaction Timeout and subsequent TransactionRollback exception?

Will anything just above 120 (Say 150 Sec.) would do or do I have to multiply it by number of messages specified in Max.Messages parameter (i.e; 150 * 2 = 300 Sec )?

Any suggesions will be highly appreciated.

TIA
R.C
Paul Ilechko

2006-01-29, 9:47 pm

smilie wrote:
> Hi - this question is about MDB Message Listener Port configuration
> and corresponding server transaction time out value.
>
> Suppose on a MDB Listener Port following are the settings: Max
> Sessions -3 Max Messages -2
>
> If I understand correctly, That means, at a given time, there will be
> 3 concurrent transactions launched via MDBs, each processing 2
> messages at a time.


Depends. I assume that as you are talking Listener Ports rather than
Activation Specs that you are on WAS 5. If you're using MQ Series as
your JMS provider (or the WAS 5 internal JMS provider, which is
basically a cut down MQ), changing Max Messages doesn't do anything, it
will only ever process one message per transaction.

Max Session refers to number of concurrent threads running MDB instances
against the destination - not necessarily the same as the number of
transactions (an MDB could call another EJB that starts a new
transaction).


smilie

2006-01-29, 9:47 pm

Hi Lets assume that Transactions are started only for MDB & rest all is "REQUIRED".

But your statement about "changing Max Messages doesn't do anything" contradicts the article at:

http://www-128.ibm.com/developerwor...titheridge.html
<quote>
"This article discusses the effect that changing the maximum messages and maximum sessions properties has when using either the WebSphere Application Server V5 JMS Provider or IBM WebSphere MQ 5.3"
</quote>

Also, as per
http://publib.boulder.ibm.com/infoc.../umb_prolp.html
Under Maximum Messages:
<quote>
For the WebSphere embedded messaging or WebSphere MQ as the JMS provider, if you want to process multiple messages in a single transaction, then set this value to more than 1.
</quote>
I am using Websphere MQ 5.3 and WAS 5.1.x

TIA
R.C

Paul Ilechko

2006-01-29, 9:47 pm

smilie wrote:
> Hi Lets assume that Transactions are started only for MDB & rest all
> is "REQUIRED".
>
> But your statement about "changing Max Messages doesn't do anything"
> contradicts the article at:
>
> http://www-128.ibm.com/developerwor...titheridge.html
> <quote> "This article discusses the effect that changing the maximum
> messages and maximum sessions properties has when using either the
> WebSphere Application Server V5 JMS Provider or IBM WebSphere MQ 5.3"
> </quote>
>
> Also, as per
> http://publib.boulder.ibm.com/infoc.../umb_prolp.html
> Under Maximum Messages: <quote> For the WebSphere embedded messaging
> or WebSphere MQ as the JMS provider, if you want to process multiple
> messages in a single transaction, then set this value to more than 1.
> </quote> I am using Websphere MQ 5.3 and WAS 5.1.x
>
> TIA R.C
>


That's not my understanding, so I'm a little skeptical; however, I
suggest you test to find out the actual behaviour. Perhaps it changed
between 5.0 and 5.1 ...
David Currie

2006-01-29, 9:47 pm

The JMS specification is a bit vague about the interaction of max
messages and transactions and consequently different providers have
chosen different behaviours.

The article is correct in that WebSphere MQ does use max messages but
all of the messages are delivered in the same transaction. As a
consequence, many people chose to set max messages to one for WebSphere
MQ so that, if a transaction is rolled back, it only rolls back the
offending message. In contrast, all other JMS providers I have come
across that support batching of messages will still deliver each message
in a separate transaction.

You should also note that max messages is only a hint to the JMS
provider - it is entitled to entirely ignore your request if it choses.

So, returning to your original question, if WebSphere MQ (or WAS 5
embedded messaging) is your JMS provider then the transaction timeout
does need to cope with the processing of up to max messages.

Regards,
David
smilie

2006-01-30, 2:50 am

Thanks Paul & David for your invaluable time and replies.

TIA
R.C
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com