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 {
59 switch (messageLevel) {
64 level = coral::Warning;
84 coralConfig.disablePoolAutomaticCleanUp();
85 coralConfig.disableConnectionSharing();
88 std::string authServiceName(
"CORAL/Services/EnvironmentAuthenticationService" );
91 if( authPath.empty() ){
102 authSys = ::atoi( authSysEnv );
110 if( authPath.empty() ){
111 const char* authEnv = ::getenv(
"HOME" );
116 servName =
"COND/Services/RelationalAuthenticationService";
118 if( authPath.empty() ){
121 servName =
"COND/Services/XMLAuthenticationService";
123 if( !authPath.empty() ){
124 authServiceName = servName;
129 coralConfig.setAuthenticationService( authServiceName );
133 coral::ConnectionService connServ;
140 coral::ConnectionService connServ;
143 if( !fullConnectionPars.second.empty() ) {
145 connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second,
TAG::tname, 1 );
146 connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second,
IOV::tname, 1 );
147 connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second,
PAYLOAD::tname, 3 );
150 return std::shared_ptr<coral::ISessionProxy>( connServ.connect( fullConnectionPars.first,
152 writeCapable ? coral::Update : coral::ReadOnly ) );
158 std::shared_ptr<coral::ISessionProxy> coralSession =
createCoralSession( connectionString, transactionId, writeCapable );
159 return Session( std::make_shared<SessionImpl>( coralSession, connectionString ));
edm::ErrorSummaryEntry Error
T getUntrackedParameter(std::string const &, T const &) const
static PFTauRenderPlugin instance
static constexpr const char *const COND_AUTH_PATH
static constexpr const char *const COND_AUTH_PATH_PROPERTY
void setParameters(const edm::ParameterSet &connectionPset)
static char const * tname
static char const * tname
static constexpr const char *const COND_READER_ROLE
void setAuthenticationSystem(int authSysCode)
void setLogging(bool flag)
Session createSession(const std::string &connectionString, bool writeCapable=false)
bool isLoggingEnabled() const
void setMessageVerbosity(coral::MsgLevel level)
coral::MsgLevel m_messageLevel
std::string m_frontierSecurity
std::pair< std::string, std::string > getConnectionParams(const std::string &connectionString, const std::string &transactionId, const std::string &signature)
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
static constexpr const char *const COND_AUTH_SYS
static constexpr const char *const COND_WRITER_ROLE
cond::CoralServiceManager * m_pluginManager
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined signature
static char const * tname
void setAuthenticationPath(const std::string &p)
std::shared_ptr< coral::ISessionProxy > createCoralSession(const std::string &connectionString, bool writeCapable=false)
void setFrontierSecurity(const std::string &signature)