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"
10 context.loadComponent(
"CORAL/RelationalPlugins/oracle");
11 coral::IHandle<coral::IRelationalDomain> domain =
12 context.query<coral::IRelationalDomain>(
"CORAL/RelationalPlugins/oracle");
13 if (!domain.isValid())
14 throw std::runtime_error(
"Could not load the OracleAccess plugin");
26 ctx.loadComponent(
"CORAL/RelationalPlugins/oracle");
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);
35 m_connection = iHandle->newConnection(connectionAndSchema.first);
40 coral::ISession* session =
m_connection->newSession(connectionAndSchema.second);