diff options
author | Melanie Thielker | 2008-07-18 20:50:47 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-07-18 20:50:47 +0000 |
commit | a73d87ef1651ac1e935e0cfebed99282a69c3941 (patch) | |
tree | 5d3428e079e5f720670215b7071da0f331648709 /OpenSim/Region | |
parent | Patch to fix saving of estate managers list loaded during migration. (diff) | |
download | opensim-SC-a73d87ef1651ac1e935e0cfebed99282a69c3941.zip opensim-SC-a73d87ef1651ac1e935e0cfebed99282a69c3941.tar.gz opensim-SC-a73d87ef1651ac1e935e0cfebed99282a69c3941.tar.bz2 opensim-SC-a73d87ef1651ac1e935e0cfebed99282a69c3941.tar.xz |
Introduce a separate connection string for estates, which defaults to the one gi
ven for the region datastore. Removes the flag to store prim inventories, which are now always stored.
Diffstat (limited to 'OpenSim/Region')
4 files changed, 11 insertions, 16 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 910ec55..05e4f46 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -300,9 +300,8 @@ namespace OpenSim | |||
300 | } | 300 | } |
301 | m_storageConnectionString | 301 | m_storageConnectionString |
302 | = startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3"); | 302 | = startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3"); |
303 | m_storagePersistPrimInventories | 303 | m_estateConnectionString |
304 | = startupConfig.GetBoolean("storage_prim_inventories", true); | 304 | = startupConfig.GetString("estate_connection_string", m_storageConnectionString); |
305 | |||
306 | m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); | 305 | m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); |
307 | m_assetStorage = startupConfig.GetString("asset_database", "local"); | 306 | m_assetStorage = startupConfig.GetString("asset_database", "local"); |
308 | m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); | 307 | m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); |
@@ -555,9 +554,9 @@ namespace OpenSim | |||
555 | return clientServer; | 554 | return clientServer; |
556 | } | 555 | } |
557 | 556 | ||
558 | protected override StorageManager CreateStorageManager(string connectionstring) | 557 | protected override StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring) |
559 | { | 558 | { |
560 | return new StorageManager(m_storageDll, connectionstring, m_storagePersistPrimInventories); | 559 | return new StorageManager(m_storageDll, connectionstring, estateconnectionstring); |
561 | } | 560 | } |
562 | 561 | ||
563 | protected override ClientStackManager CreateClientStackManager() | 562 | protected override ClientStackManager CreateClientStackManager() |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index dadaf88..3e941cf 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -62,13 +62,10 @@ namespace OpenSim.Region.ClientStack | |||
62 | 62 | ||
63 | protected StorageManager m_storageManager; | 63 | protected StorageManager m_storageManager; |
64 | protected string m_storageConnectionString; | 64 | protected string m_storageConnectionString; |
65 | protected string m_estateConnectionString; | ||
65 | 66 | ||
66 | protected ClientStackManager m_clientStackManager; | 67 | protected ClientStackManager m_clientStackManager; |
67 | 68 | ||
68 | // An attribute to indicate whether prim inventories should be persisted. | ||
69 | // Probably will be temporary until this stops being experimental. | ||
70 | protected bool m_storagePersistPrimInventories; | ||
71 | |||
72 | public SceneManager SceneManager | 69 | public SceneManager SceneManager |
73 | { | 70 | { |
74 | get { return m_sceneManager; } | 71 | get { return m_sceneManager; } |
@@ -78,7 +75,7 @@ namespace OpenSim.Region.ClientStack | |||
78 | { | 75 | { |
79 | base.Startup(); | 76 | base.Startup(); |
80 | 77 | ||
81 | m_storageManager = CreateStorageManager(m_storageConnectionString); | 78 | m_storageManager = CreateStorageManager(m_storageConnectionString, m_estateConnectionString); |
82 | 79 | ||
83 | m_clientStackManager = CreateClientStackManager(); | 80 | m_clientStackManager = CreateClientStackManager(); |
84 | 81 | ||
@@ -101,7 +98,7 @@ namespace OpenSim.Region.ClientStack | |||
101 | 98 | ||
102 | // protected abstract ConsoleBase CreateConsole(); | 99 | // protected abstract ConsoleBase CreateConsole(); |
103 | protected abstract PhysicsScene GetPhysicsScene(); | 100 | protected abstract PhysicsScene GetPhysicsScene(); |
104 | protected abstract StorageManager CreateStorageManager(string connectionstring); | 101 | protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring); |
105 | protected abstract ClientStackManager CreateClientStackManager(); | 102 | protected abstract ClientStackManager CreateClientStackManager(); |
106 | 103 | ||
107 | protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config) | 104 | protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config) |
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs index 0316f20..ad5983c 100644 --- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs | |||
@@ -39,8 +39,7 @@ namespace OpenSim.Region.Environment.Interfaces | |||
39 | /// </summary> | 39 | /// </summary> |
40 | /// <param name="filename">The file to save the database to (may not be applicable). Alternatively, | 40 | /// <param name="filename">The file to save the database to (may not be applicable). Alternatively, |
41 | /// a connection string for the database</param> | 41 | /// a connection string for the database</param> |
42 | /// <param name="persistPrimInventories">Temporary switch while this option is immature</param> | 42 | void Initialise(string filename); |
43 | void Initialise(string filename, bool persistPrimInventories); | ||
44 | 43 | ||
45 | /// <summary> | 44 | /// <summary> |
46 | /// Stores all object's details apart from inventory | 45 | /// Stores all object's details apart from inventory |
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 768e12c..36c9196 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment | |||
55 | m_dataStore = storage; | 55 | m_dataStore = storage; |
56 | } | 56 | } |
57 | 57 | ||
58 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) | 58 | public StorageManager(string dllName, string connectionstring, string estateconnectionstring) |
59 | { | 59 | { |
60 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); | 60 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); |
61 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 61 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment | |||
70 | { | 70 | { |
71 | IRegionDataStore plug = | 71 | IRegionDataStore plug = |
72 | (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 72 | (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
73 | plug.Initialise(connectionstring, persistPrimInventories); | 73 | plug.Initialise(connectionstring); |
74 | 74 | ||
75 | m_dataStore = plug; | 75 | m_dataStore = plug; |
76 | 76 | ||
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment | |||
83 | { | 83 | { |
84 | IEstateDataStore estPlug = | 84 | IEstateDataStore estPlug = |
85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
86 | estPlug.Initialise(connectionstring); | 86 | estPlug.Initialise(estateconnectionstring); |
87 | 87 | ||
88 | m_estateDataStore = estPlug; | 88 | m_estateDataStore = estPlug; |
89 | } | 89 | } |