cancel
Showing results for 
Search instead for 
Did you mean: 

Is Tomcat 7 support planned ?

Nelson_Silva
Confirmed Champ
Confirmed Champ

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...

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

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.

View answer in original post

6 REPLIES 6

Florent_Guillau
World-Class Innovator
World-Class Innovator

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.

Nelson_Silva
Confirmed Champ
Confirmed Champ

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):

    • nuxeo-runtime/nuxeo-runtime-tomcat-adapter/src/main/java/org/nuxeo/runtime/tomcat/NuxeoLauncher.java

    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.


Sorry if this seems messy.. but I thougth it would be nice to have these notes here.

Could have been good here as well

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.

Done

Getting started

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.