Issue 2479: Use of "java" as top-level IDL module (java2idl-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: The Java to IDL mapping specifies a number of names in the IDL module "java". Examples are ::java::lang::Exception and ::java::lang::_Object. This can cause problems when mapping Java to IDL and then remapping the resulting IDL back to Java. Resolution: Closed, no change Revised Text: Actions taken: February 22, 1999: received issue June 4, 1999: closed issue Discussion: End of Annotations:===== Date: Mon, 22 Feb 1999 13:52:52 +0000 From: Simon Nash Organization: IBM To: issues CC: java2idl Subject: Use of "java" as top-level IDL module The Java to IDL mapping specifies a number of names in the IDL module "java". Examples are ::java::lang::Exception and ::java::lang::_Object. This can cause problems when mapping Java to IDL and then remapping the resulting IDL back to Java. This issue is only about the choice of names in the Java to IDL mapping, not about the wider implications of this Java->IDL->Java scenario. The names that may need to be changed if we decide that some action is needed are as follows: ::java::lang::Exception ::java::lang::_Object ::javax::rmi::CORBA::ClassDesc ::java::io::Serializable ::java::io::Externalizable To avoid conflict with built-in JDK classes of similar names to the above, it is necessary to specify a package prefix for the "java" module when mapping generated IDL back to Java. This has the unfortunate side-effect of mapping all IDL valuetypes that started life as JDK classes back to similar but different classes in generated Java code. For example, if the package prefix for "java" is "gen", then the java.util.Date class will map back to gen.java.util.Date. This requires the user to implement gen.java.util.Date as a wrapper for java.util.Date. For many users, this is confusing and annoying. They would like to be able to use the original java.util.Date class. There are many issues with supporting this use, and it would probably require some changes in the IDL to Java mapping of valuetypes. However, there is little point in enabling this round trip mapping if the names of a small number of classes in the Java to IDL mapping spec effectively prevent its use for all JDK classes. Since a top-level OMG-defined IDL module is needed for these names, an obvious solution is to put them under the top-level CORBA module. For example: ::CORBA::java::Exception ::CORBA::java::_Object ::CORBA::java::ClassDesc ::CORBA::java::Serializable ::CORBA::java::Externalizable The alternative is to do nothing and say that this round-tripping is not supported, as we do today. However, I have been convinced by user feedback from the RMI-IIOP beta that this is not a good enough answer. Simon -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb