allow for Inventory database source to be specified in main

configs.  This works with sqlite and nhibernate backends, and
stays with default seperate ini files for mysql and mssql until
someone writes those.
This commit is contained in:
Sean Dague
2008-04-23 20:48:23 +00:00
parent a1cc0e436f
commit 3dd98a112f
12 changed files with 75 additions and 52 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenSim.Grid.InventoryServer
/// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
/// </summary>
/// <param name="FileName">The filename to the inventory server plugin DLL</param>
public void AddDatabasePlugin(string FileName)
public void AddDatabasePlugin(string FileName, string dbconnect)
{
m_log.Info("[" + OpenInventory_Main.LogName + "]: Invenstorage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
@@ -65,7 +65,7 @@ namespace OpenSim.Grid.InventoryServer
{
IInventoryData plug =
(IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise();
plug.Initialise(dbconnect);
_databasePlugin = plug;
m_log.Info("[" + OpenInventory_Main.LogName + "]: " +
"Invenstorage: Added IInventoryData Interface");

View File

@@ -72,7 +72,7 @@ namespace OpenSim.Grid.InventoryServer
m_inventoryService = new GridInventoryService();
// m_inventoryManager = new InventoryManager();
m_inventoryService.AddPlugin(m_config.DatabaseProvider);
m_inventoryService.AddPlugin(m_config.DatabaseProvider, m_config.DatabaseConnect);
m_log.Info("[" + LogName + "]: Starting HTTP server ...");