Deploying Jetspeed 2 to JBoss

Important: Updated instruction on using JBoss 5.1 can be found on http://wiki.apache.org/portals/Jetspeed2/JBoss5HowTo.

Instructions

Until we have deployment goals for Jetspeed 2's Maven build, you will need to install by hand. (Oh, stop yer' whinning! ;) )

This has only been tested on JBoss 3.2.5 w/Tomcat so your milleage may vary.

  1. Perform the standard maven allBuild

  2. Expand the /portal/target/jetspeed.war into jboss/server/default/deploy/jetspeed.war (directory)
  3. For the demo portlets to show up you will need to copy the following 6 wars into jboss/server/default/deploy/jetspeed.war/WEB-INF/deploy
    • /layout-portlets/target/jetspeed-layouts.war
    • /applications/struts-demo/target/struts-demo.war
    • /applications/php/target/php.war
    • /applications/perl/target/perl.war
    • /applications/security/target/security.war
    • /applications/demo/target/demo.war
  4. Copy these 5 jars into jboss/server/default/lib
    • pluto-1.0.1-SNAPSHOT.jar
    • portals-bridges-common-0.1.jar
    • jetspeed-commons-2.0-a1-dev.jar
    • jetspeed-api-2.0-a1-dev.jar
    • portlet-api-1.0.jar
  5. copy the JBoss datasource definition of your choice from /portal/src/resources to jboss/server/default/deploy/
    • For the default HsqlDB, use jetspeed-ds.xml
    • For MySQL, use jetspeed-mysql-ds.xml
  6. replace JBoss' hsqldb.jar with Jetspeed's, or drop in MySQL driver into jboss/server/default/lib
  7. In jetspeed-spring.xml, locate the bean with the id="org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager". Comment out the current bean defintion, which is targeted at Tomcat 4/5, and uncomment the bean defintion below that one, which is targeted at JBoss.

Important Note on JBoss Classloading and Jetspeed 2

Jetspeed 2 requires classloader isolation. This is switched on via this entry in /portal/src/webapp/WEB-INF/jboss-web.xml:

...
  <class-loading>
    <loader-repository>
      org.apache.jetspeed:loader=unique-archive-name
    </loader-repository>
  </class-loading>
...

Alternate Instructions for Fusion (and J2)

Since moving the commons jars out of JBoss's server/default/lib, I had to take a different approach. IF the above procedure fails, try this one:

This has only been tested on JBoss 3.2.5 w/Tomcat so your milleage may vary.

  1. Perform the standard maven allBuild

  2. Expand the /portal/target/jetspeed.war into jboss/server/default/deploy/jetspeed.war (directory)
  3. For the demo portlets to show up you will need to copy the following 6 wars into jboss/server/default/deploy/jetspeed.war/WEB-INF/deploy
    • /layout-portlets/target/jetspeed-layouts.war
    • /applications/struts-demo/target/struts-demo.war
    • /applications/php/target/php.war
    • /applications/perl/target/perl.war
    • /applications/security/target/security.war
    • /applications/demo/target/demo.war
  4. Copy these 5 jars into jboss/server/default/lib
    • pluto-1.0.1-SNAPSHOT.jar
    • portals-bridges-common-0.1.jar
    • jetspeed-commons-2.0-a1-dev.jar
    • jetspeed-api-2.0-a1-dev.jar
    • portlet-api-1.0.jar
  5. Move these 2 jars out of jetspeed.war/WEB-INF/lib into jboss/server/default/lib
    • commons-logging-1.0.3.jar
    • log4j-1.2.8.jar
  6. copy the JBoss datasource definition of your choice from /portal/src/resources to jboss/server/default/deploy/
    • For the default HsqlDB, use jetspeed-ds.xml
    • For MySQL, use jetspeed-mysql-ds.xml
  7. replace JBoss' hsqldb.jar with Jetspeed's, or drop in MySQL driver into jboss/server/default/lib
  8. In jetspeed-spring.xml, locate the bean with the id="org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager". Comment out the current bean defintion, which is targeted at Tomcat 4/5, and uncomment the bean defintion below that one, which is targeted at JBoss. Remove all arguments.

  9. don't forget the MySQL driver if using it. Copy it into jboss/server/default/lib

More detailed instructions

Can be found at http://wiki.apache.org/portals/Jetspeed2/JBossHowToDetailed for Jetspeed 2 M1 on JBoss 3.2.3, 3.2.5, 3.2.6, 4.0.1 and Jetspeed 2 M2 on JBoss 4.0.1.

Jetspeed2/JBossHowTo (last edited 2009-10-27 13:36:40 by MattReed)