04-21-2012 01:39 PM
I saw in the forums that there's been some attempts to get Nuxeo running on Tomcat 7 so I was wondering if this is in the roadmap for upcoming versions. If not, this could be used to gather links and references for what needs to be done to get Nuxeo running on Tomcat. Websocket support is what i'm looking for, especially with Atmosphere and its JAX-RS integration...
04-23-2012 02:09 PM
Nuxeo will be moved to Tomcat 7 when there is customer demand, or if we have some free time...
EDIT Tomcat 7 is supported since Nuxeo 5.7.2, see NXP-10071.
04-23-2012 02:09 PM
Nuxeo will be moved to Tomcat 7 when there is customer demand, or if we have some free time...
EDIT Tomcat 7 is supported since Nuxeo 5.7.2, see NXP-10071.
05-07-2012 01:29 PM
Ok, so I finally had some time and managed to get Nuxeo 5.5 running in Tomcat 7 so, for reference, this is what I had to do:
Start with clean Apache Tomcat 7.0.27 and just use meld or some directory diff tool to do the following:
Add nuxeoctl, nuxeo-lanucher.jar, etc .. to bin
Add endorsed libs
Add missing jars to lib
Add nxserver directory
Setup the templates (templates/default/conf) diff from nuxeo 5.5:
server.xml / server.xml.nx
Remove:
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
Add :
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
Changes to nuxeo-launcher.jar (just clone nuxeo-distribution and change):
nuxeo-distribution/nuxeo-launcher/src/main/java/org/nuxeo/launcher/NuxeoTomcatLauncher.java
protected String getClassPath() {
String cp = ".";
// This is not needed - cp = addToClassPath(cp, "nxserver" + File.separator + "lib");
cp = addToClassPath(cp, "bin" + File.separator + "bootstrap.jar");
cp = addToClassPath(cp, "bin" + File.separator + "tomcat-juli.jar"); // Add tomcat-juli.jar
return cp;
}
Changes to nuxeo-runtime-tomcat-adapter.jar (just clone nuxeo-runtime and change):
protected void handleEvent(NuxeoWebappLoader loader, LifecycleEvent event) {
...
// Was Lifecycle.START but should probably be Lifecycle.CONFIGURE_START in Tomcat 7
// hardcoded just for testing!
if (type == "configure_start") {
...
}
}
`
UPDATE
After properly changing the Lifecycle event to "configure_start" most of my previous changes are not needed and in fact break the classloading. I've updated the answer to match the proper changes to make.
05-07-2012 01:38 PM
Sorry if this seems messy.. but I thougth it would be nice to have these notes here.
05-07-2012 01:56 PM
Could have been good here as well
05-07-2012 02:17 PM
Thanks a lot Nelson. We'll take what you did and update the platform for Nuxeo 5.6 to support Tomcat 7 (if time permits). If you want you can open a JIRA issues for the technical discussion yes.
05-07-2012 02:33 PM
Done
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.