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

tfennelly do-not-reply at jboss.com
Wed Jun 27 04:52:54 EDT 2007


"thomas.diesler at jboss.com" wrote : Tom, I assume this only applies to JAXWS endpoints. The JAXWS client API is not affected.

That's right Thomas.

"heiko.braun at jboss.com" wrote : If Thomas suggestion is correct, which means the customizations are only required for JAX-WS endpoints then we might actually go with a solutions that attaches to the InvocationContext. I.e. a Map like Interface 
  | 
  |   | InvocationContext.addAttachment(JAXBContexCustomisation.class, <Instance>);
  |   |  
  | 
  | that can carry JAXBRI default properties. See http://jsourcery.com/api/java.net/jaxb/2.1.2/com/sun/xml/bind/api/JAXBRIContext.html for a complete list.
  | 
  | This way at least the JBossWS RequestHandlerImpl is open to any JAXB customisation. Other RequestHandler would then just disregard these attachments.
  | 
  | Tom, would this be sufficient? Can you supply this information on a per-invocation base? Or might this better be attached to the Endpoint - on a per-deployment base? I don't really grasp the use cases yet.

This would be perfect Heiko and is actually what I was trying to do, but I just couldn't figure out how to get the Properties instance back from within JAXBContextCache.  As I said in my original post on this thread...
anonymous wrote : I have this working at the moment simply by setting and getting the properties on a ThreadLocal. I was hoping there'd be a nicer way e.g. by attaching it to the InvocationContext perhaps, but I can't seem locate it in the JAXBContextCache e.g. through the current CommonMessageContext on the executing thread.

If I could get this properties list back from within the JAXBContextCache (or JAXBContextFactory now), this would be the ideal solution as I see it at the moment.  I just couldn't see how to get it back at the time I made the original post - I'm not familiar with the JBossWS code.


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

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



More information about the jbossws-dev mailing list