aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs17
1 files changed, 3 insertions, 14 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
index a5e4c95..40959a4 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
@@ -38,6 +38,7 @@ using OpenMetaverse;
38using OpenMetaverse.StructuredData; 38using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Grid.AssetInventoryServer.Extensions; 40using OpenSim.Grid.AssetInventoryServer.Extensions;
41using OpenSim.Data;
41 42
42namespace OpenSim.Grid.AssetInventoryServer.Plugins 43namespace OpenSim.Grid.AssetInventoryServer.Plugins
43{ 44{
@@ -46,7 +47,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
46 const string EXTENSION_NAME = "OpenSimAssetStorage"; // Used in metrics reporting 47 const string EXTENSION_NAME = "OpenSimAssetStorage"; // Used in metrics reporting
47 48
48 private AssetInventoryServer server; 49 private AssetInventoryServer server;
49 private IAssetProviderPlugin m_assetProvider; 50 private IAssetDataPlugin m_assetProvider;
50 51
51 public OpenSimAssetStoragePlugin() 52 public OpenSimAssetStoragePlugin()
52 { 53 {
@@ -315,7 +316,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
315 316
316 try 317 try
317 { 318 {
318 m_assetProvider = LoadDatabasePlugin("OpenSim.Data.MySQL.dll", server.ConfigFile.Configs["MySQL"].GetString("database_connect", null)); 319 m_assetProvider = DataPluginFactory.LoadAssetDataPlugin("OpenSim.Data.MySQL.dll", server.ConfigFile.Configs["MySQL"].GetString("database_connect", null));
319 if (m_assetProvider == null) 320 if (m_assetProvider == null)
320 { 321 {
321 Logger.Log.Error("[ASSET]: Failed to load a database plugin, server halting."); 322 Logger.Log.Error("[ASSET]: Failed to load a database plugin, server halting.");
@@ -354,17 +355,5 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
354 } 355 }
355 356
356 #endregion IPlugin implementation 357 #endregion IPlugin implementation
357
358 private IAssetProviderPlugin LoadDatabasePlugin(string provider, string connect)
359 {
360 PluginLoader<IAssetProviderPlugin> loader = new PluginLoader<IAssetProviderPlugin>(new AssetDataInitialiser(connect));
361
362 // Loader will try to load all providers (MySQL, MSSQL, etc)
363 // unless it is constrainted to the correct "Provider" entry in the addin.xml
364 loader.Add("/OpenSim/AssetData", new PluginProviderFilter (provider));
365 loader.Load();
366
367 return loader.Plugin;
368 }
369 } 358 }
370} 359}