Hi Paul, Thanks for the suggestion. At first sight that seems pretty useful, so I've entered a new RFE: "Plugable JAXBContext" http://restlet.tigris.org/issues/show_bug.cgi?id=721 See my comment directly in the RFE. If needed we can start a new thread in the developers' list to discuss technical details. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ <http://www.restlet.org/> http://www.restlet.org Noelios Technologies ~ Co-founder ~ <http://www.noelios.com/> http://www.noelios.com
_____ De : Paul Austin [mailto:[email protected]] Envoye : vendredi 23 janvier 2009 16:21 A : [email protected] Objet : Plugable JAXBContext Would it be possible to modify the JaxbRepresentation to support passing the a JAXB_CONTEXT_FACTORY property with the name of the factory to create the context. That class must have the following method. public static JAXBContext createContext(String, ClassLoader) throws JAXBException; This way you can easily plug-in say Jersey's JSONJAXContext to get Object->JSON mapping. Behind the scenes you would need to modify the getContext methods to maintain a separate cache for each context factory. Another alternate method would be to modify the class to have a static method to set the context factory to be used for a specific MIME type. With this approach when you use the MimeType, Object constructor it would use the appropriate JaxbContext factory for that mime type. Paul ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1060308

