[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-developer
Subject:    Re: [jacorb-developer] NVList & VAJava
From:       Gerald Brose <brose () inf ! fu-berlin ! de>
Date:       1999-10-13 13:15:30
Message-ID: 380485F2.C4760584 () inf ! fu-berlin ! de
[Download RAW message or body]

Hello.

Frank Bergmann wrote:
> During the weekend I tried to build up a "user management"
> application as a CORBA sample. To do this, I used IBM
> Visual Age for Java. I was quite surprised that I could
> import and integrate JacORB without problems. VAJ now allows
> me to start the IDL compiler from the IDE. The generated
> code is then read, integrated and compiled automatically
> by VAJ. I can provide a short HOWTO if someone is interested.

I would indeed be interested to put such a HOWTO up on JacORB's
documentation web page.

> However, I had some conceptual problems with CORBA
> trying to pass objects through "the link". Instead of
> passing the complete object around (I´m used to do
> this in a MoM environment), I decided to pass a key-value
> list back and forth:
> 
>   struct KeyValue {
>         string  key;
>         string  value;
>   };
>   typedef sequence <KeyValue> KVList;
> 
>   KVList getUserVars(in string userName);
>   void setUserVars(in string userName, in KVList args);
> 
> My questions:
> 1. Is there a more elegant solution to this problem (except
> for registering every user/group object in the NS)?

If I understand correctly this is probably the most straightforward
thing to do.
 
> 2. Can I use the predefined "NVList" data type
> (jacorb.org.NVList) instead of my "KVList"? What IDL do
> I have to write to establish the interface?

jacorb.orb.NVList is actually an implementation of org.omg.CORBA.NVList
which is used to construct requests for the Dynamic Invocation
Interface.
I would not recommend using it because it appears unncessarily complex 
and involves dealing with (untyped) anys rather than with straight
strings.

If you really want to use it, you would need to include the IDL
definitions for NamedValue and NVList into your IDL. These are
defined in Corba.idl but usually user-defined IDL should not
include Corba.idl but orb.idl instead (because it is much shorter
and only contains IDL that is useful in user-defined IDL). Un-
fortunately, you would need to copy the definitions for NamedValue 
and NVList to orb.idl yourself because they are not currently in
this file (but they should go there nonetheless).

Hope that helps and best regards, Gerald Brose.
--
Gerald Brose,                       Mail:       brose@inf.fu-berlin.de
FU Berlin        (for PGP key see:) http://www.inf.fu-berlin.de/~brose
Institut f. Informatik              Ph-one:        (++49-30) 838-75112
Berlin, Germany                     Ph-ax:         (++49-30) 838-75109


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic