users@glassfish.java.net

Re: mdb & cluster

From: Alexander Schell <DealeyLama_at_gmx.de>
Date: Tue, 03 Apr 2012 14:51:51 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Nigel

Thanks for your answer...I guessed as much as this...
But I'm afraid I asked the wrong question... :)

I'll try to rephrase it: In my MDB - It is listening on a queue - I'm
using a stateless session bean to process the incoming messages...The
MDB obtains the session bean by dependency injection and calls a
processing methond on it...
I would like to know how I can make sure that the actual processing is
spread over all the cluster members...

Thank you and with best regards

Alexander Schell


On 02.04.2012 18:14, Nigel Deakin wrote:
>> I have some problems understanding work load managment regarding
>> a mdb using application in a cluster...
>>
>> As far as I know only one instance of the mdb is executed...In
>> this instance I use an enterprise bean - by injection - to handle
>> the incoming messages...
>>
>> I wonder if the actual handling is really spread over all the
>> cluster members or if it's happening only where the enterprise
>> bean instance resides...?
>
> When you deploy a MDB you're actually creating a pool of MDB
> instance on each instance in the cluster. If the MDB is listening
> on a queue then *one* MDB instance, somewhere in the cluster, will
> be selected to receive each message.
>
> If the MDB is listening on a topic then the same applies. However
> for non-durable subscriptions you have the option of changing this
> behaviour so that one MDB in each instance (rather than one MDB in
> the cluster) receives a copy of each message.
>
> Nigel
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk968mcACgkQfkcoZSkNJQZvgwCfZKKBZ4SQ4P8iLmR8sMaS3R2x
hHQAn2aU3PIsAJT4laY33yMz+9H3sbW7
=B35z
-----END PGP SIGNATURE-----