users@jax-ws.java.net

Re: [Fwd: JAX-WS + EJB3.0 aka. Webservice implemented as stateless session bean]

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Fri, 09 Dec 2005 14:34:18 -0800

Find my answers inline

Doug Kohlert wrote:
> Any thoughts on this?
>
> -------- Original Message --------
> Subject: JAX-WS + EJB3.0 aka. Webservice implemented as stateless
> session bean
> Date: Thu, 08 Dec 2005 15:00:58 +1000
> From: Daniel Caldeweyher <d.caldeweyher_at_qut.edu.au>
> Reply-To: users_at_jax-ws.dev.java.net
> To: users_at_jax-ws.dev.java.net
>
>
>
> Hi,
>
> I am trying to figure out what the best practice is for naming
> conventions
> and how to organise the webservice in a JavaEE 5.0 enterprise
> application.
> Generally this would not be a problem, just put the EJBs into a jar
> file and
> the web service stuff in a war file etc. But if you want to implement the
> webservice as a stateless sessionbean, this causes a naming conflict
> as EJBs
> should be named xxxBean and webservices xxxImpl according to
> http://java.sun.com/blueprints/code/namingconventions.html. But if you
> want
> to have something like:
>
> @WebService
> @Stateless
> public class Test...
>
> What do you call it, TestBean or TestImpl?
That's really a matter of choice/conventions like you said. At this
point, if no recommendation is being made, I will go with TestBean, but
blueprints folks may change that later.
> Another thing I am not too sure
> about is, where to deploy it? In the xxx-ejb.jar or the xxx.war file?
you cannot deploy a EJB endpoint packaged in a .war file. The Sun Java
System Application Server implements JSR109 which forces you to package
servlet endpoints in war files (similar to jwsdp model) and EJB
endpoints in .jar files.
> The
> war file probably makes more sense, since the xxx-ejb.jar does/should not
> have a WEB-INF folder for the sun-jaxws.xml file.
SJS application server which has an EJB endpoint container (JWSDP does
not) does not support sun-jaxws.xml file. you need to have a ejb-jar.xml
and a sun-ejb-jar.xml
> So in other words you
> deploy it as part of the web module but personally I think that the
> service/bean should be named TestBean, indicating it should rather go
> in the
> jar file.
>
> Any suggestions would be appreciated.
> Thanks,
> Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>
>