 |
|
| Computers Forum Index » Computer - Object (Corba) » RMI server... |
|
Page 1 of 1 |
|
| Author |
Message |
| Graham Walsh... |
Posted: Mon Jun 29, 2009 3:38 pm |
|
|
|
Guest
|
hi,
I have an RMI server thats up in running, everything is java, client
and server. nothing is defined in IDL. My java client gets its server
reference from the (TAO) name service and invokes problem free.
I want to write a c++ client that connects to the same service and
invokes methods on it. There's no IDL, no poa exposed, so I don't
really see how I can get to it from c++. Is it possible, can anybody
tell me?
thanks much
G |
|
|
| Back to top |
|
|
|
| Piet van Oostrum... |
Posted: Thu Jul 02, 2009 12:36 pm |
|
|
|
Guest
|
Quote: Graham Walsh <grahamjwalsh at (no spam) gmail.com> (GW) wrote:
GW> hi,
GW> I have an RMI server thats up in running, everything is java, client
GW> and server. nothing is defined in IDL. My java client gets its server
GW> reference from the (TAO) name service and invokes problem free.
I am not familiar with TAO myself, but with Corba in general (I am an
omniORRB fan).
The fact that your java client gets a reference from the TAO name
service suggests that RMI-IIOP is used rather than plain RMI (JRMP).
Quote: GW> I want to write a c++ client that connects to the same service and
GW> invokes methods on it. There's no IDL, no poa exposed, so I don't
GW> really see how I can get to it from c++. Is it possible, can anybody
GW> tell me?
As Phil Mesnier has stated you can rmic -idl to generate IDL. This
generated very ugly IDL in general, with lots of valuetypes. The problem
might be to use these valuetypes from C++. If your RMI methods use
non-remote objects as parameters or results you need these valuetypes.
If they are anything other that simple things like strings, e.g. your
own objects, or instances of very specific Java classes you have a
problem as you would have to emulate these in C++.
In those cases you might be able to write some wrapper classes in Java
to make access from C++ easier. These wrappe classes could use RMI-IIOP
or Corba. I think the latter option gives you more possibilities.
--
Piet van Oostrum <piet at (no spam) cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at (no spam) vanoostrum.org |
|
|
| Back to top |
|
|
|
| Graham Walsh... |
Posted: Fri Jul 03, 2009 9:29 am |
|
|
|
Guest
|
On Jul 2, 10:36 am, Piet van Oostrum <p... at (no spam) cs.uu.nl> wrote:
Quote: Graham Walsh <grahamjwa... at (no spam) gmail.com> (GW) wrote:
GW> hi,
GW> I have an RMI server thats up in running, everything is java, client
GW> and server. nothing is defined in IDL. My java client gets its server
GW> reference from the (TAO) name service and invokes problem free.
I am not familiar with TAO myself, but with Corba in general (I am an
omniORRB fan).
The fact that your java client gets a reference from the TAO name
service suggests that RMI-IIOP is used rather than plain RMI (JRMP).
GW> I want to write a c++ client that connects to the same service and
GW> invokes methods on it. There's no IDL, no poa exposed, so I don't
GW> really see how I can get to it from c++. Is it possible, can anybody
GW> tell me?
As Phil Mesnier has stated you can rmic -idl to generate IDL. This
generated very ugly IDL in general, with lots of valuetypes. The problem
might be to use these valuetypes from C++. If your RMI methods use
non-remote objects as parameters or results you need these valuetypes.
If they are anything other that simple things like strings, e.g. your
own objects, or instances of very specific Java classes you have a
problem as you would have to emulate these in C++.
In those cases you might be able to write some wrapper classes in Java
to make access from C++ easier. These wrappe classes could use RMI-IIOP
or Corba. I think the latter option gives you more possibilities.
--
Piet van Oostrum <p... at (no spam) cs.uu.nl
URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4]
Private email: p... at (no spam) vanoostrum.org
thanks for the replies. Its RMI over IIOP alright. I think I'll just
go with a java client instead of trying to attack it from C++. Good to
know that I can use rmic -idl if I need to.
have a nice weekend.
Graham |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Mon Nov 30, 2009 3:04 pm
|
|