You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Per-Olof Noren <pe...@alma.nu> on 2003/12/03 11:58:21 UTC

DMBS integration with OJB?

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


Re: DMBS integration with OJB?

Posted by Josh Morris <jo...@unitt.org>.
On Wed, 2003-12-03 at 05:58, Per-Olof Noren wrote:
> 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

This could break the functionality that allows a user to specify a class
descriptor and use it load the class from either datasource...a feature
our usage of OJB depends on. If this solution is used...can the other
behaviour still be allowed?
-- 
Josh Morris
---------------------
Package says "Install Windows 2000 or better"...I installed Linux.


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