corba namespace in c++ vs java
- From: Tom Forsmo <nospam@xxxxxxxxxx>
- Date: Mon, 29 Oct 2007 14:41:57 +0100
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
.
- Follow-Ups:
- Re: corba namespace in c++ vs java
- From: ciaran . mchale
- Re: corba namespace in c++ vs java
- Prev by Date: Re: corba reference
- Next by Date: Explicit (de)marshalling
- Previous by thread: general software architecture forums?
- Next by thread: Re: corba namespace in c++ vs java
- Index(es):
Relevant Pages
|