29 using System.Reflection;
32 using OpenSim.Services.Interfaces;
33 using OpenSim.Services.Base;
35 namespace OpenSim.Services.UserAccountService
43 string dllName = String.Empty;
44 string connString = String.Empty;
45 string realm =
"UserAccounts";
47 IConfig dbConfig = config.Configs[
"DatabaseService"];
50 dllName = dbConfig.GetString(
"StorageProvider", String.Empty);
51 connString = dbConfig.GetString(
"ConnectionString", String.Empty);
54 IConfig userConfig = config.Configs[
"UserAccountService"];
55 if (userConfig == null)
56 throw new Exception(
"No UserAccountService configuration");
58 dllName = userConfig.GetString(
"StorageProvider", dllName);
60 if (dllName == String.Empty)
61 throw new Exception(
"No StorageProvider configured");
63 connString = userConfig.GetString(
"ConnectionString", connString);
65 realm = userConfig.GetString(
"Realm", realm);
67 m_Database = LoadPlugin<IUserAccountData>(dllName,
new Object[] {connString, realm});
69 if (m_Database == null)
70 throw new Exception(
"Could not find a storage interface in the given module");
UserAccountServiceBase(IConfigSource config)
An interface for connecting to the user accounts datastore