corba namespace in c++ vs java



Hi

I am having a problem with mapping a corba namespace between c++ and java.

I am currently implementing a server with a legacy corba interface originally written in c++. The server has several clients written in c++ and the new server I am writing is in java. The legacy idl interface, does not contain any modules, all its interfaces are defined without a namespace, except for some data types which are defined in a single module

e.g.

data.idl:

module MyData {
typedef sequence<string> strings;
...
}

methods.idl

interface MyMethods {

methodA(in MyData::strings);
methodB();
}

And here the namespace problem begins, since in java a module is equivalent to a package, which dictates a directory structure. While in c++ a module is just a namepsace which does not dictate a directory structure at all. What is normal in java is of course to have such code in a separate package called ex: services.corba. The problem of course is that all generated classes in java must then contain a "package services.corba;" statement. Since the legacy idl does not contain that namespace, there will be a mismatch.

If I dont include the java required modules in the idl, the generated stubs will not belong to a specific package. That is of course possible, but then it will be stored in the root source dir instead. That would really just make the source code a mess, when all other code is nicely packaged.

Another question is how namespace is interpreted by Corba during execution of a call. Normally such a call engine should check that namespaces in a call match the servers namespace for it to succeed. But does it do so in Corba or is namespaces just a internal issue of the part, i.e. client internal or server internal.

Anybody got any ideas on how to fix this?

regards

tom
.



Relevant Pages

  • Re: Java "interface" vs. OO interface
    ... > ...if DwightSchmidlap and Henry both implemented the interface. ... > The java interface allows me to specify constants in that interface. ... Now I've used the namespace provided by interfaces for stuff even more ... For example, the factories, why should I ...
    (comp.object)
  • Re: Java "interface" vs. OO interface
    ... >> ...if DwightSchmidlap and Henry both implemented the interface. ... >> The java interface allows me to specify constants in that interface. ... > Now I've used the namespace provided by interfaces for stuff even more ... For example, the factories, why should I ...
    (comp.object)
  • Re: APl v J?
    ... IBM's Workstation APL2 runs on Linux, ... APL2 includes a simple HTTP server. ... More useful, it provides a Java ... interface which allows it to be called from industrial strength web servers ...
    (comp.lang.apl)
  • Re: Hypothetical: All code in classes but main()
    ... the argument Stroustrup gives for having helper functions at namespace ... If a function requires access to member data, then by all means make it ... > There are advantages to having the static Math class in Java. ...
    (comp.lang.cpp)
  • Re: How to fix awkward ATL namespace clash?
    ... Renaming my own namespace doesn't work because I'm not getting a namespace ... I'm getting an Interface collision. ... By the time the compiler parses my typelib the OLEDB IAccessor ...
    (microsoft.public.vc.atl)