Hi Stefan,

Stefan Armbruster wrote:
> Hi,
> sorry if my questions might be too stupid, but I'm new to OJB. 
> 
> 1) using multiple databases
> I'd like to map e.g. class Users to table Users in Database A and class
> Product to table Products in Database B. A and B are the same typ of db
> (PostgreSQL).
> According to the features list of OJB "Classes can be mapped to an
> arbitrary number of JDBC datasources". How can this be done?
> repository.dtd allows only one jdbc-connection-descriptor. Can anyone
> give me some advice?

you have to use one repository for each physical db you want to work with.

This is typically done with subsetting.
1. build a default repository that contains all class descriptors (this 
is needed for OJB internal operations)
2. build subset repositories that contain only classdescriptors for the 
specific database.

To avoid redundancy it's recommended to use xml includes (as 
demonstrated with the repositoryFaraway_user.xml).

> 
> 2) best practice for calling tools
> Is there a recommended way how to use the tools reverse-db2 and
> forward-db? It's fine to call them from inside OJB, but I'd like to use
> them from my own project's build.xml. Are there any ant taskdefs that
> can do the job?
> 

Not yet. For the time being you'll have to copy the respective sections 
from our build.xml into your scripts.

important note: both tools should be handled with care as they may 
generate invalid code!

cheers,
Thomas

> Thanks,
> Stefan
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to