I was going through a Jax-ws sample tutorial, my question is why we should use a EJB to implement a webservice? are there any other ways?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume that you put up your WebService somehow like this:
You don’t really need the @Stateless-Annotation for your WebService to work and therefore you can waive to use EJB functionality in your Project.
There are several ways of implementing WebServices in Java like JAX-WS or REST (JAX-RS).
Additionally you can use supporting implementations like JAX-B or JAX-RPC.
This is just a fraction of all the possibilities but it should be a good base to get you started.
Hope this helpes, have Fun!
EDIT:
Sorry, I didn’t focused on that the first time.
As said above you don’t need EJB functionality to make a WebService work but it is most common to do this, because :
Hope this could make things more clear. Have Fun!