My team has a working .ear that uses Hibernate for its persistence tasks under JBoss 4.0.1.
We're attempting to do something that seems to be a little outside of common practice judging from documentation - we want to create an installer that can automatically deploy our app, configuring Hibernate to work with the user's database of choice. Most documentation appears to assume that the developer will hand-edit configuration files and jar up the results at deployment time; we're trying to deliver a build that can be configured automatically at deployment time by customer IT and an intermediate tool we give them.
The tool just needs to take the JDBC information from the user and replace the appropriate properties. However this is requiring unzipping of our .ear and some .jars it contains, and is proving somewhat fragile.
Is there a better paradigm for this? Should we use the JMX integration? (We've been trying to avoid JBoss-specific solutions). Is there any way to have the hibernate.properties file located somewhere besides down in the jar where our persistence classes live?
Thanks for any specific or general replies, or links to relevant documentation I've missed...
- Chris
|