Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which implementation to choose for a Web Service

 
Marco Palazzini
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody
I am working to an application that has been designed as a collection of Web Services, and I am trying to understand which implementation is most suitable. I have never been developing J2EE applications but I know that a Web Service for example may be implemented as an EJB. But it may also be implemented as a Servlet as well...
I was thinking that having some examples of real implementations in mind it would have helped me.
So I am here to ask you to send me a brief description of any 'case' you have worked on.
Thank you very much,
Marco
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally, I would only use an EJB if one of the other requirements called for an EJB -- that is do you need method-level security, 2PC transactions or distribution. Otherwise, implementing a web services as a Plain old Java Class (called the "Java Bean" approach) often works best.
Kyle
 
Ravi Verma
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There!!!
It sounds very intresting but i have one suggestion its like If u are using a Set of Web Services and you wanna call them go with Servlet approach and Bean will be the end processor of the Request. In any case U communicate over HTTP so the controler will be Servlet and Model will be Bean. More over the Servlet implementation for a Web Services is quite flexible and easy to implement.
Well i convenyed my Idea.. hope this will Help U
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic