users@glassfish.java.net

Re: Singleton by limiting pool size to 1

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Sun, 14 Mar 2010 19:19:18 +0100

2010/3/14 <glassfish_at_javadesktop.org>:
> Hi Mohamed,
>
> I had tried to create singleton MDB by setting the max-pool-size to 1 on a glassfish cluster - but 2 instances of the MDB got created - 1 on each instance.
> Is there any other setting which needs to be done for having only a single instance of the MDB running across the cluster ?
>

I think this is against the idea of cluster to have only one instance
of some session bean across all instances, because each instance in
cluster should be self-sufficient. As far as I remember, the Singleton
in EJB3.1 guarantees one instance in one node - not across cluster.