From 57c4b699169017e9552309c53f520b318cc8a1c0 Mon Sep 17 00:00:00 2001 From: diva Date: Thu, 11 Jun 2009 13:46:44 +0000 Subject: Changed the inventory service so that is uses exactly one DB plugin, not many. The composition of plugins can be done at the service and connector levels. This fixes the unit tests that were failing yesterday, but I'm not committing those yet, because I'm seeing 2 of those tests having pass and fail outcomes randomly which suggests that the tests are buggy. --- .../InventoryService/InventoryServiceBase.cs | 41 +--------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'OpenSim/Services/InventoryService/InventoryServiceBase.cs') diff --git a/OpenSim/Services/InventoryService/InventoryServiceBase.cs b/OpenSim/Services/InventoryService/InventoryServiceBase.cs index 4526c34..456e455 100644 --- a/OpenSim/Services/InventoryService/InventoryServiceBase.cs +++ b/OpenSim/Services/InventoryService/InventoryServiceBase.cs @@ -40,8 +40,6 @@ namespace OpenSim.Services.InventoryService { protected IInventoryDataPlugin m_Database = null; - protected List m_plugins = new List(); - public InventoryServiceBase(IConfigSource config) : base(config) { string dllName = String.Empty; @@ -56,8 +54,6 @@ namespace OpenSim.Services.InventoryService dllName = dbConfig.GetString("StorageProvider", String.Empty); connString = dbConfig.GetString("ConnectionString", String.Empty); } - else - Console.WriteLine("------ dbConfig = null!"); // // Try reading the more specific [InventoryService] section, if it exists @@ -79,43 +75,8 @@ namespace OpenSim.Services.InventoryService if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); - //m_Database.Initialise(connString); - List plugins - = DataPluginFactory.LoadDataPlugins(dllName, connString); - - foreach (IInventoryDataPlugin plugin in plugins) - AddPlugin(plugin); - - } - - #region Plugin methods - - /// - /// Add a new inventory data plugin - plugins will be requested in the order they were added. - /// - /// The plugin that will provide data - public void AddPlugin(IInventoryDataPlugin plugin) - { - m_plugins.Add(plugin); - } - - /// - /// Adds a list of inventory data plugins, as described by `provider' - /// and `connect', to `m_plugins'. - /// - /// - /// The filename of the inventory server plugin DLL. - /// - /// - /// The connection string for the storage backend. - /// - public void AddPlugins(string provider, string connect) - { - m_plugins.AddRange(DataPluginFactory.LoadDataPlugins(provider, connect)); + m_Database.Initialise(connString); } - #endregion - - } } -- cgit v1.1