[jbossws-dev] [Design of JBoss Web Services] - Re: Setting the properties on the JAXBContext
thomas.diesler@jboss.com
do-not-reply at jboss.com
Wed Jun 27 04:14:06 EDT 2007
I externalized construction of the JAXBContext in a JAXBHandler which is a property on the Endpoint.
| public interface JAXBHandler
| {
| /** Get a JAXBContext instance.
| */
| JAXBContext getJAXBContext(Class[] javaTypes) throws JAXBException;
| }
|
| public interface Endpoint
| {
| ...
|
| /** Get the JAXBHandler for this endpoint */
| JAXBHandler getJAXBHandler();
|
| /** Set the JAXBHandler for this endpoint */
| void setJAXBHandler(JAXBHandler handler);
|
| ...
| }
|
The JAXBHandler is injected like any other handler
| <bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
| <property name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
| <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
| <property name="jaxbHandler">org.jboss.wsf.spi.binding.jaxb.JAXBContextCache</property>
| <property name="invocationHandler">
| <map keyClass="java.lang.String" valueClass="java.lang.String">
| <entry><key>JAXRPC_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
| <entry><key>JAXRPC_EJB21</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerEJB21</value></entry>
| <entry><key>JAXRPC_MDB21</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerMDB21</value></entry>
| <entry><key>JAXWS_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
| <entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerEJB3</value></entry>
| </map>
| </property>
| </bean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057999#4057999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057999
More information about the jbossws-dev
mailing list