tag:blogger.com,1999:blog-13762456.post115396336698654594..comments2023-08-24T08:48:47.817-04:00Comments on The reality of my fantasy life: db4o + ASP.NET = ... s'alright.Anonymoushttp://www.blogger.com/profile/01417447499799468996noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-13762456.post-84160085408896378452007-05-21T15:22:00.000-04:002007-05-21T15:22:00.000-04:00There's not much code to it; just a single static ...There's not much code to it; just a single static member that persists through the entire application lifecycle.<BR/><BR/>I put it in a helper class called 'app-helper'; when you first access the member, it checks to make sure the database has been set up, and if it hasn't, sets up the db then returns an instance of the database container object.<BR/><BR/>I haven't used db4o for awhile (mostly due to interoping with traditional databases) so I can't recall anything off the top of the head other than: db4o does _not_ release references to objects.<BR/><BR/>You'll need to use its built-in method to do that; db4o doesn't check to see if its the only thing holding a reference to an object so it will hold the reference and consume memory like a mofo till the app slows to a crawl or crashes.<BR/><BR/>Doesn't work with shared hosting either.<BR/><BR/>That's about all you need to know.Anonymoushttps://www.blogger.com/profile/01417447499799468996noreply@blogger.comtag:blogger.com,1999:blog-13762456.post-44888819283358704962007-05-21T13:19:00.000-04:002007-05-21T13:19:00.000-04:00Could you post some example code on how to set it ...Could you post some example code on how to set it up in the application ? I assume you need to have a single instance for your entire application?Timothy Parezhttps://www.blogger.com/profile/09155362781630295022noreply@blogger.com