|
From: Bill B. <bb...@re...> - 2008-08-04 16:05:08
|
There were some changes to contextResolver as now it also takes into
account the mime type and I think annotation data to find the resolver
that creates the JAXBContext.
Ryan J. McDonough wrote:
> Bill,
>
> I was taking a look at how Jersey is using ContextResolver and they are
> not using it exclusively. In fact, they use a cache like we do, but they
> only use the cache if there is no ContextResolver in the request. So it
> works a like this:
>
> protected JAXBContext findJAXBContext(Class<?> type) throws JAXBException
> {
> if (contextResolver != null)
> {
> JAXBContext ctx = contextResolver.getContext(type);
> if (ctx != null)
> {
> return ctx;
> }
> }
> return JAXBCache.instance().getJAXBContext(type);
> }
>
> I had to make some changes to GenericDelegatingProxy so that it returns
> null instead of raising a RuntimeException. Otherwise, it was always
> returning a proxy even though there was no resolver present. All unit
> tests continue to execute and there doesn't appear to be any
> regressions. Please let me know if you see any issues with this change
> before I commit.
>
> Ryan-
>
>
>
>
> On Aug 1, 2008, at 5:58 PM, Bill Burke wrote:
>
>> There is no support for ContextResolver ATM. I'm upgrading to 0.10
>> and will add it in. Its gonna take me awhile though. If you are
>> going to work on the providers, just do what you were doing and I'll
>> refactor JAXB providers later to use a ContextResolver.
>>
>> FYI, big changes coming. Had to touch a LOT of files because of
>> upgrade to 0.9 :(.
>>
>> Ryan J. McDonough wrote:
>>> Ah! Now it all make more sense. This might be a better approach than
>>> additional annotations. Quick question though: do we support
>>> discovery of ContextResolver instances annotated with @Provider, or
>>> do we have to register them manually? And if it's manually, where
>>> does one do that in RESTEasy? I was poking around, but got lost :)
>>> Ryan-
>>> On Jul 31, 2008, at 2:00 PM, Bill Burke wrote:
>>>> After talking on the mail list a few weeks ago about ContextResolver (I
>>>> didn't know WTF it was for), I found that it exists solely to provide
>>>> pluggable JAXB contexts in the RI. I figure, since its there, we might
>>>> as well use it instead of JAXBCache.
>>>> --
>>>> Bill Burke
>>>> JBoss, a division of Red Hat
>>>> http://bill.burkecentral.com
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>> challenge
>>>> Build the coolest Linux based applications with Moblin SDK & win
>>>> great prizes
>>>> Grand prize is a trip for two to an Open Source event anywhere in
>>>> the world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>>>> _______________________________________________
>>>> Resteasy-developers mailing list
>>>> Res...@li...
>>>> <mailto:Res...@li...>
>>>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|