From d259238c748aafe366fd1d04e0248ef23116fd28 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Tue, 3 Feb 2009 05:20:44 +0000 Subject: - moved data plugin loading code from various places to OpenSim/Data/DataPluginFactory.cs - removed dependencies on a few executable assemblies in bin/OpenSim.Data.addin.xml - trim trailing whitespace --- OpenSim/Grid/AssetServer/Main.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'OpenSim/Grid/AssetServer') diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 07fe0a4..060c473 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -112,24 +112,11 @@ namespace OpenSim.Grid.AssetServer return null; } - public IAssetDataPlugin LoadDatabasePlugin(string provider, string connect) - { - PluginLoader loader = - new PluginLoader (new AssetDataInitialiser (connect)); - - // loader will try to load all providers (MySQL, MSSQL, etc) - // unless it is constrainted to the correct "Provider" entry in the addin.xml - loader.Add ("/OpenSim/AssetData", new PluginProviderFilter (provider)); - loader.Load(); - - return loader.Plugin; - } - public void setupDB(AssetConfig config) { try { - m_assetProvider = LoadDatabasePlugin(config.DatabaseProvider, config.DatabaseConnect); + m_assetProvider = DataPluginFactory.LoadAssetDataPlugin(config.DatabaseProvider, config.DatabaseConnect); if (m_assetProvider == null) { m_log.Error("[ASSET]: Failed to load a database plugin, server halting"); -- cgit v1.1