[javaee-spec users] Re: Java EE 8 database requirements

From: Bill Shannon <>
Date: Fri, 22 May 2015 17:04:27 -0700

arjan tijms wrote on 05/22/15 15:20:
> On Fri, May 22, 2015 at 11:23 PM, Bill Shannon <
> <>> wrote:
> arjan tijms wrote on 05/22/15 13:53:
>> Hi,
>> On Fri, May 22, 2015 at 10:20 PM, Bill Shannon <
>> <>> wrote:
>> Over the years there's been some confusion about whether a Java EE
>> product is required to include a database server. It's not.
>> What about the (embedded) database that's backing the default datasource?
> I guess I still wasn't clear.
> The database requirements are separate from the default DataSource
> requirements. A database has always been required as part of the runtime.
> I might be missing something here. The default DataSource was a new feature in
> Java EE 7. The database that has always been required is another kind of database?
Database and DataSource are different things.

You can have lots of DataSources referring to the same database server.

You've always been required to have a database available as part of the runtime
environment, whether any DataSources referred to it or not. Obviously in order
to use it the administrator needed to configure a DataSource to refer to it and
the deployer needed to map one of the application's resource references to that
DataSource. In EE 7 there's a pre-defined DataSource so that the application
can refer to it directly in a portable way.

> There's no requirement that the product include an embedded database.
> Many do, and that makes the product easier to use out of the box, but if
> the vendor prefers to put that burden on the customer they can require
> that the customer acquire, install, and configure a database to use for
> the default DataSource.
> That was not entirely my intention of the default DataSource when I
> filed
> The idea was that an application can rely on a store being available, mostly
> for new users getting started, testing, or extremely moderate requirements
> (like for very simple IoT apps). Although I mentioned this in the original
> issue, I hoped to get this more clearly defined
> via
> If a burden can be put on the customer, then the default data source is not
> entirely a default data source, but one that may need to be configured or
> setup. If that's the case then the entire concept somewhat misses its intended
> goal. With the Java EE 6 @DataSourceDefinition a user could already set up a
> datasource, but the problem was that this configuration needed to be done and
> therefor the solution was deemed to have a very simple data source that's
> already configured, setup and ready to be used.
You're confusing roles.

The default DataSource is available to the Developer.

The Administrator may need to do extra work to properly configure the product to
ensure that the default DataSource is available to the Developer.

> There would be nothing against a vendor *allowing* (not requiring) a user to
> configure an external or otherwise alternative database to use for the default
> DataSource. In fact, that would be an extremely handy feature to have.
> But at least my goal for the default datasource was to have the spec guarantee
> the out of the box experience, not to merely make it possible to make the
> product easier to use out of the box.
> If there's currently no requirement that the product include an embedded
> database, then maybe it's an idea to file an issue that asks for that
> requirement? Either by introducing a new concept, say "the default database",
> or to add this requirement to the "default datasource"?
We don't have any plan to add such a requirement. We aren't setting ease-of-use
requirements for administrators of products.