Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switching from Tomcat to Glassfish

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 ProxyPass all 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?

like image 411
Marcus Downing Avatar asked Dec 31 '22 02:12

Marcus Downing


1 Answers

In the project I'm working on we have changed from Tomcat to Glassfish because of the need for a appserver with JMS.

Should we use Glassfish in cooperation with Apache, or replace Apache entirely?

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_jk module in Apache in front of Glassfish. We use mod_jk.

Should we use Glassfish 2 or 3? Version 3 seems to be a complete rewrite

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

How well can Apache and Glassfish cooperate on the same server?

There's no problem using Glassfish and Apache on the same server

Is there an easier way? I'd hate to do all this work for nothing.

Yes. Using Glassfish own http and virtual host configuration, but again it depends on your needs.

like image 69
tronda Avatar answered Jan 05 '23 17:01

tronda