BLOG ARTICLE jboss reload | 1 ARTICLE FOUND

  1. 2008/08/07 JBoss class reload

사용자 삽입 이미지
JBoss에서 class reloading은 기본적으로 제공되지 않습니다. 이는 설정을 통하여 바꾸시면 되는데 tomcat의 server.xml에 reloadable="true" 설정과 같이 context.xml 파일을 조작하면 됩니다.
디폴트 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" />

   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 :




크리에이티브 커먼즈 라이센스
Creative Commons License
2008/08/07 17:52 2008/08/07 17:52