users@jersey.java.net

Re: ClassCastException on deploying ContextResolver?

From: ljnelson <ljnelson_at_gmail.com>
Date: Mon, 26 Apr 2010 08:19:41 -0700 (PDT)

On Mon, Apr 26, 2010 at 11:05 AM, Paul Sandoz [via Jersey]
<ml-node+4963062-351458998-210534_at_n2.nabble.com> wrote:
> In this case Jersey is bound by the rules of EJB 3.1. It has to get a
> reference, using JNDI, from the EJB container because that container is
> responsible for creating and maintaining references to EJBs.

Ah, OK. I was hoping that JAX-RS would simply see the @Provider
annotation on my bean class, and, not bothering to investigate
further, would simply newInstance() it.

I do not force the local bean interface to extend ContextProvider;
only my bean implementation was going to implement it.

It sounds like this is an odd case, and one that wouldn't be portable
anyway, so I won't pursue it.

(This is all in the age-old quest to get JAXB to behave sanely where
interfaces are concerned. I've got all these DAOs that are
responsible for serving up particular implementations of
interfaces--it seemed easy and logical to make them take part in the
JAXB binding process.)

Best,
Laird

-- 
View this message in context: http://jersey.576304.n2.nabble.com/ClassCastException-on-deploying-ContextResolver-tp4962884p4963151.html
Sent from the Jersey mailing list archive at Nabble.com.