Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Invoke C++ code on server side --- help

Reply
Thread Tools

Re: Invoke C++ code on server side --- help

 
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      07-20-2003
"pipi" <(E-Mail Removed)> writes:

> I have c++ code on linux server. I want to invoke the C++ code using Java
> program ( assume I can modify the c++ code).
>
> How can I write the Java code?


The ideal way is to use CORBA, which J2SE supports. You will need some
CORBA container at the server, and write an IDL with the interface you
want to present. Create both a client-side Java interface (a stub) and
a server-side C++ interface (a skeleton) from the IDL, then "plug" the
C++ implementation to your other code.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-20-2003
On 20 Jul 2003 21:46:24 +0200, Tor Iver Wilhelmsen
<(E-Mail Removed)> wrote or quoted :

>
>The ideal way is to use CORBA, which J2SE supports


yet another way is to write a C socket implementation you talk to with
Java.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      07-20-2003
Tor Iver Wilhelmsen wrote:
> "pipi" <(E-Mail Removed)> writes:

<snip>

> The ideal way is to use CORBA, which J2SE supports. You will need some
> CORBA container at the server, and write an IDL with the interface you
> want to present. Create both a client-side Java interface (a stub) and
> a server-side C++ interface (a skeleton) from the IDL, then "plug" the
> C++ implementation to your other code.


CORBA could well be overkill in this case. Of course if you've
got a large, distributed application then it's definitely
worthy of consideration. If everything resides in one server
then JNI is far more efficient.

 
Reply With Quote
 
pipi
Guest
Posts: n/a
 
      07-21-2003
but I want to have a client and server application. My java client ( at a
local machine) will send data to the java server ( at a remote machine), the
java server than calls the C code. Should I use RMI/JNI?

wh



"Sudsy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Tor Iver Wilhelmsen wrote:
> > "pipi" <(E-Mail Removed)> writes:

> <snip>
>
> > The ideal way is to use CORBA, which J2SE supports. You will need some
> > CORBA container at the server, and write an IDL with the interface you
> > want to present. Create both a client-side Java interface (a stub) and
> > a server-side C++ interface (a skeleton) from the IDL, then "plug" the
> > C++ implementation to your other code.

>
> CORBA could well be overkill in this case. Of course if you've
> got a large, distributed application then it's definitely
> worthy of consideration. If everything resides in one server
> then JNI is far more efficient.
>



 
Reply With Quote
 
Gopi Bulusu
Guest
Posts: n/a
 
      07-21-2003
"pipi" <(E-Mail Removed)> wrote in message news:<bffmo2$1sml$(E-Mail Removed)>...
> but I want to have a client and server application. My java client ( at a
> local machine) will send data to the java server ( at a remote machine), the
> java server than calls the C code. Should I use RMI/JNI?


CORBA is definitely the most portable way of integrating a Java client
with a C++ server. E-mail me if you want to get a sample showing how
to integrate Java clients and C++ servers using CORBA (it is quite
simple).

Best Regards,
gopi

---

Gopi Kumar Bulusu
Sankhya Technologies Private Limited
http://www.sankhya.com
Tel: +91 891 554 2666
Fax: +91 44 2822 7357
 
Reply With Quote
 
=?ISO-8859-1?Q?Thomas_Gagn=E9?=
Guest
Posts: n/a
 
      07-21-2003

pipi wrote:
> but I want to have a client and server application. My java client ( at a
> local machine) will send data to the java server ( at a remote machine), the
> java server than calls the C code. Should I use RMI/JNI?
>


In that case, consider middleware. Lots of good stuff out there, very
portable, fast, and has lots of transaction-related features. Of course, I
always recommend my own (below).

--
..tom
remove dashes in email for replies
opensource middleware at <http://isectd.sourceforge.net>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LinkButton Client side code firing before server side code alexmac262@hotmail.com ASP .Net 1 03-22-2007 06:13 PM
server side code access the text of <asp:label> changed by client-side javascript code? nick ASP .Net 3 12-15-2004 06:26 PM
how client-side presentation code interact with server-side processing code? jrefactors@hotmail.com Javascript 1 12-08-2004 01:00 AM
how client-side presentation code interacts with server-side sorting/filter code? jrefactors@hotmail.com Java 1 12-08-2004 12:30 AM
how client-side presentation code interact with server-side filter/sort processing code? jrefactors@hotmail.com Javascript 0 12-07-2004 11:15 PM



Advertisments