Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMI server

0 views
Skip to first unread message

Graham Walsh

unread,
Jun 29, 2009, 11:38:26 AM6/29/09
to
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

Phil Mesnier

unread,
Jul 1, 2009, 11:06:14 PM7/1/09
to Graham Walsh
Hi Graham,

My memory isn't clear on this, but I think you can use rmic -idl or some
variant of that to generate IDL. Take a look at
http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm
which looks like it was updated in 2008.

Perhaps you can use DII to synthesize invocations?

Best regards,
Phil

--
Phil Mesnier
Principal Software Engineer and Partner, http://www.ociweb.com
Object Computing, Inc. +01.314.579.0066 x225

Piet van Oostrum

unread,
Jul 2, 2009, 4:36:27 AM7/2/09
to
>>>>> Graham Walsh <graham...@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 <pi...@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: pi...@vanoostrum.org

Graham Walsh

unread,
Jul 3, 2009, 5:29:41 AM7/3/09
to
On Jul 2, 10:36 am, Piet van Oostrum <p...@cs.uu.nl> wrote:
> Piet van Oostrum <p...@cs.uu.nl>

> URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4]
> Private email: p...@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

0 new messages