You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Mauricio CASTRO <mc...@hotmail.com> on 2003/05/24 21:30:52 UTC

ODMG intialization.

Hi,

If I am using ODMG in a multithreaded application. Should I call for each
thread the following code?

    Implementation instance = OJB.getInstance();
    Database db = instance.newDatabase();
    //open database
    db.open(dbName, Database.OPEN_READ_WRITE);
    odmg.set(instance);

Or I just call db.open(...) the first time?
It's is possible to share db among the different threads?
Should I close something at any time, apart committing/aborting
transactions?


Thank you!
Mauicio Castro.


"The question of whether computers can think is like the question of whether
submarines can swim.", Edsger Wybe Dijkstra (1930-2002).