我有一个基本的三层Web应用程序,我想使用GlassFish。 假设相同的pipe理技能,主机操作系统的任何区别是Windows 2003 Server或RedhHat?
迟早,由于Windows文件locking问题,在Win2K3上部署时可能会遇到问题。 但是你会学会解决这个问题 – 不pipe怎么样。
也看到这个问题:
所有其他的平等,我不会selectWindows作为Glassfish的服务器操作系统,但我也不会强烈build议对付Win2K3。
我第二个fredarin。 从我贴在SO上的答案中得到一个答案:
0票下来
如果您检查glassfish来源,特别是./appserv-commons/src/java/com/sun/enterprise/util/io/FileUtils.java,您将看到Glassfish为了删除/重命名所经历的所有扭曲Windows上的文件和目录。
这是一个Windows问题,其限制在删除和重命名打开的文件。
那里有各种各样的技巧,包括多次从JVM请求GC,希望closures文件stream,“伪”重命名,睡眠循环。
一些例子:
/** *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 -- eg if * a DOS box is opened anywhere in that directory. * This method will try to do a "virtual renaming" if there are problems * Ie 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上的部署或重新部署,因为有些文件不能被删除或移动,最终被抛在后面。 在我运行的所有Glassfish实例中,我从来没有在Solaris 10上遇到任何问题,并且在Windows上总是遇到与此相关的问题。
总之,任何* NIX都会因为这个原因而更好,除了其他的平台pipe理考虑之外。
假设相同的规格,我不确定是否有任何巨大的差异。 我听说一些pipe理员说在Linux上运行应用程序客户端容器(ACC)速度更快。