[javaee-spec users] [jsr366-experts] Re: default resources

From: Bill Shannon <>
Date: Mon, 17 Nov 2014 16:49:38 -0800

Let me describe another issue that has been raised in this area...

If I have an application:

        @Resource(name="MyFactory", type=javax.jms.ConnectionFactory.class)
        ConnectionFactory cf;

with a deployment descriptor intended to supply the mapping for the resource:


Note that we now have two resource references, one mapped to the
default JMS connection factory and used by the application, and
one mapped to the JMS connection factory named "JMS1" and not used
by the application. A typo or misspelling might result in unintended

Option D doesn't help with this at all.

Option B would allow for a product-specific option that disables the
default mapping behavior, allowing deployment of the above application
to fail.

Is this a reason to consider Option B, perhaps in addition to Option D?