-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Multiple Databases
PostPosted: Fri Oct 03, 2003 12:05 pm 
Newbie

Joined: Fri Oct 03, 2003 11:58 am
Posts: 14
How do I configure Hibernate to access multiple databases?

I am using hibernate.cfg.xml as the configuration file.

Currently I have the following config:

=========================================
<hibernate-configuration>

<session-factory>
<!-- properties -->
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://fuji.contego.net:5432/arx</property>
<property name="hibernate.connection.username">nagios</property>
<property name="hibernate.connection.password">nagios</property>
<property name="hibernate.connection.pool_size">1</property>
<property name="show_sql">true</property>
<property name="hibernate.dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>

<!-- mapping files -->
<mapping resource="com/contego/arx/domain/Address.hbm.xml"/>
<mapping resource="com/contego/arx/domain/Company.hbm.xml"/>
<mapping resource="com/contego/arx/domain/Device.hbm.xml"/>
<mapping resource="com/contego/arx/domain/Contact.hbm.xml"/>
<mapping resource="com/contego/arx/domain/ContactGroup.hbm.xml"/>
<mapping resource="com/contego/arx/domain/Configuration.hbm.xml"/>
</session-factory>

</hibernate-configuration>
=========================================

Thanks,

Chris


Top
 Profile  
 
 Post subject: Never Mind
PostPosted: Fri Oct 03, 2003 12:25 pm 
Newbie

Joined: Fri Oct 03, 2003 11:58 am
Posts: 14
I found an example that pointed me in the right direction.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 2:10 pm 
Beginner
Beginner

Joined: Sun Jun 06, 2004 10:13 am
Posts: 20
"I found an example that pointed me in the right direction."

geee, thanks..

care to leave an url?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 3:46 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 10:20 am
Posts: 77
This might help - http://forum.hibernate.org/viewtopic.php?t=930358


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.