|
bin/shutdown.sh or bin/shutdown.bat to bring Tomcat down while you are making these changes.<CONFLUENCE_HOME>/confluence.cfg.xml file and your <CONFLUENCE_INSTALL>/conf/server.xml file so that you can easily revert if you have a problem.mysql-connector-java-3.0.10-stable-bin.jar.common/lib directory of your Tomcat installation. Be aware that this directory may be just lib for Tomcat version 6 and beyond (i.e. <tomcat-install>/lib rather than <tomcat-install>/common/lib).conf/server.xml file in your Tomcat installation. If you are running your own Tomcat instance, edit the XML file where you declared the Confluence Context descriptor.If editing conf/server.xml, find the following lines:
<Context path="" docBase="../confluence" debug="0" reloadable="true">
<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
|
Within the Context tags, directly after the opening <Context.../> line, insert the DataSource Resourcetag:
<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
username="yourusername"
password="yourpassword"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/confluence?useUnicode=true&characterEncoding=utf8"
maxActive="15"
maxIdle="7"
defaultTransactionIsolation="READ_COMMITTED"
validationQuery="Select 1" />
|
&useUnicode=true&characterEncoding=utf8" on the end of the above URL. These options are not required for any database other than MySQL.<CONFLUENCE_HOME>/confluence.cfg.xml file.confluence/WEB-INF/web.xml in your Confluence installation.Go to the end of the file and insert the following element just before </web-app>:
<resource-ref>
<description>Connection Pool</description>
<res-ref-name>jdbc/confluence</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
|
If you have not yet set up Confluence:
java:comp/env/jdbc/confluence既存の Confluence インストールを Tomcat データソースを使用するように変更する場合:
hibernate.Insert the following at the start of the <properties>section.
<property name="hibernate.setup"><![CDATA[true]]></property>
<property name="hibernate.dialect"><![CDATA[net.sf.hibernate.dialect.MySQLDialect]]></property>
<property name="hibernate.connection.datasource"><![CDATA[java:comp/env/jdbc/confluence]]></property>
|
Run bin/startup.sh or bin/startup.bat to start Tomcat with the new settings.