Dashboard > Jetty > ... > Jetty Documentation > JBoss
JBoss Log In | Sign Up   View a printable version of the current page.

Added by Jan Bartel , last edited by Athena Yao on May 16, 2008  (view change)
Labels: 
(None)

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

Jetty in JBoss

The following are required to build and run Jetty in JBoss:

  1. jdk1.4 (for JBoss4.0.5) or jdk1.5 (for JBoss4.2.x)
  2. Maven 2.0.4 or later
  3. A JBoss installation see Note
  4. JBoss-Jetty module in Jetty 6 - http://svn.codehaus.org/jetty-contrib/trunk/jetty-jboss/

Note: The Jetty-JBoss module is not buildable with versions of JBoss prior to 4.0.5. For runtime compability, please see the Compatibility Matrix below. Some JBoss 4.0.x versions require jsp-2.0 to be used, as the JBoss web console application appears to be incompatible with jsp-2.1.

Build instructions

After checking out the Jetty JBoss module, go to the command line and cd to its home directory. Run:

mvn -P[jdk1.4|jdk1.5] -Djboss.home=path-to-jboss -Djboss.version=jboss-version clean install

where:

  • path-to-jboss is the location of your JBoss installation and jboss-version is the version number of your JBoss installation.
  • building with profile jdk1.4 will include jsp-2.0 in the sar and building with profile jdk1.5 will include jsp-2.1 instead.

If you want to save yourself some typing, an alternate way to build it is to edit the pom.xml. Edit the <properties> section and fill in the values for the <jboss.home> and <jboss.version> properties. Once these are set in the pom.xml, you can do the build with:

mvn clean install

Installation instructions

  1. delete $JBOSS-HOME/server/default/deploy/jbossweb-tomcat55.sar (or from whichever deploy directory you are using)
  2. ensure you have built the Jetty JBoss module in $jetty.home/extras/jboss+
  3. copy the $jetty.home/extras/jboss/target/jetty-JETTY-VERSION-jboss-JBOSS-VERSION.sar+ to your JBoss deploy directory (where JETTY-VERSION is the version of jetty you are using and JBOSS-VERSION is the version of JBoss).

+ Note: The paths given are for Jetty6. In Jetty7, the JBoss module folder has been moved to $jetty.home/modules/contrib/jetty-jboss

You will find that the JBoss web-console refers to a Tomcat servlet, so you might want to comment that out in order to make it usable. You will need to edit the $JBOSS-HOME/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml file and comment out this section:

<servlet>
    <servlet-name>Status Servlet</servlet-name>
    <servlet-class>org.jboss.web.tomcat.tc5.StatusServlet</servlet-class>
  </servlet>
    
  <servlet-mapping>
    <servlet-name>Status Servlet</servlet-name>
    <url-pattern>/status</url-pattern>
  </servlet-mapping>

Configuration instructions

By default, Jetty will be configured to:

  • have a thread pool containing a minimum of 10 and a maximum of 250 threads
  • a SelectChannelConnector on port 8080

This configuration is contained in the META-INF/jboss-service.xml file inside the sar.

In order to change the port, add other types of connectors- SSL, AJP13 - configure a request log, or change the thread pool, you need to un-pack the sar to a temporary directory, edit the META-INF/jboss-service.xml file, repack it and copy the modified sar to the JBoss deploy directory.

Versions Matrix

Version compatibility matrix:

Jetty Version JBoss Version JVM Version Status
6.1.0 4.0.5.GA JDK 1.4
6.1.1 4.0.5.GA JDK 1.4
6.1.2 4.0.5.GA JDK 1.4
6.1.3 4.0.5.GA JDK 1.4
6.1.4 4.0.5.GA JDK 1.4
6.1.5 4.0.5.GA JDK 1.4
6.1.6 4.0.5.GA JDK 1.4
6.1.6 4.2.0.GA JDK 1.5
6.1.8 4.0.5.GA JDK 1.5
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Site running on a free Atlassian Confluence Open Source Project License granted to The Codehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007) - Bug/feature request - Contact Administrators