Commit 1/2

* DB4o no longer crashes the sim on Startup
* DB4o now crashes the sim on shutdown.
* Variety of console verbosity fixes.
This commit is contained in:
Adam Frisby
2007-07-29 09:37:29 +00:00
parent c518a9e141
commit 038774de30
10 changed files with 30 additions and 20 deletions

View File

@@ -37,6 +37,7 @@ namespace OpenSim.DataStore.DB4oStorage
public void Initialise(string dbfile, string dbname)
{
MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile);
db = Db4oFactory.OpenFile(dbfile);
return;
@@ -62,6 +63,8 @@ namespace OpenSim.DataStore.DB4oStorage
IObjectSet result = db.Get(typeof(SceneObject));
List<SceneObject> retvals = new List<SceneObject>();
MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
foreach (Object obj in result)
{
retvals.Add((SceneObject)obj);
@@ -97,8 +100,11 @@ namespace OpenSim.DataStore.DB4oStorage
public void Shutdown()
{
db.Commit();
db.Close();
if (db != null)
{
db.Commit();
db.Close();
}
}
}
}