Two Laptop Bag*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 8904

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: 8904

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: 8904

Read this tutorial
http://java.sun.com/webservices/learning/tutorial/index.html
 
jQuery in Action, 2nd edition
 
subject: EJB & Webservice
 
Similar Threads
Exposing EJB as Webservice...
What is the proper use of @WebService.wsdlLocation to specify the location of my WSDL file?
question about the book
Error deserializing DataHandler
Ant servicegen