提交 db5bee27 编写于 作者: M msheppar

8011157: Improve CORBA portablility

Summary: fix also reviewed by Alexander Fomin
Reviewed-by: alanb, coffeys, skoivu
上级 3c8cbb52
......@@ -130,11 +130,13 @@ $(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class
$(RMIC) -classpath "$(CLASSDESTDIR)" \
-d $(CLASSDESTDIR) \
-iiop -v1.2 \
-emitPermissionCheck \
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
$(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \
-d $(CLASSDESTDIR) \
-iiop -v1.2 \
-standardPackage \
-emitPermissionCheck \
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
@$(java-vm-cleanup)
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
......@@ -298,11 +298,15 @@ public class RequiredModelMBean
RequiredModelMBean.class.getName(),
"setModelMBeanInfo(ModelMBeanInfo)",
"Setting ModelMBeanInfo to " + printModelMBeanInfo(mbi));
int noOfNotifications = 0;
if (mbi.getNotifications() != null) {
noOfNotifications = mbi.getNotifications().length;
}
MODELMBEAN_LOGGER.logp(Level.FINER,
RequiredModelMBean.class.getName(),
"setModelMBeanInfo(ModelMBeanInfo)",
"ModelMBeanInfo notifications has " +
(mbi.getNotifications()).length + " elements");
noOfNotifications + " elements");
}
modelMBeanInfo = (ModelMBeanInfo)mbi.clone();
......
/*
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
......@@ -61,6 +61,7 @@ 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;
......@@ -128,7 +129,6 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable
Map<String, ?> environment) {
if (rmiServer == null && address == null) throw new
IllegalArgumentException("rmiServer and jmxServiceURL both null");
initTransients();
this.rmiServer = rmiServer;
......@@ -2370,13 +2370,21 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable
}
}
private static RMIConnection shadowIiopStub(Object stub)
private static RMIConnection shadowIiopStub(Object stub)
throws InstantiationException, IllegalAccessException {
Object proxyStub = proxyStubClass.newInstance();
Object proxyStub = null;
try {
proxyStub = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册