2 #include "RelationalAccess/IRelationalDomain.h"
3 #include "RelationalAccess/IConnection.h"
4 #include "RelationalAccess/ISession.h"
5 #include "RelationalAccess/RelationalServiceException.h"
6 #include "CoralKernel/Context.h"
11 context.loadComponent(
"CORAL/RelationalPlugins/oracle");
12 coral::IHandle<coral::IRelationalDomain> domain =
13 context.query<coral::IRelationalDomain>(
"CORAL/RelationalPlugins/oracle");
14 if (!domain.isValid())
15 throw std::runtime_error(
"Could not load the OracleAccess plugin");
27 coral::IHandle<coral::IRelationalDomain> iHandle =
28 ctx.query<coral::IRelationalDomain>(
"CORAL/RelationalPlugins/oracle");
29 if (!iHandle.isValid()) {
30 throw std::runtime_error(
"Could not load the OracleAccess plugin");
32 std::pair<std::string, std::string> connectionAndSchema = iHandle->decodeUserConnectionString(
connectionString);
34 m_connection = iHandle->newConnection(connectionAndSchema.first);
39 coral::ISession* session =
m_connection->newSession(connectionAndSchema.second);
41 session->startUserSession(
user, pass);