Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a basic three tier web application, and I want to use GlassFish. Assuming same admin skills, any difference in having the host OS be Windows 2003 Server or RedhHat?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Sooner or later you'll probably run in to problems when deploying on Win2K3 due to Windows file locking issues. But you'll learn to work around it - one way or another.

Also see this question:

All else equal, I would not select Windows as server OS for glassfish, but I would not strongly advice against Win2K3 either.

share|improve this answer

I second fredarin. A dupe from an answer I posted on SO:

0 vote down

If you check the glassfish source, specifically ./appserv-commons/src/java/com/sun/enterprise/util/io/FileUtils.java, you'll see all of the contortions that Glassfish goes through in order to delete/rename files and directories on Windows.

This is a Windows problem, with its restrictions on deleting and renaming open files.

There are all sorts of tricks in there, including requesting a GC from the JVM multiple times in the hope of closing the file stream, "pseudo" renaming, sleep-try loops.

Some examples:

/**
 *Attempts to delete files that could not be deleted earlier and were not overwritten.
 *<p>
 *On Windows, the method requests garbage collection which may unlock locked
 *files. (The JarFile finalizer closes the file.)

/*
     *On Windows, as long as not all leftover files have been cleaned and we have not
     *run the max. number of retries, try again to trigger gc and delete
     *each remaining leftover file.
     */

/**
 * Windows has BIG issues renaming a directory that is open somnewhere -- e.g. if
 * a DOS box is opened anywhere in that directory.
 * This method will try to do a "virtual renaming" if there are problems
 * I.e. it attempts to do a simple rename, if that fails it will copy everything under
 * the original directory to the renamed directory.  Then it will delete everything
 * under the original directory that the OS will allow it to.

In practice this sometimes translates to borked deployments or redeployments on Windows, as some files cannot be deleted or moved and end up being left behind. Of all the Glassfish instances I run I've never had a problem on Solaris 10 and always have problems relating to this on Windows.

In short, any *NIX will be better for this reason alone, other platform admin considerations aside.

share|improve this answer

I'm not sure there are any huge differences, assuming the same spec. I have heard some admins say that running Application Client Container (ACC) is faster on linux.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.