11 #include "RelationalAccess/ConnectionService.h"
12 #include "RelationalAccess/IWebCacheControl.h"
13 #include "RelationalAccess/ISessionProxy.h"
14 #include "RelationalAccess/IConnectionServiceConfiguration.h"
15 #include "CoralKernel/Context.h"
16 #include "CoralKernel/IProperty.h"
17 #include "CoralKernel/IPropertyManager.h"
19 #include <boost/filesystem/operations.hpp>
23 namespace persistency {
55 level = coral::Warning;
73 coralConfig.disablePoolAutomaticCleanUp();
74 coralConfig.disableConnectionSharing();
77 std::string authServiceName(
"CORAL/Services/EnvironmentAuthenticationService");
91 authSys = ::atoi(authSysEnv);
100 const char* authEnv = std::getenv(
"HOME");
105 servName =
"COND/Services/RelationalAuthenticationService";
110 servName =
"COND/Services/XMLAuthenticationService";
113 authServiceName = servName;
118 coralConfig.setAuthenticationService(authServiceName);
122 coral::ConnectionService connServ;
129 coral::ConnectionService connServ;
131 std::pair<std::string, std::string> fullConnectionPars =
133 if (!fullConnectionPars.second.empty()) {
135 connServ.webCacheControl().setTableTimeToLive(fullConnectionPars.second,
TAG::tname, 1);
136 connServ.webCacheControl().setTableTimeToLive(fullConnectionPars.second,
IOV::tname, 1);
137 connServ.webCacheControl().setTableTimeToLive(fullConnectionPars.second,
PAYLOAD::tname, 3);
140 return std::shared_ptr<coral::ISessionProxy>(
141 connServ.connect(fullConnectionPars.first,
143 writeCapable ? coral::Update : coral::ReadOnly));
149 std::shared_ptr<coral::ISessionProxy> coralSession =