I have two xml files I'm looking at which define an mbean that uses org.jboss.varia.property.SystemPropertiesService. One is properties-service.xml and lives directly in the deploy directory, the other is further down within my application's ear - let's call it myapp-properties-service.xml.
This mean can define two attributes - a URLList which might take properties of the form ./conf/props/myapp.properties and a Properties attribute which just takes the properties directly (e.g. myproperty=myvalue).
The problem is that while both attributes in both files load properties into the System properties at startup, the behavio开发者_StackOverflowur differs when I make a change while JBoss is running.
The Properties attribute in properties-service.xml successfully reloads the properties. The URRList fails to reload the properties and both attributes in myapp-properties-service.xml fail to reload.
Am I mistaken in thinking all four cases should reload properties? My ideal solution would be to provide a URL to myapp-properties-service.xml.
Any suggestions? Thanks.
It will only reload them when you change *-service.xml file. Changing of the files it references is not enough. You must simply touch *-service.xml. I suspect the reason why it does not automatically detect changes is because this list can contain URLs and how do you expect it to know when these files have changed. Changing properties defined within the file works because your modifying the *-service.xml file itself which is watched by JBoss.
精彩评论