diff options
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.
Diffstat (limited to 'OpenSim/Services/InventoryService/InventoryServiceBase.cs')
-rw-r--r-- | OpenSim/Services/InventoryService/InventoryServiceBase.cs | 41 |
1 files changed, 1 insertions, 40 deletions
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 | |||
40 | { | 40 | { |
41 | protected IInventoryDataPlugin m_Database = null; | 41 | protected IInventoryDataPlugin m_Database = null; |
42 | 42 | ||
43 | protected List<IInventoryDataPlugin> m_plugins = new List<IInventoryDataPlugin>(); | ||
44 | |||
45 | public InventoryServiceBase(IConfigSource config) : base(config) | 43 | public InventoryServiceBase(IConfigSource config) : base(config) |
46 | { | 44 | { |
47 | string dllName = String.Empty; | 45 | string dllName = String.Empty; |
@@ -56,8 +54,6 @@ namespace OpenSim.Services.InventoryService | |||
56 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | 54 | dllName = dbConfig.GetString("StorageProvider", String.Empty); |
57 | connString = dbConfig.GetString("ConnectionString", String.Empty); | 55 | connString = dbConfig.GetString("ConnectionString", String.Empty); |
58 | } | 56 | } |
59 | else | ||
60 | Console.WriteLine("------ dbConfig = null!"); | ||
61 | 57 | ||
62 | // | 58 | // |
63 | // Try reading the more specific [InventoryService] section, if it exists | 59 | // Try reading the more specific [InventoryService] section, if it exists |
@@ -79,43 +75,8 @@ namespace OpenSim.Services.InventoryService | |||
79 | if (m_Database == null) | 75 | if (m_Database == null) |
80 | throw new Exception("Could not find a storage interface in the given module"); | 76 | throw new Exception("Could not find a storage interface in the given module"); |
81 | 77 | ||
82 | //m_Database.Initialise(connString); | 78 | m_Database.Initialise(connString); |
83 | List<IInventoryDataPlugin> plugins | ||
84 | = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(dllName, connString); | ||
85 | |||
86 | foreach (IInventoryDataPlugin plugin in plugins) | ||
87 | AddPlugin(plugin); | ||
88 | |||
89 | } | ||
90 | |||
91 | #region Plugin methods | ||
92 | |||
93 | /// <summary> | ||
94 | /// Add a new inventory data plugin - plugins will be requested in the order they were added. | ||
95 | /// </summary> | ||
96 | /// <param name="plugin">The plugin that will provide data</param> | ||
97 | public void AddPlugin(IInventoryDataPlugin plugin) | ||
98 | { | ||
99 | m_plugins.Add(plugin); | ||
100 | } | ||
101 | |||
102 | /// <summary> | ||
103 | /// Adds a list of inventory data plugins, as described by `provider' | ||
104 | /// and `connect', to `m_plugins'. | ||
105 | /// </summary> | ||
106 | /// <param name="provider"> | ||
107 | /// The filename of the inventory server plugin DLL. | ||
108 | /// </param> | ||
109 | /// <param name="connect"> | ||
110 | /// The connection string for the storage backend. | ||
111 | /// </param> | ||
112 | public void AddPlugins(string provider, string connect) | ||
113 | { | ||
114 | m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(provider, connect)); | ||
115 | } | 79 | } |
116 | 80 | ||
117 | #endregion | ||
118 | |||
119 | |||
120 | } | 81 | } |
121 | } | 82 | } |