12 #include "RelationalAccess/ConnectionService.h"
13 #include "RelationalAccess/IWebCacheControl.h"
14 #include "RelationalAccess/ISessionProxy.h"
15 #include "RelationalAccess/IConnectionServiceConfiguration.h"
16 #include "CoralKernel/Context.h"
17 #include "CoralKernel/IProperty.h"
18 #include "CoralKernel/IPropertyManager.h"
22 namespace persistency {
56 level = coral::Warning;
74 coralConfig.disablePoolAutomaticCleanUp();
75 coralConfig.disableConnectionSharing();
81 std::string authServiceName(
"CORAL/Services/EnvironmentAuthenticationService");
95 authSys = ::atoi(authSysEnv);
104 const char* authEnv = std::getenv(
"HOME");
109 servName =
"COND/Services/RelationalAuthenticationService";
114 servName =
"COND/Services/XMLAuthenticationService";
117 authServiceName = servName;
122 coralConfig.setAuthenticationService(authServiceName);
126 coral::ConnectionService connServ;
133 coral::ConnectionService connServ;
135 std::pair<std::string, std::string> fullConnectionPars =
137 if (!fullConnectionPars.second.empty()) {
139 connServ.webCacheControl().setTableTimeToLive(fullConnectionPars.second,
TAG::tname, 1);
140 connServ.webCacheControl().setTableTimeToLive(fullConnectionPars.second,
IOV::tname, 1);
141 connServ.webCacheControl().setTableTimeToLive(fullConnectionPars.second,
PAYLOAD::tname, 3);
144 return std::shared_ptr<coral::ISessionProxy>(
145 connServ.connect(fullConnectionPars.first,
147 writeCapable ? coral::Update : coral::ReadOnly));
153 std::shared_ptr<coral::ISessionProxy> coralSession =