Deploying GateIn into an existing JBoss AS instance

    Even though the GateIn Portal comes bundled with either a Tomcat or a JBoss application server it is sometimes necessary to deploy GateIn into an existing JBossAS instance. In the following find a step-by-step walk-through that explains the actions necessary in order to successfully get GateIn to run in an existing JBoss AS instance.

     

    Conventions used in this article:

    • The home directory of your JBoss installation will be refered to as ${JBOSS_HOME}
    • The extraction directory of your GateIn bundle will be refered to as ${GATEIN_HOME}
    • The JBoss AS instance configuration you are running will be refered to as <INSTANCE>

     

    Deploy GateIn 3.1.0-GA into JBoss AS 5.1.0.GA

     

    Prerequisites:


    • Already running instance of JBoss AS 5.1.0.GA
    • Downloaded GateIn with JBoss AS 5.1.0 bundle version 3.1 FINAL
      NOTE: Make sure you download the bundle including the JDK with the version you use to run your JBoss instance with!
    • Make sure your JBoss AS <INSTANCE> is shut-down

     

    Preparations:


    1. Extract the downloaded GateIn with JBoss AS 5.1.0 bundle to a temporary location, ${GATEIN_HOME}

       

    2. Copy the file jcip-annotations.jar
      from: ${GATEIN_HOME}/server/default/lib
      to: ${JBOSS_HOME}/server/<INSTANCE>/lib

       

    3. Copy the GateIn configuration directory 'gatein'
      from: ${GATEIN_HOME}/server/default/conf
      to: ${JBOSS_HOME}/server/<INSTANCE>/conf

       

    4. In the file ${JBOSS_HOME}/server/<INSTANCE>/deploy/jbossweb.sar/context.xml add the following line:
      <SessionCookie path="/"/>
      
    5. In the file ${JBOSS_HOME}/server/<INSTANCE>/deployers/jbossweb.deployer/web.xml add the following block to the 'jsp' Servlet definition:
      <init-param>
          <description>Portlet standard tlds</description>
          <param-name>tagLibJar2</param-name>
          <param-value>../../deploy/gatein.ear/lib/pc-portlet-2.1.1-GA.jar</param-value>
      </init-param>
      
    6. To make the GateIn deployment aware of where to find its configuration

      Windows:
      In the file ${JBOSS_HOME}/bin/run.conf.bat add the following line to the bottom of the script, ideally before the line :JAVA_OPTS_SET
      set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
      

      Linux/Unix:
      In the file ${JBOSS_HOME}/bin/run.conf add the following line to the bottom of the script
      JAVA_OPTS="$JAVA_OPTS -Dexo.conf.dir.name=gatein"
      
    7. In the same file make sure that the setting -Xmx is over 1024m and -XX:MaxPermSize is over 256m in the $JAVA_OPTS declaration

     

    Deployment:

     

    1. Copy all GateIn related WAR and EAR files

      from: ${GATEIN_HOME}/server/default/deploy
      to: $JBOSS_HOME/server/<INSTANCE>/deploy


       

    2. Start your JBoss AS server <INSTANCE>