jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: HEADS-UP: JSR330 integration proposal

From: Markus KARG <markus_at_headcrashing.eu>
Date: Wed, 14 Sep 2011 19:14:34 +0200

I have no solution for it. I just wanted to point out that DI is more complex than the current solution, so I don't expect much people to change current code or even prefer it compared to existing annotations (as those will supported for backwards compatibility).

> -----Original Message-----
> From: Marek Potociar [mailto:marek.potociar_at_oracle.com]
> Sent: Mittwoch, 14. September 2011 10:02
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] Re: HEADS-UP: JSR330 integration proposal
>
> I wonder what would such parameters look like? E.g. to substitute
> PathParam and QueryParam.
>
> Marek
>
> On 09/13/2011 07:24 PM, Markus KARG wrote:
> > It should take parameters because otherwise I have to code my own
> annotations. See, it is more effort to write own annotations compared
> to just add a parameter. And it is more work to write @Inject @*Param
> compared to just writing @*Param. I understand and love standards, but
> here it clearly leads to lengthy code compared to the current
> situation.
> >
> >> -----Original Message-----
> >> From: Marek Potociar [mailto:marek.potociar_at_oracle.com]
> >> Sent: Dienstag, 13. September 2011 10:18
> >> To: jsr339-experts_at_jax-rs-spec.java.net
> >> Subject: [jsr339-experts] Re: HEADS-UP: JSR330 integration proposal
> >>
> >> I do see an advantage in cases where people use JAX-RS and a DI
> >> framework, which happens quite often. Reading the code
> >> where @Context and @Inject are interleaved makes me dizzy.
> >>
> >> Btw. I am not sure I understand why should @Inject take parameters.
> You
> >> can define your own qualifier annotations that
> >> take params, such as the standard @Named annotation (or JAX-RS
> @*Param
> >> which can be converted into qualifiers).
> >>
> >> Marek
> >>
> >> On 09/12/2011 07:25 PM, Markus KARG wrote:
> >>> Don't get me wrong. I understand the intension and like standards.
> I
> >> just wanted to say that it gives no actual benefit as long as
> @*Param
> >> becomes @Inject @*Param, you know? The solution obviously is that
> >> @Inject must have parameters, which DI does not offer so far.
> >>>
> >>>> -----Original Message-----
> >>>> From: Marek Potociar [mailto:marek.potociar_at_oracle.com]
> >>>> Sent: Montag, 12. September 2011 09:26
> >>>> To: jsr339-experts_at_jax-rs-spec.java.net
> >>>> Subject: [jsr339-experts] Re: HEADS-UP: JSR330 integration
> proposal
> >>>>
> >>>> Limited or not, it's a standard way of injecting things in Java.
> The
> >>>> idea is to make it default and deprecate @Context
> >>>> over time.
> >>>>
> >>>> Marek
> >>>>
> >>>> On 09/11/2011 05:14 PM, Markus KARG wrote:
> >>>>> Due to the limitations of the DI API I actually do not see any
> >>>> benefit of supporting DI in JAX-RS at all. I understand that it
> >> would
> >>>> be great to have only one common DI API for all Java EE bean
> types,
> >> but
> >>>> it makes no sense in the current limited state.
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Marek Potociar [mailto:marek.potociar_at_oracle.com]
> >>>>>> Sent: Dienstag, 6. September 2011 18:25
> >>>>>> To: jsr339-experts_at_jax-rs-spec.java.net
> >>>>>> Subject: [jsr339-experts] HEADS-UP: JSR330 integration proposal
> >>>>>>
> >>>>>> Hello experts,
> >>>>>> please review the proposal available on our project wiki and
> send
> >>>> your
> >>>>>> feedback:
> >>>>>>
> >>>>>> http://java.net/projects/jax-rs-spec/pages/DI
> >>>>>>
> >>>>>> Thank you,
> >>>>>> Marek
> >>>>>
> >>>
> >