28 using System.Collections.Generic;
29 using System.Reflection;
31 using OpenSim.Framework;
33 using OpenSim.Services.Interfaces;
34 using OpenSim.Services.Base;
36 namespace OpenSim.OfflineIM
45 string dllName = String.Empty;
46 string connString = String.Empty;
47 string realm =
"im_offline";
52 IConfig dbConfig = config.Configs[
"DatabaseService"];
55 if (dllName == String.Empty)
56 dllName = dbConfig.GetString(
"StorageProvider", String.Empty);
57 if (connString == String.Empty)
58 connString = dbConfig.GetString(
"ConnectionString", String.Empty);
64 IConfig imConfig = config.Configs[
"Messaging"];
67 dllName = imConfig.GetString(
"StorageProvider", dllName);
68 connString = imConfig.GetString(
"ConnectionString", connString);
69 realm = imConfig.GetString(
"Realm", realm);
75 if (dllName.Equals(String.Empty))
76 throw new Exception(
"No StorageProvider configured");
78 m_Database = LoadPlugin<IOfflineIMData>(dllName,
new Object[] { connString, realm });
79 if (m_Database == null)
80 throw new Exception(
"Could not find a storage interface in the given module " + dllName);
OfflineIMServiceBase(IConfigSource config)