users@javaee-spec.java.net

[javaee-spec users] Re: DataSourceDefinition

From: Romain Manni-Bucau <rmannibucau_at_gmail.com>
Date: Tue, 26 Aug 2014 20:22:04 +0200

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