Is there any way to change the database connection string without going into the web console? I tried to follow Openfire: Custom Database Integration Guide but unsure on how to setup the xml with an existing database and connection provider tag.
Attempted the following:
- Stop Openfire service. Added the following tags within openfire.xml then started the service
<jdbcProvider>
<driver>net.sourceforge.jtds.jdbc.Driver</driver>
<connectionString>jdbc:jtds:sqlserver://<IP Address>/Openfire?user=username;password=secret</connectionString>
</jdbcProvider>
- Modified the existing connectionProvider and database tags with the following:
<connectionProvider>
<className>org.jivesoftware.database.DefaultConnectionProvider</className>
</connectionProvider>
<database>
<defaultProvider>
<driver>net.sourceforge.jtds.jdbc.Driver</driver>
<serverURL>jdbc:jtds:sqlserver://<IP Address>/Openfire?user=username;password=secret</serverURL>
<testSQL>select 1</testSQL>
<testBeforeUse>false</testBeforeUse>
<testAfterUse>false</testAfterUse>
<testTimeout>500</testTimeout>
<timeBetweenEvictionRuns>30000</timeBetweenEvictionRuns>
<minIdleTime>900000</minIdleTime>
<maxWaitTime>500</maxWaitTime>
<minConnections>5</minConnections>
<maxConnections>25</maxConnections>
<connectionTimeout>1.0</connectionTimeout>
</defaultProvider>
</database>