Hmm, but there is not way to get the sessionContext before the
interceptor has run. I think I need to extend the invokeLocal method to
allow for extra stuff to be added.
How about:
EJBContextLifecycleCallback callback = new EJBContextLifecycleCallback()
{
public void postConstruct(BaseSessionContext ctx)
{
ctx.setMessageContext(rpcMessageContext);
ctx.setWSMessageContext(wsMessageContext);
}
public void preDestroy(BaseSessionContext ctx)
{
ctx.setMessageContext(null);
ctx.setWSMessageContext(null);
}
};
container.invokeLocal(method, args, ctxLifecycleCallback);
Conceptually the message context's are associated with the invocation.
It would be more in line to have this relationship mirrored in
EJBInvocation.
There appears to be a circular dependency non the less, ejb3 build.xml
contains jboss.jbossws.classpath.
Carlo
On Thu, 2007-01-11 at 09:19 +0100, Thomas Diesler wrote:
Carlo,
This approach is probably not the right way to go.
How about:
WebServiceContextCallback callback = new WebServiceContextCallback()
{
public MessageContext getMessageContext()
{
...
}
public WebServiceContext getWebServiceContext()
{
...
}
};
sessionContext.registerWebServiceContextCallback(callback);
The WebServiceContextCallback interface would live in the ejb3 code base.
The dependency would be unidirectional, as it is now already.
cheers
-thomas
Carlo de Wolf wrote:
Hi Thomas,
I've made an implementation which passes the test:
http://jira.jboss.com/jira/browse/EJBTHREE-757?page=com.cenqua.fisheye.jira:fisheye-tabpanel
I turned the tables by pulling in the message context via
MessageContextAssociation. Do you see any problems with this?
The one thing I don't like is the circular dependencies between ejb3 and
ws.
Carlo