users@javaee-spec.java.net

[javaee-spec users] Re: default resources

From: Romain Manni-Bucau <rmannibucau_at_gmail.com>
Date: Fri, 14 Nov 2014 19:23:25 +0100

2014-11-14 19:06 GMT+01:00 arjan tijms <arjan.tijms_at_gmail.com>:
> Hi,
>
> On Thursday, November 13, 2014, Romain Manni-Bucau <rmannibucau_at_gmail.com>
> wrote:
>>
>> Is it a real issue or just a theorical one? I mean default resources
>> are generally a bad choice for real apps since you are not sure what
>> you get so for me their purpose is related to testing so is that such
>> a big deal?
>
>
> I agree that the default resources are primarily a facility for tutorials,
> people just starting, testing and simple applications.
>
> Yet, a "simple application" does not necessarily mean non-production
> application and even does not mean non-critical application. So I don't
> agree that a "real application" should not use default resources.
>
> For instance running apps that have modest persistence requirements in
> resource constrained environments (think IoT among others) the default
> datasource is an extremely convenient facility. In such environments and for
> such apps installing a full blown external DB is often not only unnecessary
> but also not even possible.
>
> It's true that a portable app would not know what the exact nature of the
> persistent store is, but A) if the persistence requirements are modest this
> may not matter and B) for actual deployments to a specific server this -is-
> of course known.
>

Well doing it you accept to potentially make you server crashing or
not responding. "modest" is the same as "default". it doesn't define
anything so you can't rely on it if your app is used.

> I think we should steer away from the thought that Java EE servers are
> *exclusively* used by big corporations on big servers for apps with heavy
> persistence requirements that are operated and provisioned by large teams.
>

This is not a matter of size, just of control of what is done which is
mandatory when going in production.

> Java EE servers are increasingly being used for smaller and smaller
> applications, and I think that's a very exciting thing. IMHO Java EE should
> be able to both scale up and down, and default
>

I agree on this but today it is not possible. However spec can be
enhanced to make it real.

> Kind regards,
> Arjan Tijms
>
>
>>
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau