
디폴트 context.xml의 위치는 다음과 같습니다
$JBOSS_HOME/server/{config}/deploy/jboss-web.deployer/context.xml
jboss-web.deployer를 조작하게 되면 디플로이 되는 모든 애플리케이션에 적용됩니다.
<!-- The contents of this file will be loaded for each web application -->
<Context cookies="true" reloadable="true" crossContext="true">
<!-- Session persistence is disable by default. To enable for all web
apps set the pathname to a non-empty value:
<Manager pathname="SESSIONS.ser" />
<Context cookies="true" reloadable="true" crossContext="true">
<!-- Session persistence is disable by default. To enable for all web
apps set the pathname to a non-empty value:
<Manager pathname="SESSIONS.ser" />
To enable session persistence for a single web app, add a
WEB-INF/context.xml
-->
<Manager pathname="SESSIONS.ser" />
<!-- Install an InstanceListener to handle the establishment of the run-as
role for servlet init/destroy events.
-->
<InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
</Context>
만약 특정 웹 애플리케이션에만 위의 reload 사항을 적용하고 싶다면 context.xml을 원하는 웹 애플리케이션의 WEB-INF/ 에 저장한 후 적용하면 됩니다.
클래스 reload의 적용되었는지 여부는 jmx-console에서 확인할 수 있습니다.
http://localhost:8080/jmx-console로 접속해서 해당 웹어플리케이션의 Loader를 찾습니다.
예) host=localhost,path=/helloworld,type=Loader
(*) 위의 예는 localhost에 바인딩한 경우임
해당 로더를 클릭해서 들어가면 reloadable 항목을 볼 수 있습니다.
Sample WAR File :


hello.war


