Currently in our EJB3 StatelessContainer
http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/core/src/main/...
we have WSCallbackImpl which is a callback for BeanContext creation and removal:
static class WSCallbackImpl implements BeanContextLifecycleCallback
| {
| private ExtensibleWebServiceContext jaxwsContext;
| private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
|
| public WSCallbackImpl(javax.xml.rpc.handler.MessageContext jaxrpc,
ExtensibleWebServiceContext jaxws)
| {
| jaxrpcMessageContext = jaxrpc;
| jaxwsContext = jaxws;
| }
|
| public void attached(BeanContext beanCtx)
| {
| // JAX-RPC MessageContext
| StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
| sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
|
| // JAX-WS MessageContext
| BeanProperty beanProp = sbc.getWebServiceContextProperty();
| if (beanProp != null)
| {
| EJBContext ejbCtx = beanCtx.getEJBContext();
| jaxwsContext.addAttachment(EJBContext.class, ejbCtx);
| beanProp.set(beanCtx.getInstance(), jaxwsContext);
| }
| }
|
| public void released(BeanContext beanCtx)
| {
| StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
| sbc.setMessageContextJAXRPC(null);
|
| BeanProperty beanProp = sbc.getWebServiceContextProperty();
| if (beanProp != null)
| beanProp.set(beanCtx.getInstance(), null);
| }
| }
As seen in the code, on the BeanContext callback, we attach the EJBContext as an
attachment to the WebServiceContext. Does JBossWS still require this EJBContext within the
WebServiceContext or can we stop attaching this?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237949#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...