users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Re: Singleton MDB?

From: Carlo de Wolf <cdewolf_at_redhat.com>
Date: Mon, 17 Sep 2012 12:39:29 +0200

Thinking out loud I would find it counter-intuitive, rather I would
think @Singleton @MessageDriven. Taking it a bit farther @MessageDriven
can actually be construed to be a view instead of a component type. The
component type would, by default, be like a stateless session bean.

Even without going over that hurdle, the question also raises thinking
about locking. Sooner or later somebody is going to make that leap.

Carlo

On 09/15/2012 02:18 AM, Marina Vatkina wrote:
> Experts,
>
> While you are thinking about David's proposal (as I hope you all do ;)
> ), here is another question: do we need to provide a standard way to
> guarantee a single MDB instance running in a server instance? I do not
> propose support for all other features available to the singleton
> session beans, just a guarantee of a single MDB instance.
>
> In GlassFish (RI) we had this request to support message ordering
> processed by the MDB.
>
> If you think that it is useful, we can add an attribute (e.g.
> 'isSingleton') to the @MessageDriven annotation that would default to
> false for backward compatibility.
>
> thanks,
> -marina
>
>