RFR(s): 8044626 & 8165649 RMI spec changes for modularization

Mandy Chung mandy.chung at oracle.com
Wed Feb 1 06:08:56 UTC 2017


> On Jan 31, 2017, at 4:22 PM, Stuart Marks <stuart.marks at oracle.com> wrote:
> 
> diff -r 0e0e0fbc5bf3 -r b84c67d49349 src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java
> --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java Fri Jan 13 12:35:53 2017 -0800
> +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java Tue Jan 31 16:07:44 2017 -0800
> @@ -60,7 +60,19 @@
>     * initialization data, and
>     *
>     * <li> returning a MarshalledObject containing the stub for the
> -    * remote object it created </ul>
> +    * remote object it created.</ul>
> +    *
> +    * <p>In order for activation to be successful, one of the following requirements
> +    * must be met, otherwise {@link ActivationException} is thrown.
> +    *
> +    * <ul><li>If the class to be activated and the special activation contructor are both public,
> +    * the class must reside in a package that is exported or open to the
> +    * {@code java.rmi} module.
> +    *
> +    * <li>If either the class to be activated or the special activation constructor
> +    * is non-public, the class must reside in a package that is open to the
> +    * {@code java.rmi} module.
> +    * </ul>
>     *
>     * @param id the object's activation identifier
>     * @param desc the object's descriptor

Except a typo “contructor”,  looks okay. 

> diff -r 0e0e0fbc5bf3 -r b84c67d49349 src/java.rmi/share/classes/java/rmi/activation/Activator.java
> --- a/src/java.rmi/share/classes/java/rmi/activation/Activator.java	Fri Jan 13 12:35:53 2017 -0800
> +++ b/src/java.rmi/share/classes/java/rmi/activation/Activator.java	Tue Jan 31 16:07:44 2017 -0800
> @@ -48,7 +48,7 @@
>  * The <code>Activator</code> works closely with
>  * <code>ActivationSystem</code>, which provides a means for registering
>  * groups and objects within those groups, and <code>ActivationMonitor</code>,
> - * which recives information about active and inactive objects and inactive
> + * which receives information about active and inactive objects and inactive
>  * groups. <p>
>  *
>  * The activator is responsible for monitoring and detecting when
> diff -r 0e0e0fbc5bf3 -r b84c67d49349 src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java
> --- a/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java	Fri Jan 13 12:35:53 2017 -0800
> +++ b/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java	Tue Jan 31 16:07:44 2017 -0800
> @@ -107,8 +107,9 @@
>  * the binary name of the root class with the suffix {@code _Stub}.
>  *
>  * <li>The stub class is loaded by name using the class loader of the root
> - * class. The stub class must extend {@link RemoteStub} and must have a
> - * public constructor that has one parameter of type {@link RemoteRef}.
> + * class. The stub class must be public, it must extend {@link RemoteStub}, it must
> + * reside in a package that is exported to the {@code java.rmi} module, and it
> + * must have a public constructor that has one parameter of type {@link RemoteRef}.
>  *
>  * <li>Finally, an instance of the stub class is constructed with a
>  * {@link RemoteRef}.
> @@ -124,12 +125,20 @@
>  *
>  * <ul>
>  *
> - * <li>The proxy's class is defined by the class loader of the remote
> - * object's class.
> + * <li>The proxy's class is defined according to the specifications for the
> + * <a href="{@docRoot}/java/lang/reflect/Proxy.html#membership">
> + * {@code Proxy}
> + * </a>
> + * class, using the class loader of the remote object's class.
>  *
>  * <li>The proxy implements all the remote interfaces implemented by the
>  * remote object's class.
>  *
> + * <li>If all remote interfaces are public, they must reside in packages that
> + * are either exported or open to the {@code java.rmi} module. Or, if one or more
> + * of the remote interfaces are non-public, they must reside in a package that
> + * is open to the {@code java.rmi} module.
> + *
>  * <li>The proxy's invocation handler is a {@link
>  * RemoteObjectInvocationHandler} instance constructed with a
>  * {@link RemoteRef}.
> 

Looks okay too.

Mandy



More information about the core-libs-dev mailing list