From 6134ac6df2bccdcd0dd213bd76285324182ae5f1 Mon Sep 17 00:00:00 2001 From: Joe George Date: Tue, 12 Dec 2023 11:33:25 -0500 Subject: [PATCH] Reapply "Removed Freeze DbEnvs from IceGrid and IceGridGUI (#1587)" This reverts commit d451c07f179ed0d730426e18d5c3ac30130eb9e7. --- config/PropertyNames.xml | 29 --- cpp/src/Ice/PropertyNames.cpp | 38 +--- cpp/src/Ice/PropertyNames.h | 3 +- cpp/src/IceGrid/DescriptorBuilder.cpp | 64 ------ cpp/src/IceGrid/DescriptorBuilder.h | 4 - cpp/src/IceGrid/DescriptorHelper.cpp | 51 ----- cpp/src/IceGrid/DescriptorHelper.h | 1 - cpp/src/IceGrid/DescriptorParser.cpp | 30 +-- cpp/src/IceGrid/Internal.ice | 4 +- cpp/src/IceGrid/NodeCache.cpp | 18 +- cpp/src/IceGrid/ServerI.cpp | 77 ------- cpp/test/IceGrid/deployer/AllTests.cpp | 1 - cpp/test/IceGrid/deployer/application.xml | 4 - cpp/test/IceGrid/noRestartUpdate/AllTests.cpp | 24 --- csharp/src/Ice/PropertyNames.cs | 34 +-- .../main/java/IceInternal/PropertyNames.java | 35 +--- .../main/java/com/zeroc/Ice/ObjectPrx.java | 4 - .../com/zeroc/IceInternal/PropertyNames.java | 35 +--- .../zeroc/IceGridGUI/Application/Adapter.java | 3 +- .../IceGridGUI/Application/Communicator.java | 74 +------ .../zeroc/IceGridGUI/Application/DbEnv.java | 196 ------------------ .../IceGridGUI/Application/DbEnvEditor.java | 194 ----------------- .../IceGridGUI/Application/PlainServer.java | 19 +- .../IceGridGUI/Application/PlainService.java | 9 +- .../Application/ServerTemplate.java | 13 +- .../Application/ServiceTemplate.java | 8 +- .../Application/ServiceTemplates.java | 1 - .../IceGridGUI/Application/TreeNode.java | 51 ++--- .../zeroc/IceGridGUI/ApplicationActions.java | 12 -- .../com/zeroc/IceGridGUI/Coordinator.java | 1 - .../IceGridGUI/LiveDeployment/DbEnv.java | 67 ------ .../LiveDeployment/DbEnvEditor.java | 88 -------- .../IceGridGUI/LiveDeployment/Server.java | 27 +-- .../IceGridGUI/LiveDeployment/Service.java | 21 +- js/src/Ice/PropertyNames.js | 2 +- slice/IceGrid/Descriptor.ice | 54 ----- 36 files changed, 46 insertions(+), 1250 deletions(-) delete mode 100644 java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnv.java delete mode 100644 java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnvEditor.java delete mode 100644 java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnv.java delete mode 100644 java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnvEditor.java diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml index 88b49c89f93..b50fa4dd31b 100644 --- a/config/PropertyNames.xml +++ b/config/PropertyNames.xml @@ -660,33 +660,4 @@ generated from the section label. -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 5abe37ade84..151bb97234d 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 11:59:14 2023 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 15:47:11 2023 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1350,40 +1350,6 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::Glacier2CryptPermissionsVerifierProps(Glacier2CryptPermissionsVerifierPropsData, sizeof(Glacier2CryptPermissionsVerifierPropsData)/sizeof(Glacier2CryptPermissionsVerifierPropsData[0])); -const IceInternal::Property FreezePropsData[] = -{ - IceInternal::Property("Freeze.DbEnv.*.CheckpointPeriod", false, 0), - IceInternal::Property("Freeze.DbEnv.*.DbHome", false, 0), - IceInternal::Property("Freeze.DbEnv.*.DbPrivate", false, 0), - IceInternal::Property("Freeze.DbEnv.*.DbRecoverFatal", false, 0), - IceInternal::Property("Freeze.DbEnv.*.EncodingVersion", false, 0), - IceInternal::Property("Freeze.DbEnv.*.LockFile", false, 0), - IceInternal::Property("Freeze.DbEnv.*.OldLogsAutoDelete", false, 0), - IceInternal::Property("Freeze.DbEnv.*.PeriodicCheckpointMinSize", false, 0), - IceInternal::Property("Freeze.Evictor.*.BtreeMinKey", false, 0), - IceInternal::Property("Freeze.Evictor.*.Checksum", false, 0), - IceInternal::Property("Freeze.Evictor.*.MaxTxSize", false, 0), - IceInternal::Property("Freeze.Evictor.*.PageSize", false, 0), - IceInternal::Property("Freeze.Evictor.*.PopulateEmptyIndices", false, 0), - IceInternal::Property("Freeze.Evictor.*.RollbackOnUserException", false, 0), - IceInternal::Property("Freeze.Evictor.*.SavePeriod", false, 0), - IceInternal::Property("Freeze.Evictor.*.SaveSizeTrigger", false, 0), - IceInternal::Property("Freeze.Evictor.*.StreamTimeout", false, 0), - IceInternal::Property("Freeze.Map.*.BtreeMinKey", false, 0), - IceInternal::Property("Freeze.Map.*.Checksum", false, 0), - IceInternal::Property("Freeze.Map.*.PageSize", false, 0), - IceInternal::Property("Freeze.Trace.DbEnv", false, 0), - IceInternal::Property("Freeze.Trace.Evictor", false, 0), - IceInternal::Property("Freeze.Trace.Map", false, 0), - IceInternal::Property("Freeze.Trace.Transaction", false, 0), - IceInternal::Property("Freeze.Warn.Deadlocks", false, 0), - IceInternal::Property("Freeze.Warn.Rollback", false, 0), -}; - -const IceInternal::PropertyArray - IceInternal::PropertyNames::FreezeProps(FreezePropsData, - sizeof(FreezePropsData)/sizeof(FreezePropsData[0])); - const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] = { IceProps, @@ -1402,7 +1368,6 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] = IceBTProps, Glacier2Props, Glacier2CryptPermissionsVerifierProps, - FreezeProps, IceInternal::PropertyArray(0,0) }; @@ -1424,6 +1389,5 @@ const char* IceInternal::PropertyNames::clPropNames[] = "IceBT", "Glacier2", "Glacier2CryptPermissionsVerifier", - "Freeze", 0 }; diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 916a8f45203..67c284290f6 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 11:59:14 2023 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 15:47:11 2023 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -67,7 +67,6 @@ class PropertyNames static const PropertyArray IceBTProps; static const PropertyArray Glacier2Props; static const PropertyArray Glacier2CryptPermissionsVerifierProps; - static const PropertyArray FreezeProps; static const PropertyArray validProps[]; static const char * clPropNames[]; diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp index c6e2cbd4134..8d94d61baea 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.cpp +++ b/cpp/src/IceGrid/DescriptorBuilder.cpp @@ -713,64 +713,6 @@ CommunicatorDescriptorBuilder::addAllocatable(const XmlAttributesHelper& attrs) _descriptor->adapters.back().allocatables.push_back(object); } -void -CommunicatorDescriptorBuilder::addDbEnv(const XmlAttributesHelper& attrs) -{ - DbEnvDescriptor desc; - desc.name = attrs("name"); - - DbEnvDescriptorSeq::iterator p; - for(p = _descriptor->dbEnvs.begin(); p != _descriptor->dbEnvs.end(); ++p) - { - // - // We are re-opening the dbenv element to define more properties. - // - if(p->name == desc.name) - { - break; - } - } - - if(p != _descriptor->dbEnvs.end()) - { - // - // Remove the previously defined dbenv, we'll add it back again when - // the dbenv element end tag is reached. - // - desc = *p; - _descriptor->dbEnvs.erase(p); - } - - if(desc.dbHome.empty()) - { - desc.dbHome = attrs("home", ""); - } - - _descriptor->dbEnvs.push_back(desc); -} - -void -CommunicatorDescriptorBuilder::addDbEnvProperty(const XmlAttributesHelper& attrs) -{ - if(!_descriptor->dbEnvs.back().dbHome.empty()) - { - throw invalid_argument("can't add property to the database environment:\n" - "properties are only allowed if the database\n" - "environment home directory is managed by the node"); - } - - PropertyDescriptor prop; - prop.name = attrs("name"); - prop.value = attrs("value", ""); - _descriptor->dbEnvs.back().properties.push_back(prop); -} - -void -CommunicatorDescriptorBuilder::setDbEnvDescription(const string& value) -{ - _descriptor->dbEnvs.back().description = value; -} - void CommunicatorDescriptorBuilder::addLog(const XmlAttributesHelper& attrs) { @@ -923,12 +865,6 @@ IceBoxDescriptorBuilder::addAdapter(const XmlAttributesHelper& /*attrs*/) throw invalid_argument(" element can't be a child of an element"); } -void -IceBoxDescriptorBuilder::addDbEnv(const XmlAttributesHelper& /*attrs*/) -{ - throw invalid_argument(" element can't be a child of an element"); -} - void IceBoxDescriptorBuilder::addServiceInstance(const ServiceInstanceDescriptor& desc) { diff --git a/cpp/src/IceGrid/DescriptorBuilder.h b/cpp/src/IceGrid/DescriptorBuilder.h index dfc1fa705db..bc85441beaf 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.h +++ b/cpp/src/IceGrid/DescriptorBuilder.h @@ -217,9 +217,6 @@ class CommunicatorDescriptorBuilder : public DescriptorBuilder virtual void setAdapterDescription(const std::string&); virtual void addObject(const XmlAttributesHelper&); virtual void addAllocatable(const XmlAttributesHelper&); - virtual void addDbEnv(const XmlAttributesHelper&); - virtual void addDbEnvProperty(const XmlAttributesHelper&); - virtual void setDbEnvDescription(const std::string&); virtual void addLog(const XmlAttributesHelper&); virtual PropertySetDescriptorBuilder* createPropertySet() const; @@ -289,7 +286,6 @@ class IceBoxDescriptorBuilder : public ServerDescriptorBuilder virtual ServiceInstanceDescriptorBuilder* createServiceInstance(const XmlAttributesHelper&); virtual void addAdapter(const XmlAttributesHelper&); - virtual void addDbEnv(const XmlAttributesHelper&); virtual void addServiceInstance(const ServiceInstanceDescriptor&); virtual void addService(const ServiceDescriptorPtr&); diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index b4a957f9ccc..cb85f7a00da 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -1091,12 +1091,6 @@ CommunicatorHelper::operator==(const CommunicatorHelper& helper) const } } - if(set(_desc->dbEnvs.begin(), _desc->dbEnvs.end()) != - set(helper._desc->dbEnvs.begin(), helper._desc->dbEnvs.end())) - { - return false; - } - if(_desc->logs != helper._desc->logs) { return false; @@ -1211,16 +1205,6 @@ CommunicatorHelper::instantiateImpl(const CommunicatorDescriptorPtr& instance, c } } - for(DbEnvDescriptorSeq::const_iterator s = _desc->dbEnvs.begin(); s != _desc->dbEnvs.end(); ++s) - { - DbEnvDescriptor dbEnv; - dbEnv.name = resolve(s->name, "database environment name", false); - dbEnv.description = resolve(s->description, "database environment description"); - dbEnv.dbHome = resolve(s->dbHome, "database environment home directory"); - dbEnv.properties = resolve(s->properties, "database environment property"); - instance->dbEnvs.push_back(dbEnv); - } - for(Ice::StringSeq::const_iterator l = _desc->logs.begin(); l != _desc->logs.end(); ++l) { instance->logs.push_back(resolve(*l, "log path", false)); @@ -1238,12 +1222,6 @@ CommunicatorHelper::print(const Ice::CommunicatorPtr& communicator, Output& out) out << eb; } set hiddenProperties; - { - for(DbEnvDescriptorSeq::const_iterator p = _desc->dbEnvs.begin(); p != _desc->dbEnvs.end(); ++p) - { - printDbEnv(out, *p); - } - } { for(AdapterDescriptorSeq::const_iterator p = _desc->adapters.begin(); p != _desc->adapters.end(); ++p) { @@ -1279,35 +1257,6 @@ CommunicatorHelper::print(const Ice::CommunicatorPtr& communicator, Output& out) } } -void -CommunicatorHelper::printDbEnv(Output& out, const DbEnvDescriptor& dbEnv) const -{ - out << nl << "database environment `" << dbEnv.name << "'"; - if(!dbEnv.dbHome.empty() || !dbEnv.properties.empty() || !dbEnv.description.empty()) - { - out << sb; - if(!dbEnv.dbHome.empty()) - { - out << nl << "home = `" << dbEnv.dbHome << "'"; - } - if(!dbEnv.description.empty()) - { - out << nl << "description = `" << dbEnv.description << "'"; - } - if(!dbEnv.properties.empty()) - { - out << nl << "properties"; - out << sb; - for(PropertyDescriptorSeq::const_iterator p = dbEnv.properties.begin(); p != dbEnv.properties.end(); ++p) - { - out << nl << p->name << " = `" << p->value << "'"; - } - out << eb; - } - out << eb; - } -} - void CommunicatorHelper::printObjectAdapter(const Ice::CommunicatorPtr& communicator, Output& out, diff --git a/cpp/src/IceGrid/DescriptorHelper.h b/cpp/src/IceGrid/DescriptorHelper.h index a358870c98c..66a657a9a5d 100644 --- a/cpp/src/IceGrid/DescriptorHelper.h +++ b/cpp/src/IceGrid/DescriptorHelper.h @@ -97,7 +97,6 @@ class CommunicatorHelper protected: - void printDbEnv(IceUtilInternal::Output&, const DbEnvDescriptor&) const; void printObjectAdapter(const Ice::CommunicatorPtr&, IceUtilInternal::Output&, const AdapterDescriptor&) const; void printPropertySet(IceUtilInternal::Output&, const PropertySetDescriptor&) const; virtual std::string getProperty(const std::string&) const; diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp index e7467acda1a..2db3506aaee 100644 --- a/cpp/src/IceGrid/DescriptorParser.cpp +++ b/cpp/src/IceGrid/DescriptorParser.cpp @@ -69,7 +69,6 @@ class DescriptorHandler : public IceXML::Handler bool _isTopLevel; bool _inAdapter; bool _inReplicaGroup; - bool _inDbEnv; bool _inDistrib; }; @@ -82,8 +81,7 @@ DescriptorHandler::DescriptorHandler(const string& filename, const Ice::Communic _currentCommunicator(0), _isTopLevel(true), _inAdapter(false), - _inReplicaGroup(false), - _inDbEnv(false) + _inReplicaGroup(false) { } @@ -425,15 +423,6 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at } _inDistrib = true; } - else if(name == "dbenv") - { - if(!_currentCommunicator) - { - error("the element can only be a child of a or element"); - } - _currentCommunicator->addDbEnv(attributes); - _inDbEnv = true; - } else if(name == "log") { if(!_currentCommunicator) @@ -442,14 +431,6 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at } _currentCommunicator->addLog(attributes); } - else if(name == "dbproperty") - { - if(!_inDbEnv) - { - error("the element can only be a child of a element"); - } - _currentCommunicator->addDbEnvProperty(attributes); - } else if(name == "description" || name == "option" || name == "env" || name == "directory") { // @@ -610,11 +591,6 @@ DescriptorHandler::endElement(const string& name, int line, int column) { _currentApplication->setReplicaGroupDescription(elementValue()); } - else if(_inDbEnv) - { - assert(_currentCommunicator); - _currentCommunicator->setDbEnvDescription(elementValue()); - } else if(_currentCommunicator) { _currentCommunicator->setDescription(elementValue()); @@ -672,10 +648,6 @@ DescriptorHandler::endElement(const string& name, int line, int column) _currentApplication->finishReplicaGroup(); _inReplicaGroup = false; } - else if(name == "dbenv") - { - _inDbEnv = false; - } else if(name == "distrib") { _inDistrib = false; diff --git a/cpp/src/IceGrid/Internal.ice b/cpp/src/IceGrid/Internal.ice index efa026034d3..17bd88d7fa1 100644 --- a/cpp/src/IceGrid/Internal.ice +++ b/cpp/src/IceGrid/Internal.ice @@ -22,6 +22,8 @@ local exception SynchronizationException { } +// This class is no longer used. We keep it only for interop with IceGrid 3.7. +// class InternalDbEnvDescriptor { /** The name of the database environment. */ @@ -109,7 +111,7 @@ class InternalServerDescriptor /** The indirect object adapters. */ InternalAdapterDescriptorSeq adapters; - /** The database environments. */ + // Not used, always empty. Kept only for interop with IceGrid 3.7. InternalDbEnvDescriptorSeq dbEnvs; /** The configuration files of the server. */ diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 5b7c22cb583..7aec0f146ac 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -98,21 +98,6 @@ struct ToInternalServerDescriptor _desc->logs.insert(_desc->logs.end(), desc->logs.begin(), desc->logs.end()); - const string dbsPath = _node->dataDir + "/servers/" + _desc->id + "/dbs/"; - for(DbEnvDescriptorSeq::const_iterator p = desc->dbEnvs.begin(); p != desc->dbEnvs.end(); ++p) - { - props.push_back(createProperty("# Database environment " + p->name)); - if(p->dbHome.empty()) - { - _desc->dbEnvs.push_back(new InternalDbEnvDescriptor(p->name, p->properties)); - props.push_back(createProperty("Freeze.DbEnv." + p->name + ".DbHome", dbsPath + p->name)); - } - else - { - props.push_back(createProperty("Freeze.DbEnv." + p->name + ".DbHome", p->dbHome)); - } - } - // // Copy the communicator descriptor properties. // @@ -935,7 +920,6 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const // server->logs: assigned for each communicator (see below) // server->adapters: assigned for each communicator (see below) - // server->dbEnvs: assigned for each communicator (see below) // server->properties: assigned for each communicator (see below) // @@ -1047,7 +1031,7 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const // // Now, for each communicator of the descriptor, add the necessary - // logs, adapters, db envs and properties to the internal server + // logs, adapters and properties to the internal server // descriptor. // forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo(), iceVersion))(info.descriptor); diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index aa65a254a69..3294d6ae178 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -158,22 +158,6 @@ descriptorUpdated(const InternalServerDescriptorPtr& lhs, const InternalServerDe } } - if(lhs->dbEnvs.size() != rhs->dbEnvs.size()) - { - return true; - } - else - { - InternalDbEnvDescriptorSeq::const_iterator q = rhs->dbEnvs.begin(); - for(InternalDbEnvDescriptorSeq::const_iterator p = lhs->dbEnvs.begin(); p != lhs->dbEnvs.end(); ++p, ++q) - { - if((*p)->name != (*q)->name || (*p)->properties != (*q)->properties) - { - return true; - } - } - } - if(!noProps && lhs->properties != rhs->properties) { return true; @@ -2375,67 +2359,6 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) } } - // - // Update the database environments if necessary and remove the - // old ones. - // - { - Ice::StringSeq knownDbEnvs; - for(InternalDbEnvDescriptorSeq::const_iterator q = _desc->dbEnvs.begin(); q != _desc->dbEnvs.end(); ++q) - { - knownDbEnvs.push_back((*q)->name); - - string dbEnvHome = _serverDir + "/dbs/" + (*q)->name; - IcePatch2Internal::createDirectory(dbEnvHome); - - if(!(*q)->properties.empty()) - { - string file = dbEnvHome + "/DB_CONFIG"; - - ofstream configfile(IceUtilInternal::streamFilename(file).c_str()); // file is a UTF-8 string - if(!configfile.good()) - { - throw runtime_error("couldn't create configuration file `" + file + "'"); - } - - for(PropertyDescriptorSeq::const_iterator p = (*q)->properties.begin(); - p != (*q)->properties.end(); ++p) - { - if(!p->name.empty()) - { - configfile << p->name; - if(!p->value.empty()) - { - configfile << " " << p->value; - } - configfile << endl; - } - } - configfile.close(); - } - } - sort(knownDbEnvs.begin(), knownDbEnvs.end()); - - // - // Remove old database environments. - // - Ice::StringSeq dbEnvs = IcePatch2Internal::readDirectory(_serverDir + "/dbs"); - Ice::StringSeq toDel; - set_difference(dbEnvs.begin(), dbEnvs.end(), knownDbEnvs.begin(), knownDbEnvs.end(), back_inserter(toDel)); - for(Ice::StringSeq::const_iterator p = toDel.begin(); p != toDel.end(); ++p) - { - try - { - IcePatch2Internal::removeRecursive(_serverDir + "/dbs/" + *p); - } - catch(const exception& ex) - { - Ice::Warning out(_node->getTraceLevels()->logger); - out << "couldn't remove directory `" << _serverDir << "/dbs/" << *p << "':\n" << ex.what(); - } - } - } - #ifndef _WIN32 chownRecursive(_serverDir, _uid, _gid); #endif diff --git a/cpp/test/IceGrid/deployer/AllTests.cpp b/cpp/test/IceGrid/deployer/AllTests.cpp index 6e0ead4e8f4..d6885bd6e2d 100644 --- a/cpp/test/IceGrid/deployer/AllTests.cpp +++ b/cpp/test/IceGrid/deployer/AllTests.cpp @@ -653,7 +653,6 @@ allTests(Test::TestHelper* helper) test(info.descriptor->id == "SimpleServer"); test(info.descriptor->description == "SERVER NodeVar"); test(info.descriptor->adapters[0].description == "ADAPTER NodeVar"); - test(info.descriptor->dbEnvs[0].description == "DBENV NodeVar"); cout << "ok" << endl; cout << "testing property sets..." << flush; diff --git a/cpp/test/IceGrid/deployer/application.xml b/cpp/test/IceGrid/deployer/application.xml index 4010ca984e3..a89105d08c6 100644 --- a/cpp/test/IceGrid/deployer/application.xml +++ b/cpp/test/IceGrid/deployer/application.xml @@ -117,10 +117,6 @@ - - - DBENV ${NodeVar} - MY_ENV_VARIABLE=12 MY_UNIX_COMPOSED_VARIABLE=BAR;$MY_FOO diff --git a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp index c2833be8d75..09c854baf1d 100644 --- a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp @@ -494,30 +494,6 @@ allTests(Test::TestHelper* helper) test(false); } test(serverPid == admin->getServerPid("Server")); - - try - { - info = admin->getServerInfo("Server"); - test(info.descriptor); - DbEnvDescriptor dbEnv = DbEnvDescriptor(); - dbEnv.name = "foo"; - info.descriptor->dbEnvs.push_back(dbEnv); - update = empty; - update.nodes[0].servers.push_back(info.descriptor); - admin->updateApplicationWithoutRestart(update); - test(false); - } - catch(const DeploymentException&) - { - // Can't update server dbenvs without restart - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - test(false); - } - test(serverPid == admin->getServerPid("Server")); - cout << "ok" << endl; cout << "testing icebox server add... " << flush; diff --git a/csharp/src/Ice/PropertyNames.cs b/csharp/src/Ice/PropertyNames.cs index d7ebc375139..a4e77fd5355 100644 --- a/csharp/src/Ice/PropertyNames.cs +++ b/csharp/src/Ice/PropertyNames.cs @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 11:59:14 2023 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 15:47:11 2023 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1288,36 +1288,6 @@ public sealed class PropertyNames new Property(@"^Glacier2CryptPermissionsVerifier\.[^\s]+\.AdminPermissionsVerifier$", false, null), }; - public static Property[] FreezeProps = - { - new Property(@"^Freeze\.DbEnv\.[^\s]+\.CheckpointPeriod$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.DbHome$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.DbPrivate$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.DbRecoverFatal$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.EncodingVersion$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.LockFile$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.OldLogsAutoDelete$", false, null), - new Property(@"^Freeze\.DbEnv\.[^\s]+\.PeriodicCheckpointMinSize$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.BtreeMinKey$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.Checksum$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.MaxTxSize$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.PageSize$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.PopulateEmptyIndices$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.RollbackOnUserException$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.SavePeriod$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.SaveSizeTrigger$", false, null), - new Property(@"^Freeze\.Evictor\.[^\s]+\.StreamTimeout$", false, null), - new Property(@"^Freeze\.Map\.[^\s]+\.BtreeMinKey$", false, null), - new Property(@"^Freeze\.Map\.[^\s]+\.Checksum$", false, null), - new Property(@"^Freeze\.Map\.[^\s]+\.PageSize$", false, null), - new Property(@"^Freeze\.Trace\.DbEnv$", false, null), - new Property(@"^Freeze\.Trace\.Evictor$", false, null), - new Property(@"^Freeze\.Trace\.Map$", false, null), - new Property(@"^Freeze\.Trace\.Transaction$", false, null), - new Property(@"^Freeze\.Warn\.Deadlocks$", false, null), - new Property(@"^Freeze\.Warn\.Rollback$", false, null), - }; - public static Property[][] validProps = { IceProps, @@ -1336,7 +1306,6 @@ public sealed class PropertyNames IceBTProps, Glacier2Props, Glacier2CryptPermissionsVerifierProps, - FreezeProps, }; public static string[] clPropNames = @@ -1357,7 +1326,6 @@ public sealed class PropertyNames "IceBT", "Glacier2", "Glacier2CryptPermissionsVerifier", - "Freeze", }; } } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/PropertyNames.java b/java-compat/src/Ice/src/main/java/IceInternal/PropertyNames.java index e4c05960a60..0b4662bb82b 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/PropertyNames.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/PropertyNames.java @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 11:59:14 2023 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 15:47:11 2023 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1304,37 +1304,6 @@ public final class PropertyNames null }; - public static final Property FreezeProps[] = - { - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.CheckpointPeriod", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.DbHome", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.DbPrivate", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.DbRecoverFatal", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.EncodingVersion", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.LockFile", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.OldLogsAutoDelete", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.PeriodicCheckpointMinSize", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.BtreeMinKey", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.Checksum", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.MaxTxSize", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.PageSize", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.PopulateEmptyIndices", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.RollbackOnUserException", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.SavePeriod", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.SaveSizeTrigger", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.StreamTimeout", false, null), - new Property("Freeze\\.Map\\.[^\\s]+\\.BtreeMinKey", false, null), - new Property("Freeze\\.Map\\.[^\\s]+\\.Checksum", false, null), - new Property("Freeze\\.Map\\.[^\\s]+\\.PageSize", false, null), - new Property("Freeze\\.Trace\\.DbEnv", false, null), - new Property("Freeze\\.Trace\\.Evictor", false, null), - new Property("Freeze\\.Trace\\.Map", false, null), - new Property("Freeze\\.Trace\\.Transaction", false, null), - new Property("Freeze\\.Warn\\.Deadlocks", false, null), - new Property("Freeze\\.Warn\\.Rollback", false, null), - null - }; - public static final Property[] validProps[] = { IceProps, @@ -1353,7 +1322,6 @@ public final class PropertyNames IceBTProps, Glacier2Props, Glacier2CryptPermissionsVerifierProps, - FreezeProps, null }; @@ -1375,7 +1343,6 @@ public final class PropertyNames "IceBT", "Glacier2", "Glacier2CryptPermissionsVerifier", - "Freeze", null }; } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java index f95213fa2d3..890654a8316 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java @@ -654,8 +654,6 @@ default ObjectPrx ice_connectionId(String connectionId) * it first attempts to create a connection. * * @return The {@link Connection} for this proxy. - * @throws CollocationOptimizationException If the proxy uses collocation optimization and denotes a - * collocated object. * * @see Connection **/ @@ -684,8 +682,6 @@ default java.util.concurrent.Executor ice_executor() * * @return The cached {@link Connection} for this proxy (null if the proxy does not have * an established connection). - * @throws CollocationOptimizationException If the proxy uses collocation optimization and denotes a - * collocated object. * * @see Connection **/ diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/PropertyNames.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/PropertyNames.java index dd1b5d4521a..bb5357e20cf 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/PropertyNames.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/PropertyNames.java @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 11:59:14 2023 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 15:47:11 2023 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1304,37 +1304,6 @@ public final class PropertyNames null }; - public static final Property FreezeProps[] = - { - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.CheckpointPeriod", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.DbHome", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.DbPrivate", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.DbRecoverFatal", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.EncodingVersion", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.LockFile", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.OldLogsAutoDelete", false, null), - new Property("Freeze\\.DbEnv\\.[^\\s]+\\.PeriodicCheckpointMinSize", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.BtreeMinKey", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.Checksum", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.MaxTxSize", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.PageSize", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.PopulateEmptyIndices", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.RollbackOnUserException", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.SavePeriod", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.SaveSizeTrigger", false, null), - new Property("Freeze\\.Evictor\\.[^\\s]+\\.StreamTimeout", false, null), - new Property("Freeze\\.Map\\.[^\\s]+\\.BtreeMinKey", false, null), - new Property("Freeze\\.Map\\.[^\\s]+\\.Checksum", false, null), - new Property("Freeze\\.Map\\.[^\\s]+\\.PageSize", false, null), - new Property("Freeze\\.Trace\\.DbEnv", false, null), - new Property("Freeze\\.Trace\\.Evictor", false, null), - new Property("Freeze\\.Trace\\.Map", false, null), - new Property("Freeze\\.Trace\\.Transaction", false, null), - new Property("Freeze\\.Warn\\.Deadlocks", false, null), - new Property("Freeze\\.Warn\\.Rollback", false, null), - null - }; - public static final Property[] validProps[] = { IceProps, @@ -1353,7 +1322,6 @@ public final class PropertyNames IceBTProps, Glacier2Props, Glacier2CryptPermissionsVerifierProps, - FreezeProps, null }; @@ -1375,7 +1343,6 @@ public final class PropertyNames "IceBT", "Glacier2", "Glacier2CryptPermissionsVerifier", - "Freeze", null }; } diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Adapter.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Adapter.java index ecd1e5ebe13..9c497f496f3 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Adapter.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Adapter.java @@ -45,8 +45,7 @@ public boolean[] getAvailableActions() actions[COPY] = !_ephemeral; Object clipboard = getCoordinator().getClipboard(); - actions[PASTE] = clipboard != null && (clipboard instanceof AdapterCopy || - clipboard instanceof DbEnvDescriptor); + actions[PASTE] = clipboard != null && (clipboard instanceof AdapterCopy); actions[DELETE] = true; diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Communicator.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Communicator.java index 9e7759846b2..5e9b40d7b02 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Communicator.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/Communicator.java @@ -148,12 +148,6 @@ public void newAdapter() _adapters.newChild(); } - @Override - public void newDbEnv() - { - _dbEnvs.newChild(); - } - @Override public void newService() { @@ -177,11 +171,6 @@ public void paste() _adapters.newAdapter(Adapter.copyDescriptor(copy.descriptor), new java.util.HashMap<>(copy.parentProperties)); } - else if(descriptor instanceof DbEnvDescriptor) - { - DbEnvDescriptor d = (DbEnvDescriptor)descriptor; - _dbEnvs.newDbEnv(DbEnv.copyDescriptor(d)); - } else if(descriptor instanceof ServiceInstanceDescriptor && _services.initialized()) { ServiceInstanceDescriptor d = (ServiceInstanceDescriptor)descriptor; @@ -214,13 +203,9 @@ TreeNode findChildLike(TreeNode other) { return _adapters.findChildById(other.getId()); } - else if(other instanceof DbEnv) - { - return _dbEnvs.findChildById(other.getId()); - } else if(other instanceof Service) { - return _dbEnvs.findChildById(other.getId()); + return _services.findChildById(other.getId()); } else { @@ -448,7 +433,7 @@ void tryUpdate(TreeNode child) throws UpdateFailedException { // - // Child is an Adapter or DbEnv + // Child is an Adapter // assert _sorted; @@ -579,52 +564,6 @@ private void newAdapter(AdapterDescriptor descriptor, java.util.Map - { - DbEnvs() - { - super(true); - } - - @Override - void newChild() - { - DbEnvDescriptor descriptor = new DbEnvDescriptor( - "NewDbEnv", - "", - "", - new java.util.LinkedList()); - - newDbEnv(descriptor); - } - - //TreeNode createChild(Object descriptor) - @Override - TreeNode createChild(DbEnvDescriptor descriptor) - { - //DbEnvDescriptor dd = (DbEnvDescriptor)descriptor; - //String name = Utils.substitute(dd.name, getResolver()); - //return new DbEnv(Communicator.this, name, dd, false); - String name = Utils.substitute(descriptor.name, getResolver()); - return new DbEnv(Communicator.this, name, descriptor, false); - } - - private void newDbEnv(DbEnvDescriptor descriptor) - { - descriptor.name = makeNewChildId(descriptor.name); - DbEnv dbEnv = new DbEnv(Communicator.this, descriptor.name, descriptor, true); - try - { - addChild(dbEnv, true); - } - catch(UpdateFailedException e) - { - assert false; - } - getRoot().setSelectedNode(dbEnv); - } - } - class Services extends ChildList { Services() @@ -639,7 +578,6 @@ void newChild() new ServiceDescriptor(new java.util.LinkedList(), new PropertySetDescriptor( new String[0], new java.util.LinkedList()), - new java.util.LinkedList(), new String[0], "", "NewService", @@ -866,11 +804,6 @@ Adapters getAdapters() return _adapters; } - DbEnvs getDbEnvs() - { - return _dbEnvs; - } - Services getServices() { return _services; @@ -997,7 +930,6 @@ java.util.Map propertiesMap() // Children // protected Adapters _adapters = new Adapters(); - protected DbEnvs _dbEnvs = new DbEnvs(); protected Services _services = new Services(); - protected ChildList[] _childListArray = new ChildList[]{_adapters, _dbEnvs, _services}; + protected ChildList[] _childListArray = new ChildList[]{_adapters, _services}; } diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnv.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnv.java deleted file mode 100644 index 0a324f37fcb..00000000000 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnv.java +++ /dev/null @@ -1,196 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -package com.zeroc.IceGridGUI.Application; - -import java.awt.Component; -import javax.swing.JTree; -import javax.swing.tree.DefaultTreeCellRenderer; - -import com.zeroc.IceGrid.*; -import com.zeroc.IceGridGUI.*; - -class DbEnv extends TreeNode implements DescriptorHolder -{ - static public DbEnvDescriptor copyDescriptor(DbEnvDescriptor d) - { - return d.clone(); - } - - static public java.util.List copyDescriptors(java.util.List list) - { - java.util.List copy = new java.util.LinkedList<>(); - for(DbEnvDescriptor p : list) - { - copy.add(copyDescriptor(p)); - } - return copy; - } - - @Override - public Component getTreeCellRendererComponent( - JTree tree, - Object value, - boolean sel, - boolean expanded, - boolean leaf, - int row, - boolean hasFocus) - { - if(_cellRenderer == null) - { - _cellRenderer = new DefaultTreeCellRenderer(); - _cellRenderer.setLeafIcon(Utils.getIcon("/icons/16x16/database.png")); - } - return _cellRenderer.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); - } - - // - // Actions - // - @Override - public boolean[] getAvailableActions() - { - boolean[] actions = new boolean[ACTION_COUNT]; - actions[COPY] = !_ephemeral; - - Object clipboard = getCoordinator().getClipboard(); - actions[PASTE] = clipboard != null && - (clipboard instanceof Adapter.AdapterCopy - || clipboard instanceof DbEnvDescriptor); - actions[DELETE] = true; - - if(!_ephemeral) - { - boolean[] parentActions = ((TreeNode)_parent).getAvailableActions(); - actions[SHOW_VARS] = parentActions[SHOW_VARS]; - actions[SUBSTITUTE_VARS] = parentActions[SUBSTITUTE_VARS]; - } - return actions; - } - - @Override - public void copy() - { - getCoordinator().setClipboard(copyDescriptor(_descriptor)); - getCoordinator().getActionsForMenu().get(PASTE).setEnabled(true); - } - - @Override - public void paste() - { - ((TreeNode)_parent).paste(); - } - - @Override - public Editor getEditor() - { - if(_editor == null) - { - _editor = (DbEnvEditor)getRoot().getEditor(DbEnvEditor.class, this); - } - _editor.show(this); - return _editor; - } - - @Override - protected Editor createEditor() - { - return new DbEnvEditor(); - } - - @Override - public Object getDescriptor() - { - return _descriptor; - } - - public Object copyDescriptor() - { - return copyDescriptor(_descriptor); - } - - @Override - public Object saveDescriptor() - { - return copyDescriptor(_descriptor); - } - - @Override - public void restoreDescriptor(Object savedDescriptor) - { - DbEnvDescriptor clone = (DbEnvDescriptor)savedDescriptor; - _descriptor.name = clone.name; - _descriptor.dbHome = clone.dbHome; - _descriptor.description = clone.description; - _descriptor.properties = clone.properties; - } - - @Override - public void destroy() - { - ((Communicator)_parent).getDbEnvs().destroyChild(this); - } - - @Override - public boolean isEphemeral() - { - return _ephemeral; - } - - DbEnv(Communicator parent, String dbEnvName, DbEnvDescriptor descriptor, boolean ephemeral) - { - super(parent, dbEnvName); - _descriptor = descriptor; - _ephemeral = ephemeral; - } - - static void writeDbProperties(XMLWriter writer, java.util.List properties) - throws java.io.IOException - { - for(PropertyDescriptor p : properties) - { - java.util.List attributes = new java.util.LinkedList<>(); - attributes.add(createAttribute("name", p.name)); - attributes.add(createAttribute("value", p.value)); - writer.writeElement("dbproperty", attributes); - } - } - - @Override - void write(XMLWriter writer) - throws java.io.IOException - { - if(!_ephemeral) - { - java.util.List attributes = new java.util.LinkedList<>(); - attributes.add(createAttribute("name", _descriptor.name)); - if(_descriptor.dbHome.length() > 0) - { - attributes.add(createAttribute("home", _descriptor.dbHome)); - } - - if(_descriptor.description.length() == 0 && _descriptor.properties.isEmpty()) - { - writer.writeElement("dbenv", attributes); - } - else - { - writer.writeStartTag("dbenv", attributes); - if(_descriptor.description.length() > 0) - { - writer.writeElement("description", _descriptor.description); - } - writeDbProperties(writer, _descriptor.properties); - writer.writeEndTag("dbenv"); - } - } - } - - private DbEnvDescriptor _descriptor; - private final boolean _ephemeral; - private DbEnvEditor _editor; - - static private DefaultTreeCellRenderer _cellRenderer; -} diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnvEditor.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnvEditor.java deleted file mode 100644 index 21f2248987e..00000000000 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/DbEnvEditor.java +++ /dev/null @@ -1,194 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -package com.zeroc.IceGridGUI.Application; - -import javax.swing.JComboBox; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.JTextField; - -import com.jgoodies.forms.builder.DefaultFormBuilder; -import com.jgoodies.forms.layout.CellConstraints; - -import com.zeroc.IceGrid.*; -import com.zeroc.IceGridGUI.*; - -class DbEnvEditor extends CommunicatorChildEditor -{ - DbEnvEditor() - { - _name.getDocument().addDocumentListener(_updateListener); - _name.setToolTipText("Identifies this Freeze database environment within an Ice communicator"); - _description.getDocument().addDocumentListener(_updateListener); - _description.setToolTipText("An optional description for this database environment"); - - JTextField dbHomeTextField = (JTextField)_dbHome.getEditor().getEditorComponent(); - dbHomeTextField.getDocument().addDocumentListener(_updateListener); - _dbHome.setToolTipText("node data dir/servers/server id" - + "/dbs/db env name if created by the IceGrid Node;
" - + "otherwise, IceGrid does not create this directory" - + ""); - - _properties = new PropertiesField(this); - } - - @Override - void writeDescriptor() - { - DbEnvDescriptor descriptor = (DbEnvDescriptor)getDbEnv().getDescriptor(); - descriptor.name = _name.getText().trim(); - descriptor.description = _description.getText(); - descriptor.dbHome = getDbHomeAsString(); - descriptor.properties = _properties.getProperties(); - } - - @Override - boolean isSimpleUpdate() - { - DbEnvDescriptor descriptor = (DbEnvDescriptor)getDbEnv().getDescriptor(); - return descriptor.name.equals(_name.getText().trim()); - } - - @Override - Communicator.ChildList getChildList() - { - return ((Communicator)_target.getParent()).getDbEnvs(); - } - - @Override - protected void appendProperties(DefaultFormBuilder builder) - { - builder.append("Name" ); - builder.append(_name, 3); - builder.nextLine(); - - builder.append("Description"); - builder.nextLine(); - builder.append(""); - builder.nextRow(-2); - CellConstraints cc = new CellConstraints(); - JScrollPane scrollPane = new JScrollPane(_description); - builder.add(scrollPane, cc.xywh(builder.getColumn(), builder.getRow(), 3, 3)); - builder.nextRow(2); - builder.nextLine(); - - builder.append("DB Home" ); - builder.append(_dbHome, 3); - builder.nextLine(); - - builder.append("Properties"); - builder.nextLine(); - builder.append(""); - builder.nextLine(); - builder.append(""); - - builder.nextLine(); - builder.append(""); - - builder.nextRow(-6); - scrollPane = new JScrollPane(_properties); - builder.add(scrollPane, cc.xywh(builder.getColumn(), builder.getRow(), 3, 7)); - builder.nextRow(6); - builder.nextLine(); - } - - @Override - protected void buildPropertiesPanel() - { - super.buildPropertiesPanel(); - _propertiesPanel.setName("Database Environment Properties"); - } - - @Override - protected boolean validate() - { - return check(new String[]{"Name", _name.getText().trim()}); - } - - void show(DbEnv dbEnv) - { - detectUpdates(false); - _target = dbEnv; - - DbEnvDescriptor descriptor = (DbEnvDescriptor)dbEnv.getDescriptor(); - - Utils.Resolver resolver = null; - if(dbEnv.getCoordinator().substitute()) - { - resolver = dbEnv.getResolver(); - } - boolean isEditable = resolver == null; - - _name.setText(Utils.substitute(descriptor.name, resolver)); - _name.setEditable(isEditable); - - _description.setText(Utils.substitute(descriptor.description, resolver)); - _description.setEditable(isEditable); - _description.setOpaque(isEditable); - - _dbHome.setEnabled(true); - _dbHome.setEditable(true); - setDbHome(Utils.substitute(descriptor.dbHome, resolver)); - _dbHome.setEnabled(isEditable); - _dbHome.setEditable(isEditable); - - _properties.setProperties(descriptor.properties, null, null, resolver, isEditable); - - _applyButton.setEnabled(dbEnv.isEphemeral()); - _discardButton.setEnabled(dbEnv.isEphemeral()); - detectUpdates(true); - - if(dbEnv.isEphemeral()) - { - updated(); - } - } - - private DbEnv getDbEnv() - { - return (DbEnv)_target; - } - - private void setDbHome(String dbHome) - { - if(dbHome.equals("")) - { - _dbHome.setSelectedItem(NO_DB_HOME); - } - else - { - _dbHome.setSelectedItem(dbHome); - } - } - - private String getDbHomeAsString() - { - Object obj = _dbHome.getSelectedItem(); - if(obj == NO_DB_HOME) - { - return ""; - } - else - { - return obj.toString().trim(); - } - } - - private JTextField _name = new JTextField(20); - private JTextArea _description = new JTextArea(3, 20); - - @SuppressWarnings("unchecked") - private JComboBox _dbHome = new JComboBox(new Object[]{NO_DB_HOME}); - private PropertiesField _properties; - - static private final Object NO_DB_HOME = new Object() - { - @Override - public String toString() - { - return "Created by the IceGrid Node"; - } - }; -} diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainServer.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainServer.java index 0a9aa8446c0..0fd44d2f74c 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainServer.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainServer.java @@ -23,7 +23,6 @@ class PlainServer extends Communicator implements Server ServerDescriptor copy = sd.clone(); copy.adapters = Adapter.copyDescriptors(copy.adapters); - copy.dbEnvs = DbEnv.copyDescriptors(copy.dbEnvs); copy.propertySet = PropertySet.copyDescriptor(copy.propertySet); @@ -62,7 +61,6 @@ static public ServerDescriptor newServerDescriptor() return new ServerDescriptor( new java.util.LinkedList(), new PropertySetDescriptor(new String[0], new java.util.LinkedList()), - new java.util.LinkedList(), new String[0], "", "NewServer", @@ -85,7 +83,6 @@ static public IceBoxDescriptor newIceBoxDescriptor() return new IceBoxDescriptor( new java.util.LinkedList(), new PropertySetDescriptor(new String[0], new java.util.LinkedList()), - new java.util.LinkedList(), new String[0], "", "NewIceBox", @@ -118,8 +115,7 @@ public boolean[] getAvailableActions() (clipboard instanceof ServerDescriptor || clipboard instanceof ServerInstanceDescriptor || (isIceBox() && (clipboard instanceof ServiceInstanceDescriptor)) - || (!isIceBox() && (clipboard instanceof Adapter.AdapterCopy - || clipboard instanceof DbEnvDescriptor)))) + || (!isIceBox() && (clipboard instanceof Adapter.AdapterCopy)))) { actions[PASTE] = true; } @@ -132,7 +128,6 @@ public boolean[] getAvailableActions() actions[SUBSTITUTE_VARS] = true; actions[NEW_ADAPTER] = !_services.initialized(); - actions[NEW_DBENV] = !_services.initialized(); actions[NEW_SERVICE] = _services.initialized(); actions[NEW_SERVICE_FROM_TEMPLATE] = _services.initialized(); } @@ -147,7 +142,6 @@ public JPopupMenu getPopupMenu() { _popup = new JPopupMenu(); _popup.add(actions.get(NEW_ADAPTER)); - _popup.add(actions.get(NEW_DBENV)); _popup.add(actions.get(NEW_SERVICE)); _popup.add(actions.get(NEW_SERVICE_FROM_TEMPLATE)); } @@ -373,7 +367,6 @@ void write(XMLWriter writer) writeDistribution(writer, _descriptor.distrib); _adapters.write(writer, _descriptor.propertySet.properties); - _dbEnvs.write(writer); writer.writeEndTag("server"); } } @@ -483,7 +476,6 @@ void rebuild(Utils.Resolver resolver, ServerDescriptor serverDescriptor) _descriptor = serverDescriptor; _adapters.clear(); - _dbEnvs.clear(); _services.clear(); if(!_ephemeral) @@ -493,15 +485,6 @@ void rebuild(Utils.Resolver resolver, ServerDescriptor serverDescriptor) { IceBoxDescriptor iceBoxDescriptor = (IceBoxDescriptor)_descriptor; _services.init(iceBoxDescriptor.services); - - // - // IceBox has not dbEnv - // - assert _descriptor.dbEnvs.size() == 0; - } - else - { - _dbEnvs.init(_descriptor.dbEnvs); } } } diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainService.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainService.java index ee97fe75d4e..8006b3f4bf0 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainService.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/PlainService.java @@ -19,7 +19,6 @@ class PlainService extends Communicator implements Service, Cloneable { ServiceDescriptor copy = sd.clone(); copy.adapters = Adapter.copyDescriptors(copy.adapters); - copy.dbEnvs = DbEnv.copyDescriptors(copy.dbEnvs); copy.propertySet = PropertySet.copyDescriptor(copy.propertySet); return copy; } @@ -57,15 +56,13 @@ public boolean[] getAvailableActions() Object clipboard = getCoordinator().getClipboard(); if(clipboard != null && (clipboard instanceof ServiceInstanceDescriptor - || clipboard instanceof Adapter.AdapterCopy - || clipboard instanceof DbEnvDescriptor)) + || clipboard instanceof Adapter.AdapterCopy)) { actions[PASTE] = true; } actions[DELETE] = true; actions[NEW_ADAPTER] = !_ephemeral; - actions[NEW_DBENV] = !_ephemeral; if(_parent instanceof Server && !_ephemeral) { @@ -86,7 +83,6 @@ public JPopupMenu getPopupMenu() { _popup = new JPopupMenu(); _popup.add(actions.get(NEW_ADAPTER)); - _popup.add(actions.get(NEW_DBENV)); _popup.addSeparator(); _popup.add(actions.get(MOVE_UP)); _popup.add(actions.get(MOVE_DOWN)); @@ -223,7 +219,6 @@ private void reset(PlainService from) assert _parent == from._parent; _adapters = from._adapters; - _dbEnvs = from._dbEnvs; _services = from._services; _childListArray = from._childListArray; @@ -240,7 +235,6 @@ private void reset(PlainService from) _resolver = resolver; _adapters.init(_descriptor.descriptor.adapters); - _dbEnvs.init(_descriptor.descriptor.dbEnvs); } // @@ -279,7 +273,6 @@ void write(XMLWriter writer) writeLogs(writer, _descriptor.descriptor.logs, _descriptor.descriptor.propertySet.properties); _adapters.write(writer, _descriptor.descriptor.propertySet.properties); - _dbEnvs.write(writer); writer.writeEndTag("service"); } } diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServerTemplate.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServerTemplate.java index feac5a1dad2..00b43db4380 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServerTemplate.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServerTemplate.java @@ -86,8 +86,7 @@ public boolean[] getAvailableActions() Object clipboard = getCoordinator().getClipboard(); actions[PASTE] = clipboard != null && ((isIceBox() && (clipboard instanceof ServiceInstanceDescriptor)) - || (!isIceBox() && (clipboard instanceof Adapter.AdapterCopy - || clipboard instanceof DbEnvDescriptor))); + || (!isIceBox() && (clipboard instanceof Adapter.AdapterCopy))); } actions[DELETE] = true; @@ -97,7 +96,6 @@ public boolean[] getAvailableActions() actions[NEW_ADAPTER] = !_services.initialized(); actions[NEW_SERVICE] = _services.initialized(); actions[NEW_SERVICE_FROM_TEMPLATE] = _services.initialized(); - actions[NEW_DBENV] = _dbEnvs.initialized(); } return actions; @@ -118,7 +116,6 @@ public JPopupMenu getPopupMenu() { _popup = new JPopupMenu(); _popup.add(actions.get(NEW_ADAPTER)); - _popup.add(actions.get(NEW_DBENV)); _popup.add(actions.get(NEW_SERVICE)); _popup.add(actions.get(NEW_SERVICE_FROM_TEMPLATE)); } @@ -280,7 +277,6 @@ void write(XMLWriter writer) writeDistribution(writer, descriptor.distrib); _adapters.write(writer, descriptor.propertySet.properties); - _dbEnvs.write(writer); writer.writeEndTag("server"); } writer.writeEndTag("server-template"); @@ -298,7 +294,6 @@ void rebuild(TemplateDescriptor descriptor) throws UpdateFailedException _templateDescriptor = descriptor; _adapters.clear(); - _dbEnvs.clear(); _services.clear(); if(!_ephemeral) @@ -310,12 +305,6 @@ void rebuild(TemplateDescriptor descriptor) throws UpdateFailedException IceBoxDescriptor iceBoxDescriptor = (IceBoxDescriptor)_templateDescriptor.descriptor; _services.init(iceBoxDescriptor.services); - - assert _templateDescriptor.descriptor.dbEnvs.size() == 0; - } - else - { - _dbEnvs.init(_templateDescriptor.descriptor.dbEnvs); } } } diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplate.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplate.java index f5bd36fd75b..fbdbe54bc5d 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplate.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplate.java @@ -58,8 +58,7 @@ public boolean[] getAvailableActions() { Object clipboard = getCoordinator().getClipboard(); actions[PASTE] = clipboard != null && - (clipboard instanceof Adapter.AdapterCopy - || clipboard instanceof DbEnvDescriptor); + (clipboard instanceof Adapter.AdapterCopy); } actions[DELETE] = true; @@ -68,7 +67,6 @@ public boolean[] getAvailableActions() { actions[COPY] = true; actions[NEW_ADAPTER] = true; - actions[NEW_DBENV] = true; } return actions; @@ -89,7 +87,6 @@ public JPopupMenu getPopupMenu() { _popup = new JPopupMenu(); _popup.add(actions.get(NEW_ADAPTER)); - _popup.add(actions.get(NEW_DBENV)); } actions.setTarget(this); return _popup; @@ -152,7 +149,6 @@ void write(XMLWriter writer) writePropertySet(writer, descriptor.propertySet, descriptor.adapters, descriptor.logs); writeLogs(writer, descriptor.logs, descriptor.propertySet.properties); _adapters.write(writer, descriptor.propertySet.properties); - _dbEnvs.write(writer); writer.writeEndTag("service"); writer.writeEndTag("service-template"); } @@ -164,12 +160,10 @@ void rebuild(TemplateDescriptor descriptor) _templateDescriptor = descriptor; _adapters.clear(); - _dbEnvs.clear(); if(!_ephemeral) { _adapters.init(_templateDescriptor.descriptor.adapters); - _dbEnvs.init(_templateDescriptor.descriptor.dbEnvs); } } diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplates.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplates.java index 791a890d770..cbcf3c90850 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplates.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/ServiceTemplates.java @@ -59,7 +59,6 @@ public void newTemplateService() ServiceDescriptor sd = new ServiceDescriptor( new java.util.LinkedList(), new PropertySetDescriptor(new String[0], new java.util.LinkedList()), - new java.util.LinkedList(), new String[0], "", "", diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/TreeNode.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/TreeNode.java index 40bcebcaf34..87a89fd610b 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/TreeNode.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Application/TreeNode.java @@ -318,30 +318,29 @@ static void writeParameters(XMLWriter writer, java.util.List parameters, // Actions // public static final int NEW_ADAPTER = 0; - public static final int NEW_DBENV = 1; - public static final int NEW_NODE = 2; - public static final int NEW_PROPERTY_SET = 3; - public static final int NEW_REPLICA_GROUP = 4; - public static final int NEW_SERVER = 5; - public static final int NEW_SERVER_ICEBOX = 6; - public static final int NEW_SERVER_FROM_TEMPLATE = 7; - public static final int NEW_SERVICE = 8; - public static final int NEW_SERVICE_FROM_TEMPLATE = 9; - public static final int NEW_TEMPLATE_SERVER = 10; - public static final int NEW_TEMPLATE_SERVER_ICEBOX = 11; - public static final int NEW_TEMPLATE_SERVICE = 12; - - public static final int COPY = 13; - public static final int PASTE = 14; - public static final int DELETE = 15; - - public static final int SHOW_VARS = 16; - public static final int SUBSTITUTE_VARS = 17; - - public static final int MOVE_UP = 18; - public static final int MOVE_DOWN = 19; - - static public final int ACTION_COUNT = 20; + public static final int NEW_NODE = 1; + public static final int NEW_PROPERTY_SET = 2; + public static final int NEW_REPLICA_GROUP = 3; + public static final int NEW_SERVER = 4; + public static final int NEW_SERVER_ICEBOX = 5; + public static final int NEW_SERVER_FROM_TEMPLATE = 6; + public static final int NEW_SERVICE = 7; + public static final int NEW_SERVICE_FROM_TEMPLATE = 8; + public static final int NEW_TEMPLATE_SERVER = 9; + public static final int NEW_TEMPLATE_SERVER_ICEBOX = 10; + public static final int NEW_TEMPLATE_SERVICE = 11; + + public static final int COPY = 12; + public static final int PASTE = 13; + public static final int DELETE = 14; + + public static final int SHOW_VARS = 15; + public static final int SUBSTITUTE_VARS = 16; + + public static final int MOVE_UP = 17; + public static final int MOVE_DOWN = 18; + + static public final int ACTION_COUNT = 19; public boolean[] getAvailableActions() { @@ -351,10 +350,6 @@ public void newAdapter() { assert false; } - public void newDbEnv() - { - assert false; - } public void newNode() { assert false; diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/ApplicationActions.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/ApplicationActions.java index 65b7ba81e8c..d03061fdeae 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/ApplicationActions.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/ApplicationActions.java @@ -55,18 +55,6 @@ public void actionPerformed(ActionEvent e) } }; - _array[TreeNode.NEW_DBENV] = new AbstractAction(popup ? "New Database Environment" : "Database Environment") - { - @Override - public void actionPerformed(ActionEvent e) - { - if(apply(_target)) - { - _target.newDbEnv(); - } - } - }; - _array[TreeNode.NEW_NODE] = new AbstractAction(popup ? "New Node" : "Node") { @Override diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java index 56afd6ec84d..9755e3102cd 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java @@ -288,7 +288,6 @@ private MenuBar() _newMenu.addSeparator(); _newMenu.add(_appActionsForMenu.get(com.zeroc.IceGridGUI.Application.TreeNode.NEW_ADAPTER)); - _newMenu.add(_appActionsForMenu.get(com.zeroc.IceGridGUI.Application.TreeNode.NEW_DBENV)); _newMenu.add(_appActionsForMenu.get(com.zeroc.IceGridGUI.Application.TreeNode.NEW_NODE)); _newMenu.add(_appActionsForMenu.get(com.zeroc.IceGridGUI.Application.TreeNode.NEW_PROPERTY_SET)); _newMenu.add(_appActionsForMenu.get(com.zeroc.IceGridGUI.Application.TreeNode.NEW_REPLICA_GROUP)); diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnv.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnv.java deleted file mode 100644 index 0a8e6839fd3..00000000000 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnv.java +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -package com.zeroc.IceGridGUI.LiveDeployment; - -import java.awt.Component; -import javax.swing.JTree; -import javax.swing.tree.DefaultTreeCellRenderer; -import com.zeroc.IceGrid.*; -import com.zeroc.IceGridGUI.*; - -class DbEnv extends TreeNode -{ - @Override - public Component getTreeCellRendererComponent( - JTree tree, - Object value, - boolean sel, - boolean expanded, - boolean leaf, - int row, - boolean hasFocus) - { - if(_cellRenderer == null) - { - _cellRenderer = new DefaultTreeCellRenderer(); - _cellRenderer.setLeafIcon(Utils.getIcon("/icons/16x16/database.png")); - } - return _cellRenderer.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); - } - - @Override - public Editor getEditor() - { - if(_editor == null) - { - _editor = new DbEnvEditor(); - } - _editor.show(this); - return _editor; - } - - DbEnv(TreeNode parent, String dbEnvName, Utils.Resolver resolver, DbEnvDescriptor descriptor) - { - super(parent, dbEnvName); - _resolver = resolver; - _descriptor = descriptor; - - } - - Utils.Resolver getResolver() - { - return _resolver; - } - - DbEnvDescriptor getDescriptor() - { - return _descriptor; - } - - private Utils.Resolver _resolver; - private DbEnvDescriptor _descriptor; - - static private DbEnvEditor _editor; - static private DefaultTreeCellRenderer _cellRenderer; -} diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnvEditor.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnvEditor.java deleted file mode 100644 index d4ee3d0d2e7..00000000000 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/DbEnvEditor.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -package com.zeroc.IceGridGUI.LiveDeployment; - -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.JTextField; - -import com.jgoodies.forms.builder.DefaultFormBuilder; -import com.jgoodies.forms.layout.CellConstraints; - -import com.zeroc.IceGrid.*; -import com.zeroc.IceGridGUI.*; - -class DbEnvEditor extends Editor -{ - DbEnvEditor() - { - _description.setEditable(false); - _description.setOpaque(false); - _dbHome.setEditable(false); - } - - void show(DbEnv dbEnv) - { - DbEnvDescriptor descriptor = dbEnv.getDescriptor(); - Utils.Resolver resolver = dbEnv.getResolver(); - _description.setText(resolver.substitute(descriptor.description)); - - if(descriptor.dbHome.length() == 0) - { - _dbHome.setText("Created by the IceGrid Node"); - } - else - { - _dbHome.setText(resolver.substitute(descriptor.dbHome)); - } - - _properties.setProperties(descriptor.properties, resolver); - } - - @Override - protected void appendProperties(DefaultFormBuilder builder) - { - builder.append("Description"); - builder.nextLine(); - builder.append(""); - builder.nextRow(-2); - CellConstraints cc = new CellConstraints(); - JScrollPane scrollPane = new JScrollPane(_description); - builder.add(scrollPane, cc.xywh(builder.getColumn(), builder.getRow(), 3, 3)); - builder.nextRow(2); - builder.nextLine(); - - builder.append("DB Home" ); - builder.append(_dbHome, 3); - builder.nextLine(); - - builder.append("Properties"); - builder.nextLine(); - - builder.append(""); - builder.nextLine(); - - builder.append(""); - builder.nextLine(); - - builder.append(""); - builder.nextRow(-6); - scrollPane = new JScrollPane(_properties); - builder.add(scrollPane, cc.xywh(builder.getColumn(), builder.getRow(), 3, 7)); - builder.nextRow(6); - builder.nextLine(); - } - - @Override - protected void buildPropertiesPanel() - { - super.buildPropertiesPanel(); - _propertiesPanel.setName("Database Environment Properties"); - } - - private JTextArea _description = new JTextArea(3, 20); - private JTextField _dbHome = new JTextField(20); - private TableField _properties = new TableField("Name", "Value"); -} diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Server.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Server.java index 0bc9900152c..64b3c6c3c8e 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Server.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Server.java @@ -482,7 +482,7 @@ public Component getTreeCellRendererComponent( ServerDescriptor serverDescriptor, ApplicationDescriptor application, ServerState state, int pid, boolean enabled) { - super(parent, serverId, 4); + super(parent, serverId, 3); _resolver = resolver; _instanceDescriptor = instanceDescriptor; @@ -491,13 +491,11 @@ public Component getTreeCellRendererComponent( _childrenArray[0] = _metrics; _childrenArray[1] = _adapters; - _childrenArray[2] = _dbEnvs; - _childrenArray[3] = _services; + _childrenArray[2] = _services; update(state, pid, enabled, false); createAdapters(); - createDbEnvs(); createServices(); } @@ -574,13 +572,11 @@ void rebuild(Server server) _metrics = server._metrics; _adapters = server._adapters; - _dbEnvs = server._dbEnvs; _services = server._services; _childrenArray[0] = _metrics; _childrenArray[1] = _adapters; - _childrenArray[2] = _dbEnvs; - _childrenArray[3] = _services; + _childrenArray[2] = _services; // // Need to re-parent all the children @@ -590,11 +586,6 @@ void rebuild(Server server) adapter.reparent(this); } - for(DbEnv dbEnv: _dbEnvs) - { - dbEnv.reparent(this); - } - for(Service service: _services) { service.reparent(this); @@ -634,8 +625,6 @@ void rebuild(Utils.Resolver resolver, boolean variablesChanged, java.util.Set _adapters = new java.util.LinkedList<>(); - private java.util.List _dbEnvs = new java.util.LinkedList<>(); private java.util.List _services = new java.util.LinkedList<>(); private java.util.Set _startedServices = new java.util.HashSet<>(); diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Service.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Service.java index ddba4de17a0..8393b6afedd 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Service.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/LiveDeployment/Service.java @@ -289,7 +289,7 @@ protected String getDefaultFileName() Service(Server parent, String serviceName, Utils.Resolver resolver, ServiceInstanceDescriptor descriptor, ServiceDescriptor serviceDescriptor, PropertySetDescriptor serverInstancePSDescriptor) { - super(parent, serviceName, 3); + super(parent, serviceName, 2); _resolver = resolver; _instanceDescriptor = descriptor; @@ -298,10 +298,8 @@ protected String getDefaultFileName() _childrenArray[0] = _metrics; _childrenArray[1] = _adapters; - _childrenArray[2] = _dbEnvs; createAdapters(); - createDbEnvs(); } void stopShowIceLogDialog() @@ -435,24 +433,13 @@ private void createAdapters() } } - private void createDbEnvs() - { - for(DbEnvDescriptor p : _serviceDescriptor.dbEnvs) - { - String dbEnvName = Utils.substitute(p.name, _resolver); - insertSortedChild(new DbEnv(this, dbEnvName, _resolver, p), _dbEnvs, null); - } - } - void rebuild(Service service) { _adapters = service._adapters; - _dbEnvs = service._dbEnvs; _metrics = service._metrics; _childrenArray[0] = _metrics; _childrenArray[1] = _adapters; - _childrenArray[2] = _dbEnvs; // // Need to re-parent all the children @@ -462,11 +449,6 @@ void rebuild(Service service) adapter.reparent(this); } - for(DbEnv dbEnv: _dbEnvs) - { - dbEnv.reparent(this); - } - for(MetricsView metrics: _metrics) { metrics.reparent(this); @@ -480,7 +462,6 @@ void rebuild(Service service) private final Utils.Resolver _resolver; private java.util.List _adapters = new java.util.LinkedList<>(); - private java.util.List _dbEnvs = new java.util.LinkedList<>(); private boolean _started = false; diff --git a/js/src/Ice/PropertyNames.js b/js/src/Ice/PropertyNames.js index 75e9c39b6f7..8b48b505832 100644 --- a/js/src/Ice/PropertyNames.js +++ b/js/src/Ice/PropertyNames.js @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 11:59:14 2023 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Dec 11 15:47:11 2023 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/slice/IceGrid/Descriptor.ice b/slice/IceGrid/Descriptor.ice index 24a96aaa126..94fac23ec72 100644 --- a/slice/IceGrid/Descriptor.ice +++ b/slice/IceGrid/Descriptor.ice @@ -222,53 +222,6 @@ struct AdapterDescriptor **/ ["java:type:java.util.LinkedList"] sequence AdapterDescriptorSeq; -/** - * - * A Freeze database environment descriptor. - * - **/ -["cpp:comparable"] -struct DbEnvDescriptor -{ - /** - * - * The name of the database environment. - * - **/ - string name; - - /** - * - * The description of this database environment. - * - **/ - string description; - - /** - * - * The home of the database environment (i.e., the directory where - * the database files will be stored). If empty, the node will - * provide a default database directory, otherwise the directory - * must exist. - * - **/ - string dbHome; - - /** - * - * The configuration properties of the database environment. - * - **/ - PropertyDescriptorSeq properties; -} - -/** - * - * A sequence of database environment descriptors. - * - **/ -["java:type:java.util.LinkedList"] sequence DbEnvDescriptorSeq; - /** * * A communicator descriptor. @@ -290,13 +243,6 @@ class CommunicatorDescriptor **/ PropertySetDescriptor propertySet; - /** - * - * The database environments. - * - **/ - DbEnvDescriptorSeq dbEnvs; - /** * * The path of each log file.