users@jsr311.java.net

Re: Annotations on interfaces and super classes <was> Re: URI Contracts

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Wed, 11 Jun 2008 10:39:06 +0200

Hi,

this seems good arguments to me. We do not bound JAX-RS to anything, but
we give implementers the possibility to do so.
I think, we could let it in.

Stephan
>>> I've only done portable integration. Its as simple as registering a
>>> JNDI resource with JAX-RS runtime. JAX-RS runtime receives an EJB
>>> reference from JNDI, looks for JAX-RS annotations, uses the EJB
>>> reference as the target endpoint for method dispatching from an HTTP
>>> request. Kinda no different than Spring or Guice integration,
>>> except you're getting the object from your EE environment.
>> So you annotate the EJB remote interface with JAX-RS annotations ?
>> How do you register the JNDI resource with the JAX-RS runtime -
>> servlet params ?
> @Local|_at_Remote
> @Path("/customers")
> public interface CustomerDAO {
> ...
> }
>
> Doesn't matter if its local or remote.
>
>
>
> Register a JNDI name as a context-param
>
> <context-param>
> <param-name>resteasy.jndi.resources</param-name>
> <param-value>
> java:comp/env/MyEJB
> </param-value>
> </context-param>
>
> Or do it programmatically through our registery SPI.