Last modified by Simon Urli on 2023/10/10

<
From version < 8.2 >
edited by Vincent Massol
on 2014/06/07
To version < 9.1 >
edited by Vincent Massol
on 2015/02/12
>
Change comment: refactoring

Summary

Details

Page properties
Content
... ... @@ -65,10 +65,7 @@
65 65  * Copy your RDBMS Java drivers to the XWiki webapp's ##WEB-INF/lib## directory
66 66  * Configure XWiki to use the created database. This involves modifying the ##WEB-INF/hibernate.cfg.xml## file as is described in the tutorials for each database below.
67 67  
68 -Note that a more scalable and J2EE-conformant tactic is to use the Servlet container to manage your data source. You modify the web app as little as possible... hopefully one day XWiki will allow you to override ##hibernate.cfg.xml## without needing to change the app itself.
69 -** Do not add your JDBC library to the web app. Install it to the container classpath instead, like to ##$CATALINA_HOME/common/lib##.
70 -** Do not set user, url, etc., nor connection.provider_class in ##hibernate.cfg.xml##. The critical settings are ##connection.datasource## (with JNDI name like ##java:/comp/env/jdbc/XWikiDS##) and the dialect class for your DB vendor. Do not comment out <mapping resource="..."/> elements, hibernate needs them. (You should leave the provider_class unset, since Xwiki's implementation doesn't handle container-managed data sources).
71 -** Manage all database access settings using your container facilities, for example Tomcat admin webapp or server.xml + APPNAME.xml. Uncommenting the <resource-ref> element inside ##WEB-INF/web.xml## that matches the above JNDI name and looks like <res-ref-name>jdbc/XWikiDS</res-ref-name> could be a good idea.
68 +== Specific databases instructions ==
72 72  
73 73  Install and configure the database you wish to use:
74 74  
... ... @@ -85,6 +85,14 @@
85 85  If your database is empty this will result in a minimal empty wiki installation. You may want to use the [[Import/Export tool>>AdminGuide.ImportExport]] to import some pages in your wiki. We recommend that you import the [[provided default XAR>>xwiki:Main.Download]]. If you're upgrading from an existing installation your database should already contain the pages you had before.
86 86  {{/info}}
87 87  
85 +== Using a Data Source ==
86 +
87 +A more scalable and J2EE-conformant tactic is to use the Servlet Container to manage your data source. You modify the web app as little as possible.
88 +
89 +* Do not add your JDBC library to the web app. Install it to the container's classpath instead, like in ##$CATALINA_HOME/common/lib##.
90 +* Do not set user, url, etc., nor ##connection.provider_class## in ##hibernate.cfg.xml##. The critical settings are ##connection.datasource## (with JNDI name like ##java:/comp/env/jdbc/XWikiDS##) and the dialect class for your DB vendor. Do not comment out ##<mapping resource="..."/>## elements, hibernate needs them. Note that you should leave the ##provider_class## unset, since XWiki's implementation doesn't handle container-managed data sources.
91 +* Manage all database access settings using your container facilities, for example Tomcat admin webapp or ##server.xml## + ##APPNAME.xml##. Uncommenting the ##<resource-ref>## element inside ##WEB-INF/web.xml## that matches the above JNDI name and looks like ##<res-ref-name>jdbc/XWikiDS</res-ref-name>## could be a good idea.
92 +
88 88  = Concluding Step =
89 89  
90 90  {{include reference="AdminGuide.InstallationConcludingSteps"/}}

Get Connected