1

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?

user8160
  • 329
  • 5
  • 13

3 Answers3

1

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.

fredarin
  • 141
  • 3
1

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.

user11189
  • 203
  • 2
  • 7
0

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.

Sam Cogan
  • 38,158
  • 6
  • 77
  • 113