users@javaee-spec.java.net

[javaee-spec users] Re: DataSourceDefinition

From: Reza Rahman <Reza.Rahman_at_oracle.com>
Date: Tue, 26 Aug 2014 14:43:10 -0400

OK. I think this is getting a bit out of hand and feels like I have to
comment since I was quoted (even if indirectly).

The annotation(s) are incredibly valuable for
beginners/RAD/prototyping/small applications. We should definitely be
supporting more of that in EE and make sure this sort of thing works
reasonably well (perhaps via the config JSR). There may even be a cloud
use case that I have not seen personally but can envision. As further
context, Spring has successfully used the basic concept for years and it
is widely adopted in frameworks that tout productivity such as Rails and
Play.

Whether it should be used in the typical production enterprise Java
application is somewhat besides the point in this light.

I definitely see a very weak case for reinventing this in CDI or
elsewhere. As to uses outside EE, I think that should be left
proprietary as it is today and our first focus should be better enabling
EE as a cohesive standard platform.

On 8/26/2014 2:22 PM, Romain Manni-Bucau wrote:
> Hi Arun,
>
> to enforce your "nobody uses it" the main issue is it is not usable
> for prod - often not the same team handles config and packaging - and
> portable since it doesn't integrate with common Java solution (common
> jdbc config - think to [dbcp] for surely the most known one). IMHO
> @*Definitions were an error and configuration should really be handled
> mainly outside the application and inside the application for embedded
> cases/cloud but using a CDI event if possible (didnt check but it
> should) or another standard listener where we can - as it is now more
> and more done - register resources.
>
> I think it is the main goal of config jsr.
>
> Would be great IMHO to get @*Definition deprecated if really not used
> (maybe same kind of polling that for @New can help) in favor of config
> jsr solution which should be really more powerful.
>
>
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-08-26 20:12 GMT+02:00 Arun Gupta <arun.gupta_at_gmail.com>:
>> There is clear evidence that nobody is using @DataSourceDefinition in
>> production code. See the conversation at:
>>
>> https://twitter.com/arungupta/status/504039335688404992
>>
>> Seems like its good only for demos. I'd urge platform EG and other EGs
>> in Java EE 8 to strongly consider adding a similar annotation.
>>
>> Cheers
>> Arun
>>
>> --
>> http://blog.arungupta.me
>> http://twitter.com/arungupta