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 Brian McCallister <mc...@forthillcompany.com> on 2003/01/20 15:56:33 UTC
Internal Tables
Is there any way to generate the internal tables used by OJB without
running through the whole JUnit oriented table creation as described
inthe platform documentation? It is a bit of a pain to drop all of the
JUnit tables when you want to work with a relatively clean database.
-Brian
Re: Correct Multi-threaded usage of Broker - Guidelines ?
Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Stefan,
think this is the best way to handle the PB-api.
OJB pools the PB-instances and (if configured)
the db-connections in separate pools, so the costs to get a
PB/connection-instance are low.
An alternative way is to bound a PB instance
to the thread lifecycle. Get PB when thread is created,
close PB when thread died. But this solution has some pitfalls.
So, your way seems for me the best.
regards,
Armin
----- Original Message -----
From: "Stefan Schlösser" <ss...@intermediate.de>
To: "OJB Users List" <oj...@jakarta.apache.org>
Sent: Monday, January 21, 2002 2:40 PM
Subject: Correct Multi-threaded usage of Broker - Guidelines ?
Hi,
we are using the OJB-layer in a Client/Server app. Each client is
represented by a
thread on the server. Each client wishes to write to the database.
Currently I'have designed it in the following way:
Each thread gets an Instance of a class which uses the broker. In each
method of
the class is implemted in the following way:
PersistenceBrokerFactory.createPersistenceBroker(pbkey);
// do some db stuff
broker.close();
Will such a design make use of connection pooling and is this a resource
saving way
to use the broker?
Please give me some advice on whether this is a good design or how it
could be
improved.
Thanks for your Help,
Yours,
Stefan Schlösser
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
Correct Multi-threaded usage of Broker - Guidelines ?
Posted by Stefan Schlösser <ss...@intermediate.de>.
Hi,
we are using the OJB-layer in a Client/Server app. Each client is represented by a
thread on the server. Each client wishes to write to the database.
Currently I'have designed it in the following way:
Each thread gets an Instance of a class which uses the broker. In each method of
the class is implemted in the following way:
PersistenceBrokerFactory.createPersistenceBroker(pbkey);
// do some db stuff
broker.close();
Will such a design make use of connection pooling and is this a resource saving way
to use the broker?
Please give me some advice on whether this is a good design or how it could be
improved.
Thanks for your Help,
Yours,
Stefan Schlösser
Re: Internal Tables
Posted by Thomas Mahler <th...@apache.org>.
You could modify the torque scripts a bit to not generate the junit tables.
The scripts for junit-tables and for internal tables reside in different
torque scripts.
cheers,
Thomas
Brian McCallister wrote:
> Is there any way to generate the internal tables used by OJB without
> running through the whole JUnit oriented table creation as described
> inthe platform documentation? It is a bit of a pain to drop all of the
> JUnit tables when you want to work with a relatively clean database.
>
> -Brian
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>