wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes EJB vs CORBA 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 vs CORBA" Watch "EJB vs CORBA" New topic
Author

EJB vs CORBA

Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116
Authors (of Professional EJB) or Others (of'cos) -
Could you do a brief comparison of EJB and CORBA.
Thanks -
------------------
_________________________
Rama Raghavan
SCJP2


Rama Raghavan<br />SCJP2<br />SCWCD
Guillaume Compagnon
Ranch Hand

Joined: Aug 09, 2001
Posts: 106
a huge subject.
but to be concise, IMHO EJB is simplier than CORBA Objects. But CORBA model is so much rich than EJB.
EJB is convenient for ebusiness application, not for very specialized applications as telecom.
go to omg.org, perhaps they have written a technical comparison


---------<BR>Guillaume
Matjaz Juric
Author
Ranch Hand

Joined: Aug 02, 2001
Posts: 65
Hi,
Comparing EJB and CORBA is indeed a complex topic. First of all we have to decide what we will compare. EJB is the Java middle tier component model. The name CORBA denotes a set of different technologies (similar as Java platform), therefore the correct comparison is to compare EJB with the CORBA Component Model (CCM).
This comparison is actually fairly simple, because CCM is a superset of EJB. CCM defines basic and extended functionality. Basic CCM is very similar to EJB, except that the components can be developed in any (CORBA supported) programming language.
Extended CCM then adds additional functionality. The problem is that Extended CCM is currently on paper only and that basic CCM also has not been widely accepted.
Comparing EJB to CORBA ORB however (and probably that was your initial thought) is not reasonable. CORBA ORB is better compared with RMI (or RMI-IIOP).
Cheers,
Matjaz

------------------
Matjaz Juric
Author of Professional EJB


Matjaz Juric<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100544X/qid%3D1008676221/sr%3D8-1/ref%3Dsr%5F8%5F5%5F1/103-4928879-8274265" target="_blank" rel="nofollow">Professional J2EE EAI</a> and <a href="http://www.amazon.com/exec/obidos/ASIN/1861005083/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional EJB</a>
Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116

Actually I was trying to learn comparing EJB with other distributed component development technologies (and therefore Corba CCM from a component development standpoint and RMI/IIOP from runtime).
Couple of observations -
1. EJB components are easier to develop.
2. Corba clients can invoke operations on objects that could potentially be developed in any (corba supported) programming language while EJBs are components developed in Java and can only be invoked by Java clients.
I am rattling, but making an effort to learn. Thanks for your responses.
A wild question -
Can a Corba ORB find (and invoke operations on) an EJB component ?
------------------
_________________________
Rama Raghavan
SCJP2
Matjaz Juric
Author
Ranch Hand

Joined: Aug 02, 2001
Posts: 65
As already mentioned the major difference between basic CCM and EJB is in the support for prog languages that can be used to develop components. Although on first sight it looks nice being able to develop components in other languages on the second thought you might wonder why you would use an older language instead of Java. This is probably the main reason why CCM is not very popular.
However it is possible for CORBA clients (in any programming language) to locate and invoke methods on EJBs. This works, because of RMI-IIOP that uses the same protocol as CORBA (IIOP). How to do this in explained in Professional EJB book.
Matjaz

------------------
Matjaz Juric
Author of Professional EJB
faisal mahmood
Ranch Hand

Joined: Nov 30, 2000
Posts: 349
Simple answers probably would be:
* EJB is only available in Java language and so it is platform independant
* CORBA is language independant and that makes it platform independant as well
If you are after high performance CORBA with C++ would be a better choice than EJBs. For ease of design and programming EJBs are better choice.
CORBA application written for one ORB vendor most likely would not work with another ORB vendor. But, any J2EE complaint application can be put in any J2EE certified containers with out any problem at all. Deployment is a lot easier for J2EE application (including EJBs) than CORBA application.
If you need to integrate with existing systems which does not support Java then CORBA would be a better choice. Since both CORBA and EJBs both can use IIOP protocol, they can co-work together with clients.
Faisal
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
with ejb�s you have all the advantage of the container services(i.e transaction managment, security, clustering) automated, as you don�t have with corba components.
ZEESHAN AZIZ
Ranch Hand

Joined: Jan 15, 2001
Posts: 162
I wondered how EJB compared with SOAP. Is soap meant to achieve the same functionality, achieved by EJB?
Matjaz Juric
Author
Ranch Hand

Joined: Aug 02, 2001
Posts: 65
I agree with you but would like to point out that porting CORBA applications between different CORBA implementations is also straightforward as long as you use is accordingly to the specification. This holds true for EJBs too.
Cheers,
Matjaz
Originally posted by faisal mahmood:
Simple answers probably would be:
* EJB is only available in Java language and so it is platform independant
* CORBA is language independant and that makes it platform independant as well
If you are after high performance CORBA with C++ would be a better choice than EJBs. For ease of design and programming EJBs are better choice.
CORBA application written for one ORB vendor most likely would not work with another ORB vendor. But, any J2EE complaint application can be put in any J2EE certified containers with out any problem at all. Deployment is a lot easier for J2EE application (including EJBs) than CORBA application.
If you need to integrate with existing systems which does not support Java then CORBA would be a better choice. Since both CORBA and EJBs both can use IIOP protocol, they can co-work together with clients.
Faisal


------------------
Matjaz Juric
Author of Professional EJB
Matjaz Juric
Author
Ranch Hand

Joined: Aug 02, 2001
Posts: 65
SOAP (Simple Object Access Protocol) is only a protocol for communication between distributed components. EJBs for example currently use the IIOP (Internet Inter-ORB Protocol). The difference between IIOP and SOAP is that IIOP is a binary protocol which uses TCP/IP for communication. SOAP is an XML formatted protocol that can be transferred with many different protocols including HTTP and SMTP.
SOAP has been designed as independent of the underlying component model; therefore it can be used with EJBs as well as with Microsoft technologies for example. However there are still several difficulties with SOAP including support for components with state, support for transactional and security contexts etc. But this will get solved in the future.
Cheers,
Matjaz
Originally posted by ZEESHAN AZIZ:
I wondered how EJB compared with SOAP. Is soap meant to achieve the same functionality, achieved by EJB?


------------------
Matjaz Juric
Author of Professional EJB
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
How about using CORBA compliant servers, which eases the work as Oracle App Server best supports the CORBA components just using like EJB's in J2EE compliant app server.
How CORBA object stores its state, like EJB has serialization concept. Do ORB's use same concept?
Thanks,
Anil


SCJP 1.5, SCEA, ICED (287,484,486)
Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116
My understanding is IIOP is connection oriented (full duplex) and inherently stateful - The client can send one or more messages through the same (single) connection. The receiver, i.e. server, can use the same connection to reply to the originator.
But i'd let the gurus fill in.
------------------
_________________________
Rama Raghavan
SCJP2
[This message has been edited by Rama Raghavan (edited September 14, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB vs CORBA
 
Similar Threads
whats hot in adv. java to learn these days
EJB vs CORBA
ADVANCED JAVA
EJB,RMI,CORBA
CORBA client connects with Java(EJB) servers ???