aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Storage/LocalStorageDb4o
diff options
context:
space:
mode:
authorAdam Frisby2007-04-27 21:11:02 +0000
committerAdam Frisby2007-04-27 21:11:02 +0000
commit6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0 (patch)
treefa25cc297d83f70080b21f78e3bc04d32df5b00f /OpenSim.Storage/LocalStorageDb4o
parent* Added new commandline option -config <configfile.xml> (diff)
downloadopensim-SC-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.zip
opensim-SC-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.tar.gz
opensim-SC-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.tar.bz2
opensim-SC-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.tar.xz
Major ass commit
Added new "Datastore" parameter to simconfig.xml which is passed to storage engines via a new Initialise() function.
Diffstat (limited to 'OpenSim.Storage/LocalStorageDb4o')
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
index 488da58..3c17f1f 100644
--- a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -41,21 +41,28 @@ namespace OpenSim.Storage.LocalStorageDb4o
41 public class Db4LocalStorage : ILocalStorage 41 public class Db4LocalStorage : ILocalStorage
42 { 42 {
43 private IObjectContainer db; 43 private IObjectContainer db;
44 private string datastore;
44 45
45 public Db4LocalStorage() 46 public Db4LocalStorage()
46 { 47 {
47 try 48
48 {
49 db = Db4oFactory.OpenFile("localworld.yap");
50 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation");
51 }
52 catch(Exception e)
53 {
54 db.Close();
55 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured");
56 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
57 }
58 } 49 }
50
51 public void Initialise(string dfile)
52 {
53 datastore = dfile;
54 try
55 {
56 db = Db4oFactory.OpenFile(datastore);
57 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation");
58 }
59 catch (Exception e)
60 {
61 db.Close();
62 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured");
63 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
64 }
65 }
59 66
60 public void StorePrim(PrimData prim) 67 public void StorePrim(PrimData prim)
61 { 68 {