aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetInventoryServer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs17
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml6
2 files changed, 8 insertions, 15 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}
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml
index a7e5dec..0fe2f48 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml
@@ -1,13 +1,17 @@
1<Addin id="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" version="0.1"> 1<Addin id="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" version="0.1">
2 <Runtime> 2 <Runtime>
3 <Import assembly="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" /> 3 <Import assembly="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" />
4 <Import assembly="OpenSim.Data.dll" />
4 </Runtime> 5 </Runtime>
6
5 <Dependencies> 7 <Dependencies>
6 <Addin id="OpenSim.Grid.AssetInventoryServer" version="0.1" /> 8 <Addin id="OpenSim.Grid.AssetInventoryServer" version="0.1" />
7 </Dependencies> 9 </Dependencies>
10
8 <ExtensionPoint path = "/OpenSim/AssetData"> 11 <ExtensionPoint path = "/OpenSim/AssetData">
9 <ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetProviderPlugin" /> 12 <ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IAssetDataPlugin" />
10 </ExtensionPoint> 13 </ExtensionPoint>
14
11 <Extension path="/OpenSim/AssetInventoryServer/StorageProvider"> 15 <Extension path="/OpenSim/AssetInventoryServer/StorageProvider">
12 <Plugin id="OpenSimAssetStorage" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSimAssetStoragePlugin" /> 16 <Plugin id="OpenSimAssetStorage" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSimAssetStoragePlugin" />
13 </Extension> 17 </Extension>