Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

big picture..

 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an ok-idea of what web services are.

I would like to know basic stuff just to be able to see the technologies in a big picture.

Lets say I have JSPs + Servlets using EJBs.

If I create a Web Service, would my logic be my EJBs? The web service is just another way to access my logic, right?

Also, If this is true, and my fonctionalities are now accessible by web services, should my jsp+servlet access them via the web service instead of going directly to the EJBs?

Thanks in advance,
Alex
[ April 19, 2006: Message edited by: Alex Turcot ]
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alex Turcot:
If I create a Web Service, would my logic be my EJBs? The web service is just another way to access my logic, right?

Technically JAX-RPC can generate endpoints that are based on either on a servlet or an EJB. However Axis only supports the servlet version; a J2EE 1.4 compliant application server has to support both.
However just like (EJB) components should be at a higher granularity than objects, Web services should at a higher level of granularity than a component (hence the name "service"). Ideally you want your Web services to exchange context complete XML documents (usually referred to as a Document-oriented Web service). Simply exposing existing EJB stateless session beans is less than ideal and the currently rampant practice of using Web services for RPC really is a misapplication of the technology (considering the overhead).
Originally posted by Alex Turcot:
Also, If this is true, and my fonctionalities are now accessible by web services, should my jsp+servlet access them via the web service instead of going directly to the EJBs?

No - if you plan on consuming the service internally you should expose it through an alternate interface that can be accessed more efficiently. XML marshalling can become a performance concern.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic