The moose likes Distributed Java and the fly likes JNI versus CORBA Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "JNI versus CORBA" Watch "JNI versus CORBA" New topic
Author

JNI versus CORBA

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Can in any application usage of JNI with RMI substitute CORBA, if the JAVA application communicates with a C/C++ code.
If so then what is the exact role of CORBA in this regard?
Please suggest.
Thanks in advance.
Tano_Ortiga
Greenhorn

Joined: Dec 27, 2000
Posts: 11
Hi there,
First of all,RMI and CORBA are used for distributed computing/remote process calls.
RMI is a pure java (ALL OBJECTS are created in JAVA) implementation of applications involving Remote Process Calls. While CORBA does the same thing, but it will enable your Java application to communicate to objects created in any (java or none java- "any" means as long as it is supported by CORBA) other programming languages.
Yes, you're right if you have codes in C and you want it to communicate with java, an alternative to using CORBA is via JNI- you need to create java wrappers for your C codes. And if you want to have RPC implementation you combine JNI with RMI. CORBA does all these for you automatically.
I hope this helps.
Jonathan

Tano_Ortiga
Greenhorn

Joined: Dec 27, 2000
Posts: 11
an additional note:
CORBA supports many PL's, among all the most popular are C/C++,COBOL, etc. I guess, it really pays off to use CORBA if you have legacy applications coded in COBOL. JNI cannot help you in this case (COBOL).
Jonathan
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
JNI is not really object oriented. So CORBA is a better option for OO C++ code.
 
 
subject: JNI versus CORBA
 
Threads others viewed
C++ access from Java
Best alternative to JNI for C/C++ code
JNI versus CORBA
SCAE - Question regarding consuming C++ applicaiton in Java
RMI+JNI or CORBA?
developer file tools