[javaee-spec users] [jsr342-experts] Re: Platform default data source and JMS connection factory
- From: Adam Bien <abien@...>
- To: jsr342-experts@...
- Subject: [javaee-spec users] [jsr342-experts] Re: Platform default data source and JMS connection factory
- Date: Sun, 15 Apr 2012 19:13:15 +0200
- List-id: <jsr342-experts.javaee-spec.java.net>
On 22.03.2012, at 23:23, Linda DeMichiel wrote:
> In view of the feedback we've received on this issue, our conclusion is
> that we should adopt approach 3.
> To summarize, in the data source case, the following will apply:
> The Java EE Platform requires that a Java EE Product Provider
> provide a database in the operational environment. The Java EE
> Product Provider must also provide a preconfigured, default data
> source for use by the application in accessing this database.
> The Java EE Product Provider must make the default data source
> accessible to the application under the JNDI name
> The Application Component Provider or Deployer may explicitly bind a
> DataSource resource reference to the default data source using the
> lookup element of the Resource annotation or the lookup-name element
> of the resource-ref deployment descriptor element. For example,
> @Resource(name="myDataSource", lookup="java:comp/defaultDataSource")
> DataSource myDS;
DataSource myDS; should work as well. (I would require a default producer to
do the job).
> If a DataSource resource reference is not mapped to a specific data
> source by the Application Component Provider or Deployer, it must be
> mapped by the Java EE Product Provider to a preconfigured data source
> for the Java EE Product Provider's default database. For example, in
> the absence of any action on the part of the developer or deployer,
> the following will map to a preconfigured data source for the
> product's default database:
> DataSource myDS;
> And similarly for default JMS Connection Factory, whose JNDI name is