
기본 3계층 웹 애플리케이션이 있고 GlassFish를 사용하고 싶습니다. 동일한 관리 기술을 가정할 때 호스트 OS를 Windows 2003 Server 또는 RedhHat으로 설정하는 데 어떤 차이가 있습니까?
답변1
조만간 Windows 파일 잠금 문제로 인해 Win2K3에 배포할 때 문제가 발생할 수 있습니다. 하지만 어떤 식으로든 문제를 해결하는 방법을 배우게 됩니다.
또한 참조하십시오이것질문:
다른 모든 조건이 동일하다면 저는 glassfish용 서버 OS로 Windows를 선택하지 않겠지만 Win2K3에 대해서도 강력하게 조언하지 않을 것입니다.
답변2
나는 두 번째 프레다린이다. 내가 SO에 게시한 답변의 속임수:
0 투표 반대
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에서 배포 또는 재배포가 지연되는 경우가 있습니다. 내가 실행하는 모든 Glassfish 인스턴스 중에서 Solaris 10에서는 문제가 발생한 적이 없으며 Windows에서도 항상 이와 관련된 문제가 있습니다.
간단히 말해서, 다른 플랫폼 관리 고려 사항은 제쳐두고 이러한 이유만으로도 모든 *NIX가 더 좋습니다.
답변3
같은 스펙이라 큰 차이는 모르겠네요. 일부 관리자는 ACC(Application Client Container)를 실행하는 것이 Linux에서 더 빠르다고 말하는 것을 들었습니다.