ejb@glassfish.java.net

Re: A Question about MDB

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Fri, 06 Apr 2007 10:00:32 -0400

Janardhanan, Ajith (AJANARDH) wrote:

> I have a question about the MDB - Is it possible/allowed as per the
> EJB spec, to have an MDB that listens on a destinaton, to dynamically
> change the destination and listen on another destination, without
> changing the deployment descriptor and undeploying the MDB.
>
Hi Ajith,

No, the EJB spec defines JMS MDBs as being associated with a single
Queue or Topic at
deployment time. The exact configuration for expressing the
association is considered
vendor-specific, but the current spec considers the association to be
fixed, in much the same
way that a persistence unit is associated with a particular database for
the duration of an
application's deployment.

A Java EE implementation could support such a feature but it would not
be considered
portable.

 --ken

> If yes, could any of you gurus give some idea how to achieve this.
>
> Thanks
> Ajith
>