users@jsr311.java.net

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

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 11 Jun 2008 08:39:53 -0400

??? Spec already allows interfaces and subclassing so there's nothing
to "let in".

Stephan Koops wrote:
> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com