• 검색 결과가 없습니다.

Runtime Deploy

문서에서 JEUS Applications & Deployment 안내서 (페이지 47-50)

3.3. jeusadmin을 이용한 Deploy

3.3.2. Runtime Deploy

jeusadmin을 통한 Runtime Deploy 방법은 다음의 사항을 가정하여 설명한다.

● 애플리케이션은 “3.1. 애플리케이션 작성”에서 작성한 MyApp.ear을 사용한다.

● JEUS의 노드 이름은 'johan'이고, 이미 부팅된 'johan_container1'이라는 엔진 컨테이너 1개를 가지고

있다.

● -absolute-path를 제외한 deploy 명령어의 다른 옵션은 사용하지 않는다.

참고

옵션에 대한 자세한 내용은 “JEUS Reference Book”의 “4.2.3.19. deploy”를 참고한다.

JEUS에서는 jeusadmin에서 애플리케이션을 Runtime 디플로이할 경우, 애플리케이션의 위치에 따라 다 음의 2가지 방법을 제공한다.

● 디플로이할 애플리케이션을 APP_HOME에 복사한다. 시스템 프로퍼티 jeus.apphome을 설정하여 변 경할 수 있다. 이 경우에는 deploy 명령어를 사용할 때, 파라미터로 애플리케이션의 이름만 설정하면 된 다. 기본적으로 APP_HOME의 위치는 다음과 같다.

JEUS_HOME/webhome/app_home

● 디플로이할 애플리케이션을 APP_HOME에 복사하지 않고, 디플로이할 애플리케이션의 경로를 설정한 다. 이때는 deploy 명령어 다음 -absolute-path 옵션을 사용하여, 현재 디플로이할 애플리케이션의 절대 경로를 설정한다.

다음은 jeusadmin에서의 Runtime Deploy 예제이다.

[예 3.2] jeusadmin - Runtime Deploy

---1. using deploy command for application in APP_HOME

---johan>deploy MyApp

using the following application info :

<applicationType>

<deploy-when-booting>true</deploy-when-booting>

<path>MyApp.ear</path>

<deployment-type>EAR</deployment-type>

<ejb-component>

<uri>calc.jar</uri>

</ejb-component>

<web-component>

<uri>cookie.war</uri>

</web-component>

<deployment-target>

<all-targets>

</all-targets>

</deployment-target>

<class-ftp-unit>JAR</class-ftp-unit>

</applicationType>

The J2EEApplication, MyApp, is deployed on johan_container1 johan>applist

name : MyApp

type : J2EEApplication EngineContainer : johan_container1 node : johan state : running

johan>stop MyApp

The J2EEApplication [MyApp] is stopped on the johan_container1

johan>applist name : MyApp

type : J2EEApplication EngineContainer : johan_container1 node : johan state : stopped

johan>start MyApp

The J2EEApplication [MyApp] is started on the johan_container1

johan>applist name : MyApp

type : J2EEApplication EngineContainer : johan_container1 node : johan state : running

johan>redeploy MyApp

Undeploying J2EEApplication [MyApp] from johan_container1 (This may take time due to graceful undeployment)

J2EEApplication [MyApp] is undeployed from johan_container1 (elapsed = 59ms) using the following application info :

<applicationType>

<deploy-when-booting>true</deploy-when-booting>

<path>MyApp.ear</path>

<deployment-type>EAR</deployment-type>

<ejb-component>

<uri>calc.jar</uri>

</ejb-component>

<web-component>

<uri>cookie.war</uri>

</web-component>

<deployment-target>

<all-targets>

</all-targets>

</deployment-target>

32 JEUS Applications & Deployment 안내서

<class-ftp-unit>JAR</class-ftp-unit>

</applicationType>

johan>applist name : MyApp

type : J2EEApplication EngineContainer : johan_container1 node : johan state : running

johan>undeploy MyApp

Undeploying J2EEApplication [MyApp] from johan_container1 (This may take time due to graceful undeployment)

J2EEApplication [MyApp] is undeployed from johan_container1 (elapsed = 59ms)

johan>applist

there is no module corresponding to the request

---2. using deploy command with -absolute-path option

---johan>deploy -absolute-path c:\jeus\myApp\MyApp.ear

using the following application info :

<applicationType>

<deploy-when-booting>true</deploy-when-booting>

<path>c:\jeus\myApp\MyApp.ear</path>

<deployment-type>EAR</deployment-type>

<ejb-component>

<uri>calc.jar</uri>

</ejb-component>

<web-component>

<uri>cookie.war</uri>

</web-component>

<deployment-target>

<all-targets>

</all-targets>

</deployment-target>

<class-ftp-unit>JAR</class-ftp-unit>

</applicationType>

johan>applist name : MyApp

type : J2EEApplication EngineContainer : johan_container1 node : johan state : running

[예 3.2]에서는 deploy, stop, start, redeploy, undeploy의 순서대로 deploy 명령어를 실행하며, 각 명령어 를 실행한 뒤에는 applist를 수행하여 각 단계에서의 애플리케이션 상태를 확인한다.

마지막에는 "-absolute-path" 옵션을 사용하여 deploy 명령어를 실행하는 예(나머지 명령어에 대해서도 똑 같이 -absolute-path 옵션을 사용하면 된다.)를 보여주고 있다. 이때 애플리케이션은 c:\jeus\myApp 디렉 터리 아래에 위치한다고 가정한다.

다음과 같이 각 명령어에 따라 조회되는 정보가 달라진다.

deploy, redeploy : 현재 애플리케이션의 설정이 조회된다.

start, stop, undeploy : 해당 애플리케이션의 타입, 이름, Deploy된 엔진 컨테이너 이름과 실행 결과가

조회된다.

문서에서 JEUS Applications & Deployment 안내서 (페이지 47-50)

관련 문서