> There appears to be a circular dependency non the less, ejb3 build.xml contains jboss.jbossws.classpath.

Thats because EJB3 needs to see the standard JAXWS/JAXWS API. There shuld be no dependency on the impl classes.
AFAICS, you suggested approach would work.

cheers
-thomas

Carlo de Wolf wrote:
WS ctx injection should be done during construction of the object. When
the PostConstruct life cycle methods are called injection must be
completed.

Carlo

On Thu, 2007-01-11 at 13:35 +0100, Thomas Diesler wrote:
  
How about registering an interceptor that does the WS ctx injection?

Carlo de Wolf wrote: 
    
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

  
      
          
  
      
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
Web Service Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

  

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
Web Service Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx