In response to this error where pages are delivered incorrectly, we’re considering a switch from Apache + Tomcat to Glassfish. This is inspired not by features, but by frustration with a fault that just won’t go away.
The questions are:
-
Should we use Glassfish in cooperation with Apache, or replace Apache entirely? The interface between Apache and Tomcat is clearly somehow connected to the error we’re seeing, and the last thing we need is to have the same problem turning up again. On the flip side, we will have need of PHP, which Apache is already set up to handle.
-
Should we use Glassfish 2 or 3? Version 3 seems to be a complete rewrite, and comments here and elsewhere suggests that a lot of people are sticking with 2.
-
How well can Apache and Glassfish cooperate on the same server? For example, Apache could simplely
ProxyPassall requests to selected domains over to Glassfish (as opposed to the much more specific proxying to Tomcat that it’s doing at the moment). -
Is there an easier way? I’d hate to do all this work for nothing.
-
Does this question belong on serverfault.com?
In the project I’m working on we have changed from Tomcat to Glassfish because of the need for a appserver with JMS.
Strictly speaking you don’t need Apache in front. Glassfish has some configuration options to create virtual domains like you get from Apache. More information here. I guess this depends on your needs. Glassfish do support
mod_jkmodule in Apache in front of Glassfish. We usemod_jk.According to the roadmap, Glassfish 3 will not be released until the end of September 2009, and even then it doesn’t support features such as High Availability clustering before 3.1 comes out. Some info here. So personally I would have waited for 3.1, but that’s just me 🙂
There’s no problem using Glassfish and Apache on the same server
Yes. Using Glassfish own http and virtual host configuration, but again it depends on your needs.