dev@glassfish.java.net

Re: Non-JMS MDB needs JMS?

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Mon, 28 Jan 2008 16:40:30 -0800

Sivakumar Thyagarajan wrote:
> Hi Bill/Frank/Mark
>
> If the goal is to remove the need for a vendor-specific DD, there was a
> suggestion discussed earlier during the GlassFish v1 days, that we could
> use mappedName to specify the resource-adapter to be associated with the
> MDB for non-JMS MDBs. (Remember that the mappedName is used to specify
> the JMS destination JNDI name for JMS MDBs that use the bundled JMS
> provider). The mappedName is product dependent and we could choose it to
> mean what we want. Would this work?

We should make mappedName work the same here as it does elsewhere
in GlassFish. We shouldn't invent a new meaning for mappedName here.
Still, that doesn't solve the problem in a portable way.

> We had felt then, that having two distinct meanings for an attribute
> would be confusing and felt that mandating non-JMS MDBs to be bundled
> with a sun-ejb-jar.xml was a fair compromise. We felt it was more
> important to provide ease-of-use for the majority of our MDB deployments
> (ie JMS MDBs using the bundled JMS RA)
>
> Like Frank, I am wary of "intelligently" choosing bindings based on
> runtime configuration.
>
> However, it should be noted, that both approaches (mappedName and
> deriving ra-mid based on installed RAs) are non-portable.

We should consider adding requirements to the spec to provide a portable
solution. The spec could require the "matching" several of us have
suggested. The spec could also define a way to explicitly "link" an
MDB with a particular RA. We've talked about standardizing the use of
JNDI names in a way that would allow use of mappedName to be portable,
but I'm sure there are other possible solutions as well.