From 8339b30ae2d56ed27c8d4f220230977d09fca2f1 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Tue, 3 Mar 2015 18:19:41 +0100 Subject: [PATCH 1/3] 8043937: Drop support for the IIOP transport from the JMX RMIConnector Reviewed-by: alanb, erikj --- jdk/make/netbeans/jmx/build.xml | 42 +- jdk/make/rmic/Rmic-java.management.gmk | 43 +- .../sun/jmx/remote/internal/IIOPHelper.java | 190 -------- .../sun/jmx/remote/internal/IIOPProxy.java | 110 ----- .../remote/protocol/iiop/ClientProvider.java | 48 -- .../remote/protocol/iiop/IIOPProxyImpl.java | 157 ------- .../protocol/iiop/ProxyInputStream.java | 241 ---------- .../remote/protocol/iiop/ServerProvider.java | 51 --- .../remote/JMXConnectorFactory.java | 6 +- .../remote/JMXConnectorServerFactory.java | 6 +- .../remote/rmi/NoCallStackClassLoader.java | 13 +- .../remote/rmi/RMIConnectionImpl.java | 7 +- .../management/remote/rmi/RMIConnector.java | 414 +----------------- .../remote/rmi/RMIConnectorServer.java | 92 +--- .../remote/rmi/RMIIIOPServerImpl.java | 104 +---- .../management/remote/rmi/RMIServerImpl.java | 7 +- .../javax/management/remote/rmi/package.html | 99 +---- .../mandatory/connection/CloseableTest.java | 2 - .../remote/mandatory/connection/NoIIOP.java | 142 ------ 19 files changed, 105 insertions(+), 1669 deletions(-) delete mode 100644 jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPHelper.java delete mode 100644 jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPProxy.java delete mode 100644 jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ClientProvider.java delete mode 100644 jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java delete mode 100644 jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ProxyInputStream.java delete mode 100644 jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ServerProvider.java delete mode 100644 jdk/test/javax/management/remote/mandatory/connection/NoIIOP.java diff --git a/jdk/make/netbeans/jmx/build.xml b/jdk/make/netbeans/jmx/build.xml index 09c2cb25fb6..34e200f7190 100644 --- a/jdk/make/netbeans/jmx/build.xml +++ b/jdk/make/netbeans/jmx/build.xml @@ -63,8 +63,8 @@ - @@ -90,44 +90,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/make/rmic/Rmic-java.management.gmk b/jdk/make/rmic/Rmic-java.management.gmk index 57b1d221ad8..9eca430ed63 100644 --- a/jdk/make/rmic/Rmic-java.management.gmk +++ b/jdk/make/rmic/Rmic-java.management.gmk @@ -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 @@ -32,38 +32,31 @@ include RmicCommon.gmk # Generate RMI stubs # -# For RMI/IIOP call rmic a second time with -standardPackage option -# so that *_tie classes are generated in package without the prefix -# org.omg.stub (6375696) JMX_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \ javax.management.remote.rmi.RMIServerImpl -GENRMIIIOPCLASSES := -ifneq ($(RMICONNECTOR_IIOP), false) - GENRMIIIOPCLASSES := $(RMICONNECTOR_IIOP) -endif -$(eval $(call SetupRMICompilation,RMI_IIOP, \ - CLASSES := $(JMX_RMI_CLASSES), \ - CLASSES_DIR := $(CLASSES_DIR)/java.management, \ - STUB_CLASSES_DIR := $(STUB_CLASSES_DIR)/java.management, \ - RUN_V12 := true, \ - RUN_IIOP := $(GENRMIIIOPCLASSES), \ - RUN_IIOP_STDPKG := $(GENRMIIIOPCLASSES))) -# Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR -# so that javadoc can include them in the API (4997471) -$(eval $(call SetupRMICompilation,RMI_SRC, \ +# Generate into gensrc dir where sources get picked up for javadoc, then move the classes +# into the stub classes dir. +$(eval $(call SetupRMICompilation,RMI_GEN, \ CLASSES := $(JMX_RMI_CLASSES), \ CLASSES_DIR := $(CLASSES_DIR)/java.management, \ - STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR)/java.management, \ + STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \ RUN_V12 := true, \ - KEEP_GENERATED := true)) + KEEP_GENERATED := true, \ +)) + +# Find all classes generated and move them from the gensrc dir to the stub classes dir +$(RMIC_GENSRC_DIR)/_classes.moved: $(RMI_GEN) + $(eval classfiles := $(shell $(FIND) $(RMIC_GENSRC_DIR) -name "*.class")) + $(foreach src, $(classfiles), \ + $(eval target := $(patsubst $(RMIC_GENSRC_DIR)/%, \ + $(STUB_CLASSES_DIR)/java.management/%, $(src))) \ + $(MKDIR) -p $(dir $(target)) ; \ + $(MV) $(src) $(target) $(NEWLINE)) + $(TOUCH) $@ ########################################################################################## -$(RMIC_GENSRC_DIR)/_the.classes.removed: $(RMI_IIOP) $(RMI_SRC) - $(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE) - $(TOUCH) $@ - -all: $(RMIC_GENSRC_DIR)/_the.classes.removed $(RMI_IIOP) $(RMI_SRC) +all: $(RMIC_GENSRC_DIR)/_classes.moved $(RMI_GEN) .PHONY: all diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPHelper.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPHelper.java deleted file mode 100644 index eabe73962c2..00000000000 --- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPHelper.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2009, 2012, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.jmx.remote.internal; - -import java.util.Properties; -import java.io.IOException; -import java.rmi.Remote; -import java.rmi.NoSuchObjectException; - -import java.security.AccessController; -import java.security.PrivilegedAction; - -/** - * A helper class for RMI-IIOP and CORBA APIs. - */ - -public final class IIOPHelper { - private IIOPHelper() { } - - // loads IIOPProxy implementation class if available - private static final String IMPL_CLASS = - "com.sun.jmx.remote.protocol.iiop.IIOPProxyImpl"; - private static final IIOPProxy proxy = - AccessController.doPrivileged(new PrivilegedAction() { - public IIOPProxy run() { - try { - Class c = Class.forName(IMPL_CLASS, true, - IIOPHelper.class.getClassLoader()); - return (IIOPProxy)c.newInstance(); - } catch (ClassNotFoundException cnf) { - return null; - } catch (InstantiationException e) { - throw new AssertionError(e); - } catch (IllegalAccessException e) { - throw new AssertionError(e); - } - }}); - - /** - * Returns true if RMI-IIOP and CORBA is available. - */ - public static boolean isAvailable() { - return proxy != null; - } - - private static void ensureAvailable() { - if (proxy == null) - throw new AssertionError("Should not here"); - } - - /** - * Returns true if the given object is a Stub. - */ - public static boolean isStub(Object obj) { - return (proxy == null) ? false : proxy.isStub(obj); - } - - /** - * Returns the Delegate to which the given Stub delegates. - */ - public static Object getDelegate(Object stub) { - ensureAvailable(); - return proxy.getDelegate(stub); - } - - /** - * Sets the Delegate for a given Stub. - */ - public static void setDelegate(Object stub, Object delegate) { - ensureAvailable(); - proxy.setDelegate(stub, delegate); - } - - /** - * Returns the ORB associated with the given stub - * - * @throws UnsupportedOperationException - * if the object does not support the operation that - * was invoked - */ - public static Object getOrb(Object stub) { - ensureAvailable(); - return proxy.getOrb(stub); - } - - /** - * Connects the Stub to the given ORB. - */ - public static void connect(Object stub, Object orb) - throws IOException - { - if (proxy == null) - throw new IOException("Connection to ORB failed, RMI/IIOP not available"); - proxy.connect(stub, orb); - } - - /** - * Returns true if the given object is an ORB. - */ - public static boolean isOrb(Object obj) { - return (proxy == null) ? false : proxy.isOrb(obj); - } - - /** - * Creates, and returns, a new ORB instance. - */ - public static Object createOrb(String[] args, Properties props) - throws IOException - { - if (proxy == null) - throw new IOException("ORB initialization failed, RMI/IIOP not available"); - return proxy.createOrb(args, props); - } - - /** - * Converts a string, produced by the object_to_string method, back - * to a CORBA object reference. - */ - public static Object stringToObject(Object orb, String str) { - ensureAvailable(); - return proxy.stringToObject(orb, str); - } - - /** - * Converts the given CORBA object reference to a string. - */ - public static String objectToString(Object orb, Object obj) { - ensureAvailable(); - return proxy.objectToString(orb, obj); - } - - /** - * Checks to ensure that an object of a remote or abstract interface - * type can be cast to a desired type. - */ - public static T narrow(Object narrowFrom, Class narrowTo) { - ensureAvailable(); - return proxy.narrow(narrowFrom, narrowTo); - } - - /** - * Makes a server object ready to receive remote calls - */ - public static void exportObject(Remote obj) throws IOException { - if (proxy == null) - throw new IOException("RMI object cannot be exported, RMI/IIOP not available"); - proxy.exportObject(obj); - } - - /** - * Deregisters a server object from the runtime. - */ - public static void unexportObject(Remote obj) throws IOException { - if (proxy == null) - throw new NoSuchObjectException("Object not exported"); - proxy.unexportObject(obj); - } - - /** - * Returns a stub for the given server object. - */ - public static Remote toStub(Remote obj) throws IOException { - if (proxy == null) - throw new NoSuchObjectException("Object not exported"); - return proxy.toStub(obj); - } -} diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPProxy.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPProxy.java deleted file mode 100644 index b7e2ef6fe4c..00000000000 --- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/IIOPProxy.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2009, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.jmx.remote.internal; - -import java.util.Properties; -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.rmi.NoSuchObjectException; - -/** - * An interface to a subset of the RMI-IIOP and CORBA APIs to avoid a - * static dependencies on the types defined by these APIs. - */ - -public interface IIOPProxy { - - /** - * Returns true if the given object is a Stub. - */ - boolean isStub(Object obj); - - /** - * Returns the Delegate to which the given Stub delegates. - */ - Object getDelegate(Object stub); - - /** - * Sets the Delegate for a given Stub. - */ - void setDelegate(Object stub, Object delegate); - - /** - * Returns the ORB associated with the given stub - * - * @throws UnsupportedOperationException - * if the object does not support the operation that - * was invoked - */ - Object getOrb(Object stub); - - /** - * Connects the Stub to the given ORB. - */ - void connect(Object stub, Object orb) throws RemoteException; - - /** - * Returns true if the given object is an ORB. - */ - boolean isOrb(Object obj); - - /** - * Creates, and returns, a new ORB instance. - */ - Object createOrb(String[] args, Properties props); - - /** - * Converts a string, produced by the object_to_string method, back - * to a CORBA object reference. - */ - Object stringToObject(Object orb, String str); - - /** - * Converts the given CORBA object reference to a string. - */ - String objectToString(Object orb, Object obj); - - /** - * Checks to ensure that an object of a remote or abstract interface - * type can be cast to a desired type. - */ - T narrow(Object narrowFrom, Class narrowTo); - - /** - * Makes a server object ready to receive remote calls - */ - void exportObject(Remote obj) throws RemoteException; - - /** - * Deregisters a server object from the runtime. - */ - void unexportObject(Remote obj) throws NoSuchObjectException; - - /** - * Returns a stub for the given server object. - */ - Remote toStub(Remote obj) throws NoSuchObjectException; -} diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ClientProvider.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ClientProvider.java deleted file mode 100644 index eeeb6715982..00000000000 --- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ClientProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2003, 2004, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.jmx.remote.protocol.iiop; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Map; - -import javax.management.remote.JMXConnectorProvider; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXServiceURL; -import javax.management.remote.rmi.RMIConnector; - -public class ClientProvider implements JMXConnectorProvider { - - public JMXConnector newJMXConnector(JMXServiceURL serviceURL, - Map environment) - throws IOException { - if (!serviceURL.getProtocol().equals("iiop")) { - throw new MalformedURLException("Protocol not iiop: " + - serviceURL.getProtocol()); - } - return new RMIConnector(serviceURL, environment); - } -} diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java deleted file mode 100644 index b0fe91bf728..00000000000 --- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2009,2013, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.jmx.remote.protocol.iiop; - -import org.omg.CORBA.ORB; -import org.omg.CORBA.portable.Delegate; -import javax.rmi.PortableRemoteObject; -import javax.rmi.CORBA.Stub; - -import java.util.Properties; -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.rmi.NoSuchObjectException; - -import com.sun.jmx.remote.internal.IIOPProxy; -import java.io.SerializablePermission; -import java.security.AccessControlContext; -import java.security.AccessController; -import java.security.Permissions; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.security.ProtectionDomain; - -/** - * An implementation of IIOPProxy that simply delegates to the appropriate - * RMI-IIOP and CORBA APIs. - */ - -public class IIOPProxyImpl implements IIOPProxy { - // special ACC used to initialize the IIOP stub - // the only allowed privilege is SerializablePermission("enableSubclassImplementation") - private static final AccessControlContext STUB_ACC; - - static { - Permissions p = new Permissions(); - p.add(new SerializablePermission("enableSubclassImplementation")); - STUB_ACC = new AccessControlContext( - new ProtectionDomain[]{ - new ProtectionDomain(null, p) - } - ); - } - - public IIOPProxyImpl() { } - - @Override - public boolean isStub(Object obj) { - return (obj instanceof Stub); - } - - @Override - public Object getDelegate(Object stub) { - return ((Stub)stub)._get_delegate(); - } - - @Override - public void setDelegate(Object stub, Object delegate) { - ((Stub)stub)._set_delegate((Delegate)delegate); - } - - @Override - public Object getOrb(Object stub) { - try { - return ((Stub)stub)._orb(); - } catch (org.omg.CORBA.BAD_OPERATION x) { - throw new UnsupportedOperationException(x); - } - } - - @Override - public void connect(Object stub, Object orb) - throws RemoteException - { - ((Stub)stub).connect((ORB)orb); - } - - @Override - public boolean isOrb(Object obj) { - return (obj instanceof ORB); - } - - @Override - public Object createOrb(String[] args, Properties props) { - return ORB.init(args, props); - } - - @Override - public Object stringToObject(Object orb, String str) { - return ((ORB)orb).string_to_object(str); - } - - @Override - public String objectToString(Object orb, Object obj) { - return ((ORB)orb).object_to_string((org.omg.CORBA.Object)obj); - } - - @Override - @SuppressWarnings("unchecked") - public T narrow(Object narrowFrom, Class narrowTo) { - return (T)PortableRemoteObject.narrow(narrowFrom, narrowTo); - } - - @Override - public void exportObject(Remote obj) throws RemoteException { - PortableRemoteObject.exportObject(obj); - } - - @Override - public void unexportObject(Remote obj) throws NoSuchObjectException { - PortableRemoteObject.unexportObject(obj); - } - - @Override - public Remote toStub(final Remote obj) throws NoSuchObjectException { - if (System.getSecurityManager() == null) { - return PortableRemoteObject.toStub(obj); - } else { - try { - return AccessController.doPrivileged(new PrivilegedExceptionAction() { - - @Override - public Remote run() throws Exception { - return PortableRemoteObject.toStub(obj); - } - }, STUB_ACC); - } catch (PrivilegedActionException e) { - if (e.getException() instanceof NoSuchObjectException) { - throw (NoSuchObjectException)e.getException(); - } - throw new RuntimeException("Unexpected exception type", e.getException()); - } - } - } -} diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ProxyInputStream.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ProxyInputStream.java deleted file mode 100644 index e7fda6098eb..00000000000 --- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ProxyInputStream.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2003, 2008, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.jmx.remote.protocol.iiop; - -import java.io.IOException; -import java.io.Serializable; -import java.math.BigDecimal; - -import org.omg.CORBA.Any; -import org.omg.CORBA.Context; -import org.omg.CORBA.NO_IMPLEMENT; -import org.omg.CORBA.ORB; -import org.omg.CORBA.TypeCode; -import org.omg.CORBA.portable.BoxedValueHelper; - -@SuppressWarnings({"deprecation", "rawtypes"}) -public class ProxyInputStream extends org.omg.CORBA_2_3.portable.InputStream { - public ProxyInputStream(org.omg.CORBA.portable.InputStream in) { - this.in = in; - } - - public boolean read_boolean() { - return in.read_boolean(); - } - - public char read_char() { - return in.read_char(); - } - - public char read_wchar() { - return in.read_wchar(); - } - - public byte read_octet() { - return in.read_octet(); - } - - public short read_short() { - return in.read_short(); - } - - public short read_ushort() { - return in.read_ushort(); - } - - public int read_long() { - return in.read_long(); - } - - public int read_ulong() { - return in.read_ulong(); - } - - public long read_longlong() { - return in.read_longlong(); - } - - public long read_ulonglong() { - return in.read_ulonglong(); - } - - public float read_float() { - return in.read_float(); - } - - public double read_double() { - return in.read_double(); - } - - public String read_string() { - return in.read_string(); - } - - public String read_wstring() { - return in.read_wstring(); - } - - public void read_boolean_array(boolean[] value, int offset, int length) { - in.read_boolean_array(value, offset, length); - } - - public void read_char_array(char[] value, int offset, int length) { - in.read_char_array(value, offset, length); - } - - public void read_wchar_array(char[] value, int offset, int length) { - in.read_wchar_array(value, offset, length); - } - - public void read_octet_array(byte[] value, int offset, int length) { - in.read_octet_array(value, offset, length); - } - - public void read_short_array(short[] value, int offset, int length) { - in.read_short_array(value, offset, length); - } - - public void read_ushort_array(short[] value, int offset, int length) { - in.read_ushort_array(value, offset, length); - } - - public void read_long_array(int[] value, int offset, int length) { - in.read_long_array(value, offset, length); - } - - public void read_ulong_array(int[] value, int offset, int length) { - in.read_ulong_array(value, offset, length); - } - - public void read_longlong_array(long[] value, int offset, int length) { - in.read_longlong_array(value, offset, length); - } - - public void read_ulonglong_array(long[] value, int offset, int length) { - in.read_ulonglong_array(value, offset, length); - } - - public void read_float_array(float[] value, int offset, int length) { - in.read_float_array(value, offset, length); - } - - public void read_double_array(double[] value, int offset, int length) { - in.read_double_array(value, offset, length); - } - - public org.omg.CORBA.Object read_Object() { - return in.read_Object(); - } - - public TypeCode read_TypeCode() { - return in.read_TypeCode(); - } - - public Any read_any() { - return in.read_any(); - } - - /** - * @deprecated - */ - @Override - @Deprecated - public org.omg.CORBA.Principal read_Principal() { - return in.read_Principal(); - } - - @Override - public int read() throws IOException { - return in.read(); - } - - @Override - public BigDecimal read_fixed() { - return in.read_fixed(); - } - - @Override - public Context read_Context() { - return in.read_Context(); - } - - @Override - public org.omg.CORBA.Object read_Object(java.lang.Class clz) { - return in.read_Object(clz); - } - - @Override - public ORB orb() { - return in.orb(); - } - - @Override - public Serializable read_value() { - return narrow().read_value(); - } - - @Override - public Serializable read_value(Class clz) { - return narrow().read_value(clz); - } - - @Override - public Serializable read_value(BoxedValueHelper factory) { - return narrow().read_value(factory); - } - - @Override - public Serializable read_value(String rep_id) { - return narrow().read_value(rep_id); - } - - @Override - public Serializable read_value(Serializable value) { - return narrow().read_value(value); - } - - @Override - public Object read_abstract_interface() { - return narrow().read_abstract_interface(); - } - - @Override - public Object read_abstract_interface(Class clz) { - return narrow().read_abstract_interface(clz); - } - - protected org.omg.CORBA_2_3.portable.InputStream narrow() { - if (in instanceof org.omg.CORBA_2_3.portable.InputStream) - return (org.omg.CORBA_2_3.portable.InputStream) in; - throw new NO_IMPLEMENT(); - } - - public org.omg.CORBA.portable.InputStream getProxiedInputStream() { - return in; - } - - protected final org.omg.CORBA.portable.InputStream in; -} diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ServerProvider.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ServerProvider.java deleted file mode 100644 index 2f248f52a0e..00000000000 --- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ServerProvider.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2003, 2004, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.jmx.remote.protocol.iiop; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Map; - -import javax.management.MBeanServer; -import javax.management.remote.JMXConnectorServer; -import javax.management.remote.JMXConnectorServerProvider; -import javax.management.remote.JMXServiceURL; -import javax.management.remote.rmi.RMIConnectorServer; - -public class ServerProvider implements JMXConnectorServerProvider { - - public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL, - Map environment, - MBeanServer mbeanServer) - throws IOException { - if (!serviceURL.getProtocol().equals("iiop")) { - throw new MalformedURLException("Protocol not iiop: " + - serviceURL.getProtocol()); - } - return new RMIConnectorServer(serviceURL, environment, mbeanServer); - } - -} diff --git a/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorFactory.java b/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorFactory.java index 2eb99d2b870..1458aca4c3b 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorFactory.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -140,9 +140,7 @@ import sun.reflect.misc.ReflectUtil; * *

Every implementation must support the RMI connector protocol with * the default RMI transport, specified with string rmi. - * An implementation may optionally support the RMI connector protocol - * with the RMI/IIOP transport, specified with the string - * iiop.

+ *

* *

Once a provider is found, the result of the * newJMXConnector method is the result of calling {@link diff --git a/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java b/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java index bdaa4e7f1fd..2bfae84c688 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -131,9 +131,7 @@ import javax.management.MBeanServer; * *

Every implementation must support the RMI connector protocol with * the default RMI transport, specified with string rmi. - * An implementation may optionally support the RMI connector protocol - * with the RMI/IIOP transport, specified with the string - * iiop.

+ *

* *

Once a provider is found, the result of the * newJMXConnectorServer method is the result of calling diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java index e8addac66fe..8a0882f5369 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -31,12 +31,11 @@ import java.security.ProtectionDomain;

A class loader that only knows how to define a limited number of classes, and load a limited number of other classes through delegation to another loader. It is used to get around a problem - with Serialization, in particular as used by RMI (including - RMI/IIOP). The JMX Remote API defines exactly what class loader - must be used to deserialize arguments on the server, and return - values on the client. We communicate this class loader to RMI by - setting it as the context class loader. RMI uses the context - class loader to load classes as it deserializes, which is what we + with Serialization, in particular as used by RMI. The JMX Remote API + defines exactly what class loader must be used to deserialize arguments on + the server, and return values on the client. We communicate this class + loader to RMI by setting it as the context class loader. RMI uses the + context class loader to load classes as it deserializes, which is what we want. However, before consulting the context class loader, it looks up the call stack for a class with a non-null class loader, and uses that if it finds one. So, in the standalone version of diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java index 5fb3c9d0508..dd050e4ef9c 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -76,11 +76,10 @@ public class RMIConnectionImpl implements RMIConnection, Unreferenced { /** * Constructs a new {@link RMIConnection}. This connection can be - * used with either the JRMP or IIOP transport. This object does + * used with the JRMP transport. This object does * not export itself: it is the responsibility of the caller to * export it appropriately (see {@link - * RMIJRMPServerImpl#makeClient(String,Subject)} and {@link - * RMIIIOPServerImpl#makeClient(String,Subject)}. + * RMIJRMPServerImpl#makeClient(String,Subject)}). * * @param rmiServer The RMIServerImpl object for which this * connection is created. The behavior is unspecified if this diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java index 9f256481711..4bd796e3e7a 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -30,25 +30,21 @@ import com.sun.jmx.remote.internal.ClientCommunicatorAdmin; import com.sun.jmx.remote.internal.ClientListenerInfo; import com.sun.jmx.remote.internal.ClientNotifForwarder; import com.sun.jmx.remote.internal.ProxyRef; -import com.sun.jmx.remote.internal.IIOPHelper; import com.sun.jmx.remote.util.ClassLogger; import com.sun.jmx.remote.util.EnvHelp; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InvalidObjectException; -import java.io.NotSerializableException; import java.io.ObjectInputStream; import java.io.ObjectStreamClass; import java.io.Serializable; -import java.io.WriteAbortedException; import java.lang.ref.WeakReference; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Proxy; import java.net.MalformedURLException; -import java.rmi.MarshalException; import java.rmi.MarshalledObject; import java.rmi.NoSuchObjectException; import java.rmi.Remote; @@ -61,13 +57,12 @@ import java.rmi.server.RemoteRef; import java.security.AccessController; import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; -import java.security.PrivilegedActionException; import java.security.ProtectionDomain; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.Hashtable; import java.util.Map; -import java.util.Properties; import java.util.Set; import java.util.WeakHashMap; import javax.management.Attribute; @@ -146,22 +141,20 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable * the RMI connector server with the given address.

* *

The address can refer directly to the connector server, - * using one of the following syntaxes:

+ * using the following syntax:

* *
      * service:jmx:rmi://[host[:port]]/stub/encoded-stub
-     * service:jmx:iiop://[host[:port]]/ior/encoded-IOR
      * 
* *

(Here, the square brackets {@code []} are not part of the * address but indicate that the host and port are optional.)

* *

The address can instead indicate where to find an RMI stub - * through JNDI, using one of the following syntaxes:

+ * through JNDI, using the following syntax:

* *
      * service:jmx:rmi://[host[:port]]/jndi/jndi-name
-     * service:jmx:iiop://[host[:port]]/jndi/jndi-name
      * 
* *

An implementation may also recognize additional address @@ -242,8 +235,7 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable /** * @throws IOException if the connection could not be made because of a - * communication problem, or in the case of the {@code iiop} protocol, - * that RMI/IIOP is not supported + * communication problem */ public void connect() throws IOException { connect(null); @@ -251,8 +243,7 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable /** * @throws IOException if the connection could not be made because of a - * communication problem, or in the case of the {@code iiop} protocol, - * that RMI/IIOP is not supported + * communication problem */ public synchronized void connect(Map environment) throws IOException { @@ -294,9 +285,7 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable if (checkStub) checkStub(stub, rmiServerImplStubClass); - // Connect IIOP Stub if needed. if (tracing) logger.trace("connect",idstr + " connecting stub..."); - stub = connectStub(stub,usemap); idstr = (tracing?"["+this.toString()+"]":null); // Calling newClient on the RMIServer stub. @@ -307,18 +296,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable try { connection = getConnection(stub, credentials, checkStub); } catch (java.rmi.RemoteException re) { - if (jmxServiceURL != null) { - final String pro = jmxServiceURL.getProtocol(); - final String path = jmxServiceURL.getURLPath(); - - if ("rmi".equals(pro) && - path.startsWith("/jndi/iiop:")) { - MalformedURLException mfe = new MalformedURLException( - "Protocol is rmi but JNDI scheme is iiop: " + jmxServiceURL); - mfe.initCause(re); - throw mfe; - } - } throw re; } @@ -1413,13 +1390,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable if (ioe instanceof UnmarshalException) { throw ioe; // the fix of 6937053 made ClientNotifForwarder.fetchNotifs // fetch one by one with UnmarshalException - } else if (ioe instanceof MarshalException) { - // IIOP will throw MarshalException wrapping a NotSerializableException - // when a server fails to serialize a response. - MarshalException me = (MarshalException)ioe; - if (me.detail instanceof NotSerializableException) { - throw (NotSerializableException)me.detail; - } } // Not serialization problem, return. @@ -1654,9 +1624,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable throw new IOException("Failed to get a RMI stub: "+ne); } - // Connect IIOP Stub if needed. - stub = connectStub(stub,env); - // Calling newClient on the RMIServer stub. Object credentials = env.get(CREDENTIALS); connection = stub.newClient(credentials); @@ -1693,103 +1660,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable //-------------------------------------------------------------------- // Private stuff - Serialization //-------------------------------------------------------------------- - /** - *

In order to be usable, an IIOP stub must be connected to an ORB. - * The stub is automatically connected to the ORB if: - *

    - *
  • It was returned by the COS naming
  • - *
  • Its server counterpart has been registered in COS naming - * through JNDI.
  • - *
- * Otherwise, it is not connected. A stub which is deserialized - * from Jini is not connected. A stub which is obtained from a - * non registered RMIIIOPServerImpl is not a connected.
- * A stub which is not connected can't be serialized, and thus - * can't be registered in Jini. A stub which is not connected can't - * be used to invoke methods on the server. - *

- * In order to palliate this, this method will connect the - * given stub if it is not yet connected. If the given - * RMIServer is not an instance of - * {@link javax.rmi.CORBA.Stub javax.rmi.CORBA.Stub}, then the - * method do nothing and simply returns that stub. Otherwise, - * this method will attempt to connect the stub to an ORB as - * follows: - *

    - *
  • This method looks in the provided environment for - * the "java.naming.corba.orb" property. If it is found, the - * referenced object (an {@link org.omg.CORBA.ORB ORB}) is used to - * connect the stub. Otherwise, a new org.omg.CORBA.ORB is created - * by calling {@link - * org.omg.CORBA.ORB#init(String[], Properties) - * org.omg.CORBA.ORB.init((String[])null,(Properties)null)}
  • - *
  • The new created ORB is kept in a static - * {@link WeakReference} and can be reused for connecting other - * stubs. However, no reference is ever kept on the ORB provided - * in the environment map, if any.
  • - *
- * @param rmiServer A RMI Server Stub. - * @param environment An environment map, possibly containing an ORB. - * @return the given stub. - * @exception IllegalArgumentException if the - * {@code java.naming.corba.orb} property is specified and - * does not point to an {@link org.omg.CORBA.ORB ORB}. - * @exception IOException if the connection to the ORB failed. - **/ - static RMIServer connectStub(RMIServer rmiServer, - Map environment) - throws IOException { - if (IIOPHelper.isStub(rmiServer)) { - try { - IIOPHelper.getOrb(rmiServer); - } catch (UnsupportedOperationException x) { - // BAD_OPERATION - IIOPHelper.connect(rmiServer, resolveOrb(environment)); - } - } - return rmiServer; - } - - /** - * Get the ORB specified by environment, or create a - * new one. - *

This method looks in the provided environment for - * the "java.naming.corba.orb" property. If it is found, the - * referenced object (an {@link org.omg.CORBA.ORB ORB}) is - * returned. Otherwise, a new org.omg.CORBA.ORB is created - * by calling {@link - * org.omg.CORBA.ORB#init(String[], java.util.Properties) - * org.omg.CORBA.ORB.init((String[])null,(Properties)null)} - *

The new created ORB is kept in a static - * {@link WeakReference} and can be reused for connecting other - * stubs. However, no reference is ever kept on the ORB provided - * in the environment map, if any. - * @param environment An environment map, possibly containing an ORB. - * @return An ORB. - * @exception IllegalArgumentException if the - * {@code java.naming.corba.orb} property is specified and - * does not point to an {@link org.omg.CORBA.ORB ORB}. - * @exception IOException if the ORB initialization failed. - **/ - static Object resolveOrb(Map environment) - throws IOException { - if (environment != null) { - final Object orb = environment.get(EnvHelp.DEFAULT_ORB); - if (orb != null && !(IIOPHelper.isOrb(orb))) - throw new IllegalArgumentException(EnvHelp.DEFAULT_ORB + - " must be an instance of org.omg.CORBA.ORB."); - if (orb != null) return orb; - } - final Object orb = - (RMIConnector.orb==null)?null:RMIConnector.orb.get(); - if (orb != null) return orb; - - final Object newOrb = - IIOPHelper.createOrb((String[])null, (Properties)null); - RMIConnector.orb = new WeakReference(newOrb); - return newOrb; - } - /** * Read RMIConnector fields from an {@link java.io.ObjectInputStream * ObjectInputStream}. @@ -1846,7 +1716,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable throws IOException { if (rmiServer == null && jmxServiceURL == null) throw new InvalidObjectException("rmiServer and jmxServiceURL both null."); - connectStub(this.rmiServer,env); s.defaultWriteObject(); } @@ -1911,24 +1780,15 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable private RMIServer findRMIServer(JMXServiceURL directoryURL, Map environment) throws NamingException, IOException { - final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); - if (isIiop) { - // Make sure java.naming.corba.orb is in the Map. - environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); - } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) - return findRMIServerJNDI(path.substring(6,end), environment, isIiop); + return findRMIServerJNDI(path.substring(6,end), environment); else if (path.startsWith("/stub/")) - return findRMIServerJRMP(path.substring(6,end), environment, isIiop); - else if (path.startsWith("/ior/")) { - if (!IIOPHelper.isAvailable()) - throw new IOException("iiop protocol not available"); - return findRMIServerIIOP(path.substring(5,end), environment, isIiop); - } else { + return findRMIServerJRMP(path.substring(6,end), environment); + else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); @@ -1940,16 +1800,13 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable * @param jndiURL A JNDI URL indicating the location of the Stub * (see {@link javax.management.remote.rmi}), e.g.: *
  • {@code rmi://registry-host:port/rmi-stub-name}
  • - *
  • or {@code iiop://cosnaming-host:port/iiop-stub-name}
  • *
  • or {@code ldap://ldap-host:port/java-container-dn}
  • *
* @param env the environment Map passed to the connector. - * @param isIiop true if the stub is expected to be an IIOP stub. * @return The retrieved RMIServer stub. * @exception NamingException if the stub couldn't be found. **/ - private RMIServer findRMIServerJNDI(String jndiURL, Map env, - boolean isIiop) + private RMIServer findRMIServerJNDI(String jndiURL, Map env) throws NamingException { InitialContext ctx = new InitialContext(EnvHelp.mapToHashtable(env)); @@ -1957,10 +1814,7 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable Object objref = ctx.lookup(jndiURL); ctx.close(); - if (isIiop) - return narrowIIOPServer(objref); - else - return narrowJRMPServer(objref); + return narrowJRMPServer(objref); } private static RMIServer narrowJRMPServer(Object objref) { @@ -1968,28 +1822,8 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable return (RMIServer) objref; } - private static RMIServer narrowIIOPServer(Object objref) { - try { - return IIOPHelper.narrow(objref, RMIServer.class); - } catch (ClassCastException e) { - if (logger.traceOn()) - logger.trace("narrowIIOPServer","Failed to narrow objref=" + - objref + ": " + e); - if (logger.debugOn()) logger.debug("narrowIIOPServer",e); - return null; - } - } - - private RMIServer findRMIServerIIOP(String ior, Map env, boolean isIiop) { - // could forbid "rmi:" URL here -- but do we need to? - final Object orb = env.get(EnvHelp.DEFAULT_ORB); - final Object stub = IIOPHelper.stringToObject(orb, ior); - return IIOPHelper.narrow(stub, RMIServer.class); - } - - private RMIServer findRMIServerJRMP(String base64, Map env, boolean isIiop) + private RMIServer findRMIServerJRMP(String base64, Map env) throws IOException { - // could forbid "iiop:" URL here -- but do we need to? final byte[] serialized; try { serialized = base64ToByteArray(base64); @@ -2203,228 +2037,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable return proxyStub; } - /* - The following code performs a similar trick for RMI/IIOP to the - one described above for RMI/JRMP. Unlike JRMP, though, we - can't easily insert an object between the RMIConnection stub - and the RMI/IIOP deserialization code, as explained below. - - A method in an RMI/IIOP stub does the following. It makes an - org.omg.CORBA_2_3.portable.OutputStream for each request, and - writes the parameters to it. Then it calls - _invoke(OutputStream) which it inherits from CORBA's - ObjectImpl. That returns an - org.omg.CORBA_2_3.portable.InputStream. The return value is - read from this InputStream. So the stack during - deserialization looks like this: - - MBeanServerConnection.getAttribute (or whatever) - -> _RMIConnection_Stub.getAttribute - -> Util.readAny (a CORBA method) - -> InputStream.read_any - -> internal CORBA stuff - - What we would have *liked* to have done would be the same thing - as for RMI/JRMP. We create a "ProxyDelegate" that is an - org.omg.CORBA.portable.Delegate that simply forwards every - operation to the real original Delegate from the RMIConnection - stub, except that the InputStream returned by _invoke is - wrapped by a "ProxyInputStream" that is loaded by our - NoCallStackClassLoader. - - Unfortunately, this doesn't work, at least with Sun's J2SE - 1.4.2, because the CORBA code is not designed to allow you to - change Delegates arbitrarily. You get a ClassCastException - from code that expects the Delegate to implement an internal - interface. - - So instead we do the following. We create a subclass of the - stub that overrides the _invoke method so as to wrap the - returned InputStream in a ProxyInputStream. We create a - subclass of ProxyInputStream using the NoCallStackClassLoader - and override its read_any and read_value(Class) methods. - (These are the only methods called during deserialization of - MBeanServerConnection return values.) We extract the Delegate - from the original stub and insert it into our subclass stub, - and away we go. The state of a stub consists solely of its - Delegate. - - We also need to catch ApplicationException, which will encode - any exceptions declared in the throws clause of the called - method. Its InputStream needs to be wrapped in a - ProxyInputSteam too. - - We override _releaseReply in the stub subclass so that it - replaces a ProxyInputStream argument with the original - InputStream. This avoids problems if the implementation of - _releaseReply ends up casting this InputStream to an - implementation-specific interface (which in Sun's J2SE 5 it - does). - - It is not strictly necessary for the stub subclass to be loaded - by a NoCallStackClassLoader, since the call-stack search stops - at the ProxyInputStream subclass. However, it is convenient - for two reasons. One is that it means that the - ProxyInputStream subclass can be accessed directly, without - using reflection. The other is that it avoids build problems, - since usually stubs are created after other classes are - compiled, so we can't access them from this class without, - again, using reflection. - - The strings below encode the following two Java classes, - compiled using javac -g:none. - - package com.sun.jmx.remote.protocol.iiop; - - import org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub; - - import org.omg.CORBA.portable.ApplicationException; - import org.omg.CORBA.portable.InputStream; - import org.omg.CORBA.portable.OutputStream; - import org.omg.CORBA.portable.RemarshalException; - - public class ProxyStub extends _RMIConnection_Stub { - public InputStream _invoke(OutputStream out) - throws ApplicationException, RemarshalException { - try { - return new PInputStream(super._invoke(out)); - } catch (ApplicationException e) { - InputStream pis = new PInputStream(e.getInputStream()); - throw new ApplicationException(e.getId(), pis); - } - } - - public void _releaseReply(InputStream in) { - if (in != null) - in = ((PInputStream)in).getProxiedInputStream(); - super._releaseReply(in); - } - } - - package com.sun.jmx.remote.protocol.iiop; - - public class PInputStream extends ProxyInputStream { - public PInputStream(org.omg.CORBA.portable.InputStream in) { - super(in); - } - - public org.omg.CORBA.Any read_any() { - return in.read_any(); - } - - public java.io.Serializable read_value(Class clz) { - return narrow().read_value(clz); - } - } - - - */ - private static final String iiopConnectionStubClassName = - "org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub"; - private static final String proxyStubClassName = - "com.sun.jmx.remote.protocol.iiop.ProxyStub"; - private static final String ProxyInputStreamClassName = - "com.sun.jmx.remote.protocol.iiop.ProxyInputStream"; - private static final String pInputStreamClassName = - "com.sun.jmx.remote.protocol.iiop.PInputStream"; - private static final Class proxyStubClass; - static { - final String proxyStubByteCodeString = - "\312\376\272\276\0\0\0\63\0+\12\0\14\0\30\7\0\31\12\0\14\0\32\12"+ - "\0\2\0\33\7\0\34\12\0\5\0\35\12\0\5\0\36\12\0\5\0\37\12\0\2\0 "+ - "\12\0\14\0!\7\0\"\7\0#\1\0\6\1\0\3()V\1\0\4Code\1\0\7_in"+ - "voke\1\0K(Lorg/omg/CORBA/portable/OutputStream;)Lorg/omg/CORBA"+ - "/portable/InputStream;\1\0\15StackMapTable\7\0\34\1\0\12Except"+ - "ions\7\0$\1\0\15_releaseReply\1\0'(Lorg/omg/CORBA/portable/Inp"+ - "utStream;)V\14\0\15\0\16\1\0-com/sun/jmx/remote/protocol/iiop/"+ - "PInputStream\14\0\20\0\21\14\0\15\0\27\1\0+org/omg/CORBA/porta"+ - "ble/ApplicationException\14\0%\0&\14\0'\0(\14\0\15\0)\14\0*\0&"+ - "\14\0\26\0\27\1\0*com/sun/jmx/remote/protocol/iiop/ProxyStub\1"+ - "\0\1\0'("+ - "Lorg/omg/CORBA/portable/InputStream;)V\1\0\4Code\1\0\10read_an"+ - "y\1\0\25()Lorg/omg/CORBA/Any;\1\0\12read_value\1\0)(Ljava/lang"+ - "/Class;)Ljava/io/Serializable;\14\0\10\0\11\14\0\30\0\31\7\0\32"+ - "\14\0\13\0\14\14\0\33\0\34\7\0\35\14\0\15\0\16\1\0-com/sun/jmx"+ - "/remote/protocol/iiop/PInputStream\1\0\61com/sun/jmx/remote/pr"+ - "otocol/iiop/ProxyInputStream\1\0\2in\1\0$Lorg/omg/CORBA/portab"+ - "le/InputStream;\1\0\"org/omg/CORBA/portable/InputStream\1\0\6n"+ - "arrow\1\0*()Lorg/omg/CORBA_2_3/portable/InputStream;\1\0&org/o"+ - "mg/CORBA_2_3/portable/InputStream\0!\0\6\0\7\0\0\0\0\0\3\0\1\0"+ - "\10\0\11\0\1\0\12\0\0\0\22\0\2\0\2\0\0\0\6*+\267\0\1\261\0\0\0"+ - "\0\0\1\0\13\0\14\0\1\0\12\0\0\0\24\0\1\0\1\0\0\0\10*\264\0\2\266"+ - "\0\3\260\0\0\0\0\0\1\0\15\0\16\0\1\0\12\0\0\0\25\0\2\0\2\0\0\0"+ - "\11*\266\0\4+\266\0\5\260\0\0\0\0\0\0"; - final byte[] proxyStubByteCode = - NoCallStackClassLoader.stringToBytes(proxyStubByteCodeString); - final byte[] pInputStreamByteCode = - NoCallStackClassLoader.stringToBytes(pInputStreamByteCodeString); - final String[] classNames={proxyStubClassName, pInputStreamClassName}; - final byte[][] byteCodes = {proxyStubByteCode, pInputStreamByteCode}; - final String[] otherClassNames = { - iiopConnectionStubClassName, - ProxyInputStreamClassName, - }; - if (IIOPHelper.isAvailable()) { - PrivilegedExceptionAction> action = - new PrivilegedExceptionAction>() { - public Class run() throws Exception { - Class thisClass = RMIConnector.class; - ClassLoader thisLoader = thisClass.getClassLoader(); - ProtectionDomain thisProtectionDomain = - thisClass.getProtectionDomain(); - ClassLoader cl = - new NoCallStackClassLoader(classNames, - byteCodes, - otherClassNames, - thisLoader, - thisProtectionDomain); - return cl.loadClass(proxyStubClassName); - } - }; - Class stubClass; - try { - stubClass = AccessController.doPrivileged(action); - } catch (Exception e) { - logger.error("", - "Unexpected exception making shadow IIOP stub class: "+e); - logger.debug("",e); - stubClass = null; - } - proxyStubClass = stubClass; - } else { - proxyStubClass = null; - } - } - - private static RMIConnection shadowIiopStub(Object stub) - throws InstantiationException, IllegalAccessException { - Object proxyStub = null; - try { - proxyStub = AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - return proxyStubClass.newInstance(); - } - }); - } catch (PrivilegedActionException e) { - throw new InternalError(); - } - IIOPHelper.setDelegate(proxyStub, IIOPHelper.getDelegate(stub)); - return (RMIConnection) proxyStub; - } private static RMIConnection getConnection(RMIServer server, Object credentials, boolean checkStub) @@ -2434,8 +2046,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable try { if (c.getClass() == rmiConnectionImplStubClass) return shadowJrmpStub((RemoteObject) c); - if (c.getClass().getName().equals(iiopConnectionStubClassName)) - return shadowIiopStub(c); logger.trace("getConnection", "Did not wrap " + c.getClass() + " to foil " + "stack search for classes: class loading semantics " + diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectorServer.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectorServer.java index 4cdb092c6d2..fe90422c193 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectorServer.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnectorServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -27,7 +27,6 @@ package javax.management.remote.rmi; import com.sun.jmx.remote.security.MBeanServerFileAccessController; -import com.sun.jmx.remote.internal.IIOPHelper; import com.sun.jmx.remote.util.ClassLogger; import com.sun.jmx.remote.util.EnvHelp; @@ -117,8 +116,8 @@ public class RMIConnectorServer extends JMXConnectorServer { * * @exception MalformedURLException if url does not * conform to the syntax for an RMI connector, or if its protocol - * is not recognized by this implementation. Only "rmi" and "iiop" - * are valid when this constructor is used. + * is not recognized by this implementation. Only "rmi" is valid when + * this constructor is used. * * @exception IOException if the connector server cannot be created * for some reason or if it is inevitable that its {@link #start() @@ -151,8 +150,8 @@ public class RMIConnectorServer extends JMXConnectorServer { * * @exception MalformedURLException if url does not * conform to the syntax for an RMI connector, or if its protocol - * is not recognized by this implementation. Only "rmi" and "iiop" - * are valid when this constructor is used. + * is not recognized by this implementation. Only "rmi" is valid + * when this constructor is used. * * @exception IOException if the connector server cannot be created * for some reason or if it is inevitable that its {@link #start() @@ -179,7 +178,7 @@ public class RMIConnectorServer extends JMXConnectorServer { * consistent with the protocol type specified in url. * If this parameter is non null, the protocol type specified by * url is not constrained, and is assumed to be valid. - * Otherwise, only "rmi" and "iiop" will be recognized. + * Otherwise, only "rmi" will be recognized. * * @param mbeanServer the MBean server to which the new connector * server is attached, or null if it will be attached by being @@ -189,8 +188,8 @@ public class RMIConnectorServer extends JMXConnectorServer { * * @exception MalformedURLException if url does not * conform to the syntax for an RMI connector, or if its protocol - * is not recognized by this implementation. Only "rmi" and "iiop" - * are recognized when rmiServerImpl is null. + * is not recognized by this implementation. Only "rmi" is recognized + * when rmiServerImpl is null. * * @exception IOException if the connector server cannot be created * for some reason or if it is inevitable that its {@link #start() @@ -208,7 +207,7 @@ public class RMIConnectorServer extends JMXConnectorServer { IllegalArgumentException("Null JMXServiceURL"); if (rmiServerImpl == null) { final String prt = url.getProtocol(); - if (prt == null || !(prt.equals("rmi") || prt.equals("iiop"))) { + if (prt == null || !(prt.equals("rmi"))) { final String msg = "Invalid protocol type: " + prt; throw new MalformedURLException(msg); } @@ -298,11 +297,6 @@ public class RMIConnectorServer extends JMXConnectorServer { *
  • If an RMIServerImpl was supplied to the * constructor, it is used. * - *
  • Otherwise, if the protocol part of the - * JMXServiceURL supplied to the constructor was - * iiop, an object of type {@link RMIIIOPServerImpl} - * is created. - * *
  • Otherwise, if the JMXServiceURL * was null, or its protocol part was rmi, an object * of type {@link RMIJRMPServerImpl} is created. @@ -324,21 +318,19 @@ public class RMIConnectorServer extends JMXConnectorServer { * will not be bound to a directory. Instead, a reference to it * will be encoded in the URL path of the RMIConnectorServer * address (returned by {@link #getAddress()}). The encodings for - * rmi and iiop are described in the - * package documentation for {@link - * javax.management.remote.rmi}.

    + * rmi are described in the package documentation for + * {@link javax.management.remote.rmi}.

    * *

    The behavior when the URL path is neither empty nor a JNDI - * directory URL, or when the protocol is neither rmi - * nor iiop, is implementation defined, and may - * include throwing {@link MalformedURLException} when the - * connector server is created or when it is started.

    + * directory URL, or when the protocol is not rmi, + * is implementation defined, and may include throwing + * {@link MalformedURLException} when the connector server is created + * or when it is started.

    * * @exception IllegalStateException if the connector server has * not been attached to an MBean server. * @exception IOException if the connector server cannot be - * started, or in the case of the {@code iiop} protocol, that - * RMI/IIOP is not supported. + * started. */ public synchronized void start() throws IOException { final boolean tracing = logger.traceOn(); @@ -649,16 +641,13 @@ public class RMIConnectorServer extends JMXConnectorServer { * Creates a new RMIServerImpl. **/ RMIServerImpl newServer() throws IOException { - final boolean iiop = isIiopURL(address,true); final int port; if (address == null) port = 0; else port = address.getPort(); - if (iiop) - return newIIOPServer(attributes); - else - return newJRMPServer(attributes, port); + + return newJRMPServer(attributes, port); } /** @@ -675,10 +664,7 @@ public class RMIConnectorServer extends JMXConnectorServer { final int port; if (address == null) { - if (IIOPHelper.isStub(rmiServer)) - protocol = "iiop"; - else - protocol = "rmi"; + protocol = "rmi"; host = null; // will default to local host name port = 0; } else { @@ -692,31 +678,12 @@ public class RMIConnectorServer extends JMXConnectorServer { address = new JMXServiceURL(protocol, host, port, urlPath); } - static boolean isIiopURL(JMXServiceURL directoryURL, boolean strict) - throws MalformedURLException { - String protocol = directoryURL.getProtocol(); - if (protocol.equals("rmi")) - return false; - else if (protocol.equals("iiop")) - return true; - else if (strict) { - - throw new MalformedURLException("URL must have protocol " + - "\"rmi\" or \"iiop\": \"" + - protocol + "\""); - } - return false; - } - /** * Returns the IOR of the given rmiServer. **/ static String encodeStub( RMIServer rmiServer, Map env) throws IOException { - if (IIOPHelper.isStub(rmiServer)) - return "/ior/" + encodeIIOPStub(rmiServer, env); - else - return "/stub/" + encodeJRMPStub(rmiServer, env); + return "/stub/" + encodeJRMPStub(rmiServer, env); } static String encodeJRMPStub( @@ -730,17 +697,6 @@ public class RMIConnectorServer extends JMXConnectorServer { return byteArrayToBase64(bytes); } - static String encodeIIOPStub( - RMIServer rmiServer, Map env) - throws IOException { - try { - Object orb = IIOPHelper.getOrb(rmiServer); - return IIOPHelper.objectToString(orb, rmiServer); - } catch (RuntimeException x) { - throw newIOException(x.getMessage(), x); - } - } - /** * Object that we will bind to the registry. * This object is a stub connected to our RMIServerImpl. @@ -748,8 +704,7 @@ public class RMIConnectorServer extends JMXConnectorServer { private static RMIServer objectToBind( RMIServerImpl rmiServer, Map env) throws IOException { - return RMIConnector. - connectStub((RMIServer)rmiServer.toStub(),env); + return (RMIServer)rmiServer.toStub(); } private static RMIServerImpl newJRMPServer(Map env, int port) @@ -761,11 +716,6 @@ public class RMIConnectorServer extends JMXConnectorServer { return new RMIJRMPServerImpl(port, csf, ssf, env); } - private static RMIServerImpl newIIOPServer(Map env) - throws IOException { - return new RMIIIOPServerImpl(env); - } - private static String byteArrayToBase64(byte[] a) { int aLen = a.length; int numFullGroups = aLen/3; diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIIIOPServerImpl.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIIIOPServerImpl.java index 45be553e1f7..00b25b71d9e 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIIIOPServerImpl.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIIIOPServerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -27,16 +27,9 @@ package javax.management.remote.rmi; import java.io.IOException; import java.rmi.Remote; -import java.security.AccessControlContext; -import java.security.AccessController; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; import java.util.Map; -import java.util.Collections; import javax.security.auth.Subject; -import com.sun.jmx.remote.internal.IIOPHelper; - /** *

    An {@link RMIServerImpl} that is exported through IIOP and that * creates client connections as RMI objects exported through IIOP. @@ -45,120 +38,59 @@ import com.sun.jmx.remote.internal.IIOPHelper; * @see RMIServerImpl * * @since 1.5 + * @deprecated This transport is no longer supported. */ +@Deprecated public class RMIIIOPServerImpl extends RMIServerImpl { /** - *

    Creates a new {@link RMIServerImpl}.

    + * Throws {@linkplain UnsupportedOperationException} * * @param env the environment containing attributes for the new * RMIServerImpl. Can be null, which is equivalent * to an empty Map. * - * @exception IOException if the RMI object cannot be created. + * @throws IOException if the RMI object cannot be created. */ public RMIIIOPServerImpl(Map env) throws IOException { super(env); - this.env = (env == null) ? Collections.emptyMap() : env; - - callerACC = AccessController.getContext(); + throw new UnsupportedOperationException(); } + @Override protected void export() throws IOException { - IIOPHelper.exportObject(this); + throw new UnsupportedOperationException("Method not supported. JMX RMI-IIOP is deprecated"); } + @Override protected String getProtocol() { return "iiop"; } - /** - *

    Returns an IIOP stub.

    - * The stub might not yet be connected to the ORB. The stub will - * be serializable only if it is connected to the ORB. - * @return an IIOP stub. - * @exception IOException if the stub cannot be created - e.g the - * RMIIIOPServerImpl has not been exported yet. - **/ + @Override public Remote toStub() throws IOException { - // javax.rmi.CORBA.Stub stub = - // (javax.rmi.CORBA.Stub) PortableRemoteObject.toStub(this); - final Remote stub = IIOPHelper.toStub(this); - // java.lang.System.out.println("NON CONNECTED STUB " + stub); - // org.omg.CORBA.ORB orb = - // org.omg.CORBA.ORB.init((String[])null, (Properties)null); - // stub.connect(orb); - // java.lang.System.out.println("CONNECTED STUB " + stub); - return stub; + throw new UnsupportedOperationException(); } - /** - *

    Creates a new client connection as an RMI object exported - * through IIOP. - * - * @param connectionId the ID of the new connection. Every - * connection opened by this connector server will have a - * different ID. The behavior is unspecified if this parameter is - * null. - * - * @param subject the authenticated subject. Can be null. - * - * @return the newly-created RMIConnection. - * - * @exception IOException if the new client object cannot be - * created or exported. - */ + @Override protected RMIConnection makeClient(String connectionId, Subject subject) throws IOException { - - if (connectionId == null) - throw new NullPointerException("Null connectionId"); - - RMIConnection client = - new RMIConnectionImpl(this, connectionId, getDefaultClassLoader(), - subject, env); - IIOPHelper.exportObject(client); - return client; + throw new UnsupportedOperationException(); } + @Override protected void closeClient(RMIConnection client) throws IOException { - IIOPHelper.unexportObject(client); + throw new UnsupportedOperationException(); } - /** - *

    Called by {@link #close()} to close the connector server by - * unexporting this object. After returning from this method, the - * connector server must not accept any new connections.

    - * - * @exception IOException if the attempt to close the connector - * server failed. - */ + @Override protected void closeServer() throws IOException { - IIOPHelper.unexportObject(this); + throw new UnsupportedOperationException(); } @Override RMIConnection doNewClient(final Object credentials) throws IOException { - if (callerACC == null) { - throw new SecurityException("AccessControlContext cannot be null"); - } - try { - return AccessController.doPrivileged( - new PrivilegedExceptionAction() { - public RMIConnection run() throws IOException { - return superDoNewClient(credentials); - } - }, callerACC); - } catch (PrivilegedActionException pae) { - throw (IOException) pae.getCause(); - } + throw new UnsupportedOperationException(); } - - RMIConnection superDoNewClient(Object credentials) throws IOException { - return super.doNewClient(credentials); - } - - private final Map env; - private final AccessControlContext callerACC; } diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIServerImpl.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIServerImpl.java index 323f6bb2c2b..957a08e2535 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIServerImpl.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIServerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -61,8 +61,7 @@ import javax.security.auth.Subject; * or by instantiating {@link RMIConnector}.

    * *

    This is an abstract class. Concrete subclasses define the - * details of the client connection objects, such as whether they use - * JRMP or IIOP.

    + * details of the client connection objects.

    * * @since 1.5 */ @@ -307,7 +306,7 @@ public abstract class RMIServerImpl implements Closeable, RMIServer { /** *

    Returns the protocol string for this object. The string is - * rmi for RMI/JRMP and iiop for RMI/IIOP. + * rmi for RMI/JRMP. * * @return the protocol string for this object. */ diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/package.html b/jdk/src/java.management/share/classes/javax/management/remote/rmi/package.html index 09b09a3021e..9669be24397 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/package.html +++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/package.html @@ -2,7 +2,7 @@ RMI connector