You can deploy the SystemPropertiesService along with your application (e.g. a xx-service.xml descriptor inside your .ear referenced by a statement).
But those will be globally visible inside the VM, there is no "scoped" namespace of properties. If you deploy the same set of properties twice within 2 different applications, the latter deployment will overwrite the former one.
Thanks for your quick answer Dimitris.
but still I don't fully understand your answer, because I tried to add my own jboss-services.xml file to the EAR (in the META-INF directory)
but it doesn't work, I couldn't access the properties, only when I use
the jboss-services in JBOSS_HOME//conf it works.
and as far as I understand jboss-services must be referenced to MBEAN (SAR) not to EAR, so how can I do it?
can u give me an example of how to do it?
and what do u mean by referenced by a statement?
e.g. a xx-service.xml descriptor inside your .ear referenced by a statement
Thanks a lot amit
A myproperties-service.xml with an mbean entry similar with the one you put inf conf/jboss-service.xml. This can go in the root of your ear. Then reference this file with a "module" entry in your META-INF/application.xml so it's loaded.
I'm a little confused, how can I reference an xml file (myjboss-service.xml) within the EAR descriptor (application.xml) ?
the module tag can only have childrens tag such as .
... <module>myjboss-service.xml</module> ...
but now I'm receiving the following error code:
File META-INF/jboss-app.xml process error. Line: 9. Error message: The content of element type "module" must match "(service|har)
by the way, I'm using JBOSS 4.0.3.
Aaah, he must has meant to include it in a "service" tag
<jboss-app> <!-- <module> <service>hibernate-service.xml</service> </module> --> <module> <har>sandboxtest.har</har> </module> </jboss-app>
See the commented section. (I did however have some trouble implementing it...and finally put it in the META-INF of the har file where it was picked up by JBoss. Don't know if anyone else have been having trouble with this)
Also, you might want to have a look at the documentation: