-->
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.  [ 4 posts ] 
Author Message
 Post subject: Finding hibernate.cfg.xml with Hibernate Tools/JBoss-IDE
PostPosted: Wed Aug 03, 2005 1:02 pm 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
Using the Hibernate Tools bundled with JBoss-IDE 1.5 M2 (I believe this is the alpha 4 release of the toolset).

My hibernate.cfg.xml file is located outside of the Eclipse project. Only Java sources are in the Eclipse project. Configuration files necessary for runtime are in a different directory on the filesystem defined with a Classpath Variable in Eclipse. This Classpath Variable is included in the launch configuration for the executable classes.

Currently, with the aforementioned release, it seems that one can only select a hibernate.cfg.xml file that exists in the Eclipse Workspace. Are there any plans to include this file within a Classpath Variable or on the filesystem?

Would it be worth it to create a Jira issue to request the feature, or is this an off the wall request?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 8:38 am 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
What is the goal of putting the cfg file outside the Eclipse project?

Your Eclipse project will soon be hard to maintain if you need to configure some ENV variables to redirect to some other files needed by the classpath.... Each time you need to build another workspace or deploy the application, you will reset all the ENV variables? Also, how can you manage the source with CVS or ClearCase like that?

Solution: Create a source folder "properties" and put the cfg file inside.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 10:11 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
fully agree,
and if each of your users needs his own database
you can create a sub directory for each user,
so that they can put their personal properties files
their.
This also has the advantage that you can checkout
your projects everywhere and at once you have
all you need to run the apps.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 11:11 am 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
I don't know what you're talking about. We've had these Eclipse projects for over three years, with many CVS branches and released versions behind us. A new branch in CVS usually equates to a new product release (possibly either major or minor version). When we branch in CVS we create new Eclipse workspaces, and new classpath variables prefixed by the branch name. Launch configurations are copied and updated to reflect the branch. It’s all very simple and enables us to load up a workspace (or individual projects) for any given CVS branch at any time.

As for your question of how we can manage this... huh? Are you referring to the fact that we have stuff outside of Eclipse? We've got a lot of stuff outside of Eclipse - shell scripts, configuration files, C++ code, SQL scripts, Perl scripts, LDAP schema modifiers, documentation, etc. All of this stuff exists in CVS and is built by Ant scripts on a build server.

The reason is that it is a fairly large system, with multiple Java-based modules. Each of these has its own Eclipse project, but shares a common config directory. This is where hibernate.cfg.xml lives, along with other items. You can't have multiple Eclipse projects share a directory, so that is why it is not in the source tree.

The solution you propose is an obvious one, and one that we've considered. We may, in fact, do it - adding the hibernate.cfg.xml to our 'common' module (which is also where most of our Hibernate domain classes are). The only way that we would though is if we really need the Hibernate Console functionality. It is not a burning desire at the moment - just a 'nice to have' test/prototype tool that is not worth tweaking our directory structures and build scripts over. That is why I was inquiring about a way to make it work with our existing environment.

Anyways, thanks for the comments and sorry if this response sounds harsh. I wasn't looking for ways to set up a development environment - we have had a very successful one using Hibernate for several years. I just had a simple question.


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