Hello,

I'm accessing OJB inside JBoss 3.0.x.
Inside of a session EJB I want to get a Database reference.
Calling:

      Database         _ojbDb = null;
      String pmname = "java:/ojb/defaultODMG";
...
           InitialContext jndiContext = new InitialContext();
           ODMGJ2EEFactory  factory = (ODMGJ2EEFactory)
jndiContext.lookup(pmname);
           Implementation  _ojbImpl = factory.getInstance();
           _ojbDb.open("repository.xml", Database.OPEN_READ_WRITE);

works fine. But what happens ? For me it looks like I am opening a database
but OJB uses a DataService inside so the Database (JDBC Connect) should be
open already.
I wasn't able t find a sample, so maybe that everything is all right, I'm
just not sure about that.
If it is all right, why do I have to give the name of the "repository.xml"
every time?

thanks, cheers,

Guido Beutler


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to