summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Freeze/TransactionI.java9
-rw-r--r--java/src/Freeze/TransactionalEvictorI.java10
-rw-r--r--java/src/Ice/LoggerI.java2
-rw-r--r--java/src/Ice/PropertiesI.java37
-rw-r--r--java/src/IceGridGUI/Coordinator.java7
-rw-r--r--java/src/IceGridGUI/LiveDeployment/Server.java140
-rw-r--r--java/src/IceGridGUI/LiveDeployment/ServerEditor.java26
-rw-r--r--java/src/IceGridGUI/SessionKeeper.java38
-rw-r--r--java/src/IceGridGUI/XMLWriter.java2
-rw-r--r--java/src/IceInternal/Network.java45
-rw-r--r--java/src/IceInternal/PropertyNames.java25
-rw-r--r--java/src/IceInternal/ValueWriter.java23
12 files changed, 299 insertions, 65 deletions
diff --git a/java/src/Freeze/TransactionI.java b/java/src/Freeze/TransactionI.java
index b1d0a807048..e05eab4c663 100644
--- a/java/src/Freeze/TransactionI.java
+++ b/java/src/Freeze/TransactionI.java
@@ -222,7 +222,14 @@ class TransactionI implements Transaction
{
if(_postCompletionCallback != null)
{
- _postCompletionCallback.postCompletion(committed, deadlock);
+ try
+ {
+ _postCompletionCallback.postCompletion(committed, deadlock);
+ }
+ finally
+ {
+ _postCompletionCallback = null;
+ }
}
}
diff --git a/java/src/Freeze/TransactionalEvictorI.java b/java/src/Freeze/TransactionalEvictorI.java
index 6d44f055ea3..26623346c53 100644
--- a/java/src/Freeze/TransactionalEvictorI.java
+++ b/java/src/Freeze/TransactionalEvictorI.java
@@ -252,6 +252,16 @@ class TransactionalEvictorI extends EvictorI implements TransactionalEvictor
{
if(_deactivateController.deactivate())
{
+ synchronized(this)
+ {
+ //
+ // Set the evictor size to zero, meaning that we will evict
+ // everything possible.
+ //
+ _evictorSize = 0;
+ evict();
+ }
+
try
{
closeDbEnv();
diff --git a/java/src/Ice/LoggerI.java b/java/src/Ice/LoggerI.java
index aa9fa251e1f..33983a38cce 100644
--- a/java/src/Ice/LoggerI.java
+++ b/java/src/Ice/LoggerI.java
@@ -19,7 +19,7 @@ public class LoggerI implements Logger
_prefix = prefix + ": ";
}
- _lineSeparator = System.getProperties().getProperty("line.separator");
+ _lineSeparator = System.getProperty("line.separator");
_date = java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT);
_time = new java.text.SimpleDateFormat(" HH:mm:ss:SSS");
}
diff --git a/java/src/Ice/PropertiesI.java b/java/src/Ice/PropertiesI.java
index 30f711f884e..c562715b457 100644
--- a/java/src/Ice/PropertiesI.java
+++ b/java/src/Ice/PropertiesI.java
@@ -36,7 +36,14 @@ public final class PropertiesI implements Properties
PropertyValue pv = _properties.get(key);
if(pv == null)
{
- result = System.getProperty(key, "");
+ try
+ {
+ result = System.getProperty(key, "");
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ result = "";
+ }
}
else
{
@@ -53,7 +60,14 @@ public final class PropertiesI implements Properties
PropertyValue pv = _properties.get(key);
if(pv == null)
{
- result = System.getProperty(key, value);
+ try
+ {
+ result = System.getProperty(key, value);
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ result = value;
+ }
}
else
{
@@ -76,7 +90,13 @@ public final class PropertiesI implements Properties
PropertyValue pv = _properties.get(key);
if(pv == null)
{
- result = System.getProperty(key);
+ try
+ {
+ result = System.getProperty(key);
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ }
}
else
{
@@ -118,7 +138,13 @@ public final class PropertiesI implements Properties
PropertyValue pv = _properties.get(key);
if(pv == null)
{
- result = System.getProperty(key);
+ try
+ {
+ result = System.getProperty(key);
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ }
if(result == null)
{
return value;
@@ -621,9 +647,8 @@ public final class PropertiesI implements Properties
value = "";
}
}
- catch(SecurityException ex)
+ catch(java.lang.SecurityException ex)
{
- Ice.Util.getProcessLogger().warning("unable to access ICE_CONFIG environment variable");
value = "";
}
}
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java
index 3a128ca91c1..245b52a36f2 100644
--- a/java/src/IceGridGUI/Coordinator.java
+++ b/java/src/IceGridGUI/Coordinator.java
@@ -1396,7 +1396,7 @@ public class Coordinator
{
JOptionPane.showMessageDialog(
parent,
- "This version of IceGrid Admin requires an IceGrid Registry version 3.2 or higher",
+ "This version of IceGrid Admin requires an IceGrid Registry version 3.3",
"Version Mismatch",
JOptionPane.ERROR_MESSAGE);
return null;
@@ -1627,6 +1627,11 @@ public class Coordinator
return _sessionKeeper.addCallback(servant, name, facet);
}
+ public Ice.ObjectPrx retrieveCallback(String name, String facet)
+ {
+ return _sessionKeeper.retrieveCallback(name, facet);
+ }
+
public Ice.Object removeCallback(String name, String facet)
{
return _sessionKeeper.removeCallback(name, facet);
diff --git a/java/src/IceGridGUI/LiveDeployment/Server.java b/java/src/IceGridGUI/LiveDeployment/Server.java
index a9ac2d67c1e..4767c04a8c2 100644
--- a/java/src/IceGridGUI/LiveDeployment/Server.java
+++ b/java/src/IceGridGUI/LiveDeployment/Server.java
@@ -711,6 +711,21 @@ class Server extends ListArrayTreeNode
}
}
+ void updateServices()
+ {
+ for(Service service: _services)
+ {
+ if(_startedServices.contains(service.getId()))
+ {
+ service.started();
+ }
+ else
+ {
+ service.stopped();
+ }
+ }
+ }
+
void rebuild(Server server)
{
_resolver = server._resolver;
@@ -722,6 +737,10 @@ class Server extends ListArrayTreeNode
_dbEnvs = server._dbEnvs;
_services = server._services;
+ _childrenArray[0] = _adapters;
+ _childrenArray[1] = _dbEnvs;
+ _childrenArray[2] = _services;
+
//
// Need to re-parent all the children
//
@@ -740,9 +759,7 @@ class Server extends ListArrayTreeNode
service.reparent(this);
}
- _childrenArray[0] = _adapters;
- _childrenArray[1] = _dbEnvs;
- _childrenArray[2] = _services;
+ updateServices();
getRoot().getTreeModel().nodeStructureChanged(this);
}
@@ -777,6 +794,7 @@ class Server extends ListArrayTreeNode
_services.clear();
_servicePropertySets.clear();
createServices();
+ updateServices();
getRoot().getTreeModel().nodeStructureChanged(this);
}
@@ -785,6 +803,8 @@ class Server extends ListArrayTreeNode
_services.clear();
_servicePropertySets.clear();
createServices();
+ updateServices();
+
getRoot().getTreeModel().nodeStructureChanged(this);
}
}
@@ -813,63 +833,77 @@ class Server extends ListArrayTreeNode
{
if(_serviceObserver == null)
{
- IceBox.ServiceObserver servant = new IceBox._ServiceObserverDisp()
- {
- public void servicesStarted(final String[] services, Ice.Current current)
+ _serviceObserver = IceBox.ServiceObserverPrxHelper.uncheckedCast(
+ getCoordinator().retrieveCallback(_id, "IceBox.ServiceManager"));
+
+ if(_serviceObserver == null)
+ {
+ IceBox.ServiceObserver servant = new IceBox._ServiceObserverDisp()
{
- final java.util.Set<String> serviceSet = new java.util.HashSet<String>(java.util.Arrays.asList(services));
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
+ public void servicesStarted(final String[] services, Ice.Current current)
+ {
+ final java.util.Set<String> serviceSet = new java.util.HashSet<String>(java.util.Arrays.asList(services));
+
+ SwingUtilities.invokeLater(new Runnable()
{
- for(Service service: _services)
+ public void run()
{
- if(serviceSet.contains(service.getId()))
+ for(Service service: _services)
{
- service.started();
+ if(serviceSet.contains(service.getId()))
+ {
+ service.started();
+ }
}
+ _startedServices.addAll(serviceSet);
+ getCoordinator().getLiveDeploymentPane().refresh();
}
- getCoordinator().getLiveDeploymentPane().refresh();
- }
- });
- }
-
- public void servicesStopped(final String[] services, Ice.Current current)
- {
- final java.util.Set<String> serviceSet = new java.util.HashSet<String>(java.util.Arrays.asList(services));
+ });
+ }
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
+ public void servicesStopped(final String[] services, Ice.Current current)
+ {
+ final java.util.Set<String> serviceSet = new java.util.HashSet<String>(java.util.Arrays.asList(services));
+
+ SwingUtilities.invokeLater(new Runnable()
{
- for(Service service: _services)
+ public void run()
{
- if(serviceSet.contains(service.getId()))
+ for(Service service: _services)
{
- service.stopped();
+ if(serviceSet.contains(service.getId()))
+ {
+ service.stopped();
+ }
}
+ _startedServices.removeAll(serviceSet);
+ getCoordinator().getLiveDeploymentPane().refresh();
}
- getCoordinator().getLiveDeploymentPane().refresh();
- }
- });
- }
-
- };
+ });
+ }
+
+ };
- _serviceObserver = IceBox.ServiceObserverPrxHelper.uncheckedCast(
- getCoordinator().addCallback(servant, _id, "IceBox.ServiceManager"));
+ _serviceObserver = IceBox.ServiceObserverPrxHelper.uncheckedCast(
+ getCoordinator().addCallback(servant, _id, "IceBox.ServiceManager"));
- if(_serviceObserver == null)
- {
- // TODO: log/report condition (observer not available, e.g. adapter not configured)
+ if(_serviceObserver == null)
+ {
+ JOptionPane.showMessageDialog(
+ getCoordinator().getMainFrame(),
+ "Could not create servant for service-manager observer",
+ "Observer creation error",
+ JOptionPane.ERROR_MESSAGE);
+ }
}
+
}
-
+
if(_serviceObserver != null)
{
//
// Add observer to service manager using AMI call
+ // Note that duplicate registrations are ignored
//
IceBox.AMI_ServiceManager_addObserver cb = new IceBox.AMI_ServiceManager_addObserver()
@@ -881,7 +915,11 @@ class Server extends ListArrayTreeNode
public void ice_exception(Ice.LocalException e)
{
- // TODO: log/report exception
+ JOptionPane.showMessageDialog(
+ getCoordinator().getMainFrame(),
+ "Failed to register service-manager observer: " + e.toString(),
+ "Observer registration error",
+ JOptionPane.ERROR_MESSAGE);
}
};
@@ -897,20 +935,24 @@ class Server extends ListArrayTreeNode
}
catch(Ice.LocalException ex)
{
- // TODO: log/report exception
+ JOptionPane.showMessageDialog(
+ getCoordinator().getMainFrame(),
+ "Failed to contact service-manager: " + ex.toString(),
+ "Observer communication error",
+ JOptionPane.ERROR_MESSAGE);
}
}
}
}
- else if(_state == null || _state == ServerState.Inactive)
+ }
+ else if(_state == null || _state == ServerState.Inactive)
+ {
+ for(Service service: _services)
{
- for(Service service: _services)
- {
- service.stopped();
- }
+ service.stopped();
}
}
-
+
if(fireEvent)
{
getRoot().getTreeModel().nodeChanged(this);
@@ -1157,6 +1199,8 @@ class Server extends ListArrayTreeNode
private java.util.List<DbEnv> _dbEnvs = new java.util.LinkedList<DbEnv>();
private java.util.List<Service> _services = new java.util.LinkedList<Service>();
+ private java.util.Set<String> _startedServices = new java.util.HashSet<String>();
+
private ServerState _state;
private boolean _enabled;
private int _stateIconIndex;
diff --git a/java/src/IceGridGUI/LiveDeployment/ServerEditor.java b/java/src/IceGridGUI/LiveDeployment/ServerEditor.java
index 6b81a98c045..5b0f9577ce8 100644
--- a/java/src/IceGridGUI/LiveDeployment/ServerEditor.java
+++ b/java/src/IceGridGUI/LiveDeployment/ServerEditor.java
@@ -95,6 +95,9 @@ class ServerEditor extends CommunicatorEditor
void show(Server server)
{
+
+ Server previousServer = _target;
+
_target = server;
ServerState state = server.getState();
@@ -108,6 +111,7 @@ class ServerEditor extends CommunicatorEditor
_currentPid.setText("");
_buildId.setText("Unknown");
_properties.clear();
+ _propertiesRetrieved = false;
_refreshButton.setEnabled(false);
}
else
@@ -128,19 +132,29 @@ class ServerEditor extends CommunicatorEditor
int iceIntVersion = server.getIceVersion();
if(state == ServerState.Active && (iceIntVersion == 0 || iceIntVersion >= 30300))
{
- _buildId.setText("Retrieving...");
- _properties.clear();
+ if(!_propertiesRetrieved || previousServer != server)
+ {
+ _buildId.setText("Retrieving...");
+ _properties.clear();
+ //
+ // Retrieve all properties in background
+ //
+ _target.showRuntimeProperties();
+ _propertiesRetrieved = true; // set to true immediately to avoid 'spinning'
+ }
+
//
- // Retrieve all properties in background
+ // Otherwise, use current value
//
- _target.showRuntimeProperties();
_refreshButton.setEnabled(true);
+
}
else
{
_buildId.setText("");
_properties.clear();
+ _propertiesRetrieved = false;
_refreshButton.setEnabled(false);
}
}
@@ -215,7 +229,8 @@ class ServerEditor extends CommunicatorEditor
if(server == _target)
{
_properties.setSortedMap(map);
-
+ _propertiesRetrieved = true;
+
String buildString = (String)map.get("BuildId");
if(buildString == null)
{
@@ -370,6 +385,7 @@ class ServerEditor extends CommunicatorEditor
private JTextField _buildId = new JTextField(20);
private JButton _refreshButton;
private TableField _properties = new TableField("Name", "Value");
+ private boolean _propertiesRetrieved = false;
private JTextField _application = new JTextField(20);
private JButton _gotoApplication;
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java
index 128ce1a7b80..5130b133c6d 100644
--- a/java/src/IceGridGUI/SessionKeeper.java
+++ b/java/src/IceGridGUI/SessionKeeper.java
@@ -99,6 +99,17 @@ class SessionKeeper
_serverAdminCategory = _admin.getServerAdminCategory();
}
+ catch(Ice.OperationNotExistException e)
+ {
+ logout(true);
+ JOptionPane.showMessageDialog(
+ parent,
+ "This version of IceGrid Admin requires an IceGrid Registry version 3.3",
+ "Login failed: Version Mismatch",
+ JOptionPane.ERROR_MESSAGE);
+ throw e;
+
+ }
catch(Ice.LocalException e)
{
logout(true);
@@ -189,6 +200,27 @@ class SessionKeeper
}
}
+ Ice.ObjectPrx retrieveCallback(String name, String facet)
+ {
+ if(_adminCallbackCategory == null)
+ {
+ return null;
+ }
+ else
+ {
+ Ice.Identity ident = new Ice.Identity(name, _adminCallbackCategory);
+ if(_adapter.findFacet(ident, facet) == null)
+ {
+ return null;
+ }
+ else
+ {
+ return _adapter.createProxy(ident).ice_facet(facet);
+ }
+ }
+ }
+
+
Ice.Object removeCallback(String name, String facet)
{
if(_adminCallbackCategory == null)
@@ -1388,6 +1420,12 @@ class SessionKeeper
{
return _session == null ? null : _session.addCallback(servant, name, facet);
}
+
+ Ice.ObjectPrx retrieveCallback(String name, String facet)
+ {
+ return _session == null ? null : _session.retrieveCallback(name, facet);
+ }
+
Ice.Object removeCallback(String name, String facet)
{
diff --git a/java/src/IceGridGUI/XMLWriter.java b/java/src/IceGridGUI/XMLWriter.java
index 30bb46ffba5..a0c6e225f87 100644
--- a/java/src/IceGridGUI/XMLWriter.java
+++ b/java/src/IceGridGUI/XMLWriter.java
@@ -93,7 +93,7 @@ public class XMLWriter
while(p.hasNext())
{
String[] pair = (String[])p.next();
- _writer.write(" " + pair[0] + "=\"" + pair[1] + "\"");
+ _writer.write(" " + pair[0] + "=\"" + escape(pair[1]) + "\"");
}
}
}
diff --git a/java/src/IceInternal/Network.java b/java/src/IceInternal/Network.java
index e1de5ed1960..915883e05d3 100644
--- a/java/src/IceInternal/Network.java
+++ b/java/src/IceInternal/Network.java
@@ -317,6 +317,13 @@ public final class Network
se.initCause(ex);
throw se;
}
+ catch(java.lang.SecurityException ex)
+ {
+ closeSocketNoThrow(fd);
+ Ice.SocketException se = new Ice.SocketException();
+ se.initCause(ex);
+ throw se;
+ }
if(System.getProperty("os.name").equals("Linux"))
{
@@ -827,6 +834,13 @@ public final class Network
{
Ice.DNSException e = new Ice.DNSException();
e.host = host;
+ e.initCause(ex);
+ throw e;
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ Ice.SocketException e = new Ice.SocketException();
+ e.initCause(ex);
throw e;
}
@@ -875,6 +889,12 @@ public final class Network
se.initCause(e);
throw se;
}
+ catch(java.lang.SecurityException ex)
+ {
+ Ice.SocketException e = new Ice.SocketException();
+ e.initCause(ex);
+ throw e;
+ }
return result;
}
@@ -917,6 +937,12 @@ public final class Network
catch(java.net.UnknownHostException ex)
{
}
+ catch(java.lang.SecurityException ex)
+ {
+ Ice.SocketException e = new Ice.SocketException();
+ e.initCause(ex);
+ throw e;
+ }
}
java.util.ArrayList<String> hosts = new java.util.ArrayList<String>();
@@ -1158,6 +1184,13 @@ public final class Network
{
Ice.DNSException e = new Ice.DNSException();
e.host = host;
+ e.initCause(ex);
+ throw e;
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ Ice.SocketException e = new Ice.SocketException();
+ e.initCause(ex);
throw e;
}
@@ -1191,6 +1224,12 @@ public final class Network
assert(false);
return null;
}
+ catch(java.lang.SecurityException ex)
+ {
+ Ice.SocketException e = new Ice.SocketException();
+ e.initCause(ex);
+ throw e;
+ }
}
private static java.net.InetAddress[]
@@ -1215,5 +1254,11 @@ public final class Network
assert(false);
return null;
}
+ catch(java.lang.SecurityException ex)
+ {
+ Ice.SocketException e = new Ice.SocketException();
+ e.initCause(ex);
+ throw e;
+ }
}
}
diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java
index 439d3a099cc..91a1371bdb3 100644
--- a/java/src/IceInternal/PropertyNames.java
+++ b/java/src/IceInternal/PropertyNames.java
@@ -7,6 +7,9 @@
//
// **********************************************************************
+//
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Tue Dec 23 19:01:32 2008
+
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
package IceInternal;
@@ -264,7 +267,15 @@ public final class PropertyNames
new Property("IceGrid\\.Registry\\.CryptPasswords", false, null),
new Property("IceGrid\\.Registry\\.Data", false, null),
new Property("IceGrid\\.Registry\\.DefaultTemplates", false, null),
+ new Property("IceGrid\\.Registry\\.Discard\\.Interval", false, null),
new Property("IceGrid\\.Registry\\.DynamicRegistration", false, null),
+ new Property("IceGrid\\.Registry\\.Election\\.ElectionTimeout", false, null),
+ new Property("IceGrid\\.Registry\\.Election\\.MasterTimeout", false, null),
+ new Property("IceGrid\\.Registry\\.Election\\.ResponseTimeout", false, null),
+ new Property("IceGrid\\.Registry\\.Flush\\.Timeout", false, null),
+ new Property("IceGrid\\.Registry\\.IceStormAdmin\\.TopicManager\\.Default", false, null),
+ new Property("IceGrid\\.Registry\\.IceStormAdmin\\.TopicManager\\.[^\\s]+", false, null),
+ new Property("IceGrid\\.Registry\\.InstanceName", false, null),
new Property("IceGrid\\.Registry\\.Internal\\.AdapterId", false, null),
new Property("IceGrid\\.Registry\\.Internal\\.Endpoints", false, null),
new Property("IceGrid\\.Registry\\.Internal\\.Locator", false, null),
@@ -278,6 +289,9 @@ public final class PropertyNames
new Property("IceGrid\\.Registry\\.Internal\\.ThreadPool\\.SizeWarn", false, null),
new Property("IceGrid\\.Registry\\.Internal\\.ThreadPool\\.StackSize", false, null),
new Property("IceGrid\\.Registry\\.Internal\\.ThreadPool\\.Serialize", false, null),
+ new Property("IceGrid\\.Registry\\.Node\\.[^\\s]+", false, null),
+ new Property("IceGrid\\.Registry\\.NodeId", false, null),
+ new Property("IceGrid\\.Registry\\.Nodes\\.id", false, null),
new Property("IceGrid\\.Registry\\.NodeSessionTimeout", false, null),
new Property("IceGrid\\.Registry\\.PermissionsVerifier\\.EndpointSelection", false, null),
new Property("IceGrid\\.Registry\\.PermissionsVerifier\\.ConnectionCached", false, null),
@@ -288,8 +302,12 @@ public final class PropertyNames
new Property("IceGrid\\.Registry\\.PermissionsVerifier\\.CollocationOptimization", true, "IceGrid.Registry.PermissionsVerifier.CollocationOptimized"),
new Property("IceGrid\\.Registry\\.PermissionsVerifier\\.CollocationOptimized", false, null),
new Property("IceGrid\\.Registry\\.PermissionsVerifier", false, null),
+ new Property("IceGrid\\.Registry\\.Publish\\.[^\\s]+", false, null),
new Property("IceGrid\\.Registry\\.ReplicaName", false, null),
new Property("IceGrid\\.Registry\\.ReplicaSessionTimeout", false, null),
+ new Property("IceGrid\\.Registry\\.ReplicatedPublishEndpoints", false, null),
+ new Property("IceGrid\\.Registry\\.ReplicatedTopicManagerEndpoints", false, null),
+ new Property("IceGrid\\.Registry\\.Send\\.Timeout", false, null),
new Property("IceGrid\\.Registry\\.Server\\.AdapterId", false, null),
new Property("IceGrid\\.Registry\\.Server\\.Endpoints", false, null),
new Property("IceGrid\\.Registry\\.Server\\.Locator", false, null),
@@ -327,15 +345,22 @@ public final class PropertyNames
new Property("IceGrid\\.Registry\\.SSLPermissionsVerifier\\.CollocationOptimization", true, "IceGrid.Registry.SSLPermissionsVerifier.CollocationOptimized"),
new Property("IceGrid\\.Registry\\.SSLPermissionsVerifier\\.CollocationOptimized", false, null),
new Property("IceGrid\\.Registry\\.SSLPermissionsVerifier", false, null),
+ new Property("IceGrid\\.Registry\\.TopicManager\\.[^\\s]+", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Application", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Adapter", false, null),
+ new Property("IceGrid\\.Registry\\.Trace\\.Election", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Locator", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Node", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Object", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Patch", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Replica", false, null),
+ new Property("IceGrid\\.Registry\\.Trace\\.Replication", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Server", false, null),
new Property("IceGrid\\.Registry\\.Trace\\.Session", false, null),
+ new Property("IceGrid\\.Registry\\.Trace\\.Subscriber", false, null),
+ new Property("IceGrid\\.Registry\\.Trace\\.Topic", false, null),
+ new Property("IceGrid\\.Registry\\.Trace\\.TopicManager", false, null),
+ new Property("IceGrid\\.Registry\\.Transient", false, null),
new Property("IceGrid\\.Registry\\.UserAccounts", false, null),
null
};
diff --git a/java/src/IceInternal/ValueWriter.java b/java/src/IceInternal/ValueWriter.java
index 63efa63640a..2c4ed5d3bd8 100644
--- a/java/src/IceInternal/ValueWriter.java
+++ b/java/src/IceInternal/ValueWriter.java
@@ -190,9 +190,28 @@ public final class ValueWriter
writeFields(name, obj, c.getSuperclass(), objectTable, out);
//
- // Write the declared fields of the given class.
+ // Write the declared fields of the given class. We prefer to use the declared
+ // fields because it includes protected fields that may have been defined using
+ // the Slice "protected" metadata. However, if a security manager prevents us
+ // from obtaining the declared fields, we will fall back to using the public ones.
//
- java.lang.reflect.Field[] fields = c.getDeclaredFields();
+ java.lang.reflect.Field[] fields = null;
+ try
+ {
+ fields = c.getDeclaredFields();
+ }
+ catch(java.lang.SecurityException ex)
+ {
+ try
+ {
+ fields = c.getFields();
+ }
+ catch(java.lang.SecurityException e)
+ {
+ return; // Nothing else we can do.
+ }
+ }
+ assert(fields != null);
for(int i = 0; i < fields.length; i++)
{
//