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.  [ 2 posts ] 
Author Message
 Post subject: Sharing Hibernate configuration files.
PostPosted: Sat Aug 27, 2005 8:43 am 
Newbie

Joined: Sat Aug 13, 2005 11:35 am
Posts: 5
I want to share a Hibernate configuration file across managed and unmanaged environemtns. In the managed environment I have access to a datasource but for the unmanaged environment, basic JDBC settings.

There are numerous ways I can approach this: -

- Use application clients and always use a datasoure
- Create filters in an ant file and generate a configuration file for each environment
- Create two configuration files (but then I would have to maintain both)

This would appear to be a very common requirement, sharing a Hibernate layer across environments. What approach are others taking?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2005 7:41 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Which configuration file? hibernate.cfg.xml or .properties ? Both are where, among other things, the JDBC URL or datasource settings are. This much will not be portable across a managed and unmanaged environments.

If you are trying to share the mapping configurations, one way is to jar them up and distribute it to both applications. Perhaps you could place the more portable configuration settings, such as show_sql=true, into a .properties and distribute this w/ the mappings as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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.