Red Hat Bugzilla – Bug 831482
Define system properties service MBean in JBoss
Last modified: 2012-07-03 01:27:55 EDT
Description of problem:
We need to have a unified way of defining system properties for Zanata.
Steps to Reproduce:
Hibernate search and Java melody writes files to a location defined at build time which is not flexible when deploy to different environment.
Add properties-service MBean into conf/jboss-service.xml so that we can define system properties for various things on different environment. This requires no re-build.
To define property for hibernate search index base:
- remove hibernate.search.default.indexBase property in zanata-war/src/main/webapp-jboss/WEB-INF/classes/META-INF/persistence.xml
- add following xml snippet into $JBOSS_HOME/server/default/conf/jboss-service.xml
- make sure jboss user has write permission to above defined directories
Clean up no longer needed code/stuff:
- remove property env.hibernate.indexBase in zanata-war/pom.xml
- remove properties-services.xml under $JBOSS_HOME/server/default/deploy
- remove zanata-war/src/etc/properties-service-sample.xml
replace properties-service-sample.xml with
jboss-service-snippet.xml under zanata-war/src/etc will be good.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
properties-services.xml don't play nice in jboss 5.1. If this gets loaded after zanata.war we won't have the necessary system properties available.
At the moment we have to define properties in pom.xml and set it at build time which makes deployment to different environment not flexible.
jboss service will always be loaded before zanata war so the properties are guaranteed to be available.
committed into master:
I think this affect the documentation too - part of the installation process now requires that you put the Hibernate Search and JavaMelody system properties into your JBoss instance.
VERIFIED with Zanata version 1.6.1-SNAPSHOT (20120628-0014)
Zanata version 1.7-SNAPSHOT (20120626-0025)