JBoss Installation

These instructions are for JBoss Application Server 4.0.X.

  • Download and install JBoss Application Server . It's usually as simple as unzipping it in a directory. Let's call this directory $JBOSS_HOME.
  • (optional) By default JBoss runs on port 8080. If you want to modify the port on which JBoss is running, edit $JBOSS_HOME/server/<mode>/deploy/jbossweb-tomcat55.sar/server.xml. Search for "8080" and replace with the port value you wish to use. Similarly change the port in $JBOSS_HOME/server/<mode>/deploy/http-invoker.sar/META-INF/jboss-service.xml to the value you like.
  • Copy and expand the XWiki WAR into a directory named xwiki.war/ (note that unlike most servlet containers JBoss wants the directory name to end with .war) in $JBOSS_HOME/server/<server configuration>/deploy where server configuration is the JBoss configuration you're using.

Configuration XWiki to use a JBoss DataSource

  • Uncomment the resource-ref section in XWiki's web.xml file.
  • Modify XWiki's WEB-INF/hibernate.cfg.xml file to tell Hibernate to use a DataSource rather than a direct JDBC connection
  • Copy the jboss-web.xml file to XWiki's WEB-INF/ directory
Version 3.4 last modified by VincentMassol on 05/03/2008 at 14:39

Comments 4

VincentMassol | 30.04.2007 at 09:32 AM
These instructions need to be improved:
  • the DS definition is optional as by default XWiki doesn't require it and isn't configured to use it (you need to modify the hibernate.cfg.xml file to use the DS)
  • The MySQL java connector is only required if you use the DS as XWiki already bundles the MySQL java connector jar
  • Need to explain why there's a need for jboss-web.xml as I don't believe it's required
  • Last the dfault/deploy directory is only valid if the user is using the default server configuration. Need to make this more explicit and more generic
Thanks

TharinduJayasuriya | 16.05.2007 at 07:45 AM
Since DS definition is optional by the default XWIKI so the users can comment the data source resource reference in the web.xml. After doing that there is no need to add a jboss-web.xml to the XWIKI war file.

DeanSellers | 11.01.2008 at 04:45 AM
My setup: xwiki/jboss/mysql/ubuntu-dapper-server

See http://wiki.jboss.org/wiki/Wiki.jsp?page=ExplodedDeployment

It is important that you name the directory that you explode the .war into with a .war extension otherwise it will not deploy properly when you start jboss. EG: Exploding into; $JBOSS_HOME/server//deploy/xwiki.war WIll result in your xwiki being available at; http://your.server:8080/xwiki

Without the .war results in long server startup, a massive server.log file, high processor usage and no deployment of xwiki. This took me some time to work out! Otherwise following the instructions was a breeze. I didn't need to do any of the data source stuff for mysql, just follow the instructions for it.


RudolfTronicek | 05.03.2008 at 02:39 PM
Move jfreechart.jar and jcommon.jar out of xwiki.war/WEB-INF/lib and into jboss/server//lib to enable JBoss server to shutdown (cause of: ERROR STDERR? Exception in thread "AWT-Windows").

See http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113028#4113028

Attachments 2

XML
jboss-web.xml 1.2
PostedBy: TharinduJayasuriya on 06/12/2007 (318 bytes )
XML
mysql-xa-ds.xml 1.2
PostedBy: TharinduJayasuriya on 06/12/2007 (708 bytes )

Creator: TharinduJayasuriya on 2007/04/25 07:16
This wiki is licensed under a Creative Commons license
1.3.2.9174