dev@glassfish.java.net

RE: Non-JMS MDB needs JMS?

From: Frank Kieviet <Frank.Kieviet_at_Sun.COM>
Date: Sat, 26 Jan 2008 23:20:34 -0800

Bill,

One of the problems of using the interface the MDB requires to find a
resource adapter, may lead to surprises for the user: the deployment of
another adapter with the same interface may lead to the sudden need to
resolve ambiguities.

BTW, having multiple adapters with the same interface is not uncommon by the
way.

Annotations could be used instead of the MID field in the deployment
descriptor. The mappedName element in @MessageDriven is implementation
dependent, and in Glassfish it is used to denote what JMS destination the
MDB should read from. However, this information can also be specified in the
parameters of the activationspec, i.e. the activationConfig element in
@MessageDriven.

If you would want to do away with the deployment descriptor completely, the
annotations should allow for elements to denote common parameters. E.g. all
EE implementations have parameters for bean pool sizes. Extra elements could
be invented, or a generic mechanism could be used. This generic mechanism
could be done similar to the activatonConfig element, i.e. an arbitrary
number of arbitrarily named key-value pairs can be specified. The generic
mechanism can also be used to specify EE-implementation-specific
configuration parameters, such as bean pool resize quantities, etc.

Frank

> -----Original Message-----
> From: dev-return-5373-frank.kieviet=sun.com_at_glassfish.dev.java.net
> [mailto:dev-return-5373-frank.kieviet=sun.com_at_glassfish.dev.java.net] On
> Behalf Of Bill Shannon
> Sent: Saturday, January 26, 2008 15:09
> To: dev_at_glassfish.dev.java.net
> Subject: Re: Non-JMS MDB needs JMS?
>
> Frank Kieviet wrote:
> > Markus,
> >
> > You need to use a Glassfish specific deployment descriptor (sun-ejb-
> jar.xml)
> > that will tell Glassfish to which resource adapter to bind your MDB. The
> > parameter is called MID and is equal to the name of the resource adapter
> as
> > it shows up in the glassfish console.
>
> Isn't there enough information for GlassFish to match the resource adapter
> with the MDB without that deployment descriptor? I would think the
> interface
> implemented by the MDB could be matched with the interfaces supported by
> the
> resource adapter. What additional information is needed?
>
> (Obviously if more than one resource adapter supported the same interface,
> you would have to do something to resolve the ambiguity.)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net