Re: CDI integration

Sebastian Daschner

Fully agree that we should try to align JAX-RS into Java EE (i.e. CDI here) as much as possible. IMO one of the biggest advantages of EE is how the different specs integrate with eachother.

That said CDI / JSR 330 is (and IMO should be) the way of how to @Inject any managed objects into anywhere the developers like. JSF is a good example. Another one is @EJB vs @Inject.


On 06/03/2017 06:56 AM, Arjan Tijms wrote:

On Fri, Jun 2, 2017 at 11:32 PM, Sergey Beryozkin <sberyozkin@...> wrote:
Why are we talking about JSF?

Because it's another Java EE spec that had its own DI engine and gave it up for the platform one.

I'm really not sure why the REST API of Java EE should have its own DI engine.

Does Spring MVC also has its own DI engine, separate from the Spring platform's bean container? If not, why should Java EE have that?

And if JAX-RS needs to have its own DI engine, why should JSF not have its own? And then Servlet its own? And JPA its own? Does every spec in Java EE need its own and totally different Di engine? 

All JAX-RS stacks have been doing very well so far as far taking care of their users, and somehow they have managed to do it without CDI being a required dependency.

Imagine how well JAX-RS could do -with- CDI. I absolutely love JAX-RS and so do many people, but I've rarely heard of anyone going for JAX-RS just because of it's fabulous own DI engine.

I know many do use CDI with CXF, RI for sure, and very likely RestEasy, which I'm happy with. This relentless push to get CDI as a required dep won't help with the cause of spreading JAX-RS beyond EE boundaries.

Is Spring trying to spread Spring MVC beyond EE boundaries? Is Microsoft trying to spread ASP.NET Web API beyond the .NET boundaries? Is Ruby On Rails trying to spread its REST API beyond RoR boundaries? Or are they all trying to integrate it in their framework as well as they possibly can?

Kind regards,
Arjan Tijms

I've no more energy left to continue this discussion, sorry, glad I'm away for the next week and a bit

Have fun

On 02/06/17 22:12, Arjan Tijms wrote:
Can you give me any good reason why we should keep @ManagedBean? It has been deprecated already and everything in and around it has been superseded by CDI. Also remember that pruning is a multi release process, so if we announce it to be pruned for JSF 2.4 (or whatever the new version will be), it will not be actually made optional until JSF 2.5.

Join to automatically receive all group messages.