You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Blevins <da...@visi.com> on 2007/03/01 00:55:05 UTC

Re: EJB and JAX-WS

On Feb 28, 2007, at 12:14 PM, Jarek Gawor wrote:

> David,
>
> Here are two fairly simple things that we need to do get closer to the
> spec compliance with EJB and JAX-WS support:
>
> 1) OpenEJB must recognize and inject @Resource WebServiceContext
> resource. This is like the EJBContext object I think (not looked up in
> JNDI and there is no DD XML for it). So somehow we must be able to
> pass WebServiceContext implementation from within Geronimo to the EJB
> container. Maybe somehow through the EjbDeployment object.

Sure.  What do we have in place for processing @Resource  
WebServiceContext for Servlets?  Should be easy to figure out how to  
do it on the EJB side based on what's done in the Servlet side.

> 2) The InvocationContext.getContextData() must return the same exact
> Map object as WebServiceContext.getMessageContext() returns. I think
> this just pretty much depends on 1).

Good info.  I'm not really following the new web service stuff, so if  
you run into more requirements like this definitely continue to post.

> Of course there are other things like the handler/interceptor stuff
> that we need to work out. And I think some security issues that I need
> to read more about.

Cool.  If you encounter any more handler/interceptor stuff like the  
above that we should be aware of definitely post.  In fact now that I  
mention it I also seem to remember that for web services  
InvocationContext.getParameters() and getMethod() don't apply and  
shouldn't be used.  I can't remember if the result is an exception or  
null, though.

-David




Re: EJB and JAX-WS

Posted by Jarek Gawor <jg...@gmail.com>.
David,

> > 1) OpenEJB must recognize and inject @Resource WebServiceContext
> > resource. This is like the EJBContext object I think (not looked up in
> > JNDI and there is no DD XML for it). So somehow we must be able to
> > pass WebServiceContext implementation from within Geronimo to the EJB
> > container. Maybe somehow through the EjbDeployment object.
>
> Sure.  What do we have in place for processing @Resource
> WebServiceContext for Servlets?  Should be easy to figure out how to
> do it on the EJB side based on what's done in the Servlet side.

For POJO-based web services we have a separate @Resource injector. It
basically just checks the type of @Resource annotation and if it is of
WebServiceContext type, an instance of that type is returned otherwise
JNDI lookup is done.
See JAXWSResourceAnnotationHandler class in
http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSAnnotationProcessor.java?view=markup

> > 2) The InvocationContext.getContextData() must return the same exact
> > Map object as WebServiceContext.getMessageContext() returns. I think
> > this just pretty much depends on 1).
>
> Good info.  I'm not really following the new web service stuff, so if
> you run into more requirements like this definitely continue to post.

Sure.

Jarek