I would like to know if there’s a way to provide database properties on the java command line when launching Openfire. Database properties are usually specified in conf/openfire.xml, but I have a need to override what’s in there at the time of launching Openfire.
For example, I set the OPENFIRE_OPTS environment variable as shown below, and then started Openfire. However, it does not seem to picking up this property.
Create your own conference/openfire.XML file before you start the process. Having username and password for the jdbc connection in the ‘ps’ list is not recommended.
I think there is no code in Openfire to read random system properties, so adding -D… has no effect.
Yes, we do not plan to inject database credentials through -D options when launching Openfire, but rather just the database server url. This is part of experiment to containerise Openfire. Ideally openfire.xml should accept environment variables in the form of ${ENV_VARIABLE}, but it doesn’t. Therefore, we need find out some other mechanism for injecting configuration to the Openfire container.