[omniORB] omniorb, C++ and java question

Jason Stelzer jstelzer at healthmarketscience.com
Thu Jun 28 12:48:11 BST 2007


On Jun 28, 2007, at 11:35 AM, Hervin, Paul wrote:

> Hi,
>
> There is no problem in writing an IDL, then compiling it with idlj  
> for the java part and compiling it with omniidl for the C++ part.
>
> Regards
> Paul
>
>

Yes, its looking more and more like I'm going to have to do that. I  
was hoping that this approach would work.
http://java.sun.com/j2se/1.4.2/docs/guide/rmi-iiop/interop.html#31647

Once I realized that rmic has no idea about annotations and wrote an  
old style ejb, the idl generated became much closer to what I need.  
But, there are still a few hopefully minor issues.


java/lang/Exception.idl:17: In declaration of non-custom valuetype  
'_Exception', inherited valuetype 'java::lang::Throwable' is custom
java/lang/Throwable.idl:16:  (java::lang::Throwable declared here)
javax/ejb/EJBObject.idl:60: Warning: Identifier 'primaryKey' clashes  
with CORBA 3 keyword 'primarykey'


I believe this is due to the fact that _Exception should not be  
declared like this:
module java {
module lang  
{                                                                        
                                                                         
                                                                         
                                                                         
                                                                         
                             valuetype  
_Exception: ::java::lang::Throwable  
{                                                                        
                                                                         
        };
#pragma ID _Exception "RMI:java.lang.Exception: 
77E8B62CD7E79AA2:D0FD1F3E1A3B1CC4"                                       
                                                                         
                                                                         
                                                                         
                                                             };
  };

However, I'm not well versed in corba so this is as much me feeling  
my way through the problem and looking up references as anything else.

--
J.





More information about the omniORB-list mailing list