[jboss-dev-forums] [Design of EJB 3.0] - Re: webservices ejb3 api usage

wolfc do-not-reply at jboss.com
Tue Apr 15 07:14:14 EDT 2008


"heiko.braun at jboss.com" wrote : To me the order of injection vs. method invocation is an implementation detail of the EJB3 domain. 
  | 
  | If I understand you correctly we speak about dependency injection before the bean becomes method-ready, right?
Yes and it's not an EJB 3 problem:
"JAX-WS 2.1 5.2.1" wrote : Endpoint implementors MAY use the WebServiceContext facility (see 5.3) to access the message context and other information about the request currently being served. Injection of the WebServiceContext, if requested, MUST happen the first time the endpoint is published. After any injections have been performed and before any requests are dispatched to the implementor, the implementor method which carries a javax.annotation.PostConstruct annotation, if present, MUST be invoked. Such a method MUST satisfy the requirements for lifecycle methods in JSR-250 [31].

You need the intermediate deployer to access any EJB 3 meta data. WebServiceDeployment and WebServiceDeclaration should not be implemented by any runtime container or even exist in the first place.

As for the WebServiceContext. The InvocationContextCallback should not exist. You should specify an WebServiceContext injection handler on the injection component which injects a WebServiceContext which delegates to a thread local WebServiceContext. That thread local should be set before the invokeEndPoint.

The only problem is that the injection component is in the works and will probably not be integrated with EJB 3 before AS 5.1. So for the moment we could keep the InvocationContextCallback and I'll handle the thread local stuff (as in EAP 4.x).

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

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



More information about the jboss-dev-forums mailing list