db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Gedin <frederic.ge...@Jaluna.COM>
Subject Re: Map objects to different databases
Date Thu, 24 Apr 2003 06:50:16 GMT
Hi

Is your problem related to the generation of the databases or to the 
runtime use?

I never succeeded to generate two databases. Actually, I did not really 
try very much as my second database comes with an other application. 
 However, using two databases at runtime works fine for me.

Could you be more specific regarding your problem?

Regards

Frederic


Malte Stien wrote:

>Hello,
>
>I am new to torque. I set it up and went through the tutorial. It seems to 
>work so far. I need it for a particular project. So I have two questions:
>
>1. How do I map different objects to tables in different databases. I thought, 
>that I can just configure two databases in Torque.properties...
>
>torque.database.proj.adapter=postgresql
>torque.dsfactory.proj.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
>torque.dsfactory.proj.pool.defaultMaxConnections=10
>torque.dsfactory.proj.pool.maxExpiryTime=3600
>torque.dsfactory.proj.pool.connectionWaitTimeout=10
>torque.dsfactory.proj.connection.driver = org.postgresql.Driver
>torque.dsfactory.proj.connection.url = jdbc:postgresql://localhost:5432/proj
>torque.dsfactory.proj.connection.user = postgres
>torque.dsfactory.proj.connection.password =
>
>torque.dsfactory.projmaster.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
>torque.dsfactory.projmaster.pool.defaultMaxConnections=10
>torque.dsfactory.projmaster.pool.maxExpiryTime=3600
>torque.dsfactory.projmaster.pool.connectionWaitTimeout=10
>torque.dsfactory.projmaster.connection.driver = org.postgresql.Driver
>torque.dsfactory.projmaster.connection.url = 
>jdbc:postgresql://localhost:5432/projmaster
>torque.dsfactory.projmaster.connection.user = postgres
>torque.dsfactory.projmaster.connection.password =
>
>... and then use the names "proj" and "projmaster" in my schema file.
>
><database name="projmaster"...>
>  ...
></database>
><database name="proj"...>
>  ...
></database>
>
>But that does not seem to work. All my objects end up in projmaster no matter 
>what database name I use in the schema. I cannot find really much in the 
>documentation about that. Do the names used in the schema and the name used 
>in the Torque.properties have to match or are they completely different 
>things?
>
>2. How do I configure these two databases without using the Torque.properties 
>file? I need the user to specify the database details. So I cannot use a 
>static file. I cannot find really much in the documentation about that 
>either.
>
>I would be really grateful for further help. Is there a book or a piece of 
>good documentation apart from the javadocs? It seems not really to be 
>documented in a verbose way.
>
>Thank you.
>Malte.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>  
>



Mime
View raw message