-->
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.  [ 1 post ] 
Author Message
 Post subject: How to manage shared objects in two DB with distinct hosts
PostPosted: Thu May 24, 2007 11:04 am 
Newbie

Joined: Thu May 24, 2007 10:33 am
Posts: 1
I have two Oracle Database at 10.67.60.7 and 10.67.60.8 hosts.
Like de Person/Event hibernate example:
http://www.hibernate.org/hib_docs/v3/re ... l-firstapp

If i have the PERSON table in 10.67.60.7 and the EVENT table at 10.67.60.8
how to work with this enviroment?

hibernate1.cfg.xml
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:hsql://10.67.60.7</property>
<property name="connection.username">User1</property>
<property name="connection.password"></property>
<mapping resource="events/Person.hbm.xml"/>
</session-factory>
</hibernate-configuration>

hibernate2.cfg.xml
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:hsql://10.67.60.8</property>
<property name="connection.username">User2</property>
<property name="connection.password"></property>
<mapping resource="events/Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>

When I try use Person occurs the exception below:
org.hibernate.MappingException: An association from the table PERSON refers to an unmapped class: events.Event


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

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.