Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Using connection properties from hibernate.cfg.xml
PostPosted: Thu Jul 05, 2012 12:12 am 
Newbie

Joined: Fri Jun 29, 2012 3:21 am
Posts: 3
Hi Friends,

In my struts2 web-application with Hibernate3.5 ORM, we are using the default hibernate.cfg.xml for all db properties. In the hibernate.cfg.xml file the following properties, I want to use in quartz.properties file @ startup(when the application initializes).

<property name="hibernate.dialect">com.generalsentiment.dialect.MySQL5InnoDB</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>

<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/gsraisin?useUnicode=true&amp;characterEncoding=UTF-8</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">rootAdmin</property>

The reason why i can't hardcode the same in quartz.properties file is because in the production servers we have different properties for different environments. Please suggest me what changes i need to do in order get the properties files these properties at startup.


Top
 Profile  
 
 Post subject: Re: Using connection properties from hibernate.cfg.xml
PostPosted: Thu Jul 05, 2012 1:26 am 
Newbie

Joined: Fri Jun 29, 2012 3:21 am
Posts: 3
I am sorry, i didn't get the point from your reply.

andrewmicky wrote:
we are using the default hibernate.cfg.xml for all db properties. In the hibernate.cfg.xml file the following properties


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