users@jersey.java.net

Re: [Jersey] natural notation stopped to work

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 20 Jan 2010 15:25:51 +0000

On Jan 20, 2010, at 3:07 PM, Felipe Gaścho wrote:

>> JMS? what was it doing there?
>
> good question :) the context resolver is probably in the wrong
> package ;)
>
> * I am using JMS together with REST, for notification and registration
> purposes...
>
>> the JAXBContext that is created supports the classes.
>
> Good to know.. it may be a problem to maintain such configuration in
> large projects. Perhaps we can dream with an Annotation in a near
> future...
>

It is a hard problem because of the way JAXBContext works. It is not
possible to ask a JAXBContext what class it supports.

One simple solution is to check of all classes belong to a particular
package. I suppose we could create a helper implementation of
ContextResolver to do just that.

Paul.