users@jsr311.java.net

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

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 10 Jun 2008 13:30:54 -0400

Marc Hadley wrote:
> On Jun 10, 2008, at 12:23 PM, Bill Burke wrote:
>>
>> For interfaces, I've found they fit naturally with the EJB model. I
>> can integrate portably with EJBs in our JAX-RS implementations.
>
> Can you say bit more about what you've done with JAX-RS and EJB (assume
> I know nothing about EJB which isn't so far from the truth ;-)).
>



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.

JBoss specific integration is the only way to support JAX-RS annotations
on a bean class, or any deployment mechanism outside of a servlet.



Bill

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