Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > Java

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 07-09-2009, 06:49 AM
ug4jee ug4jee is offline
Registered User
 
Join Date: Aug 2008
Posts: 32
How to set "hibernate.properties" environment specific

Hi All,

Greetings,

I would like to know steps for,

How to configure the "hibernate.properties" specific to environment(dev/stage/prod).

we are using .properties file for DB connection utility with below props.
Code:
hibernate.dialect = org.hibernate.dialect.OracleDialect
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@host:port_no:dsn
hibernate.connection.username=username
hibernate.connection.password=password
hibernate.jdbc.batch_size=0
we are not using hibernate-cfg.xml for DB connection,

I need to put this for specific to the environment, as of now we are using the "hibernate.properties" for every environment, we used to change the db connection everytime whenever we want to deploy to dev/stage/prod envs which is causing issue with other developers, if they are not aware of usage of this process.

Iam using Tomcat server and deploying the war file in to it.

Please let me know your ideas on this.

Thanks,
Reply With Quote
  #2  
Old 07-22-2009, 12:00 PM
ug4jee ug4jee is offline
Registered User
 
Join Date: Aug 2008
Posts: 32
Any help is appreciated...!!!
Reply With Quote
  #3  
Old 07-24-2009, 03:50 AM
ug4jee ug4jee is offline
Registered User
 
Join Date: Aug 2008
Posts: 32
if it is not the correct place to put this question please let me point to the correct place...
Reply With Quote
  #4  
Old 07-24-2009, 07:02 AM
ug4jee ug4jee is offline
Registered User
 
Join Date: Aug 2008
Posts: 32
Today when i was googling found a link http://galaxy.andromda.org/forum/vie...f9ecbc4fa95e64 which has some info on it. I was trying with this it could resolve the issue.

i.e. Adding the properties to CATALINA_OPTS and export like below..
-Dhibernate.dialect=org.hibernate.dialect.HSQLDialect
Reply With Quote
  #5  
Old 10-13-2009, 09:57 AM
ug4jee ug4jee is offline
Registered User
 
Join Date: Aug 2008
Posts: 32
The above mentioned process is working like chome....
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
want to 'set' two variables with one 'if' in mssql server 2000 rekhad Database 4 10-19-2006 01:21 PM
Unable to set environment vars in j2ee kshama Java 0 04-03-2003 01:54 PM
Get the value of a specific record and column, and set as Textbox's content newbie ASP.NET 0 06-19-2001 02:06 PM
how can I open an existing Excel workbook with ASP Internet Client ? Alox ASP.NET 1 12-23-2000 09:42 AM
How to generate Make Files? aMax Java 2 08-04-2000 06:55 PM


All times are GMT -4. The time now is 10:22 PM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.