diff options
Diffstat (limited to 'OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs')
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | 29 |
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 | { |