OpenORB RMIoverIIOP ------------------- - Added a flag to UtilDelegateImpl so that the call to the expensive RMIClassloader can be avoided: get/setLocalCodebaseOnly() This is a for performance improvement but the code does not behave standard compliant anymore. However in most environments no code will be downloaded from a server in order to instantiate a class. - Fixed a bug when sending an interface of a Serializable. public interface SerialItf extends Serializable {} public class SerialItfImpl implements SerialItf {} public interface RemoteItf extends Remote { SerialItf echo_serialitf( SerialItf si ) throws RemoteException; } When creating an instance of SerialItfImpl and sending it as parameter of a remote method call echo_serialitf the Java VM crashed because the native method allocateNewObject in the DeserializationKernel implementation tries to allocate the interface instead of the implementation class. - Added a test case to test the mapping of IDLEntity types other than org.omg.CORBA.Any and org.omg.CORBA.TypeCode. - Fixed RMIObjectStreamClass where the constructor was trying to load helper classes for org.omg.CORBA.TypeCode and org.omg.CORBA.Any. These two classes do not have Helper classes. The read/write methods and the typecode are already set in the static initializer of the class and thus does not need to be loaded again. - The JavaToIdl compiler has been moved into the OpenORB src/compiler tree and is packaged into the openorb_tools.jar. The openorb_rmi_tools.jar has been removed. - Converted the build.xml file to use the java2idl taskdef. - Removed the setConfig scripts, use the updateConfig scripts from tools instead. - Added patches for running the RMIoverIIOP module in a security restricted environment. When certain policies are enabled (e.g. inside a EJB container) to restrict the permissions of the server/client then several methods need to be executed as PriviledgedAction in order not to fail with a PermissionDenied exception. - Moved the IdentityKey class into the tools module. - Moved methods from util class NameMangling into the tools class RepoIDHelper. - Moved build script logic into Ant files. - Fixed a bug when un-/marshaling stubs in an array of java.lang.Object. In this case the read_value() method was called for each array element instead of read_Object(). The fix uses the read_abstract_interface() method for the arary elements now. - Added extensive logging output to the ValueHandler class. - LogEnabled the classes RMIOutputStream, RMIInputStream, UtilDelegateImpl, and ValueHandlerImpl. - Added a minor performance optimization for the internal writeArray() method. - Refactored the readValue method to speed-up the class discovery. - Some refactoring to make the code in ValueHandlerImpl easier to read. - Removed the BigInteger patch again, because the overall fix of the PutField/GetField mechanism also fixed the marshal problems with JDKs 1.4 BigInteger class. - Bugfixes for the PutField/GetField implementations. - Added test cases for JDK1.4 classes that proved critical: Throwable, BigDecimal (BigInteger). - Performance optimization for RMIObjectStreamClass. Keep already loaded classes in thread-local hash maps. - Added critical performance optimization flags to the UtilDelegateImpl class: o get/setProhibitIsLocalTest() -> default false This method can be used to avoid the costly obj._is_local() call. When passing true to this method the isLocal() method in UtilDelegateImpl returns false per default, i.e. the stub is a remote stub. o get/setIsLocalResult() -> false This flag can be used to change the return value of the isLocal() call when the flag prohibitIsLocalTest is set to false. Per default the remote case is assumed. o get/setCopyLocalObjects() -> default true This flag can be set to false so that objects are not copied when the local optimization path is taken in compiler generated stubs. The costly copy operation can be saved by setting the property to false. This flag is dangerous as it changes the parameter passing semantics. The in-process call normally gets fresh copies of objects so that the same behaviour is achieved as in remote calls, i.e. the remote server always gets a copy of the object, never the same instance because the object is normally not located in the same VM, but transfered over the network. These flags can be used under certain circumstances where it is clear that each call must be a remote call. The test whether the stub is a local or a remote call is often as expensive as the actual remote call itself. The flags can be used to change this behaviour and to lead to a better performance. ATTENTION: Use these optimizations only if you know exactly what you are doing! Because of the special nature of these flags no configuration option in rmi.xml is available, keeping the inexperienced user away from playing around with these flags. - Performance optimization for RMIRemoteStreamClass. Keep already loaded classes in thread-local hash maps. - Bugfix for RMIRemoteStreamClass. The caching of already loaded classes was not thread safe. - Performance improvements for the implementation classes DeserializationKernel[Sun,IBM]. - Added a setenv shell script and preserved the file attributes for the shell scripts in tgz archives. - Create the jars in the lib folder instead of the dist folder. - Removed the jndi_1_2_1.jar that was a relict from times when the JDK had no javax.naming package on its own. - Changed ClassCastException to throw a descriptive text. - Create javadoc for examples and test cases additionally. - Moved the JNDI service provider to the NamingService (incl. the associated test case). - Return a NotSerializableException from mapSystemException when the originating exception was a BAD_PARAM with minor code 6. Previously a MarshalException was returned which was not spec. compliant. - Adapted usage of OpenORB classes to new package structure. - Updated version number to 1.4.0. - The class ReleaseInfo has been removed for simplicity reasons. Version 1.3.0 - September, 27 2002 - RMIoverIIOP_1_3_0 - Applied patch for bug #594274 (submitted by Stefan Reich ), fixing a problem when write replacing CORBA object references. - Applied the patch for bug #594268 (submitted by Stefan Reich ) which fixes the following issues in the class RMIObjectStreamClass: * error reporting is broken in the method lookup(), which returns a null value for some classes, which most of the calling code doesn't expect, so that NPE are thrown * lookup() special-cases org.omg.CORBA.Object, java.rmi.Remote and org.omg.CORBA.portable.ValueBase as invalid classes for writeReplace(). * the InvalidClassExcpetion is thrown nowhere in this method, but declared. * synchronization on the field s_stream_classes is broken. Although lookup() acquires a lock on the field, the rest of the code doesn't, rendering the locking useless. * the lookup() code doesn't perform well for the most frequent case that a class is already in the s_stream_classes map. - Added a hack to make BigInteger (BigDecimal) work on JDK 1.4.x. This hack applies only on JDK 1.4.x on other platforms no such tweaking will be done to maintain interoperability to with other ORBs. The interoperability has not been tested but with this solution in place there is no chance for interoperability at all. - Fixed logger passing for the ValueHandlerImpl class. No valid logger was passed before and thus no logging output could be seen. - Since JDK 1.4.x the classes java.awt.CardLayout java.math.BigInteger javax.security.auth.Subject are using the ObjectOutputStream.putFields() method for serializing their internal state. This new internal behaviour revealed that the ValueHandlerImpl.putFields() and ValueHandler.writeFields() methods were not implemented. This fix implements the two methods to support the PutField mechanism for serializing member fields. - Added a test case for the PutField and the serialPersistentFields array serialization mechanism. - Do not create import statements in generated code for classes in the global scope (classes/interfaces with no package statement) as this is not accepted by the JDK 1.4 javac compiler anymore, see http://java.sun.com/j2se/1.4/compatibility.html#incompatibilities1.4 - Make build.sh work with the latest cygwin version. The script was using a variable OSTYPE that is not available in sh. The official way to get the name of the platform is uname which is now used for determining the CLASSPATH separator. Version 1.3.0 BETA2 - August, 10 2002 - RMIoverIIOP_1_3_0_BETA2 - Added patch by Diego Sevilla Ruiz (dsevilla _at_ um _dot_ es) for the install target of the build.xml. The new version copies the files to the path specified by the property install.path just as if you extract one of the binary tarballs. - Make the install target in build.xml copy all jars from the dist directory to the specified install location. - Deprecated the JNDI CosNaming SPI as it uses the CosNaming IDL APIs and should thus be part of the NameService. - Removed the JDK 1.2.x support. The JDK 1.4.0 and the JDK 1.2.2 are mutually exclusive, so adding support for JDK 1.4.0 necessarily means removing support for JDK 1.2.x. All the javax.* packages and classes have therefore been removed because javax.rmi.* and javax.rmi.CORBA.* have been integrated into the JDK since 1.3.0. - Updated the test case ComplexTest to marshal and unmarshal the class that was used for working on the JDK1.4 support bug fix. - Added JDK 1.4.0 support. An interface DeserializationKernel and two implementation classes, one for Sun and one for IBM JDKs, have been added. The implementation classes provide access to the native methods that are needed to unmarshal final class members and assign them to class instance member fields. New JDKs can be supported easily by adding more implementation classes of the DeserializationKernel interface, as long as the JDK provides the hooks to the right native methods. - Added dump-info target to build.xml to show the basic settings that are used by ant. - Add support for xalan on JDK 1.4 to build.xml. Otherwise the compile-docbook target does not work. - Fixed deprecation warnings. Disabled the JUnit tests for the JNDI CosNaming SPI, because a running NameSerivce is needed for this to work. Version 1.3.0 BETA1 - June, 19 2002 - RMIoverIIOP_1_3_0_BETA1 - Added a fix from Stefan Reich (sreich@users.sourceforge.net) for bug #563056 (RMI marshalling problem). - Added some debug output to the MappingAPI class to show which type of class the parser has identified. Along with that some clean up of the MappingAPI.setClassType() method. - Fixed a bug in the JavaToIdl compiler. When you have an empty public class MyClass implements EJBObject, MyInterface {} where the remote methods are declared in MyInterface but forgot to classify each remote method with "throws RemoteException" then the compiler failed with a ClassCastException. Now the exception does not occur anymore but the generated Stub is missing all the remote methods. This is correct because they haven't been qualified by the necessary tag, so compilation of the stub file fails in spite of having a ClassCastException. - UtilDelegateImpl's copyObject() method was not handling the org.omg.CORBA.portable.UnknownException right. This exception is derived from org.omg.CORBA.SystemException and is the only one with no default constructor. The copyObject() method was checking for the SystemException and performing a newInstance() on the type. For the special case of the UnknownException a IllegalAccessExcption was thrown because no default constructor is available. - Added an example to show how the JavaToIdl compiler can be used multiple times in one VM. This was not possible previously because all the RMIoverIIOP classes were in the same jar file and therefore errors occured when all RMIoverIIOP classes were loaded by different classloaders. - Added a compile() method to the JavaToIdl class that returns an exit value. This value can be used to determine the state of the last compilation process. - Created an openorb_rmi_tools-x.y.z.jar holding the JavaToIdl compiler and the JNDI CosNaming SPI. Added an example to show how the compiler can be used multiple times in porcess when using the new archive and different ClassLoaders each time (see Bug #501327 in Bug Tracker). - Issue a warning when the type javax.rmi.CORBA.ClassDesc is used as method or return type in an interface. This is not supported by the JavaToIdl mapping (see 1999 Java2Idl RTF Issue http://cgi.omg.org/issues/issue2479.txt). Bug 522384. - Do not hide the originating exception in the locally optimized call case when an exception is copied via the method UtilDelegateImpl.copyObject(). Added the original exception text to the CORBA.BAD_PARAM exception thrown. - When no package is specified, classes must be imported explicitly. A simple test case with a user-defined exception "BookException" failed because the JavaToIdl created an import statement "import Book" instead of "import BookException". Internally the "BookException" is converted to the IDL name "BookEx" and when writing the Tie/Stub file the "Ex" was simply removed instead of "ception" added. The method for this is located in OpenORB, because JavaToIdl uses the IDL tree structures from the IdlCompiler, see OpenORB/src/main/org/openorb/compiler/generator/IdlToJava - Added a checkstyle target to build.xml. The command "build.sh checkstyle" checks the source code for adherence to the Jakarta coding conventions. - Changed all Class.forName() calls where needed to Thread.currentThread().getContextLoader().loadClass() This is safer when having multiple class loaders. - The logging system has been changed and is based on the Jakarta Avalon LogKit now. - Removed static Trace class occurences either completely or by switching to Avalon logger wherever possible. - Rearranged the directory structure for the examples to follow the general rule src/examples/org/openorb/${NAME_SHORT}/examples - Added more test cases for various bugs that had been in the last Intalio version 1.2.0. - Added a test case for bug #515907. - Added a fix to get the copyObject/copyObjects semantics right. This problem surfaced from contributions of Stefan Reich, especially the patch for bug #514575. - Added a narrow for the local optimized case to the javatoidl compiler. The previously generated code did not use PortableRemoteObject.narrow() to perform the cast (Patch submitted by Stefan Reich ). - Added a task to run the test-cases in remote and in local optimized mode. Patch to build.xml by Stefan Reich. - Added the patch for bug #514575 from Stefan Reich. Avoid a ClassCastException in UtilDelegateImpl.wrapException(). - Added test cases for exceptions. Contributed by Stefan Reich, . - JavaToIdl creates code now that is aligned to the Jakarta coding guidelines. - Separated the setConfig shell scripts from the build.xml. Added an add.bat file to perform the actual command. - Added local.properties file to influence the ant build process locally. - In the mapException method, the org.omg.CosNaming.NamingContextPackage.NotFound exception is getting mapped to a plain javax.naming.NamingException, but it should be a javax.naming.NameNotFoundException. Submitted by David Blevins (dblevins@users.sourceforge.net). - build.sh now works under Cygwin, patch submitted by David Blevins (dblevins@users.sourceforge.net). - Removed the common libs from the lib directory. - Converted the rmi.xml file to docbook format. Build.xml creates pdf and html output now. - Merged install.txt and src/etc/README files. Moved src/etc files CHANGELOG, README, and LICENSE to the base directory of the package and renamed CHANGELOG to WHATSNEW (Jakarta style). - Switched to template based manifest files. - Aligned code to the Apache/Jakarta coding guidlines (Normal and generated code). - Bug #505198: Added the patch from Stefan Reich (sreich@users.sourceforge.net). Version 1.2.1 - January, 11 2002 - RMIoverIIOP_1_2_1 - Bug #850/501292: Added a workaround to fix the name mangling in case the class loader is buggy or not fully implemented. - Bug #840: Added a patch to shut the JavaToIdl compiler VM down explicitly. - Added junit to the build.xml's project.classpath. - Bug #715: Added trace output for original exceptions. Added a new property openorb.debug.ShowStackTrace. This property can be used to show the actual exception traces for all the rethrown exceptions. - Bug #783: Fixed Java2Idl for IDLEntities Any and TypeCode. - Removed the reason for a deprecation warning in UtilDelegateImpl. - Added a runtest target to the build.xml file. - Bug #827: Use the class org.openorb.CORBA.ORBSingleton explicitly. - Fixed a few typos. - Bug #787: Fixed the endless loop when marshalling inner classes. Depends on bug #749 because synthetic members are final. - Bug #749: Added the hack for assigning values to final fields. Does not work for JDK 1.4!!! The serialization architecture has been changed for 1.4 fundamentally. - Added some undocumented flags to the usage list and ordered the switches lexicographically. - Bug #818: Fixed a ClassNotFoundException for UtilDelegateImpl.copyObject(). - Updated the ReleaseInfo class to match the current settings in build.xml. - Enhancement #804: Added a switch for the EJB1.1/2.0 exception mapping. - Bug: Added code to set the internal variable _root not only when generating IDL files. - Bug #802: Added code to get a list of classes to be imported. - Change for #710, the check for null was at the wrong place. - Bug: Fixed code for the generation of stub class names. - Bug #769: Added remote semantics for the local case. - Bug #775: Fixed several bugs in copyObject(). See bugzilla. - Added a target to create debug jars. - Bug #778: Set thread to daemon mode. See bugzilla. - Bug #712: Large number of IDL compiler bugs. See bugzilla. Patch sent by Michael Rumpf - Bug #743: JavaToIdl compiler must sort exceptions before writing them into the generated source file. Patch sent by Michael Rumpf - Bug #710: When calling narrow() on PortableRemoteDelegateImpl with a null object reference a NullPointerException is thrown because narrowExt() which is called internally accesses the reference without checking it for null. Patch sent by Michael Rumpf - Bug #709: The class RMIObjectStreamClass has some places where a NullPointerException is likely to occur. Patch sent by Michael Rumpf - Bug #708.3: In system.UtilDelegateImpl the activation of the object in registerTarget() is not correct in the ServanLocator case. Patch sent by Michael Rumpf - Bug #708.1: In system.UtilDelegateImpl the exception TransactionRollbackException is not correct, it must be TransactionRolledbackException. Patch sent by Michael Rumpf Version 1.2.0 - August, 8 2001 - RMIoverIIOP_1_2_0 - Bug: in the compiler for classes thad don't inherit from any other classes when generated the class id. - Bug: Fixed some problems with the JNDI/CosNaming adapter. - Fixed a bug in the compiler when an exception didn't have a package, a NullPointerException was thrown. - Modified DefaultORB to allow setting of orb directly. - Modified patch on array handling from two down. Array types are marshalled as their declared types, and all other types as their runtime types. - Updated compiler to fix a wide range of problems occouring when generating IDL. The RMI repository IDs are now correctly calculated and used in the IDL files. - Patched generator to fix problem with set methods being called asynchronously. Bug #649. Submitted by Arend Smit [arends@fmf.nl]. - Patched RMIOutputStream to properly handle arrays. This also updates some test cases. Submitted by Michael Rumpf (michael@rumpfonline.de). - Patched the RMIRemoteStreamClass.java, to ensure classes without package are correctly handled. Submitted by Michael Rumpf (michael@rumpfonline.de). - Added a synchronized block for the CtxFactory class to avoid a concurrency problem on the static ORB instance. Version 1.1.0 - May, 8 2001 - RMIoverIIOP_1_1_0 - Changed the DefaultORB.java file to import fully qualified module name as rmi.xml#rmi - Updated the documentation - Removed the manifest file from src/etc and generate it in the build - Bug fixed for wrong package names (kernel -> system) - Bug fixed for accessor ( get/set method and stub/skeleton generation ). - Changed most of the kernel to enhance performances, compliance and scalability. In addition some new features are available : * management of write/readObject * management of writeReplace * Supports of classes ( with or without default constructor ) - Modified the MappingAPI.java class for two fixes: * Recursive custom values providing the writeObject method (like java.util.Date) were not correctly parsed. * The setter operation of a looking like get/set pair (but with different params) was not generated. - Modified the the getRMIObject method, a problem occured when a stub was passed as argument (it should be returned as is). Modified file: UtilDelegate.java Version 1.0.1 - March, 9 2001 - RMIoverIIOP_1_0_1 - Bug fixed in the compiler. The '-' is replaced by '_' in the #define and #ifndef clauses. - The JUNIT tests were added instead of the JTF ones. - One orb per VM initialized for all stubs, skeletons and JNDI contexts to use, rather than using the latest orb to be initialized. Version 1.0.0 - February, 1 2001 - RMIoverIIOP_1_0_0 - Initial Release