summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/src')
-rwxr-xr-xjava/src/IceGridGUI/Application/Communicator.java41
-rwxr-xr-xjava/src/IceGridGUI/Coordinator.java12
-rwxr-xr-xjava/src/IceGridGUI/LiveDeployment/AdapterEditor.java13
-rwxr-xr-xjava/src/IceGridGUI/LiveDeployment/Node.java27
-rwxr-xr-xjava/src/IceGridGUI/SessionKeeper.java1
5 files changed, 49 insertions, 45 deletions
diff --git a/java/src/IceGridGUI/Application/Communicator.java b/java/src/IceGridGUI/Application/Communicator.java
index 8edbc5a3b06..41bc8c402a1 100755
--- a/java/src/IceGridGUI/Application/Communicator.java
+++ b/java/src/IceGridGUI/Application/Communicator.java
@@ -669,12 +669,9 @@ abstract class Communicator extends TreeNode implements DescriptorHolder
else
{
//
- // serviceName = TemplateName<unsubstituted param 1, ....>
+ // Note: service names don't have to be unique
//
- serviceName = templateLabel(descriptor.template,
- templateDescriptor.parameters,
- descriptor.parameterValues,
- templateDescriptor.parameterDefaults);
+ serviceName = descriptor.template + "<>";
}
return new ServiceInstance(Communicator.this,
@@ -895,40 +892,6 @@ abstract class Communicator extends TreeNode implements DescriptorHolder
}
}
- static String templateLabel(String templateName,
- java.util.List parameters,
- final java.util.Map parameterValues,
- final java.util.Map parameterDefaults)
- {
- String result = templateName + "<";
-
- Utils.Stringifier stringifier = new Utils.Stringifier()
- {
- public String toString(Object obj)
- {
- String name = (String)obj;
- String val = (String)parameterValues.get(name);
- if(val == null)
- {
- val = (String)parameterDefaults.get(name);
- }
- if(val != null)
- {
- return val;
- }
- else
- {
- return "";
- }
- }
- };
-
- result += Utils.stringify(parameters, stringifier, ", ", null);
- result += ">";
- return result;
- }
-
-
//
// Children
//
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java
index 0f741e83abe..58e3ee65059 100755
--- a/java/src/IceGridGUI/Coordinator.java
+++ b/java/src/IceGridGUI/Coordinator.java
@@ -644,12 +644,16 @@ public class Coordinator
public void acquireExclusiveWriteAccess(Runnable runnable)
throws AccessDeniedException
{
+ System.err.println("acquireExclusiveWriteAccess");
+
if(_writeSerial == -1)
{
_mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try
{
+ System.err.println("startUpdate");
_writeSerial = _sessionKeeper.getSession().startUpdate();
+ System.err.println("write serial is now: " + _writeSerial);
}
finally
{
@@ -664,14 +668,20 @@ public class Coordinator
//
_writeAccessCount++;
+ System.err.println("write accsess count is now: " + _writeAccessCount);
+
if(runnable != null)
{
if(_writeSerial <= _latestSerial)
{
+ System.err.println("run update immediately");
runnable.run();
}
else
{
+ System.err.println("latest serial is: " + _latestSerial);
+ System.err.println("waiting ...");
+
_onExclusiveWrite = runnable;
_mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
//
@@ -717,6 +727,8 @@ public class Coordinator
assert serial == _latestSerial + 1;
_latestSerial = serial;
+ System.err.println("updateSerial _latestSerial is now " + _latestSerial);
+
if(_writeAccessCount > 0 &&
_writeSerial <= _latestSerial &&
_onExclusiveWrite != null)
diff --git a/java/src/IceGridGUI/LiveDeployment/AdapterEditor.java b/java/src/IceGridGUI/LiveDeployment/AdapterEditor.java
index 76d78b1af9a..9a02f20a22e 100755
--- a/java/src/IceGridGUI/LiveDeployment/AdapterEditor.java
+++ b/java/src/IceGridGUI/LiveDeployment/AdapterEditor.java
@@ -48,12 +48,20 @@ class AdapterEditor extends Editor
AdapterDescriptor descriptor = adapter.getDescriptor();
Utils.Resolver resolver = adapter.getResolver();
+ _id.setText(resolver.substitute(descriptor.id));
+
String currentEndpoints = adapter.getCurrentEndpoints();
- boolean active = (currentEndpoints != null);
if(currentEndpoints == null)
{
- _currentStatus.setText("Inactive");
+ if(_id.getText().length() == 0)
+ {
+ _currentStatus.setText("Direct adapter (does not register with IceGrid at runtime)");
+ }
+ else
+ {
+ _currentStatus.setText("Inactive");
+ }
_currentEndpoints.setText("");
}
else
@@ -63,7 +71,6 @@ class AdapterEditor extends Editor
}
_description.setText(resolver.substitute(descriptor.description));
- _id.setText(resolver.substitute(descriptor.id));
_replicaGroupId.setText(resolver.substitute(descriptor.replicaGroupId));
java.util.Map properties = adapter.getProperties();
diff --git a/java/src/IceGridGUI/LiveDeployment/Node.java b/java/src/IceGridGUI/LiveDeployment/Node.java
index aa652a659ee..7ec19533761 100755
--- a/java/src/IceGridGUI/LiveDeployment/Node.java
+++ b/java/src/IceGridGUI/LiveDeployment/Node.java
@@ -179,8 +179,8 @@ class Node extends ListTreeNode
update.variables,
update.serverInstances,
update.servers,
- update.loadFactor.value,
- update.description.value,
+ update.loadFactor == null ? "" : update.loadFactor.value,
+ update.description == null ? "" : update.description.value,
update.propertySets);
appDesc.nodes.put(_id, nodeDesc);
@@ -280,6 +280,29 @@ class Node extends ListTreeNode
java.util.Set serverTemplates)
{
ApplicationData data = (ApplicationData)_map.get(appDesc.name);
+
+ if(data == null)
+ {
+ if(update != null)
+ {
+ NodeDescriptor nodeDesc = new NodeDescriptor(
+ update.variables,
+ update.serverInstances,
+ update.servers,
+ update.loadFactor == null ? "" : update.loadFactor.value,
+ update.description == null ? "" : update.description.value,
+ update.propertySets);
+
+ appDesc.nodes.put(_id, nodeDesc);
+ add(appDesc, nodeDesc);
+ }
+ //
+ // Else, nothing to do.
+ //
+
+ return;
+ }
+
NodeDescriptor nodeDesc = data.descriptor;
java.util.Set freshServers = new java.util.HashSet();
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java
index 0388724293b..6a6f533fc22 100755
--- a/java/src/IceGridGUI/SessionKeeper.java
+++ b/java/src/IceGridGUI/SessionKeeper.java
@@ -1047,7 +1047,6 @@ class SessionKeeper
JOptionPane.ERROR_MESSAGE);
logout(false);
- relog(true);
}
void logout(boolean destroySession)