Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: unable to switch database from configuration file
PostPosted: Mon Apr 09, 2012 6:40 am 
Newbie

Joined: Mon Apr 09, 2012 6:27 am
Posts: 1
Hi We have generated database mapping file with the help of myeclipse hibernate tools. It works fine.
Now we want to swich the database from DB1 to DB2 .
DB1 is our setup database name and DB2 is our Testing enviroment database.

We have hibernate.cfg.xml which specify the database it have configuration as
Quote:
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.url">jdbc:mysql://localhost:3306/DB1?characterEncoding=UTF-8</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="myeclipse.connection.profile">MySql</property>



Now when we are trying to switch the database by changing the URL as
jdbc:mysql://localhost:3306/lsms?characterEncoding=UTF-8 ===>to===>jdbc:mysql://localhost:3306/DB2?characterEncoding=UTF-8

From frontend we are still acccessing the DB1 database
even if we change it to
jdbc:mysql://localhost:3306/?characterEncoding=UTF-8
means without secifing the database name still accessing the DB1 database.

Please suggest?
Thanks in advanced


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.