45 coral::IHandle<coral::IConnectionService> lookSvcH =
m_context->query<coral::IConnectionService>();
46 if (!lookSvcH.isValid()) {
47 m_context->loadComponent(
"CORAL/Services/ConnectionService");
48 lookSvcH = m_context->query<coral::IConnectionService>();
50 if (!lookSvcH.isValid()) { return; }
51 m_context->loadComponent(
"CORAL/Services/XMLAuthenticationService");
52 m_context->loadComponent(
"CORAL/Services/RelationalService");
159 coral::IHandle<coral::IRelationalService> relationalService =
m_context->query<coral::IRelationalService>();
160 if (!relationalService.isValid()) {
161 throw std::runtime_error(
162 Form(
"File: %s, Line: %d\nCalibDbConnection::domain() - Could not locate the relational service!", __FILE__, __LINE__));
165 coral::IHandle<coral::IAuthenticationService> authenticationService =
m_context->query<coral::IAuthenticationService>();
166 if (!authenticationService.isValid()) {
167 throw std::runtime_error(
168 Form(
"File: %s, Line: %d\nCalibDbConnection::domain() - Could not locate the authentication service!", __FILE__, __LINE__));
171 const coral::IAuthenticationCredentials& credentials = authenticationService->credentials(connectionString);
172 m_username = credentials.valueForItem(
"user");
173 m_password = credentials.valueForItem(
"password");
176 return relationalService->domainForConnection(connectionString);