File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB & Webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB & Webservice" Watch "EJB & Webservice" New topic
Author

EJB & Webservice

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Hi,
Whats the main difference b/w a EJB & Webservice ..
In which case a webservice is to be used & in which case a ejb shd be used..
May be it's a foolish question to ask here.

Srini


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

EJB is based on RMI-IIOP protocol whereas Web services is based on SOAP protocol over HTTP(or any other).

WebServices is used for intergrating hetergenous platforms. WebServices makes it possible to expose your API's to your business partners where the client application could be running in a different platform (.NET for exampel) than the server. You might have guessed that WebServices has a performance overhead compared to native implementations.

It is possible to expose EJB 2.1 as a Webservice endpoint.


Groovy
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

WebServices could also be used when you cannot predict which platforms the clients will run.
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Nice .. Thanks Pradeep..
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Read this tutorial
http://java.sun.com/webservices/learning/tutorial/index.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB & Webservice