[javaee-spec users] [jsr342-experts] Re: Clarification on Default resources

From: Jason Greene <>
Date: Thu, 6 Jun 2013 14:57:14 -0500

On Jun 6, 2013, at 10:56 AM, Kevin Sutter <> wrote:

> Hi Linda,
> > I'm not sure whether your interpretation is in agreement with what
> > I've written. Can you confirm?
> Unfortunately, no... I won't speak for David's situation with OpenEJB and TomEE, but from a WebSphere perspective, this interpretation puts us in a pickle... WebSphere provides default bindings based on the name of the resource. So, something like this would map to two separate datasources due to the default bindings that WebSphere utilized prior to Java EE 7:
> @Resource
> DataSource myDS;
> @Resource
> DataSource myDStoo;

Do these both point to the same underly database though, and thus share the same underlying data, or do you partition based on name? If so I don't think there is a problem. If they are isolated thats going to create a portability challenge.

> With your stated interpretation, both of these datasources (myDS and myDStoo) would map to the same datasource that is defined at "java:comp/DefaultDataSource", correct?

Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat