jsr366-experts@javaee-spec.java.net

[jsr366-experts] Re: default resources

From: Jason T. Greene <jason.greene_at_redhat.com>
Date: Tue, 11 Nov 2014 21:39:04 -0500 (EST)

> On Nov 5, 2014, at 6:06 PM, Bill Shannon <bill.shannon_at_oracle.com> wrote:
>
>
> B. The spec should allow a product-specific switch that controls whether
> the behavior follows the Java EE 7 rules or the product-specific rules.
> The switch might be per-application or global, but the default must be
> to follow the Java EE 7 rules.

I think this is the best option. IMO the value in default resources was that an application developer needn't define a resource, and this type of mangling also achieves this goal.

Further, the default EE resource is already defined by the vender. So if a vender wants to have something more advanced that seems reasonable.

That said I can come up with two problematic scenarios.

I) Two separate deployments that expect to share the same resource by defaulting, yet the mangling rules prevent that.

II) Part of the code refers to the default JNDI names programmatically, under the expectation it will use the same resource as the other part of the code using unmapped annotations or components namespace references.

{II} is particularly worrisome, since potentially it prevents a compliant deployment from running.

The default should be spec compliant, but a vendor should be able to provide a per deployment or server wide switch to change this for the purpose of compatibility. I don't think we should care how they do it.

-Jason