想知道选择Redhat或Windows 2003 Server是否重要(可靠性)? 假设两者都有相同的技能。 感谢
答案 0 :(得分:16)
如果您检查glassfish源,特别是./appserv-commons/src/java/com/sun/enterprise/util/io/FileUtils.java,您将看到Glassfish经历的所有扭曲,以便在Windows上删除/重命名文件和目录。
这是一个Windows问题,其限制是删除和重命名打开的文件。
其中有各种各样的技巧,包括多次从JVM请求GC以期关闭文件流,“伪”重命名,睡眠尝试循环。
一些例子:
/**
*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.
实际上,这有时会转换为Windows上的borked部署或重新部署,因为某些文件无法删除或移动,最终会被遗忘。在我运行的50个左右的Glassfish实例中,我在Solaris 10上从未遇到过任何问题,并且在Windows上始终存在与此相关的问题。
简而言之,任何* NIX都会因为这个原因而更好,除了其他平台管理员考虑因素。
答案 1 :(得分:3)
我认为你会发现大多数人会认为Redhat胜过Windows可靠性。 Glassfish本身也应该运行相同的。
您应该在Server Fault
上提出这个问题