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 Alessandro Rizzi <Al...@saga.it> on 2003/05/23 09:54:29 UTC

EJB implicit transaction & multiple database

Our deploy environment whould be:
1 application server (Oracle IAS, JBoss) (possibly clustered)
n database server, one for each customer
1 application (the same for all the clients)

I mean: each user will log on the system, from his login we will discover
which customer he belongs to, and than he will correct to the right DB.

This mean that we do not know at desig-time how many database we will have
to manage, we only know that they could be Oracle, SQL Server, DB2,
Postgres ...

The first question is: is possible to do that with OJB?

I suppose the anwser will be yes, so the second question is: is possible to
use session bean implicit transaction in such a context? Which API should
we use: PB, ODMG, JDO?

If someone has alredy done this, can give me some hint (e.g. some little
code sample)?

Any help/comments will be appreciated.

Regards
Alessandro



Re: EJB implicit transaction & multiple database

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Alessandro,

>
> Our deploy environment whould be:
> 1 application server (Oracle IAS, JBoss) (possibly clustered)
> n database server, one for each customer
> 1 application (the same for all the clients)
>
> I mean: each user will log on the system, from his login we will
discover
> which customer he belongs to, and than he will correct to the right
DB.
>
> This mean that we do not know at desig-time how many database we will
have
> to manage, we only know that they could be Oracle, SQL Server, DB2,
> Postgres ...
>
> The first question is: is possible to do that with OJB?

Yes!

>
> I suppose the anwser will be yes, so the second question is: is
possible to
> use session bean implicit transaction in such a context?

Yes, it's possible and recommended to use only
declarative(cm-tx) or programmatic (bm-tx) transaction
if tx was needed. (Some sample session beans shipped with OJB)

> Which API should
> we use: PB, ODMG, JDO?

I don't want to beat around the bush:
JDO: Only a prototype, thus it's not recommended
to use that implementation in production.
PB: Most flexible api, optimistic locking,
best performance, proprietary
ODMG: pessimistic & optimistic locking, currently distributed
pessimistic locking is database table based (a performance
impact)

>
> If someone has alredy done this, can give me some hint (e.g. some
little
> code sample)?

Sorry I don't :-(

HTH

regards,
Armin

>
> Any help/comments will be appreciated.
>
> Regards
> Alessandro
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>