• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB vs Web Services

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand that when components are distributed and when they need to talk to each other, EJB is employed (Considering a web scenario). Do web services act as an alternative to EJB ? Any input on this is appreciated.
Thanx
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One major disadvantage of using EJB technology for distributed components is that the client typically must also be Java based. Of course you could use CORBA and IIOP to accomplish this, but that introduces a significant layer of complexity unless you are already using CORBA. Another disadvantage of EJBs is that they typically aren't firewall friendly, meaning that it is difficult to invoke EJBs behind firewalls. That isn't to say that EJBs aren't a good solution for certain applications. And, in fact EJBs and web services can be used together.
What web services enable is a platform independent, language independent technology for allowing two applications to interact with each other using XML as the representation format. Because SOAP (the represenation and invocation) standard for web services typically supports HTTP as a transport, the firewall issue isn't as much of a concern because most firewalls open port 80 (or 8080) for HTTP traffic.
Have a look at the following article from XML Journal written by a colleague. It helps show examples of how web services and J2EE can work together.
http://www.sys-con.com/xml/articleprint.cfm?id=649
Best regards,
Mark

Originally posted by kris reddy:
I understand that when components are distributed and when they need to talk to each other, EJB is employed (Considering a web scenario). Do web services act as an alternative to EJB ? Any input on this is appreciated.
Thanx

 
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello
i think that kris is concerning more ahout that if the webservice can be an ALTERNATIVE to the ejb as distributed component.
from my side,i think that,from distributed architecture point of view,it is ok.
but from performence point of view,i don't test it,you can test it to see which one is more performent.
 
Mark Secrist
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In one way, you could simply think of web services as simply a different distributed component techology. One with different advantages & disadvantes (and possibly some similar characteristics as well). Another way of looking at this is that today at least, web services are more about distributed services capability. The key thing is that since services typically don't maintain session state, all you can do is make service style requests of them. That's not a bad thing necessarily, but it is important to realize that as a limitation or as a characteristic.

Originally posted by zb cong:
hello
i think that kris is concerning more ahout that if the webservice can be an ALTERNATIVE to the ejb as distributed component.
from my side,i think that,from distributed architecture point of view,it is ok.
but from performence point of view,i don't test it,you can test it to see which one is more performent.

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The Basic funda of Webservices is they are Truly platform independent. Webservices use the much accepted TCP/IP and XML (for SOAP and WSDL). Adoption to Webservices is high because of these two highly accepted technologies.Where as with J2EE the client also needs to be a java client. All the the earlier Distributed technologies were not truly platform independent. and EJB 2.1 and J2EE 1.4 includes webservices. J2EE with Webservices wold a powerful duo.

Cheers,
Gaya3
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic