-
1. Re: Control the MDB instance number
nhebert Jul 23, 2002 7:17 AM (in response to ericmacau)Eric,
Under most situations this is one of those things you
should not have to worry about! The number of instances
of an EJB whether it be an MDB, Session or Entity Bean,
is the responsibility of the application server as part
of managing resources.
Why do you want only *one* instance of your MDB? I would
expect JBoss to take on the responsibility of creating as
many of your MDB instances as are required to handle the
inbound message load at that point in time.
Later, when the message arrival rate decreases, JBoss
would take on the responsibility of evicting (removing)
the least recently used MDBs from memory.
After all this is its responsibility.
So I will ask the question again.
Why to you feel that you need only one instance of your
MDB?
Cheers,
Noel. -
2. Re: Control the MDB instance number
ericmacau Jul 24, 2002 12:25 PM (in response to ericmacau)Hi Noel,
I just want to handle all message one-by-on in order.
If all the message(transaction) will be handled at the same time(create a new instance). I can't control the real sequence for the submited sequence in the MDB.
Regards,
Eric -
3. Re: Control the MDB instance number
nhebert Jul 25, 2002 6:56 AM (in response to ericmacau)G'Day Eric,
I am still not quite sure what you are trying to
do.
>I can't control the real sequence for the submited sequence in the MDB.
Do the messages on the inbound queue have some relationship
with one another that processing them in some sequence
is important?
Or, does the sequence in which they are read have
significance to some business process?
I a trying to understand what you mean by the "real
sequence" and the "submitted sequence". How are
they related?
Cheers,
Noel. -
4. Re: Control the MDB instance number
faustodelatog Apr 27, 2010 11:47 AM (in response to ericmacau)I had the same problem, the solution is set the maxSession property,
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1"),
...