db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per-Olof Noren <pe...@alma.nu>
Subject DMBS integration with OJB?
Date Wed, 03 Dec 2003 10:58:21 GMT
Hi all,

Suppose I have different two DBMS:s, lets say Oracle and PostgreSQL,
each having information that I would like to integrate behind one
PersistenceBroker.

The facts I know so far:

1. I can declare multiple connections in the mapping file.

2. I can map tables from both DBMS:s in the mapping file, no
specification of the connection to use is made in the mapping file.

3. Asking a broker for objects from one of the DBMS:s require me to know
and specify the connection to use.

Ok, So now some stragegies

First lets look the OJB newbie approach in which PersistenceBroker is
wrapped into some own GeneralBroker class that would be given the task
of identifying which JCDAlias to use and then forwarding the request to
an internal PersistenceBroker with correct jcdalias. This GeneralBroker
would then have to perform its checks using instanceof on the beans to
to the trick. This would bring on the need to have the beans in separate
packages.

Another, possibly more attractive solution would be to be able to assign
which JCDAlias to use for each class-descriptor in the mapping file.
This would give the broker all the information needed to do this under
the hood, right?

So, I'd like some opinions on the different approaches, maybe some
pointers on what to change/ where to look in order to take on the second
approach.


Regards,
Per-Olof Norén
Curalia AB



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message