Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdi-dev] Extend lookup by method types and annotations?

Hi,

On Mon, Sep 13, 2021 at 8:59 AM Ladislav Thon <lthon@xxxxxxxxxx> wrote:
Yet that's essentially what happens in Jakarta REST. Leaving path combining out, you essentially get a request for path "/foo/bar", so you look up a bean declaring to handle "/foo/bar".

That would make for a very inefficient implementation though, especially considering path variables. If CDI had some kind of "executable methods", and I were to implement JAX-RS on top of it, I would want to collect all annotated methods beforehands and build an efficient lookup structure 

Just wondering here, why would a lookup for "/foo/bar" via CDI be inefficient, but via one's own structure efficient? 

I know of course that the Jakarta REST example is contrived hence why I said "Leaving path combining out". 

> that would in the end give me the executable method.

The idea was that the CDI lookup for a method could give you back just that as well.

Kind regards,
Arjan

 

Back to the top