If the limiting factor is your Resource that is single-thread-access-only, then you should define its service method as synchronized. This way you don't have to rely on the behavior of your client, whether its an MDB, servlet, ejb, etc., to assure serialization.
Gene
Sachin Pandey <[EMAIL PROTECTED]> wrote:
Hi,
Is there a way to configure Message Driven Bean so that it doesn't process
concurrently. The problem is the onMessage function we are accessing a
resource that can be accessed by only one thread at at time (indexing data).
2 MDB's try and index data at the same time which causes problem.
The only way i can think of is having just one instance of the MDB in the
container. JBoss allows this but i am not sure of the other containers. This
will result in low through put with the messages and hamper performance.
Is there a better way to do this??
Cheers
Sachin
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup
