Hi Guido,
seems alright. The name the repository was used to get
the connection (Datasource) to the database defined in
the repository file. This concept will be modified in the
next release (see current CVS).
0.9.8 was shipped with some example session beans
([ojb]/src/ejb). In the shipped docs section 'deployment'
you could find the installation rules OJB-->JBoss.
Further on there was an ant target
(see build-xdoclet.xml) to generate the
sample beans using xdoclet.
Sorry for the less docu (next version has better ones)
HTH
regards,
Armin
----- Original Message -----
From: "Guido Beutler" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 5:08 PM
Subject: OJB Database creation inside J2EE (JBoss)
> 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]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]