4 #include "RelationalAccess/IWebCacheControl.h"
21 std::string
getRealConnectString(
const std::string&userconnect,
const std::string& transactionId )
const;
26 std::string
makeRealConnectString(
const std::string& initialConnection,
const std::string& transactionId )
const ;
51 m_refreshtablelist.clear();
60 while( slashpos!=std::string::npos){
61 slashpos = input.find(
'/', slashpos );
62 if ( slashpos != std::string::npos ){
73 const std::string& transactionId )
const {
74 std::string realConn = initialConnection;
77 std::string proto(
"frontier://");
79 unsigned int nslash=
countslash(initialConnection.substr(proto.size(),initialConnection.size()-fpos));
83 throw cms::Exception(
"edm::SiteLocalConfigService is not available");
88 if (!transactionId.empty()) {
89 size_t l = realConn.rfind(
'/');
90 realConn.insert(l,
"(freshkey="+transactionId+
')');
95 std::string refreshConnect;
97 if (startRefresh != std::string::npos){
101 if (endRefresh == std::string::npos){
102 refreshConnect = realConn;
104 refreshConnect = realConn.substr(startRefresh, endRefresh-startRefresh);
105 if(refreshConnect.substr(0,1) !=
"("){
108 refreshConnect.insert(0,
"http://");
111 std::vector<std::string>::const_iterator ibeg=m_refreshtablelist.begin();
112 std::vector<std::string>::const_iterator iend=m_refreshtablelist.end();
113 for(std::vector<std::string>::const_iterator it=ibeg; it!=iend; ++it){
114 m_dbConnection->webCacheControl().refreshTable(refreshConnect,*it );
126 if( ! m_dbConnection ){
127 throwException(
"The Technology Proxy has not been initialized.",
"FrontierProxy::getRealConnectString");
129 return makeRealConnectString( userconnect, m_dbConnection->configuration().transactionId() );
134 if( ! m_dbConnection ){
135 throwException(
"The Technology Proxy has not been initialized.",
"FrontierProxy::getRealConnectString");
137 const std::string* tId = &transId;
138 if( transId.empty() ) tId = &m_dbConnection->configuration().transactionId();
139 return makeRealConnectString( userconnect, *tId );
144 m_dbConnection = &connection;
std::string makeRealConnectString(const std::string &initialConnection, const std::string &transactionId) const
const DbConnection * m_dbConnection
virtual std::string const lookupCalibConnect(std::string const &input) const =0
std::vector< std::string > m_refreshtablelist
static std::string iovDataTableName()
unsigned int countslash(const std::string &input)
void throwException(std::string const &message, std::string const &methodName)
std::string getRealConnectString(const std::string &userconnect) const
static std::string iovTableName()
#define DEFINE_EDM_PLUGIN(factory, type, name)
void initialize(const DbConnection &connection)
bool isTransactional() const