Rnet
Rnet

Reputation: 5040

Jboss load system properties from file

Can I make jboss load system properties from a file without writing any explicit code for it?

Upvotes: 0

Views: 1459

Answers (1)

Paweł Wyrwiński
Paweł Wyrwiński

Reputation: 1443

Yes you can.
In JbossAS versions prior to 7.x there is PropertiesService. It's dead simple to use. I am using it with JBoss 5.1.0.GA, and it works like a charm.
Unfortunatelly PropertiesService mbean is absent in JBossAS 7.x, but there are other ways as described in official admin guide.

Here is another solution. Post author claims it's possible to list your properties files in command line while starting server instance:

./standalone.sh --properties=1.properties --properties=2.properties

and their contents should be added to System Properties.

Upvotes: 1

Related Questions