CORBA vs EJB technology solution

home

Abstract:

There are two kinds of distributed computing model, they are CORBA and EJB. CORBA is more closed to structure architecture and more difficult while EJB is more closed to object architecture and easier.

Model CORBA EJB
OS Windows/Linux/Unix JAVA OS over Windows/Linux/Unix
Protocol IIOP RMI over IIOP
Interface describe file IDL JAVA
Data type module package
interface (non-abstract) signature interface and an operations interface, helper class, holder class
interface (abstract) signature interface, helper class, holder class
constant (not within an interface) public interface
boolean boolean
char, wchar char
octet byte
string, wstring java.lang.String
short, unsigned short short
long, unsigned long int
long long, unsigned long long long
float float
double double
fixed java.math.BigDecimal
enum, struct, union class
sequence, array array
exception class
readonly attribute accessor method
readwrite attribute accessor and modifer methods
operation method
Server sample code org.omg.CORBA.ORB myORB = org.omg.CORBA.ORB.init(new String[0], null); 
Wombat myWombat = new WombatImpl(); javax.rmi.CORBA.Stub myStub = (javax.rmi.CORBA.Stub)PortableRemoteObject.toStub(myWombat); 
myStub.connect(myORB);
Context initialNamingContext = new InitialContext();

initialNamingContext.rebind("MyObject", myObj);

Client sample code Hello obj = (Hello)PortableRemoteObject.narrow(  initialNamingContext.lookup("HelloServer"), Hello.class); Hello obj = (Hello)Naming.lookup("//" +   getCodeBase().getHost() + "/HelloServer");

To get the full text for this report, please contact with us.