# HG changeset patch # User iveresov # Date 1443207875 25200 # Node ID ffe98d5b56214726da35fcb67f86d94d464a866b # Parent c3e302e8e429c3a075b882550b87b0fa9645282d# Parent b00f765af244acc0bd59feb8a81a1998dd752050 Merge diff -r c3e302e8e429 -r ffe98d5b5621 .hgtags --- a/.hgtags Thu Sep 17 16:53:42 2015 +0200 +++ b/.hgtags Fri Sep 25 12:04:35 2015 -0700 @@ -324,3 +324,4 @@ 3966bd3b8167419aa05c6718a4af1cf54b1e3c58 jdk9-b79 3c9f5bd909ae7187f24622ee4b69f8a5756a9271 jdk9-b80 2050b3a0aadcb0e024bf798197421d58e54ec8bf jdk9-b81 +6521875cb63e1d0121b30af56ebbc36db078c4c6 jdk9-b82 diff -r c3e302e8e429 -r ffe98d5b5621 .hgtags-top-repo --- a/.hgtags-top-repo Thu Sep 17 16:53:42 2015 +0200 +++ b/.hgtags-top-repo Fri Sep 25 12:04:35 2015 -0700 @@ -324,3 +324,4 @@ ba08a9f79b9849716bae1f39f71333d47f604012 jdk9-b79 f7c5ae2933c0b8510a420d1713a955e4ffc7ad0b jdk9-b80 b8afcf91331d78626a583ec1b63164468d6f4181 jdk9-b81 +42b56d1f418523ecb61a49d7493302c80c8009cc jdk9-b82 diff -r c3e302e8e429 -r ffe98d5b5621 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Thu Sep 17 16:53:42 2015 +0200 +++ b/common/autoconf/generated-configure.sh Fri Sep 25 12:04:35 2015 -0700 @@ -841,7 +841,6 @@ JDK_MAJOR_VERSION USER_RELEASE_SUFFIX COMPRESS_JARS -RMICONNECTOR_IIOP UNLIMITED_CRYPTO CACERTS_FILE TEST_IN_BUILD @@ -1060,7 +1059,6 @@ enable_hotspot_test_in_build with_cacerts_file enable_unlimited_crypto -enable_rmiconnector_iiop with_milestone with_update_version with_user_release_suffix @@ -1848,9 +1846,6 @@ run the Queens test after Hotspot build [disabled] --enable-unlimited-crypto Enable unlimited crypto policy [disabled] - --enable-rmiconnector-iiop - enable the JMX RMIConnector iiop transport - [disabled] --disable-warnings-as-errors do not consider native warnings to be an error [enabled] @@ -3951,7 +3946,7 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -20100,22 +20095,6 @@ ############################################################################### # - # --enable-rmiconnector-iiop - # - # Check whether --enable-rmiconnector-iiop was given. -if test "${enable_rmiconnector_iiop+set}" = set; then : - enableval=$enable_rmiconnector_iiop; -fi - - if test "x$enable_rmiconnector_iiop" = "xyes"; then - RMICONNECTOR_IIOP=true - else - RMICONNECTOR_IIOP=false - fi - - - ############################################################################### - # # Compress jars # COMPRESS_JARS=false diff -r c3e302e8e429 -r ffe98d5b5621 common/autoconf/jdk-options.m4 --- a/common/autoconf/jdk-options.m4 Thu Sep 17 16:53:42 2015 +0200 +++ b/common/autoconf/jdk-options.m4 Fri Sep 25 12:04:35 2015 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -455,19 +455,6 @@ ############################################################################### # - # --enable-rmiconnector-iiop - # - AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop], - [enable the JMX RMIConnector iiop transport @<:@disabled@:>@])]) - if test "x$enable_rmiconnector_iiop" = "xyes"; then - RMICONNECTOR_IIOP=true - else - RMICONNECTOR_IIOP=false - fi - AC_SUBST(RMICONNECTOR_IIOP) - - ############################################################################### - # # Compress jars # COMPRESS_JARS=false diff -r c3e302e8e429 -r ffe98d5b5621 common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Thu Sep 17 16:53:42 2015 +0200 +++ b/common/autoconf/spec.gmk.in Fri Sep 25 12:04:35 2015 -0700 @@ -262,9 +262,6 @@ # Enable unlimited crypto policy UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@ -# Enable RMIConnector IIOP transport -RMICONNECTOR_IIOP=@RMICONNECTOR_IIOP@ - GCOV_ENABLED=@GCOV_ENABLED@ # Necessary additional compiler flags to compile X11 diff -r c3e302e8e429 -r ffe98d5b5621 common/bin/blessed-modifier-order.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/bin/blessed-modifier-order.sh Fri Sep 25 12:04:35 2015 -0700 @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Copyright 2015 Google, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. + +usage() { + ( + echo "$0 DIR ..." + echo "Modifies in place all the java source files found" + echo "in the given directories so that all java language modifiers" + echo "are in the canonical order given by Modifier#toString()." + echo "Tries to get it right even within javadoc comments," + echo "and even if the list of modifiers spans 2 lines." + echo + echo "See:" + echo "https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#toString-int-" + echo + echo "Example:" + echo "$0 jdk/src/java.base jdk/test/java/{util,io,lang}" + ) >&2 + exit 1 +} + +set -eu +declare -ar dirs=("$@") +[[ "${#dirs[@]}" > 0 ]] || usage +for dir in "${dirs[@]}"; do [[ -d "$dir" ]] || usage; done + +declare -ar modifiers=( + public protected private + abstract static final transient + volatile synchronized native strictfp +) +declare -r SAVE_IFS="$IFS" +for ((i = 3; i < "${#modifiers[@]}"; i++)); do + IFS='|'; x="${modifiers[*]:0:i}" y="${modifiers[*]:i}"; IFS="$SAVE_IFS" + if [[ -n "$x" && -n "$y" ]]; then + find "${dirs[@]}" -name '*.java' -type f -print0 | \ + xargs -0 perl -0777 -p -i -e \ + "do {} while s/^([A-Za-z@* ]*)\b($y)(\s|(?:\s|\n\s+\*)*\s)($x)\b/\1\4\3\2/mg" + fi +done diff -r c3e302e8e429 -r ffe98d5b5621 corba/.hgtags --- a/corba/.hgtags Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/.hgtags Fri Sep 25 12:04:35 2015 -0700 @@ -324,3 +324,4 @@ 4ab250b8fac66ef8cd15ee78c40f0c651c96e16a jdk9-b79 821a0373ef2d1642a9824facb938b901ad010413 jdk9-b80 45c35b7f5b40d5af0085e4a7b3a4d6e3e0347c35 jdk9-b81 +c20d8ebddaa6fb09cc81d3edf3d1d05f4232700a jdk9-b82 diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/com/sun/corba/se/impl/ior/ByteBuffer.java --- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/ior/ByteBuffer.java Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/ior/ByteBuffer.java Fri Sep 25 12:04:35 2015 -0700 @@ -37,9 +37,9 @@ protected byte elementData[]; /** - * The number of valid components in this ByteBuffer object. - * Components elementData[0] through - * elementData[elementCount-1] are the actual items. + * The number of valid components in this {@code ByteBuffer} object. + * Components {@code elementData[0]} through + * {@code elementData[elementCount-1]} are the actual items. * * @serial */ @@ -88,7 +88,7 @@ /** * Constructs an empty ByteBuffer so that its internal data array - * has size 10 and its standard capacity increment is + * has size {@code 10} and its standard capacity increment is * zero. */ public ByteBuffer() { @@ -99,7 +99,7 @@ * Trims the capacity of this ByteBuffer to be the ByteBuffer's current * size. If the capacity of this cector is larger than its current * size, then the capacity is changed to equal the size by replacing - * its internal data array, kept in the field elementData, + * its internal data array, kept in the field {@code elementData}, * with a smaller one. An application can use this operation to * minimize the storage of a ByteBuffer. */ @@ -138,7 +138,7 @@ * Returns the current capacity of this ByteBuffer. * * @return the current capacity (the length of its internal - * data arary, kept in the field elementData + * data arary, kept in the field {@code elementData} * of this ByteBuffer. */ public int capacity() { @@ -157,9 +157,9 @@ /** * Tests if this ByteBuffer has no components. * - * @return true if and only if this ByteBuffer has + * @return {@code true} if and only if this ByteBuffer has * no components, that is, its size is zero; - * false otherwise. + * {@code false} otherwise. */ public boolean isEmpty() { return elementCount == 0; diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java --- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java Fri Sep 25 12:04:35 2015 -0700 @@ -438,11 +438,11 @@ } /** - * Writes a java.lang.Object as a CORBA Object. If obj is + * Writes a java.lang.Object as a CORBA Object. If {@code obj} is * an exported RMI-IIOP server object, the tie is found - * and wired to obj, then written to out.write_Object(org.omg.CORBA.Object). - * If obj is a CORBA Object, it is written to - * out.write_Object(org.omg.CORBA.Object). + * and wired to {@code obj}, then written to {@code out.write_Object(org.omg.CORBA.Object)}. + * If {@code obj} is a CORBA Object, it is written to + * {@code out.write_Object(org.omg.CORBA.Object)}. * @param out the stream in which to write the object. * @param obj the object to write. */ @@ -457,10 +457,10 @@ /** * Writes a java.lang.Object as either a value or a CORBA Object. - * If obj is a value object or a stub object, it is written to - * out.write_abstract_interface(java.lang.Object). If obj is an exported - * RMI-IIOP server object, the tie is found and wired to obj, - * then written to out.write_abstract_interface(java.lang.Object). + * If {@code obj} is a value object or a stub object, it is written to + * {@code out.write_abstract_interface(java.lang.Object)}. If {@code obj} is an exported + * RMI-IIOP server object, the tie is found and wired to {@code obj}, + * then written to {@code out.write_abstract_interface(java.lang.Object)}. * @param out the stream in which to write the object. * @param obj the object to write. */ @@ -595,7 +595,7 @@ * the class might be found. May be null. * @param loader a class whose ClassLoader may be used to * load the class if all other methods fail. - * @return the Class object representing the loaded class. + * @return the {@code Class} object representing the loaded class. * @exception ClassNotFoundException if class cannot be loaded. */ public Class loadClass( String className, String remoteCodebase, @@ -605,20 +605,20 @@ } /** - * The isLocal method has the same semantics as the + * The {@code isLocal} method has the same semantics as the * ObjectImpl._is_local method, except that it can throw a RemoteException. * (no it doesn't but the spec says it should.) * - * The _is_local() method is provided so that stubs may determine + * The {@code _is_local()} method is provided so that stubs may determine * if a particular object is implemented by a local servant and hence local * invocation APIs may be used. * * @param stub the stub to test. * - * @return The _is_local() method returns true if + * @return The {@code _is_local()} method returns true if * the servant incarnating the object is located in the same process as - * the stub and they both share the same ORB instance. The _is_local() - * method returns false otherwise. The default behavior of _is_local() is + * the stub and they both share the same ORB instance. The {@code _is_local()} + * method returns false otherwise. The default behavior of {@code _is_local()} is * to return false. * * @throws RemoteException The Java to IDL specification does to diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java --- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java Fri Sep 25 12:04:35 2015 -0700 @@ -93,7 +93,7 @@ * @param name Ignored * @param ctx The non-null CNCtx whose ORB to use. * @param env Ignored - * @return The CORBA object for orig or null. + * @return The CORBA object for {@code orig} or null. * @exception ConfigurationException If the CORBA object cannot be obtained * due to configuration problems * @exception NamingException If some other problem prevented a CORBA diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/com/sun/corba/se/spi/legacy/connection/ORBSocketFactory.java --- a/corba/src/java.corba/share/classes/com/sun/corba/se/spi/legacy/connection/ORBSocketFactory.java Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/com/sun/corba/se/spi/legacy/connection/ORBSocketFactory.java Fri Sep 25 12:04:35 2015 -0700 @@ -165,7 +165,7 @@ * If number is 0 then use an emphemeral port for the listener of * the associated type.

* - * If number is greater then 0 use that port number.

+ * If number is greater than 0 use that port number.

* * An ORB creates a listener socket for each type * specified by the user by calling diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/javax/rmi/CORBA/Util.java --- a/corba/src/java.corba/share/classes/javax/rmi/CORBA/Util.java Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/javax/rmi/CORBA/Util.java Fri Sep 25 12:04:35 2015 -0700 @@ -108,12 +108,12 @@ } /** - * Writes a java.lang.Object as a CORBA Object. If obj is + * Writes a java.lang.Object as a CORBA Object. If {@code obj} is * an exported RMI-IIOP server object, the tie is found - * and wired to obj, then written to -out.write_Object(org.omg.CORBA.Object). - * If obj is a CORBA Object, it is written to - * out.write_Object(org.omg.CORBA.Object). + * and wired to {@code obj}, then written to + * {@code out.write_Object(org.omg.CORBA.Object)}. + * If {@code obj} is a CORBA Object, it is written to + * {@code out.write_Object(org.omg.CORBA.Object)}. * @param out the stream in which to write the object. * @param obj the object to write. */ @@ -128,12 +128,11 @@ /** * Writes a java.lang.Object as either a value or a CORBA Object. - * If obj is a value object or a stub object, it is written to - * out.write_abstract_interface(java.lang.Object). If obj -is -an exported - * RMI-IIOP server object, the tie is found and wired to obj, - * then written to out.write_abstract_interface(java.lang.Object). + * If {@code obj} is a value object or a stub object, it is written to + * {@code out.write_abstract_interface(java.lang.Object)}. + * If {@code obj} is an exported + * RMI-IIOP server object, the tie is found and wired to {@code obj}, + * then written to {@code out.write_abstract_interface(java.lang.Object)}. * @param out the stream in which to write the object. * @param obj the object to write. */ @@ -161,8 +160,8 @@ } /** - * Removes the associated tie from an internal table and calls {@link -Tie#deactivate} + * Removes the associated tie from an internal table + * and calls {@link Tie#deactivate} * to deactivate the object. * @param target the object to unexport. */ @@ -219,27 +218,27 @@ *

The spec for this method is the "Java to IDL language * mapping", ptc/00-01-06. *

In Java SE Platform, this method works as follows: - *

Tools

diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/org/omg/CORBA/doc-files/generatedfiles.html --- a/corba/src/java.corba/share/classes/org/omg/CORBA/doc-files/generatedfiles.html Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/org/omg/CORBA/doc-files/generatedfiles.html Fri Sep 25 12:04:35 2015 -0700 @@ -9,7 +9,8 @@

IDL-to-Java Generated Files

The files that are generated by the IDL-to-Java compiler, in accordance with -the IDL-to-Java Language Mapping Specification, +the +IDL-to-Java Language Mapping Specification, which is implemented in JavaTM SE 6 according the compliance document. @@ -18,23 +19,25 @@ and identifiers with no change. Because of the nature of the Java language, a single IDL construct may be mapped to several (differently named) Java constructs. The additional names are constructed by appending a descriptive suffix. -For example, the IDL interface foo is mapped to the Java -interfaces foo and fooOperations, and additional -Java classes fooHelper, fooHolder, fooPOA, -and optionally fooPOATie. +For example, the IDL interface foo is mapped to the Java +interfaces foo and fooOperations, and additional +Java classes fooHelper, fooHolder, fooPOA, +and optionally fooPOATie.

The mapping in effect reserves the use of several names for its own purposes. These are:

@@ -42,50 +45,55 @@

Helper Files

Helper files supply several static methods needed to manipulate the type. -These include Any insert and extract operations for the type, +These include Any insert and extract operations for the type, getting the repository id, getting the typecode, and reading and writing the type from and to a stream.

The helper class for a mapped IDL interface or abstract interface also -include narrow operation(s). The static narrow method allows an org.omg.CORBA.Object +include narrow operation(s). The static narrow method allows an org.omg.CORBA.Object to be narrowed to the object reference of a more specific type. -The IDL exception CORBA::BAD_PARAM is thrown if the narrow fails because +The IDL exception CORBA::BAD_PARAM is thrown if the narrow fails because the object reference does not support the requested type. A different system exception -is raised to indicate other kinds of errors. Trying to narrow a null will always succeed with a return value of null. +is raised to indicate other kinds of errors. Trying to narrow +a null will always succeed with a return value of null.

Holder Files

Support for out and inout parameter passing modes requires the use of additional holder classes. -These classes are available for all of the basic IDL datatypes in the org.omg.CORBA package +These classes are available for all of the basic IDL datatypes in the org.omg.CORBA package and are generated for all named user defined IDL types except those defined by typedefs. (Note that in this context user defined includes types that are defined in OMG specifications such as those for the Interface Repository, and other OMG services.)

Each holder class has a constructor from an instance, a default constructor, and has -a public instance member, value which is the typed value. The default constructor +a public instance member, value which is the typed value. The default constructor sets the value field to the default value for the type as defined by the Java language: false for boolean, 0 for numeric and char types, null for strings, null for object references.

To support portable stubs and skeletons, holder classes also implement -the org.omg.CORBA.portable.Streamable interface. +the org.omg.CORBA.portable.Streamable interface.

Operations Files

A non abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface. -The signature interface, which extends IDLEntity, has the same -name as the IDL interface name and is used as the signature type in method declarations +The signature interface, which extends IDLEntity, has the same +name as the IDL interface name and is used +as the signature type in method declarations when interfaces of the specified type are used in other interfaces. -The operations interface has the same name as the IDL interface with the suffix Operations +The operations interface has the same name as the IDL interface +with the suffix Operations appended to the end and is used in the server-side mapping and as a mechanism for providing optimized calls for collocated client and servers.

The Java operations interface contains the mapped operation signatures. The Java signature interface extends the operations interface, -the (mapped) base org.omg.CORBA.Object, as well as org.omg.portable.IDLEntity. +the (mapped) base org.omg.CORBA.Object, +as well as org.omg.portable.IDLEntity. Methods can be invoked on the signature interface. Interface inheritance -expressed in IDL is reflected in both the Java signature interface and operations interface hierarchies. +expressed in IDL is reflected in both the Java signature +interface and operations interface hierarchies.

Stubs

@@ -96,11 +104,13 @@ for programmers to predict once they are familiar with OMG IDL and the language mapping for the particular programming language. The stubs make calls on the rest of the ORB using interfaces that are private to, and presumably optimized for, the particular ORB Core. -If more than one ORB is available, there may be different stubs corresponding to the different ORBs. -In this case, it is necessary for the ORB and language mapping to cooperate to associate +If more than one ORB is available, there may be different stubs +corresponding to the different ORBs. In this case, it is necessary for +the ORB and language mapping to cooperate to associate the correct stubs with the particular object reference. -

Object-oriented programming languages, such as Java, C++, and Smalltalk, do not require stub interfaces. +

Object-oriented programming languages, such as Java, +C++, and Smalltalk, do not require stub interfaces.

diff -r c3e302e8e429 -r ffe98d5b5621 corba/src/java.corba/share/classes/org/omg/CORBA/package.html --- a/corba/src/java.corba/share/classes/org/omg/CORBA/package.html Thu Sep 17 16:53:42 2015 +0200 +++ b/corba/src/java.corba/share/classes/org/omg/CORBA/package.html Fri Sep 25 12:04:35 2015 -0700 @@ -34,27 +34,27 @@ Provides the mapping of the OMG CORBA APIs to the JavaTM -programming language, including the class ORB, which is implemented +programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB). -

For a precise list of supported sections of official CORBA specifications with which -the Java[TM] Platform, Standard Edition 6 complies, see Official Specifications for CORBA support in +

For a precise list of supported sections of official CORBA specifications with which +the Java[TM] Platform, Standard Edition 6 complies, see Official Specifications for CORBA support in Java[TM] SE 6.

General Information

-The information in this section is information relevant to someone who +The information in this section is information relevant to someone who compiles Interface Definition Language (IDL) files and uses the ORB to write clients and servers. -

The classes and interfaces described in this section can be put into -four groups: ORB classes, Exceptions, Helper classes, -and Holder classes. +

The classes and interfaces described in this section can be put into +four groups: ORB classes, Exceptions, Helper classes, +and Holder classes.

-The ORB Class

+The ORB Class

An ORB handles (or brokers) method invocations between a client and the method's implementation on a server. Because the client and server @@ -63,92 +63,91 @@ deal of work behind the scenes to accomplish this communication.

Most of what an ORB does is completely transparent to the user, and a major -portion of the CORBA package consists of classes used by the ORB +portion of the CORBA package consists of classes used by the ORB behind the scenes. The result is that most programmers will use only a small part of this package directly. In fact, most programmers will use -only a few methods from the ORB class, some exceptions, and +only a few methods from the ORB class, some exceptions, and occasionally, -a holder class. +a holder class.

-ORB Methods

+ORB Methods -

Before an application can enter the CORBA environment, it must first: +

Before an application can enter the CORBA environment, it must first:

The following operations are provided to initialize applications and obtain the appropriate object references:

-When an application requires a CORBA environment it needs a mechanism to -get an ORB object reference and possibly an OA object reference -(such as the root POA). This serves two purposes. First, it initializes -an application into the ORB and OA environments. Second, it returns the -ORB object reference and the OA object reference to the application -for use in future ORB and OA operations. +When an application requires a CORBA environment it needs a mechanism to +get an ORB object reference and possibly an OA object reference +(such as the root POA). This serves two purposes. First, it initializes +an application into the ORB and OA environments. Second, it returns the +ORB object reference and the OA object reference to the application +for use in future ORB and OA operations. -

In order to obtain an ORB object reference, applications call -the ORB.init operation. The parameters to the call can comprise an +

In order to obtain an ORB object reference, applications call +the ORB.init operation. The parameters to the call can comprise an identifier for the ORB for which the object reference is required, - and an arg_list, which is used to allow environment-specific data to be - passed into the call. + and an arg_list, which is used to allow environment-specific data to be + passed into the call. -

These are the ORB methods +

These are the ORB methods that provide access to the ORB:

-

Using the init() method without parameters initiates +

Using the init() method without parameters initiates a singleton ORB, which can only -give typecode creation anys needed in code generated -in Helper classes by idlj. +give typecode creation anys needed in code generated +in Helper classes by idlj. -

Applications require a portable means by which to obtain their -initial object references. References are required for the root -POA, POA Current, Interface Repository, and various Object Services +

Applications require a portable means by which to obtain their +initial object references. References are required for the root +POA, POA Current, Interface Repository, and various Object Services instances. The functionality required by the application is similar - to that provided by the Naming Service. However, the OMG does not - want to mandate that the Naming Service be made available to all - applications in order that they may be portably initialized. - Consequently, the operations shown in this section provide a - simplified, local version of the Naming Service that applications - can use to obtain a small, defined set of object references which - are essential to its operation. Because only a small well-defined + to that provided by the Naming Service. However, the OMG does not + want to mandate that the Naming Service be made available to all + applications in order that they may be portably initialized. + Consequently, the operations shown in this section provide a + simplified, local version of the Naming Service that applications + can use to obtain a small, defined set of object references which + are essential to its operation. Because only a small well-defined set of objects are expected with this mechanism, the naming context can be flattened to be a single-level name space. This simplification results in only two operations being defined to achieve the functionality required. -

Initial references are obtained via two operations provided in -the ORB object interface, providing facilities to list and +

Initial references are obtained via two operations provided in +the ORB object interface, providing facilities to list and resolve initial object references. These are:

-

An example that uses some of these methods is An example that uses some of these methods is Getting Started with Java IDL. @@ -156,7 +155,7 @@ Exceptions Exceptions in Java IDL are similar to those in any code written in the Java programming language. If a method is defined to throw an exception, -then any code using that method must have a try/catch +then any code using that method must have a try/catch block and handle that exception when it is thrown.

The documentation on The following is a list of the system exceptions (which are unchecked -exceptions inheriting through -org.omg.CORBA.SystemException from -java.lang.RuntimeException) that are defined in the package -org.omg.CORBA: +exceptions inheriting through +org.omg.CORBA.SystemException from +java.lang.RuntimeException) that are defined in the package +org.omg.CORBA:


         BAD_CONTEXT
         BAD_INV_ORDER
@@ -203,7 +202,7 @@
 

The following is a list of user-defined exceptions defined in the package -org.omg.CORBA. +org.omg.CORBA.


         Bounds
         UnknownUserException
@@ -212,37 +211,37 @@
 

Subpackages

-There are some packages inside the CORBA package with +There are some packages inside the CORBA package with "Package" as part of their names. These packages are generally quite small because all they do is provide exceptions or classes for use by interfaces -and classes in the CORBA package. +and classes in the CORBA package. -

For example, the package -org.omg.CORBA.TypeCodePackage contains -two exceptions thrown by methods in the class TypeCode. These +

For example, the package +org.omg.CORBA.TypeCodePackage contains +two exceptions thrown by methods in the class TypeCode. These exceptions are:

-The package -org.omg.CORBA.ORBPackage contains two exceptions: +The package +org.omg.CORBA.ORBPackage contains two exceptions: -

Another package that is a subpackage of CORBA is the -portable package. It -provides a set of ORB APIs that makes it +

Another package that is a subpackage of CORBA is the +portable +package. It provides a set of ORB APIs that makes it possible for code generated by one vendor's IDL compiler to run -on another vendor's ORB. +on another vendor's ORB. @@ -251,47 +250,49 @@ Holder classes -

Support for out and inout parameter passing modes requires the use of -additional holder -classes. Because the Java programming language does not support out or +

Support for out and inout parameter passing modes requires the use of +additional holder +classes. Because the Java programming language does not support out or inout parameters, holder classes are needed as a means of passing a parameter -that can be modified. To support portable stubs and skeletons, holder classes also implement - the org.omg.CORBA.portable.Streamable - interface. +that can be modified. To support portable stubs and skeletons, +holder classes also implement the +org.omg.CORBA.portable.Streamable +interface.

Holder classes are named by appending "Holder" to the name of the type. The name of the type refers to its name in the Java programming language. For - example, a holder class for the interface named Account in the Java programming - language would be named AccountHolder. + example, a holder class for the interface named Account + in the Java programming + language would be named AccountHolder.

Holder classes are available for all of the basic IDL - datatypes in the org.omg.CORBA package. So, for example, - there are already-defined classes for LongHolder, ShortHolder, - FloatHolder, and so on. Classes are also generated for - all named user-defined IDL types except those defined by typedefs. - (Note that in this context user defined includes types that are + datatypes in the org.omg.CORBA package. So, for example, + there are already-defined classes for LongHolder, ShortHolder, + FloatHolder, and so on. Classes are also generated for + all named user-defined IDL types except those defined by typedefs. + (Note that in this context user defined includes types that are defined in OMG specifications such as those for the Interface - Repository, and other OMG services.) + Repository, and other OMG services.)

Each holder class has:

-

The default constructor sets the value field to the default value for the -type as defined by the Java language: +

The default constructor sets the value field to the default value for the +type as defined by the Java language:

@@ -301,7 +302,7 @@ were mapped to the Java programming language, the following holder class would be generated:
-public final class AccountHolder implements 
+public final class AccountHolder implements
     org.omg.CORBA.portable.Streamable
 {
   // field that holds an Account object
@@ -342,53 +343,52 @@
 

For more information on Holder classes, see Chapter 1.4, Mapping for Basic Types in the OMG IDL to Java Language Mapping. The Holder classes defined -in the package org.omg.CORBA are: -

-     AnyHolder
-     AnySeqHolder
-     BooleanHolder
-     BooleanSeqHolder
-     ByteHolder
-     CharHolder
-     CharSeqHolder
-     CurrentHolder
-     DoubleHolder
-     DoubleSeqHolder
-     FixedHolder
-     FloatHolder
-     FloatSeqHolder
-     IntHolder
-     LongHolder
-     LongLongSeqHolder
-     LongSeqHolder
-     ObjectHolder
-     OctetSeqHolder
-     ParameterModeHolder
-     PolicyErrorHolder
-     PolicyListHolder
-     PrincipalHolder
-     ServiceInformationHolder
-     ShortHolder
-     ShortSeqHolder
-     StringHolder
-     StringSeqHolder
-     TypeCodeHolder
-     ULongLongSeqHolder
-     ULongSeqHolder
-     UnknownUserExceptionHolder
-     UShortSeqHolder
-     ValueBaseHolder
-     WCharSeqHolder
-     WrongTransactionHolder
-     WStringSeqHolder
-
-
+in the package org.omg.CORBA are: +

+     AnyHolder
+     AnySeqHolder
+     BooleanHolder
+     BooleanSeqHolder
+     ByteHolder
+     CharHolder
+     CharSeqHolder
+     CurrentHolder
+     DoubleHolder
+     DoubleSeqHolder
+     FixedHolder
+     FloatHolder
+     FloatSeqHolder
+     IntHolder
+     LongHolder
+     LongLongSeqHolder
+     LongSeqHolder
+     ObjectHolder
+     OctetSeqHolder
+     ParameterModeHolder
+     PolicyErrorHolder
+     PolicyListHolder
+     PrincipalHolder
+     ServiceInformationHolder
+     ShortHolder
+     ShortSeqHolder
+     StringHolder
+     StringSeqHolder
+     TypeCodeHolder
+     ULongLongSeqHolder
+     ULongSeqHolder
+     UnknownUserExceptionHolder
+     UShortSeqHolder
+     ValueBaseHolder
+     WCharSeqHolder
+     WrongTransactionHolder
+     WStringSeqHolder
+

Helper Classes

Helper files supply several static methods needed to manipulate the type. These include:

The helper class for a mapped IDL interface or abstract interface - also include narrow operation(s). The static narrow method allows - an org.omg.CORBA.Object to be narrowed to the object reference - of a more specific type. The IDL exception CORBA.BAD_PARAM - is thrown if the narrow fails because the object reference does not - support the requested type. A different system exception is raised - to indicate other kinds of errors. Trying to narrow a null will always - succeed with a return value of null. Generally, the only helper method an application programmer uses is +also include narrow operation(s). The static narrow method allows +an org.omg.CORBA.Object to be narrowed to the object reference +of a more specific type. The IDL exception CORBA.BAD_PARAM +is thrown if the narrow fails because the object reference does not +support the requested type. A different system exception is raised +to indicate other kinds of errors. Trying to narrow a null will always +succeed with a return value of null. +Generally, the only helper method an application programmer uses is the narrow method. The other methods are normally used behind the scenes and are transparent to the programmer.

Helper classes fall into two broad categories, helpers for value types and -helpers for non value types. Because all of the helper +helpers for non value types. Because all of the helper classes in one category -provide the same methods, one generic explanation of each +provide the same methods, one generic explanation of each category of helper classes is presented here.

-When OMG IDL is mapped to the Java programming language, +When OMG IDL is mapped to the Java programming language, a "helper" class is generated for each user-defined type. This generated class will have the name of the user-defined type with the suffix Helper appended. For example, if the @@ -423,7 +424,7 @@ idlj compiler will automatically generate a class named AccountHelper. The AccountHelper class will contain the static methods needed for manipulating instances of the type, -in this case, Account objects. +in this case, Account objects. @@ -442,14 +443,12 @@ not determines which narrow method its helper class will provide. The helper class for an interface that is not abstract will have a narrow method that takes a CORBA -object, whereas the narrow method for an interface that is abstract -will -take an object in the Java programming language. The helper class for a +object, whereas the narrow method for an interface that is abstract +will take an object in the Java programming language. The helper class for a non-abstract interface that has at least one abstract base interface will provide both versions of the narrow method. -

The Hello World -tutorial uses a narrow method that looks -like this: +

The Hello World +tutorial uses a narrow method that looks like this:

         // create and initialize the ORB
         ORB orb = ORB.init(args, null);
@@ -469,7 +468,7 @@
 
 

Example of a Basic Helper Class

A basic helper class, for purposes of this explanation, is one with -the methods that are provided by every helper class, plus a narrow +the methods that are provided by every helper class, plus a narrow method if the type defined in OMG IDL maps to an interface in the Java programming language. Types that are not value types will have a basic helper class generated for them. @@ -626,57 +625,56 @@ }
-

The Helper classes defined in the package org.omg.CORBA are: +

The Helper classes defined in the package org.omg.CORBA are:


-     AnySeqHelper
-     BooleanSeqHelper
-     CharSeqHelper
-     CompletionStatusHelper
-     CurrentHelper
-     DefinitionKindHelper
-     DoubleSeqHelper
-     FieldNameHelper
-     FloatSeqHelper
-     IdentifierHelper
-     IDLTypeHelper
-     LongLongSeqHelper
-     LongSeqHelper
-     NameValuePairHelper
-     ObjectHelper
-     OctetSeqHelper
-     ParameterModeHelper
-     PolicyErrorCodeHelper
-     PolicyErrorHelper
-     PolicyHelper
-     PolicyListHelper
-     PolicyTypeHelper
-     RepositoryIdHelper
-     ServiceDetailHelper
-     ServiceInformationHelper
-     SetOverrideTypeHelper
-     ShortSeqHelper
-     StringSeqHelper
-     StringValueHelper
-     StructMemberHelper
-     ULongLongSeqHelper
-     ULongSeqHelper
-     UnionMemberHelper
-     UnknownUserExceptionHelper
-     UShortSeqHelper
-     ValueBaseHelper
-     ValueMemberHelper
-     VersionSpecHelper
-     VisibilityHelper
-     WCharSeqHelper
-     WrongTransactionHelper
-     WStringSeqHelper
-     WStringValueHelper
-
+     AnySeqHelper
+     BooleanSeqHelper
+     CharSeqHelper
+     CompletionStatusHelper
+     CurrentHelper
+     DefinitionKindHelper
+     DoubleSeqHelper
+     FieldNameHelper
+     FloatSeqHelper
+     IdentifierHelper
+     IDLTypeHelper
+     LongLongSeqHelper
+     LongSeqHelper
+     NameValuePairHelper
+     ObjectHelper
+     OctetSeqHelper
+     ParameterModeHelper
+     PolicyErrorCodeHelper
+     PolicyErrorHelper
+     PolicyHelper
+     PolicyListHelper
+     PolicyTypeHelper
+     RepositoryIdHelper
+     ServiceDetailHelper
+     ServiceInformationHelper
+     SetOverrideTypeHelper
+     ShortSeqHelper
+     StringSeqHelper
+     StringValueHelper
+     StructMemberHelper
+     ULongLongSeqHelper
+     ULongSeqHelper
+     UnionMemberHelper
+     UnknownUserExceptionHelper
+     UShortSeqHelper
+     ValueBaseHelper
+     ValueMemberHelper
+     VersionSpecHelper
+     VisibilityHelper
+     WCharSeqHelper
+     WrongTransactionHelper
+     WStringSeqHelper
+     WStringValueHelper
 

Other Classes

-The other classes and interfaces in the CORBA package, which are +The other classes and interfaces in the CORBA package, which are used behind the scenes, can be put into four groups. Three of the groups are used with requests in some capacity, and the fourth group, concerning the Interface Repository, is a category by itself. @@ -686,38 +684,38 @@ information used in request operations. @@ -726,23 +724,23 @@ The second group of classes deals with requests: @@ -750,82 +748,82 @@ Interfaces That Serve as Constants The third group contains interfaces that serve as constants. The IDL-to-Java mapping mandates that IDL enums are mapped to a Java class with the enumerated -values represented as public static final fields in that class (e.g. +values represented as public static final fields in that class (e.g. DefinitionKind). On the other hand IDL constants defined outside of an IDL interface are mapped to a Java interface for each constant. -

This is why several interfaces in the org.omg.CORBA package -consist of a single field, value, which is a short. This +

This is why several interfaces in the org.omg.CORBA package +consist of a single field, value, which is a short. This field is a constant used for such things as an error code or value modifier. -For example, the value field of the interface BAD_POLICY -is one of the possible reasons for the exception PolicyError to -be thrown. To specify this error code, you would use BAD_POLICY.value. +For example, the value field of the interface BAD_POLICY +is one of the possible reasons for the exception PolicyError to +be thrown. To specify this error code, you would use BAD_POLICY.value. -

The exception PolicyError uses the value field of +

The exception PolicyError uses the value field of the following interfaces as its possible error codes.

-The method TypeCode.type_modifier returns the value field -of one of the following interfaces. The VM in the names of these +The method TypeCode.type_modifier returns the value field +of one of the following interfaces. The VM in the names of these interfaces stands for "value modifier." The following constants are returned by a ValueMember object's access method to denote the visibility of the ValueMember object. -These flags, used in NamedValue objects or as parameters to methods, +These flags, used in NamedValue objects or as parameters to methods, are defined in the following interfaces:

Interface Repository Interfaces and Classes

A fourth group contains the Interface Repository interfaces and classes, -which are generated by the idlj compiler from the OMG IDL -interface ir.idl. The purpose of the Interface Repository is to +which are generated by the idlj compiler from the OMG IDL +interface ir.idl. The purpose of the Interface Repository is to identify the interfaces stored in it so that they can be accessed by an ORB. Each module, type, interface, attribute, operation, parameter, exception, constant, and so on is described completely by the Interface Repository @@ -874,7 +872,7 @@

CORBA Features Not Implemented in Java IDL

-

Some of the API included in org.omg subpackages is provided for +

Some of the API included in org.omg subpackages is provided for conformance with the current OMG CORBA specification but is not implemented in Sun's release of the JDKTM. This enables other JDK licensees to provide implementations of this API in standard @@ -883,21 +881,21 @@

Features That Throw NO_IMPLEMENT

-

Some of the API included in org.omg subpackages throw -NO_IMPLEMENT exceptions for various reasons. Among these reasons +

Some of the API included in org.omg subpackages throw +NO_IMPLEMENT exceptions for various reasons. Among these reasons are:

@@ -912,65 +910,67 @@ operation of Java IDL.
  • -Java IDL does not support long double. +Java IDL does not support long double.
  • -Policies (org.omg.CORBA.Policy) and methods for getting them are not implemented. +Policies (org.omg.CORBA.Policy) +and methods for getting them are not implemented.
  • -Domain managers (org.omg.CORBA.DomainManager) and methods for +Domain managers (org.omg.CORBA.DomainManager) and methods for getting them are not implemented.
  • -Service Information org.omg.CORBA.ServiceInformation and ORB method public boolean get_service_information(short service_type, -ServiceInformationHolder -service_info) are not implemented. +Service Information org.omg.CORBA.ServiceInformation +and ORB method +public boolean get_service_information(short service_type, ServiceInformationHolder service_info) +are not implemented. -
  • ORB methods for supporting single-threading (perform_work, work_pending) are not implemented. +
  • ORB methods for supporting single-threading +(perform_work, work_pending) are not implemented.
  • IDL contexts.

    -Specific List of Unimplemented Features in Package org.omg.CORBA

    +Specific List of Unimplemented Features in Package org.omg.CORBA

    -Unimplemented Methods in package org.omg.CORBA:

    +Unimplemented Methods in package org.omg.CORBA: