이 콘텐츠는 선택한 언어로 제공되지 않습니다.
1.5. Hot-deployment of services in JBoss
Hot-deployable services are those which can be added to or removed from the running server. These are placed in the
JBOSS_DIST/jboss-as/server/<instance-name>/deploy directory. Let’s have a look at a practical example of hot-deployment of services in JBoss.
Start JBoss if it isn’t already running and take a look at the
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
server/default/deploy directory. Remove the mail-service.xml file and watch the output from the server:
13:10:05,235 INFO [MailService] Mail service 'java:/Mail' removed from JNDI
13:10:05,235 INFO [MailService] Mail service 'java:/Mail' removed from JNDI
Then replace the file and watch JBoss re-install the service:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
This is hot-deployment in action.
13:58:54,331 INFO [MailService] Mail Service bound to java:/Mail
13:58:54,331 INFO [MailService] Mail Service bound to java:/Mail
1.5.1. Hot-deployment configurations 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Hot deployment of services in the server is controlled by the HDScanner MC bean configured in
$JBOSS_HOME/server/conf/deploy/hdscanner-jboss-beans.xml file. For the default server configuration the scanPeriod is set to 5 seconds:
The scanPeriod attribute controls the interval for thread which picks up the hot deployable changes.
Note
The changes to the
hdscanner-jboss-beans.xml file itself are hot deployable. No server restart is needed.