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 coral::Context& context = coral::Context::instance();
12 context.loadComponent(
"CORAL/RelationalPlugins/oracle" );
13 coral::IHandle<coral::IRelationalDomain> domain = context.query<coral::IRelationalDomain>(
14 "CORAL/RelationalPlugins/oracle" );
15 if ( ! domain.isValid() )
16 throw std::runtime_error(
"Could not load the OracleAccess plugin" );
28 const std::string& userName,
29 const std::string& password )
31 coral::Context& ctx = coral::Context::instance();
32 ctx.loadComponent(
"CORAL/RelationalPlugins/oracle");
33 coral::IHandle<coral::IRelationalDomain> iHandle=ctx.query<coral::IRelationalDomain>(
"CORAL/RelationalPlugins/oracle");
34 if ( ! iHandle.isValid() ) {
35 throw std::runtime_error(
"Could not load the OracleAccess plugin" );
37 std::pair<std::string, std::string> connectionAndSchema = iHandle->decodeUserConnectionString( connectionString );
40 m_connection = iHandle->newConnection( connectionAndSchema.first );
48 session->startUserSession( userName, password );
58 coral::MessageStream::setMsgVerbosity(level);
void setVerbosityLevel(coral::MsgLevel level)
coral::ISession * connect(const std::string &connectionString, const std::string &userName, const std::string &password)
coral::IConnection * m_connection