@@ -6,7 +6,7 @@
//
// Design and Implementation by Bjoern Lemke
//
-// (C)opyright 2000-2010 Bjoern Lemke
+// (C)opyright 2000-2012 Bjoern Lemke
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -542,6 +542,16 @@
srvShowRole(pAH);
break;
}
+ case CegoAdminHandler::CREATE_ROLE:
+ {
+ srvCreateRole(pAH);
+ break;
+ }
+ case CegoAdminHandler::DROP_ROLE:
+ {
+ srvDropRole(pAH);
+ break;
+ }
case CegoAdminHandler::ASSIGN_ROLE:
{
srvAssignRole(pAH);
@@ -552,6 +562,16 @@
srvRemoveRole(pAH);
break;
}
+ case CegoAdminHandler::SET_PERM:
+ {
+ srvSetPerm(pAH);
+ break;
+ }
+ case CegoAdminHandler::REMOVE_PERM:
+ {
+ srvRemovePerm(pAH);
+ break;
+ }
case CegoAdminHandler::USER_TRACE:
{
srvUserTrace(pAH);
@@ -746,56 +766,6 @@
medGetTransactionInfo(pAH);
break;
}
- case CegoAdminHandler::MED_ADD_USER:
- {
- medCreateUser(pAH);
- break;
- }
- case CegoAdminHandler::MED_REMOVE_USER:
- {
- medDropUser(pAH);
- break;
- }
- case CegoAdminHandler::MED_CHANGE_PASSWD:
- {
- medChangePasswd(pAH);
- break;
- }
- case CegoAdminHandler::MED_CREATE_ROLE:
- {
- medCreateRole(pAH);
- break;
- }
- case CegoAdminHandler::MED_DROP_ROLE:
- {
- medDropRole(pAH);
- break;
- }
- case CegoAdminHandler::MED_ASSIGN_ROLE:
- {
- medAssignRole(pAH);
- break;
- }
- case CegoAdminHandler::MED_REMOVE_ROLE:
- {
- medRemoveRole(pAH);
- break;
- }
- case CegoAdminHandler::MED_SET_PERM:
- {
- medSetPerm(pAH);
- break;
- }
- case CegoAdminHandler::MED_REMOVE_PERM:
- {
- medRemovePerm(pAH);
- break;
- }
- case CegoAdminHandler::MED_USER_TRACE:
- {
- medUserTrace(pAH);
- break;
- }
case CegoAdminHandler::MED_BEGIN_BACKUP:
{
medBeginBackup(pAH);
@@ -1094,10 +1064,8 @@
_pDBMng->log(_modId, Logger::LOGERR, msg);
}
-
_pDBMng->setTableSetSyncState(tableSet, XML_SYNCHED_VALUE);
-
pAHS->closeSession();
pAHM->closeSession();
@@ -2485,7 +2453,7 @@
_pDBMng->setSecondary(tableSet, secondary);
_pDBMng->setMediator(tableSet, mediator);
- pAH->sendResponse(Chain("Tableet nodes set"));
+ pAH->sendResponse(Chain("Tableset nodes set"));
}
void CegoAdminThread::srvSetLSN(CegoAdminHandler *pAH)
@@ -2707,8 +2675,12 @@
Chain password;
pAH->getUser(user);
pAH->getPassword(password);
-
+
+ // AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
+ //_pDBMng->addUser(user, aescrypt.encrypt(password));
+
_pDBMng->addUser(user, password);
+
pAH->sendResponse(Chain("User " + user + " added"));
}
@@ -2729,8 +2701,11 @@
pAH->getUser(user);
pAH->getPassword(password);
-
+
+ // AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
+ // _pDBMng->changePassword(user, aescrypt.encrypt(passwd));
_pDBMng->changePassword(user, password);
+
pAH->sendResponse(Chain("Password changed for user " + user));
}
@@ -2755,14 +2730,44 @@
Host h;
Chain mediator = h.getName();
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Role showed")) == false )
- return;
+
+ pAH->sendResponse(Chain("Role info"), pPermInfo);
+
+}
+
+
+void CegoAdminThread::srvCreateRole(CegoAdminHandler *pAH)
+{
+
+ Chain role;
+ pAH->getRole(role);
+
+ _pDBMng->createRole(role);
+
+ Host h;
+ Chain mediator = h.getName();
+
+ pAH->sendResponse(Chain("Role " ) + role + Chain(" created"));
+
+}
+
+
+void CegoAdminThread::srvDropRole(CegoAdminHandler *pAH)
+{
- pAH->sendResponse(Chain("Admin action finished"), pPermInfo);
+ Chain role;
+ pAH->getRole(role);
+
+ _pDBMng->dropRole(role);
+
+ Host h;
+ Chain mediator = h.getName();
+
+ pAH->sendResponse(Chain("Role ") + role + Chain(" dropped"));
}
+
void CegoAdminThread::srvAssignRole(CegoAdminHandler *pAH)
{
Chain user;
@@ -2784,10 +2789,49 @@
pAH->getRole(role);
_pDBMng->removeUserRole(user, role);
- pAH->sendResponse(Chain("Role set for user " + user));
+ pAH->sendResponse(Chain("Role ") + role + Chain("removed from user ") + user);
}
+void CegoAdminThread::srvSetPerm(CegoAdminHandler *pAH)
+{
+
+ Chain role;
+ pAH->getRole(role);
+
+ Chain tableSet;
+ pAH->getTableSet(tableSet);
+
+ Chain filter;
+ pAH->getFilter(filter);
+
+ Chain perm;
+ pAH->getPerm(perm);
+
+ Chain permid;
+ pAH->getPermId(permid);
+
+ _pDBMng->setPerm(role, permid, tableSet, filter, perm);
+
+ pAH->sendResponse(Chain("Permission ") + permid + Chain(" set"));
+
+}
+
+void CegoAdminThread::srvRemovePerm(CegoAdminHandler *pAH)
+{
+
+ Chain role;
+ pAH->getRole(role);
+
+ Chain permid;
+ pAH->getPermId(permid);
+
+ _pDBMng->removePerm(role, permid);
+
+ pAH->sendResponse(Chain("Permission ") + permid + Chain(" removed"));
+
+}
+
void CegoAdminThread::srvUserTrace(CegoAdminHandler *pAH)
{
@@ -2797,7 +2841,7 @@
pAH->getTrace(isOn);
_pDBMng->setUserTrace(user, isOn);
- pAH->sendResponse(Chain("User trace set for " + user));
+ pAH->sendResponse(Chain("User trace set for ") + user);
}
@@ -2896,7 +2940,6 @@
pAH->sendResponse(Chain("Tableset recovered to lsn ") + Chain(lsn));
}
-
void CegoAdminThread::srvSecSwitch(CegoAdminHandler *pAH)
{
Chain tableSet;
@@ -2925,8 +2968,9 @@
ListT<Chain> tsList;
ListT<Chain> syncList;
+ ListT<Chain> runList;
- pAH->getTableSyncStateList(tsList, syncList);
+ pAH->getTableSyncStateList(tsList, runList, syncList);
#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Setting host status <") + hostStatus + Chain("> for host <")
@@ -2937,17 +2981,20 @@
Chain *pTS = tsList.First();
Chain *pSync = syncList.First();
+ Chain *pRun = runList.First();
- while ( pTS && pSync )
+ while ( pTS && pSync && pRun)
{
#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Setting tableset status for <") + *pTS + Chain("> to ") + *pSync );
#endif
+ _pDBMng->setTableSetRunState(*pTS, *pRun);
_pDBMng->setTableSetSyncState(*pTS, *pSync);
pTS = tsList.Next();
pSync = syncList.Next();
+ pRun = runList.Next();
}
pAH->sendResponse(Chain("Notify ok"));
@@ -3018,11 +3065,8 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK )
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
@@ -3033,22 +3077,15 @@
Chain msg;
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
+
if ( res != CegoAdminHandler::ADM_OK )
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
_pDBMng->addTableSetDef(tableSet, tsRoot, tsTicket, primary, secondary, h.getName(), sysFid, tmpFid, sysSize, tmpSize, logFileSize, logFileNum, sortAreaSize);
- if ( pAH->syncWithInfo(Chain("mediator"), h.getName(), Chain("Tableset ") + tableSet + Chain(" defined")) == false )
- return;
-
- pAH->sendResponse(Chain("Admin action successful"));
+ pAH->sendResponse(Chain("Tableset ") + tableSet + Chain(" defined"));
}
@@ -3110,8 +3147,7 @@
}
else
{
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
@@ -3133,8 +3169,7 @@
}
else
{
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
@@ -3233,16 +3268,14 @@
Chain msg;
pPrimaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pPrimaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
-
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pPrimaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
if ( primary != secondary )
@@ -3251,15 +3284,14 @@
Chain msg;
pPrimaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pPrimaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pPrimaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
}
@@ -3281,30 +3313,28 @@
Chain msg;
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
-
+
res = pSecondaryAH->reqSetSyncState(tableSet, XML_NOT_SYNCHED_VALUE);
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
closeSession(pSecondaryAH);
@@ -3345,32 +3375,22 @@
catch ( Exception e )
{
Chain msg;
- e.pop(msg);
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ e.pop(msg);
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
if ( primary == secondary )
{
- Chain msg = Chain("Cannot copy tablset,\nprimary and secondary are identical\n(") + primary + Chain("=") + secondary + Chain(")");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Cannot copy tablset, primary and secondary are identical (") + primary + Chain("=") + secondary + Chain(")");
+ throw Exception(EXLOC, msg);
}
-
Chain primaryStatus;
try
@@ -3381,18 +3401,14 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
CegoAdminHandler* pPrimaryAH = 0;
@@ -3438,26 +3454,24 @@
CegoAdminHandler::ResultType res = pSecondaryAH->reqStopRecovery(tableSet);
-
Chain msg;
pSecondaryAH->getMsg(msg);
-
- pAH->syncWithInfo(Chain("secondary"), secondary, msg);
+
if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
+ }
}
if ( pPrimaryAH == 0 )
{
_pDBMng->startCopy(tableSet, secondary, mediator, pAH->getUser(), pAH->getPassword(), Chain("Copy requested"));
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, Chain("Copy started")) == false )
- return;
-
+ pAH->syncWithInfo(Chain("primary"), primary, Chain("Copy started"));
}
else
{
@@ -3468,10 +3482,13 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- pAH->syncWithInfo(Chain("primary"), primary, msg);
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
@@ -3490,19 +3507,18 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- pAH->syncWithInfo(Chain("secondary"), secondary, msg);
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
}
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator , Chain("Tableset copy started")) == false )
- return;
- pAH->sendResponse(Chain("Admin action successful"));
-
+ pAH->sendResponse(Chain("Tableset copy started"));
}
@@ -3659,7 +3675,7 @@
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
+ Chain msg = Chain("Invalid mediator host ") + mediator + Chain(" for tableset ") + tableSet;
throw Exception(EXLOC, msg);
}
@@ -3714,33 +3730,36 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
- if ( primary != secondary )
+ else
{
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+ }
+ }
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
- CegoAdminHandler::ResultType res = pSecondaryAH->reqStartRecovery(tableSet);
-
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
+ if ( primary != secondary )
+ {
+
+ CegoAdminHandler* pSecondaryAH = 0;
+
+ pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
+ CegoAdminHandler::ResultType res = pSecondaryAH->reqStartRecovery(tableSet);
+
+ Chain msg;
+ pSecondaryAH->getMsg(msg);
+ closeSession(pSecondaryAH);
+
+ if ( res != CegoAdminHandler::ADM_OK)
+ {
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
@@ -3792,7 +3811,7 @@
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ Chain msg = Chain("Invalid mediator host ") + mediator + Chain(" for tableset ") + tableSet;
throw Exception(EXLOC, msg);
}
@@ -3853,15 +3872,15 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
-
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+ }
+
if ( primary != secondary )
{
@@ -3873,12 +3892,13 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
@@ -3966,7 +3986,7 @@
if ( primary == secondary )
{
- Chain msg = Chain("Primary and secondary identical,\nswitch not useful");
+ Chain msg = Chain("Primary and secondary identical, switch not useful");
throw Exception(EXLOC, msg);
}
@@ -4013,9 +4033,10 @@
CegoAdminHandler::ResultType res;
pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
+
if ( isOnline )
{
+
res = pPrimaryAH->reqStopTableSet(tableSet);
Chain msg;
@@ -4026,6 +4047,10 @@
closeSession(pPrimaryAH);
throw Exception(EXLOC, msg);
}
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+ }
}
res = pPrimaryAH->reqSetTableSetNode(tableSet, newPrimary, newSecondary, newMediator);
@@ -4186,10 +4211,6 @@
_pDBMng->setPrimary(tableSet, newPrimary);
_pDBMng->setSecondary(tableSet, newSecondary);
_pDBMng->setMediator(tableSet, newMediator);
-
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Tableset switched")) == false )
- return;
Chain msg = Chain("Tableset ") + tableSet + Chain(" switched");
pAH->sendResponse(msg);
@@ -4226,18 +4247,14 @@
catch ( Exception e )
{
Chain msg;
- e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ e.pop(msg);
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -4251,26 +4268,20 @@
catch ( Exception e )
{
Chain msg;
- e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ e.pop(msg);
+ throw Exception(EXLOC, msg);
}
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator != primary )
@@ -4284,13 +4295,15 @@
Chain msg;
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
-
- pAH->syncWithInfo(Chain("primary"), primary, msg);
+
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), secondary, msg);
}
-
if ( primary != secondary )
{
@@ -4305,20 +4318,20 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- pAH->syncWithInfo(Chain("secondary"), secondary, msg);
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), secondary, msg);
}
}
}
_pDBMng->addArchLog(tableSet, archId, archPath);
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Archlog added")) == false )
- return;
-
- pAH->sendResponse("Admin action finished");
+
+ pAH->sendResponse("Archlog added");
}
@@ -4355,33 +4368,25 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator != primary )
@@ -4396,10 +4401,13 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- pAH->syncWithInfo(Chain("primary"), primary, msg);
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
if ( primary != secondary )
@@ -4414,22 +4422,20 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- pAH->syncWithInfo(Chain("secondary"), secondary, msg);
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
-
}
}
_pDBMng->removeArchLog(tableSet, archId);
-
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Archlog removed")) == false )
- return;
- pAH->sendResponse("Admin action finished");
+ pAH->sendResponse(Chain("Archlog removed"));
}
@@ -4463,20 +4469,14 @@
}
catch ( Exception e )
{
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = e.getBaseMsg();
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -4495,14 +4495,9 @@
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
-
int fileId = _pDBMng->nextFID();
if ( mediator == primary )
@@ -4511,14 +4506,11 @@
{
_pTabMng->addDataFile(tableSet, fileType, fileId, fileName, fileSize);
_pTabMng->writeCheckPoint(tableSet, true, false);
-
}
catch ( Exception e )
{
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = e.getBaseMsg();
+ throw Exception(EXLOC, msg);
}
}
else
@@ -4534,51 +4526,51 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- pAH->syncWithInfo(Chain("primary"), primary, msg);
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
-
- if ( primary != secondary )
+ else
{
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+ }
+ }
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqAddDataFile(tableSet, fileType, fileId, fileName, fileSize);
-
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- pAH->syncWithInfo(Chain("secondary"), secondary, msg);
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
- }
+ if ( primary != secondary && secondary != mediator )
+ {
+
+ CegoAdminHandler* pSecondaryAH = 0;
+
+ pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
+
+ CegoAdminHandler::ResultType res = pSecondaryAH->reqAddDataFile(tableSet, fileType, fileId, fileName, fileSize);
+
+ Chain msg;
+ pSecondaryAH->getMsg(msg);
+ closeSession(pSecondaryAH);
+
- try
+ if ( res != CegoAdminHandler::ADM_OK)
{
- _pDBMng->addDataFile(tableSet, fileType, fileId, fileName, fileSize);
+ throw Exception(EXLOC, msg);
}
- catch ( Exception e )
+ else
{
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
-
- }
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Datafile added")) == false )
- return;
+ }
- pAH->sendResponse("Admin action finished");
+ try
+ {
+ _pDBMng->addDataFile(tableSet, fileType, fileId, fileName, fileSize);
+ }
+ catch ( Exception e )
+ {
+ Chain msg = e.getBaseMsg();
+ throw Exception(EXLOC, msg);
+ }
+
+ pAH->sendResponse(Chain("Datafile added"));
}
@@ -4600,10 +4592,9 @@
pTabSet = tabSetList.Next();
}
}
- pAH->sendResponse(Chain("Admin action finished"), pTabSetInfo);
+ pAH->sendResponse(Chain("Tableset list"), pTabSetInfo);
}
-
void CegoAdminThread::medGetDetailedTableSetInfo(CegoAdminHandler *pAH)
{
Chain tableSet;
@@ -4642,29 +4633,23 @@
CegoAdminHandler::ResultType res = pPrimaryAH->reqGetDetailedTSInfo(tableSet);
- pTSInfo = pPrimaryAH->getTSInfo();
+ if ( res != CegoAdminHandler::ADM_OK)
+ {
+ Chain msg;
+ pPrimaryAH->getMsg(msg);
+ throw Exception(EXLOC, msg);
+ }
+ pTSInfo = pPrimaryAH->getTSInfo();
Chain msg;
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
}
-
-
- //if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Tableset information retrieved")) == false )
- // return;
- pAH->sendResponse(Chain("Admin action finished"), pTSInfo);
+ pAH->sendResponse(Chain("Tableset information"), pTSInfo);
-
}
@@ -4689,10 +4674,7 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
@@ -4717,19 +4699,17 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Tableset information retrieved")) == false )
- // return;
- pAH->sendResponse(Chain("Admin action finished"), pTAInfo);
+ pAH->sendResponse(Chain("Transaction info"), pTAInfo);
}
void CegoAdminThread::medGetObjectInfo(CegoAdminHandler *pAH)
@@ -4753,10 +4733,7 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
Element *pObjectInfo;
@@ -4780,66 +4757,53 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Tableset information retrieved")) == false )
- return;
- pAH->sendResponse(Chain("Admin action finished"), pObjectInfo);
+ pAH->sendResponse(Chain("Object info"), pObjectInfo);
}
-
-void CegoAdminThread::medCreateUser(CegoAdminHandler *pAH)
+void CegoAdminThread::medBeginBackup(CegoAdminHandler *pAH)
{
- Chain user;
- pAH->getUser(user);
-
- Chain passwd;
- pAH->getPassword(passwd);
+ Chain tableSet;
+ pAH->getTableSet(tableSet);
- /*
- TODO : distributed user add logic must be redesigned
- ----------------------------------------------------
-
Chain primary;
Chain secondary;
Chain mediator;
+ Chain status;
- try
- {
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- }
- catch ( Exception e )
+ Host h;
+
+ primary = _pDBMng->getPrimary(tableSet);
+ secondary = _pDBMng->getSecondary(tableSet);
+ mediator = _pDBMng->getMediator(tableSet);
+ status = _pDBMng->getTableSetRunState(tableSet);
+
+ if ( status != Chain(XML_ONLINE_VALUE) )
{
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status online\nto be backup up online");
+ throw Exception(EXLOC, msg);
}
- Host h;
-
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
throw Exception(EXLOC, msg);
}
Chain primaryStatus;
Chain secondaryStatus;
-
_pDBMng->getStatusByHost(primary, primaryStatus);
_pDBMng->getStatusByHost(secondary, secondaryStatus);
@@ -4847,882 +4811,82 @@
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
throw Exception(EXLOC, msg);
-
}
+
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
throw Exception(EXLOC, msg);
}
- if ( mediator != primary )
+ if ( mediator == primary )
+ {
+ _pTabMng->beginBackup(tableSet);
+ }
+ else
{
-
+
CegoAdminHandler* pPrimaryAH = 0;
-
+
pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
- CegoAdminHandler::ResultType res = pPrimaryAH->reqAddUser(user, passwd);
+ CegoAdminHandler::ResultType res = pPrimaryAH->reqBeginBackup(tableSet);
+
Chain msg;
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
- if ( primary != secondary )
+ else
{
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqAddUser(user, passwd);
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
- }
- */
- AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
- _pDBMng->addUser(user, aescrypt.encrypt(passwd));
+ _pDBMng->setTableSetRunState(tableSet,XML_BACKUP_VALUE);
+
+ }
- Host h;
- Chain mediator = h.getName();
+ pAH->sendResponse(Chain("Backup mode started"));
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Added user locally")) == false )
- return;
-
- pAH->sendResponse(Chain("Admin action finished"));
-
}
-void CegoAdminThread::medDropUser(CegoAdminHandler *pAH)
+void CegoAdminThread::medEndBackup(CegoAdminHandler *pAH)
{
- Chain user;
- pAH->getUser(user);
-
- /*
- TODO : distributed user remove logic must be redesigned
- ----------------------------------------------------
-
+ Chain tableSet;
+ pAH->getTableSet(tableSet);
+ bool keepTicket;
+ pAH->getKeepTicket(keepTicket);
+
Chain primary;
Chain secondary;
Chain mediator;
+ Chain status;
- try
- {
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- }
- catch ( Exception e )
- {
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
Host h;
- if ( h.getName() != mediator )
+ primary = _pDBMng->getPrimary(tableSet);
+ secondary = _pDBMng->getSecondary(tableSet);
+ mediator = _pDBMng->getMediator(tableSet);
+ status = _pDBMng->getTableSetRunState(tableSet);
+
+ if ( status != Chain(XML_BACKUP_VALUE) )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
- }
-
- Chain primaryStatus;
- Chain secondaryStatus;
-
- _pDBMng->getStatusByHost(primary, primaryStatus);
- _pDBMng->getStatusByHost(secondary, secondaryStatus);
-
- if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
- }
-
- if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
- }
-
- if ( mediator != primary )
- {
-
- CegoAdminHandler* pPrimaryAH = 0;
-
- pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pPrimaryAH->reqRemoveUser(tableSet, user);
-
- Chain msg;
- pPrimaryAH->getMsg(msg);
- closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( primary != secondary )
- {
-
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqRemoveUser(tableSet, user);
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
- }
- }
-
- */
-
- _pDBMng->removeUser(user);
-
- Host h;
- Chain mediator = h.getName();
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("User removed")) == false )
- return;
-
- pAH->sendResponse(Chain("Admin action finished"));
-
-}
-
-
-void CegoAdminThread::medChangePasswd(CegoAdminHandler *pAH)
-{
-
- Chain user;
- pAH->getUser(user);
-
- Chain passwd;
- pAH->getPassword(passwd);
-
- /*
-
- Chain primary;
- Chain secondary;
- Chain mediator;
-
- try
- {
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- }
- catch ( Exception e )
- {
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Host h;
-
- if ( h.getName() != mediator )
- {
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Chain primaryStatus;
- Chain secondaryStatus;
-
-
- _pDBMng->getStatusByHost(primary, primaryStatus);
- _pDBMng->getStatusByHost(secondary, secondaryStatus);
-
- if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- throw Exception(EXLOC, msg);
- }
-
- if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- throw Exception(EXLOC, msg);
- }
-
- if ( mediator != primary )
- {
-
- CegoAdminHandler* pPrimaryAH = 0;
-
- pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pPrimaryAH->reqChangePwd(tableSet, user, passwd);
-
- Chain msg;
- pPrimaryAH->getMsg(msg);
- closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( primary != secondary )
- {
-
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqChangePwd(tableSet, user, passwd);
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- }
- }
-
- */
-
- AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
- _pDBMng->changePassword(user, aescrypt.encrypt(passwd));
-
- Host h;
- Chain mediator = h.getName();
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Passwd changed")) == false )
- return;
-
- pAH->sendResponse(Chain("Admin action finished"));
-
-}
-
-void CegoAdminThread::medCreateRole(CegoAdminHandler *pAH)
-{
-
- Chain role;
- pAH->getRole(role);
-
- _pDBMng->createRole(role);
-
- Host h;
- Chain mediator = h.getName();
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Role created")) == false )
- // return;
-
- pAH->sendResponse(Chain("Role " ) + role + Chain(" created"));
-
-}
-
-
-void CegoAdminThread::medDropRole(CegoAdminHandler *pAH)
-{
-
- Chain role;
- pAH->getRole(role);
-
- _pDBMng->dropRole(role);
-
- Host h;
- Chain mediator = h.getName();
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Role dropped")) == false )
- // return;
-
- pAH->sendResponse(Chain("Role ") + role + Chain(" dropped"));
-
-}
-
-
-void CegoAdminThread::medAssignRole(CegoAdminHandler *pAH)
-{
-
- Chain user;
- pAH->getUser(user);
-
- Chain role;
- pAH->getRole(role);
-
-
- /*
-
- Chain primary;
- Chain secondary;
- Chain mediator;
-
- try
- {
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- }
- catch ( Exception e )
- {
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Host h;
-
- if ( h.getName() != mediator )
- {
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Chain primaryStatus;
- Chain secondaryStatus;
-
- _pDBMng->getStatusByHost(primary, primaryStatus);
- _pDBMng->getStatusByHost(secondary, secondaryStatus);
-
- if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
- }
-
- if ( mediator != primary )
- {
-
- CegoAdminHandler* pPrimaryAH = 0;
-
- pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pPrimaryAH->reqAddRole(tableSet, user, role);
-
- Chain msg;
- pPrimaryAH->getMsg(msg);
- closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( primary != secondary )
- {
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqAddRole(tableSet, user, role);
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
- }
- }
-
- */
-
- _pDBMng->assignUserRole(user, role);
-
- Host h;
- Chain mediator = h.getName();
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Role added")) == false )
- // return;
-
- pAH->sendResponse(Chain("Role ") + role + Chain(" assigned"));
-
-}
-
-void CegoAdminThread::medRemoveRole(CegoAdminHandler *pAH)
-{
-
-
- Chain user;
- pAH->getUser(user);
-
- Chain role;
- pAH->getRole(role);
-
- /*
-
- Chain primary;
- Chain secondary;
- Chain mediator;
-
- try
- {
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- }
- catch ( Exception e )
- {
- Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Host h;
-
- if ( h.getName() != mediator )
- {
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Chain primaryStatus;
- Chain secondaryStatus;
-
- _pDBMng->getStatusByHost(primary, primaryStatus);
- _pDBMng->getStatusByHost(secondary, secondaryStatus);
-
- if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( mediator != primary )
- {
-
- CegoAdminHandler* pPrimaryAH = 0;
-
- pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pPrimaryAH->reqRemoveRole(tableSet, user, role);
-
- Chain msg;
- pPrimaryAH->getMsg(msg);
- closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( primary != secondary )
- {
-
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqRemoveRole(tableSet, user, role);
-
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
- }
- }
- */
-
- _pDBMng->removeUserRole(user, role);
-
- Host h;
- Chain mediator = h.getName();
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Role removed")) == false )
- return;
-
- pAH->sendResponse(Chain("Role ") + role + Chain(" removed"));
-
-}
-
-
-void CegoAdminThread::medSetPerm(CegoAdminHandler *pAH)
-{
-
- Chain role;
- pAH->getRole(role);
-
- Chain tableSet;
- pAH->getTableSet(tableSet);
-
- Chain filter;
- pAH->getFilter(filter);
-
- Chain perm;
- pAH->getPerm(perm);
-
- Chain permid;
- pAH->getPermId(permid);
-
- _pDBMng->setPerm(role, permid, tableSet, filter, perm);
-
- Host h;
- Chain mediator = h.getName();
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Permission set")) == false )
- // return;
-
- pAH->sendResponse(Chain("Permission ") + permid + Chain(" set"));
-
-
-}
-
-void CegoAdminThread::medRemovePerm(CegoAdminHandler *pAH)
-{
-
- Chain role;
- pAH->getRole(role);
-
- Chain permid;
- pAH->getPermId(permid);
-
- _pDBMng->removePerm(role, permid);
-
- Host h;
- Chain mediator = h.getName();
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Permission removed")) == false )
- // return;
-
- pAH->sendResponse(Chain("Permission ") + permid + Chain(" removed"));
-
-}
-
-void CegoAdminThread::medUserTrace(CegoAdminHandler *pAH)
-{
-
- Chain user;
- pAH->getUser(user);
-
- bool isOn;
- pAH->getTrace(isOn);
-
- /*
-
- Chain primary = _pDBMng->getPrimary(tableSet);
- Chain secondary = _pDBMng->getSecondary(tableSet);
- Chain mediator = _pDBMng->getMediator(tableSet);
-
- Host h;
-
- if ( h.getName() != mediator )
- {
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Chain primaryStatus;
- Chain secondaryStatus;
-
- _pDBMng->getStatusByHost(primary, primaryStatus);
- _pDBMng->getStatusByHost(secondary, secondaryStatus);
-
- if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
- }
-
- if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( mediator != primary )
- {
-
- CegoAdminHandler* pPrimaryAH = 0;
-
- pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pPrimaryAH->reqUserTrace(tableSet, user, isOn);
-
- Chain msg;
- pPrimaryAH->getMsg(msg);
- closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( primary != secondary )
- {
-
- CegoAdminHandler* pSecondaryAH = 0;
-
- pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pSecondaryAH->reqUserTrace(tableSet, user, isOn);
-
- Chain msg;
- pSecondaryAH->getMsg(msg);
- closeSession(pSecondaryAH);
-
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
- }
- }
- */
-
- _pDBMng->setUserTrace(user, isOn);
-
- Host h;
- Chain mediator = h.getName();
-
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("User trace set")) == false )
- // return;
-
- pAH->sendResponse(Chain("User trace set"));
-
-}
-
-
-void CegoAdminThread::medBeginBackup(CegoAdminHandler *pAH)
-{
-
- Chain tableSet;
- pAH->getTableSet(tableSet);
-
- Chain primary;
- Chain secondary;
- Chain mediator;
- Chain status;
-
- Host h;
-
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- status = _pDBMng->getTableSetRunState(tableSet);
-
- if ( status != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status online\nto be backup up online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( h.getName() != mediator )
- {
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- Chain primaryStatus;
- Chain secondaryStatus;
-
- _pDBMng->getStatusByHost(primary, primaryStatus);
- _pDBMng->getStatusByHost(secondary, secondaryStatus);
-
- if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
- {
- Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- if ( mediator == primary )
- {
- _pTabMng->beginBackup(tableSet);
- }
- else
- {
-
- CegoAdminHandler* pPrimaryAH = 0;
-
- pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
-
- CegoAdminHandler::ResultType res = pPrimaryAH->reqBeginBackup(tableSet);
-
-
- Chain msg;
- pPrimaryAH->getMsg(msg);
- closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
- if ( res != CegoAdminHandler::ADM_OK)
- {
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
-
- _pDBMng->setTableSetRunState(tableSet,XML_BACKUP_VALUE);
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Set up tableset runstate")) == false )
- return;
-
- }
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Backup mode started")) == false )
- // return;
-
- pAH->sendResponse(Chain("Backup mode started"));
-
-
-}
-
-
-void CegoAdminThread::medEndBackup(CegoAdminHandler *pAH)
-{
-
- Chain tableSet;
- pAH->getTableSet(tableSet);
-
- bool keepTicket;
- pAH->getKeepTicket(keepTicket);
-
- Chain primary;
- Chain secondary;
- Chain mediator;
- Chain status;
-
-
- Host h;
-
- primary = _pDBMng->getPrimary(tableSet);
- secondary = _pDBMng->getSecondary(tableSet);
- mediator = _pDBMng->getMediator(tableSet);
- status = _pDBMng->getTableSetRunState(tableSet);
-
- if ( status != Chain(XML_BACKUP_VALUE) )
- {
- Chain msg = Chain("Tableset ") + tableSet + Chain(" must be\nin status backup to end backup");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status backup to end backup");
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -5735,17 +4899,13 @@
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -5765,25 +4925,19 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
_pDBMng->setTableSetRunState(tableSet, XML_ONLINE_VALUE);
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Set up tableset runstate")) == false )
- return;
-
}
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Backup mode finished")) == false )
- // return;
-
pAH->sendResponse(Chain("Backup mode finished"));
@@ -5820,42 +4974,27 @@
if ( status != Chain(XML_OFFLINE_VALUE) )
{
- Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status\noffline to be started");
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status offline to be started");
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -5865,8 +5004,7 @@
CegoRecoveryManager recoveryMng(_pTabMng);
lsn = recoveryMng.recoverTableSet(tableSet, pit, true, logMngProg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Tableset recovered\nto lsn ") + Chain(lsn)) == false )
- return;
+ pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Tableset recovered to lsn ") + Chain(lsn));
}
else
@@ -5882,23 +5020,18 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
-
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+ }
}
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Recovery completed")) == false )
- // return;
-
pAH->sendResponse(Chain("Recover completed"));
-
-
-
+
}
void CegoAdminThread::medSecSwitch(CegoAdminHandler *pAH)
@@ -5935,9 +5068,7 @@
catch ( Exception e )
{
Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
}
else
@@ -5954,22 +5085,19 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
- // if ( pAH->syncWithInfo(Chain("mediator"), h.getName(), Chain("Secondary switched")) == false )
- // return;
-
pAH->sendResponse(Chain("Secondary switch"));
-
}
@@ -6006,30 +5134,20 @@
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( isArchiveMode == false )
{
Chain msg = Chain("No archive mode enabled");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -6041,9 +5159,7 @@
catch ( Exception e )
{
Chain msg = e.getBaseMsg();
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
}
else // ( mediator != primary )
@@ -6059,32 +5175,28 @@
Chain msg;
pPrimaryAH->getMsg(msg);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
+
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pPrimaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
-
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pPrimaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
res = pPrimaryAH->reqSetSyncState(tableSet, XML_NOT_SYNCHED_VALUE);
pPrimaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pPrimaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
-
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pPrimaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
res = pPrimaryAH->reqSetTableSetNode(tableSet, primary, newSecondary, mediator);
@@ -6092,12 +5204,13 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
if ( mediator != secondary && primary != secondary )
@@ -6112,12 +5225,13 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
}
@@ -6130,63 +5244,42 @@
pSecondaryAH = getSession(Chain("secondary"), newSecondary, pAH->getUser(), pAH->getPassword());
CegoAdminHandler::ResultType res;
+ Chain msg;
res = pSecondaryAH->reqPropTSInfo(_pDBMng->getTableSetInfo(tableSet));
- Chain msg;
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), newSecondary, msg) == false )
- {
- closeSession(pSecondaryAH);
- return;
- }
if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
res = pSecondaryAH->reqSecSwitch(tableSet, newSecondary);
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), newSecondary, msg) == false )
- {
- closeSession(pSecondaryAH);
- return;
- }
if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
res = pSecondaryAH->reqSetRunState(tableSet, _pDBMng->getTableSetRunState(tableSet));
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), newSecondary, msg) == false )
- {
- closeSession(pSecondaryAH);
- return;
- }
if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
res = pSecondaryAH->reqSetSyncState(tableSet, XML_NOT_SYNCHED_VALUE);
-
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), newSecondary, msg) == false )
- {
- closeSession(pSecondaryAH);
- return;
- }
if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pSecondaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
res = pSecondaryAH->reqSetTableSetNode(tableSet, primary, newSecondary, mediator);
@@ -6194,17 +5287,12 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- if ( pAH->syncWithInfo(Chain("secondary"), newSecondary, msg) == false )
- {
- return;
- }
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
}
-
if ( primary != newSecondary )
{
_pDBMng->setTableSetSyncState(tableSet, XML_NOT_SYNCHED_VALUE);
@@ -6216,9 +5304,6 @@
_pDBMng->setSecondary(tableSet, newSecondary);
- // if ( pAH->syncWithInfo(Chain("mediator"), h.getName(), Chain("Secondary relocated")) == false )
- // return;
-
pAH->sendResponse(Chain("Secondary relocated"));
@@ -6248,11 +5333,7 @@
if ( h.getName() != secondary )
{
Chain msg = Chain("Invalid secondary host ") + h.getName() + Chain(" for tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( mediator != secondary )
@@ -6268,12 +5349,13 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
@@ -6290,24 +5372,18 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
_pDBMng->setMediator(tableSet, secondary);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Set secondary to") + secondary) == false )
- return;
-
-
- // if ( pAH->syncWithInfo(Chain("mediator"), h.getName(), Chain("Secondary switched")) == false )
- // return;
-
pAH->sendResponse("Secondary switched");
@@ -6331,12 +5407,8 @@
if ( h.getName() != secondary )
{
- Chain msg = Chain("Invalid secondary host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Invalid secondary host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -6350,20 +5422,12 @@
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( primary != newMediator )
@@ -6378,19 +5442,16 @@
res = pPrimaryAH->reqSetTableSetNode(tableSet, primary, secondary, newMediator);
Chain msg;
pPrimaryAH->getMsg(msg);
-
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
+
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pPrimaryAH);
- return;
+ throw Exception(EXLOC, msg);
}
-
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pPrimaryAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+ }
}
if ( secondary != newMediator )
@@ -6406,36 +5467,32 @@
Chain msg;
pMediatorAH->getMsg(msg);
-
- if ( pAH->syncWithInfo(Chain("mediator"), newMediator, msg) == false )
+
+ if ( res != CegoAdminHandler::ADM_OK)
{
closeSession(pMediatorAH);
- return;
+ throw Exception(EXLOC, msg);
}
-
- if ( res != CegoAdminHandler::ADM_OK)
+ else
{
- closeSession(pMediatorAH);
- throw Exception(EXLOC, Chain("Admin action failed"));
- }
+ pAH->syncWithInfo(Chain("mediator"), newMediator, msg);
+ }
res = pMediatorAH->reqSetTableSetNode(tableSet, primary, secondary, newMediator);
pMediatorAH->getMsg(msg);
closeSession(pMediatorAH);
- if ( pAH->syncWithInfo(Chain("mediator"), newMediator, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ {
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("mediator"), newMediator, msg);
+ }
}
_pDBMng->setMediator(tableSet, newMediator);
-
-
- // if ( pAH->syncWithInfo(Chain("mediator"), h.getName(), Chain("Mediator relocated")) == false )
- // return;
pAH->sendResponse("Mediator relocated");
@@ -6456,12 +5513,8 @@
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -6482,20 +5535,13 @@
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
CegoAdminHandler* pPrimaryAH = 0;
@@ -6512,13 +5558,14 @@
Chain msg;
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
-
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
}
@@ -6531,12 +5578,13 @@
pSecondaryAH->getMsg(msg);
closeSession(pSecondaryAH);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
}
@@ -6550,10 +5598,6 @@
pCheck->setAttribute(XML_MEDIATOR_ATTR, mediator);
pCheck->setAttribute(XML_PRIMARY_ATTR, primary);
pCheck->setAttribute(XML_SECONDARY_ATTR, secondary);
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Check completed")) == false )
- // return;
-
pAH->sendResponse(Chain("Check completed"), pCheck);
}
@@ -6586,26 +5630,20 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( status != Chain(XML_ONLINE_VALUE) )
{
- Chain msg = Chain("Tableset ") + tableSet + Chain(" must be\nin status online to be verified");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status online to be verified");
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -6620,24 +5658,18 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -6695,14 +5727,10 @@
}
catch ( Exception e )
- {
-
+ {
Chain msg;
e.pop(msg);
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC,msg);
}
}
else
@@ -6718,12 +5746,13 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
@@ -6732,19 +5761,19 @@
CegoAdminHandler* pSecondaryAH = 0;
-
pSecondaryAH = getSession(Chain("secondary"), secondary, pAH->getUser(), pAH->getPassword());
CegoAdminHandler::ResultType res; // TODO = pSecondaryAH->reqVerifyTS(tableSet);
Chain msg;
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
closeSession(pSecondaryAH);
@@ -6781,26 +5810,20 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( status != Chain(XML_ONLINE_VALUE) )
{
- Chain msg = Chain("Tableset ") + tableSet + Chain(" must be\nin status online to be corrected");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in status online to be corrected");
+ throw Exception(EXLOC, msg);
}
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -6815,24 +5838,18 @@
{
Chain msg;
e.pop(msg);
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -6848,13 +5865,10 @@
Chain *pTable = tableList.First();
while ( pTable)
- {
-
+ {
Element *pCorrectionInfo = _pTabMng->correctTable(tableSet, *pTable);
- if ( pAH->syncWithInfo(Chain("primary"), h.getName(), Chain("Correction of ") + *pTable, pCorrectionInfo) == false )
- return;
- pTable = tableList.Next();
-
+ pAH->syncWithInfo(Chain("primary"), h.getName(), Chain("Correction of ") + *pTable, pCorrectionInfo);
+ pTable = tableList.Next();
}
@@ -6862,14 +5876,10 @@
}
catch ( Exception e )
- {
-
+ {
Chain msg;
e.pop(msg);
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
}
else
@@ -6885,12 +5895,13 @@
pPrimaryAH->getMsg(msg);
closeSession(pPrimaryAH);
- if ( pAH->syncWithInfo(Chain("primary"), primary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
}
@@ -6906,12 +5917,13 @@
Chain msg;
pSecondaryAH->getMsg(msg);
- if ( pAH->syncWithInfo(Chain("secondary"), secondary, msg) == false )
- return;
-
if ( res != CegoAdminHandler::ADM_OK)
{
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
+ }
+ else
+ {
+ pAH->syncWithInfo(Chain("secondary"), secondary, msg);
}
closeSession(pSecondaryAH);
@@ -6941,12 +5953,8 @@
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -6958,19 +5966,12 @@
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -6980,30 +5981,17 @@
_pDBMng->getArchLogInfo(tableSet, archIdList, archPathList);
if ( archIdList.Size() == 0 )
- {
-
+ {
Chain msg = Chain("No valid archive locations available");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
_pDBMng->enableArchLog(tableSet);
}
else
{
- Chain msg = Chain("Archive mode just supported\nin single node mode");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Archive mode just supported in single node mode");
+ throw Exception(EXLOC, msg);
}
-
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Arch mode enabled")) == false )
- // return;
-
pAH->sendResponse(Chain("Arch mode enabled"));
@@ -7033,12 +6021,8 @@
if ( h.getName() != mediator )
{
- Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain("\nfor tableset ") + tableSet;
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
}
Chain primaryStatus;
@@ -7050,21 +6034,12 @@
if ( primaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Primary host ") + primary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
-
+ throw Exception(EXLOC, msg);
}
if ( secondaryStatus != Chain(XML_ONLINE_VALUE) )
{
Chain msg = Chain("Secondary host ") + secondary + Chain(" not online");
-
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ throw Exception(EXLOC, msg);
}
if ( mediator == primary )
@@ -7073,19 +6048,12 @@
}
else
{
- Chain msg = Chain("Archive mode just supported\nin single node mode");
- if ( pAH->syncWithInfo(Chain("mediator"), mediator, msg) == false )
- return;
- throw Exception(EXLOC, Chain("Admin action failed"));
-
+ Chain msg = Chain("Archive mode just supported in single node mode");
+ throw Exception(EXLOC, msg);
}
- // if ( pAH->syncWithInfo(Chain("mediator"), mediator, Chain("Arch mode disabled")) == false )
- // return;
-
pAH->sendResponse(Chain("Arch mode disabled"));
-
}
@@ -7104,7 +6072,7 @@
}
catch ( Exception e )
{
- throw Exception(EXLOC, Chain("Cannot get session"), e);
+ throw Exception(EXLOC, Chain("Cannot get session to ") + hostname, e);
}
CegoAdminHandler* pAH = new CegoAdminHandler( _pDBMng, pN);
@@ -7256,7 +6224,7 @@
else
archMode = Chain(XML_OFF_VALUE);
- Element *pTSInfo = new Element(XML_TABLESETINFO_ELEMENT);
+ Element *pTSInfo = new Element(XML_TABLESET_ELEMENT);
pTSInfo->setAttribute(XML_NAME_ATTR, tableSet);
pTSInfo->setAttribute(XML_RUNSTATE_ATTR, runState);
|