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.  [ 1 post ] 
Author Message
 Post subject: Web app and standalone app configured from the same files
PostPosted: Thu Jul 29, 2010 12:59 pm 
Newbie

Joined: Fri May 22, 2009 4:07 pm
Posts: 2
I have an existing web service built with Java 6, Tomcat 6, and Hibernate 3.2 that uses hibernate.cfg.xml for object mappings only, and webservice.beans.xml (used by wed.xml) for the datasource and other properties.

I'd like to reuse these files, if possible, for the configuration of the batch/cron files that will work on the same data.

One key feature is that there are properties files (db_config.properties) outside the webapps directory that contain the database login information (only username, password, and url), so that development, test, and production servers can be individually configured without having to modify the passwords each time a new set of code is deployed. Also, that file is locked on the test and production servers for security reasons.

I was able to get my standalone app to run using hardcoded values for the datasource (inserted into the hibernate.cfg.xml), but that is not acceptable for production. I'm hoping there is a reasonable way to read in the webservice.beans.xml file in a standalone application.

Any ideas?


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