[jbossws-dev] [Design of JBoss Web Services] - Re: Setting the properties on the JAXBContext

tfennelly do-not-reply at jboss.com
Mon Jun 25 10:16:02 EDT 2007


Sorry about the delay in replying - I was on vacation :-)

"heiko.braun at jboss.com" wrote : We can defer creation of JAXBContext's to JBossWS factory. The SPI ships with a default FactoryLoader implementation that allows us to change the implementation through a /META-INF/services entry. 
  | 
  | IMO this would be the easiest. Another option would be indirect creation though the MC. Then the factory would become part of jbossws-beans.xml.

How would we get the properties instance (which will be different per typeset for which the JAXBContext is being created) into this factories scope?

"thomas.diesler at jboss.com" wrote : Why specifically do you need to interact with such low level detail as JAXB properties. A JAXWS client should not have to do that AFAIK.

This forum post to the JAXB Forums should explain why we need it: http://forums.java.net/jive/thread.jspa?threadID=27591&tstart=0

The changes I'm talking about are not really low level from a JBossWS perspective.  The JAXBContext class provides 2 factory methods for creating the JAXBContext, one which takes a properties set and one which does not.  From a JBossWS perspective, we're just talking about being able to specify a property set.  To see how I'm doing this at the minute, see the JBossWSAdapter class - search for references to JAXBContextCache.  So at the moment I relying on a hack whereby I'm setting the JAXBContext properties (for the SOAP message being processed) via a Threadlocal.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057367#4057367

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057367



More information about the jbossws-dev mailing list