Nuxeo with JBoss is ran into a modified JBoss 4.2.3.GA, here is a description of the process and the changes.
Building Nuxeo with JBoss is done by nuxeo-distribution-jboss module.
Cleanup
Starting from org.jboss:jboss-as:4.2.3.GA:zip:light which is a standard JBoss 4.2.3.GA without unnecessary documentation, samples and unused contexts:
- jboss-as-4.2.3.GA.zip (95Mo)
- jboss-as-4.2.3.GA-light.zip (57Mo)
Here are files removed from standard JBoss:
- docs/dtd/
- docs/examples/
- docs/licenses/
- docs/schema/
- docs/tests/
- server/all/
- server/minimal/
Then, the following files are also excluded from the ZIP archive:
- bin/classpath.sh
- bin/run.conf
- bin/jboss_init*.*
- bin/probe.*
- bin/run.sh
- bin/run.bat
- bin/shutdown.bat
- bin/shutdown.sh
- bin/wsconsume.bat
- bin/wsconsume.sh
- bin/wsprovide.bat
- bin/wsprovide.sh
- bin/wsrunclient.bat
- bin/wsrunclient.sh
- bin/wstools.bat
- bin/wstools.sh
Nuxeo files addition
We add nuxeo documentation and binary files (like nuxeoctl and nuxeoctl.exe)
and move JBoss specific documentation from root to doc-jboss directory.
We add Nuxeo templates at root:
Patch and changes on libraries
jboss-patch
The jboss-patch pre-configure jboss and remove some libraries that will be replaced by newer versions.
Configuration changes
jboss-service.xsl
These changes are commented in the XSL file, but basically it contains :
- close ports and remove invoker that are not used by default
- declare the NuxeoDeployer as EAR deployer
- replace some buggy interceptors by corrected one
- prepare RMI over HTTP binding if needed (depends on a parameter)
Here is a listing of files modified by jboss-patch/src/main/xsl/jboss-service.xsl:
- $JBOSS/server/default/conf/jboss-service.xml
- $JBOSS/server/default/deploy/jmx-invoker-service.xml
- $JBOSS/server/default/deploy/ear-deployer.xml
- $JBOSS/server/default/deploy/http-invoker.sar/META-INF/jboss-service.xml
- $JBOSS/server/default/deploy/management/console-mgr.sar/META-INF/jboss-service.xml
- $JBOSS/server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml
- $JBOSS/server/default/deploy/jms/uil2-service.xml
- $JBOSS/server/default/deploy/jms/jbossmq-httpil.sar/META-INF/jboss-service.xml
standardjboss.xsl
This transforms standardjboss.xml to add http invokers for RMI.
This transformation is not applied by default and is only useful when using RMI over HTTP.
web-app.xsl
It removes EJB3 connector servlets (ServerInvokerServlet, Ejb3InvokerServlet) and their mappings, replacing with unified EJB3 connector servlets from Nuxeo.
$JBOSS/server/default/deploy/http-invoker.sar/invoker.war/WEB-INF/web.xml by jboss-patch/src/main/xsl/web-app.xsl
This transformation is not applied by default and is only useful when using RMI over HTTP.
ds.xsl
It replaces JMX invoker specification with mandatory jndi-name element appended to jmx-invoker-name.
$JBOSS/server/default/deploy/*.-ds.xml by jboss-patch/src/main/xsl/ds.xsl
This transformation is not applied by default and is only useful when using RMI over HTTP.
jbossjta-properties.xsl
Adds allowMultipleLastResource for JTA.
$JBOSS/server/default/conf/jbossjta-properties.xml with jboss-patch/src/main/xsl/jbossjta-properties.xsl
root-web.xsl
Adds WSS Filter declaration and mapping.
$JBOSS/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/web.xml with jboss-patch/src/main/xsl/root-web.xsl
This declaration is only useful if WSS protocol is used.
Other changes
Addition of log4j DTD: jboss-patch/src/main/dtd/log4j.dtd into $JBOSS/server/default/conf/. This is to allow JBoss running without connection to internet for validating files.
Replacement of log4j configuration: jboss-patch/src/main/xml/jboss-log4j.xml into $JBOSS/server/default/conf/. Changes are explained in the configuration file: mainly configured to log only WARN (or worst) messages, some Nuxeo packages are set on INFO in order to report server activity (configuration, deployment, started, ...).
Patch of main deployer: jboss-patch/src/main/xml/org.jboss.deployment.MainDeployer-xmbean.xml into $JBOSS/server/default/conf/xmdesc
Deletion of Jboss WS stack (replaced by metro JAX-WS stack)
- $JBOSS/server/default/deploy/jbossws.sar
- $JBOSS/server/default/lib/jboss-jaxws-ext.jar
- $JBOSS/server/default/lib/jboss-jaxws.jar
- $JBOSS/server/default/lib/jboss-saaj.jar
- $JBOSS/server/default/lib/jbossws-framework.jar
- $JBOSS/server/default/lib/jbossws-jboss42.jar
Removal of Hibernate 3 (replaced by a newer version)
- $JBOSS/server/default/lib/hibernate3.jar
Added libraries into $JBOSS/server/default/lib/
- org.nuxeo.common:nuxeo-common
(common classes between nuxeo.ear and other nuxeo libraries) - org.nuxeo.runtime:nuxeo-runtime-deploy
(nuxeo-runtime deployment librabry) - org.nuxeo.runtime:nuxeo-runtime-jboss-extensions
(custom JBoss deployer for Nuxeo-Runtime) - org.nuxeo.ecm.core:nuxeo-core-storage-sql-extensions
(Additional functions for Derby and H2, only used when dery or H2 is used as database for VCS) - com.h2database:h2
(H2 dabase, default backend for the VCS reposlitory) - org.apache.derby:derby
(derby database) - org.apache.lucene:lucene-core
(used for fulltext indexing when H2 is used as backend for VCS) - Required by rich faces:
- commons-digester:commons-digester
- commons-beanutils:commons-beanutils
- Required by tomahawk:
- commons-el:commons-el
- New webservice stack
- metro.webservices:webservices-api
- metro.webservices:webservices-rt
- metro.webservices:webservices-tools
- org.hibernate:hibernate:3.2.4.SP1_CP01-brew_NXP-3881-NXP-4604
(Replace default version and correct some bugs) - JDBC drivers:
- postgresql:postgresql:8.3-604.jdbc3
- mysql:mysql-connector-java:5.1.6
- Logging monitor:
- org.jboss.services:logging-monitor
Added libraries into $JBOSS/server/default/deploy/
- org.nuxeo:nuxeo-jboss-interceptors:4.2.3.GA.2
This jar only contains 2 Interceptors that correct the default ejb3 interceptors.