> Hello,
> What are the main differences between EJB and WebService ?
The only thing they have in common, as far as I can see, is that they
are used by clients to execute code remotely.
Two completely different, and unrelated technologies.
A webservice is RPC, using SOAP as a comm. protocol.
A WS can be written in any language imaginable.
Whereas an EJB is a Java-class written according to a specific
design-pattern, and is completely dependent upon an application
server like BEA, Websphere, JBoss, etc. to contain it.
It's a way too large a subject to describe here (for me, anyway)
:-)
--
Dag.
Christopher Blunck - 25 Sep 2003 04:52 GMT
>> Hello,
>> What are the main differences between EJB and WebService ?
[quoted text clipped - 12 lines]
>
> It's a way too large a subject to describe here (for me, anyway)
EJB is a framework that enables distributed Java client to Java server
connectivity. The EJB framework handles concurrency, and ensures data
integrity at the object level.
WebServices is a framework that enables cross-platform and cross-language
connectivity between functional programming units. In other words,
WebServices is a superset of EJB. A webservice may wrap an EJB, but
rarely does an EJB wrap a web service.
When you think of Web Services, think of functional pieces of programming.
For example, consider somebody (like myself) who has implemented several
meteorological conversion functions. I have implemented a celsius ->
fahrenhight converter as well as a millibar -> inches of mercury
converter. These are atomic functions that are reusable outside the scope
of my application. I may wish to expose them to other developers in my
workplace as web services.
When thinking of EJB, think of functional pieces of software that apply to
the business. For example, consider a data warehouse that exposes
critical entities in your organization (like Customer). You only want the
Customer be accessed internally, so you expose the Customer through a J2EE
interface only accessible by internal servers. The Customer is not
intended to be accessed globally.
This is perhaps a poor example, but I'm hoping it will fuel the fire that
will ignite someone else to post/cross-post a better explanation.
-c
> Hello,
> What are the main differences between EJB and WebService ?
>
> Thanks :)
You can also use EJB to implement a WebService. :P