I have had jira and confluence running under tomcat 5.5.23 (behind apache over AJP13/modjk) for a while now. The aim is to migrate them over to glassfish (behind the same apache but with modproxy).
First - some links I found useful:
So - what changes had to be made?
In the jira download area (where you build the war) - I had only one file in edit-webapp from when building for tomcat - edit-webapp/WEB-INF/classes/entityengine.xml. In this file I had to change the JNDI names for UserTransaction and the datasource - removing java:comp/env (this seems to be a difference between tomcat and glassfish, tomcat wants the whole path where glassfish assumes you are in the env section of the JNDI tree - affects confluence too - see below).
Then a simple
./build.sh war and a new war was generated. I deployed the dist-generic rather than the dist-tomcat war file to glassfish using the GUI.
Easier than JIRA - just deploy the same expanded directory that tomcat was using (I had confluence expanded on disk and had used a config in tomcat/conf/Catalina/localhost to point to it).
Changes required - in confluence_home there is a confluence.cfg.xml - defines amongst other things the datasource. You need to make the same change here to the JNDI name - remove java:comp/env
Remember that for both you must have:
Mod proxy was already available on the server (debian makes it very simple to enable) - so all I had to do was to replace
JkMount /jira tomcat_worker
ProxyPass /jira http://localhost:8080/jira ProxyPassReverse /jira http://localhost:8080/jira
Both jira and confluence are displayed under https using a self-certified certificate in apache2. The jiraissues macro in confluence will call jira over this. Therefore glassfish JVM must trust the certificate. Under tomcat I had the certificates in the default JVM stores $JAVA_HOME/jre/lib/security/cacerts and jssecerts. Glassfish has its own under domains/domain1/config.