Top Banner
1 Interstage Application Server V5.0.1 Operation Guide 한국후지쯔 Internet사업부
62

Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

Jul 24, 2020

… … …" href="https://cupdf.com/download/interstage-application-server-v501-operation-guide-2005-12-22-1-" class="btn-download btn-primary">Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

1

InterstageApplication Server

V5.0.1Operation Guide

한국후지쯔Internet사업부

Page 2: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

2

□ 목차

1. FJApache (WWW server)

- 환경 설정 file

- 기본 운용

2. InfoProviderPro (WWW server)

- 환경 설정 file

- 기본 운용

3. Jservlet (Servlet engine)

- 환경 설정 file

- 기본 운용

4. EJB Service

5. IJServer

Appendix.

FAQ.

□ 목차

1. FJApache (WWW server)

- 환경 설정 file

- 기본 운용

2. InfoProviderPro (WWW server)

- 환경 설정 file

- 기본 운용

3. Jservlet (Servlet engine)

- 환경 설정 file

- 기본 운용

4. EJB Service

5. IJServer

Appendix.

FAQ.

Page 3: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

3

1. FJApache (WWW server)1. FJApache (WWW server)

Page 4: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

4

FJApache 환경 설정 file

☞ /opt/FJSVihs/conf/httpd.conf

- port 번호 등 각종 환경 설정

☞ Jservlet 사용 시, httpd.conf 수정

Example))

#vi /opt/FJSVihs/conf/httpd.conf

LoadModule jsvlt_module /opt/FJSVjs2/gateway/jsgw_apapi_is.so

include /opt/FJSVjs2/conf/jsgw_apapi.conf

#vi /opt/FJSVihs/conf/httpd.conf

LoadModule jsvlt_module /opt/FJSVjs2/gateway/jsgw_apapi_is.so

include /opt/FJSVjs2/conf/jsgw_apapi.conf

Page 5: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

5

FJApache 기본 운용

☞ webserver 기동 / 정지

#cd /opt/FJSVihs/bin

#apachectl start ( 기동 )

# apachectl stop ( 정지 )

#cd /opt/FJSVihs/bin

#apachectl start ( 기동 )

# apachectl stop ( 정지 )

Page 6: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

6

2. InfoProviderPro (WWW server)2. InfoProviderPro (WWW server)

Page 7: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

7

IPP 환경 설정 file(1)

☞ /opt/FSUNprovd/conf/HTTPD.conf

Example))

# Number of port that accepts requests to InfoProvider

# If omitted: 80

#

port: 80

#

# Name of top directory to be opened (required)

#

acstop: /opt/FSUNprovd/sample/pub

#

# Relative path name of HTML file supplied from acstop and displayed

# only when server name is specified

# (If omitted: top.html)

#

topHTML: /index.html

#

# HTML file name representing respective directories that are opened

# (If omitted or when the set file name does not exist, 404 is returned.)

#

typical-HTML: index.html

#

# Name of directory in which CGI applications are stored.

# (If omitted: Set the value of asctop/cgi-bin cgi-bin.)

#

cgi-path-idnt: /opt/FSUNprovd/sample/cgi-bin cgi-bin

#

# Virtual directory specification (default value: not used)

#

# link: documents1 /usr/contents/documents

# Number of port that accepts requests to InfoProvider

# If omitted: 80

#

port: 80

#

# Name of top directory to be opened (required)

#

acstop: /opt/FSUNprovd/sample/pub

#

# Relative path name of HTML file supplied from acstop and displayed

# only when server name is specified

# (If omitted: top.html)

#

topHTML: /index.html

#

# HTML file name representing respective directories that are opened

# (If omitted or when the set file name does not exist, 404 is returned.)

#

typical-HTML: index.html

#

# Name of directory in which CGI applications are stored.

# (If omitted: Set the value of asctop/cgi-bin cgi-bin.)

#

cgi-path-idnt: /opt/FSUNprovd/sample/cgi-bin cgi-bin

#

# Virtual directory specifi

☞ Port 번호 변경

☞ WWW server의 root directory

☞ URL에 server명만 표기 시, 자동 loading되는 file 명

☞ URL에 directory명만 표기 시, 자동 loading되는 file 명

☞ CGI application 위치

cation (default value: not used)

#

# link: documents1 /usr/contents/documents

☞ Virtual directory 지정

Page 8: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

8

IPP 환경 설정 file(2)

☞ Jservlet 사용 시, HTTPD.conf 수정

Example))

#vi /opt/FSUNprovd/conf/HTTPD.conf

filter-file: /opt/FJSVjs2/gateway/jsgw.so

cgi-path-idnt: /opt/FJSVjs2/gateway FJSVjs2

#vi /opt/FSUNprovd/conf/HTTPD.conf

filter-file: /opt/FJSVjs2/gateway/jsgw.so

cgi-path-idnt: /opt/FJSVjs2/gateway FJSVjs2

Page 9: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

9

IPP 기본 운용

☞ webserver 기동 / 정지

#cd /opt/FSUNprovd/bin

#ippstart -f ../conf/HTTPD.conf ( 기동 )

#ippstop -f ../conf/HTTPD.conf ( 정지 )

=> /opt/FSUNprovd/conf/HTTPD.conf를 환경file로 지정

#cd /opt/FSUNprovd/bin

#ippstart -f ../conf/HTTPD.conf ( 기동 )

#ippstop -f ../conf/HTTPD.conf ( 정지 )

=> /opt/FSUNprovd/conf/HTTPD.conf를 환경file로 지정

Page 10: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

10

3. Jservlet (servlet engine)3. Jservlet (servlet engine)

Page 11: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

11

JServlet Server Component

WWW serverWWW server

Servlet

gateway

Servlet

gateway

Java VMJava VM

Servletcontainer

Servletcontainer

Web applicationWeb application

Java VMJava VM

Servletcontainer

Servletcontainer

Web applicationWeb application

Container

Processing

Process

Container

Processing

ProcessCommunication

Monitor

Monitor

Servlet Gateway

•Servlet Container와 통신

•Servlet Container의 처리 결과를 WWW server를 통해 WWW browser로 반환

•WWW server의 확장기능으로 동작

•특정 application에 대한 interface (filter interface or extension interface)를

사용하는 application으로써 동작

Servlet Container

•Web applications 제어

•Servlet Gateway로부터의 요청에 대한 처리결과를 반환

•JVM상에서 java application으로 동작

Container monitoring process

•Servlet Container 기동/정지/감시

Page 12: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

12

JServlet 환경 설정 file 종류

☞ Servlet Service 환경 정의 file

•위치 : /opt/FJSVjs2/conf

• File 명 : jswatch.conf

☞ Servlet Gateway 환경 정의 file

• Servlet Container port 번호 / Web applications별 식별자 등

• 위치 : /opt/FJSVjs2/conf

• File 명 : jsgw.conf (Apache를 사용하는 경우는 jsgw_apapi.conf)

☞ Servlet Container 환경 정의 File

• Servlet Container 별로 하나씩 정의

• Web application 식별자 / Web application 환경 정의 file 등

• 위치 : jswatch.conf에 정의된 위치 (어느 곳이나 가능)

• File 명 : jswatch.conf에 정의된 file

예) jscontainer.xml

☞ Web Application 환경 정의 File

• Web Application 별로 하나씩 정의

• 위치 : Web application root directory/WEB-INF

• File 명 : web.xml

☞ Servlet Service 환경 정의 file

•위치 : /opt/FJSVjs2/conf

• File 명 : jswatch.conf

☞ Servlet Gateway 환경 정의 file

• Servlet Container port 번호 / Web applications별 식별자 등

• 위치 : /opt/FJSVjs2/conf

• File 명 : jsgw.conf (Apache를 사용하는 경우는 jsgw_apapi.conf)

☞ Servlet Container 환경 정의 File

• Servlet Container 별로 하나씩 정의

• Web application 식별자 / Web application 환경 정의 file 등

• 위치 : jswatch.conf에 정의된 위치 (어느 곳이나 가능)

• File 명 : jswatch.conf에 정의된 file

예) jscontainer.xml

☞ Web Application 환경 정의 File

• Web Application 별로 하나씩 정의

• 위치 : Web application root directory/WEB-INF

• File 명 : web.xml

Page 13: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

13

JServlet 환경 설정 file(1)

☞ /opt/FJSVjs2/conf/jswatch.conf

container.checkFrequency=1800

container.checkCount=3

container.restart=true

container.shutdownInterval=600

ejbsample.ipaddress=localhost

ejbsample.port=8009

ejbsample.log=true

ejbsample.containerconf=/opt/FJSVjs2/conf/jscontainer.xml

ejbsample.bin=/opt/FJSVawjbk/jdk13/bin/java

ejbsample.env=CLASSPATH=/opt/FJSVawjbk/jdk13/lib/tools.jar

ejbsample.env=CLASSPATH=/opt/FJSVjs2/classes/jsboot.jar

ejbsample.env=CLASSPATH=/opt/FJSVjs2/classes/servlet.jar

ejbsample.env=CLASSPATH=./

ejbsample.env=CLASSPATH=/opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample/WEB-INF/classes

ejbsample.env=CLASSPATH=/opt/FSUNod/etc/class/ODjava2.jar

ejbsample.env=CLASSPATH=/opt/FJSVejb/lib/fjcontainer32.jar

ejbsample.env=CLASSPATH=/opt/FJSVj2ee/lib/isj2ee.jar

ejbsample.bin.parameters

=-Dcom.fujitsu.interstage.jservlet.j2ee=true -Dorg.omg.CORBA.ORBClass

=com.fujitsu.ObjectDirector.CORBA.ORB -Dorg.omg.CORBA.ORBSingletonClass

=com.fujitsu.ObjectDirector.CORBA.SingletonORB -Djavax.rmi.CORBA.StubClass

=com.fujitsu.ObjectDirector.rmi.CORBA.StubDelegateImpl -Djavax.rmi.CORBA.UtilClass

=com.fujitsu.ObjectDirector.rmi.CORBA.UtilDelegateImpl -Djavax.rmi.CORBA.PortableRemoteObjectClass

=com.fujitsu.ObjectDirector.rmi.CORBA.PortableRemoteObjectDelegateImpl

ejbsample.env=LD_LIBRARY_PATH=/opt/FSUNod/lib

ejbsample.env=PATH=/opt/FJSVj2ee/bin

container.checkFrequency=1800

container.checkCount=3

container.restart=true

container.shutdownInterval=600

ejbsample.ipaddress=localhost

ejbsample.port=8009

ejbsample.log=true

ejbsample.containerconf=/opt/FJSVjs2/conf/jscontainer.xml

ejbsample.bin=/opt/FJSVawjbk/jdk13/bin/java

ejbsample.env=CLASSPATH=/opt/FJSVawjbk/jdk13/lib/tools.jar

ejbsample.env=CLASSPATH=/opt/FJSVjs2/classes/jsboot.jar

ejbsample.env=CLASSPATH=/opt/FJSVjs2/classes/servlet.jar

ejbsample.env=CLASSPATH=./

ejbsample.env=CLASSPATH=/opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample/WEB-INF/classes

ejbsample.env=CLASSPATH=/opt/FSUNod/etc/class/ODjava2.jar

ejbsample.env=CLASSPATH=/opt/FJSVejb/lib/fjcontainer32.jar

ejbsample.env=CLASSPATH=/opt/FJSVj2ee/lib/isj2ee.jar

ejbsample.bin.parameters

=-Dcom.fujitsu.interstage.jservlet.j2ee=true -Dorg.omg.CORBA.ORBClass

=com.fujitsu.ObjectDirector.CORBA.ORB -Dorg.omg.CORBA.ORBSingletonClass

=com.fujitsu.ObjectDirector.CORBA.SingletonORB -Djavax.rmi.CORBA.StubClass

=com.fujitsu.ObjectDirector.rmi.CORBA.StubDelegateImpl -Djavax.rmi.CORBA.UtilClass

=com.fujitsu.ObjectDirector.rmi.CORBA.UtilDelegateImpl -Djavax.rmi.CORBA.PortableRemoteObjectClass

=com.fujitsu.ObjectDirector.rmi.CORBA.PortableRemoteObjectDelegateImpl

ejbsample.env=LD_LIBRARY_PATH=/opt/FSUNod/lib

ejbsample.env=PATH=/opt/FJSVj2ee/bin

Note))

- jdbc 드라이버를 사용하는 경우 CLASSPATH로 드라이버 환경 지정

ex) ejbsample.env=CLASSPATH=/jdbc/classes12.zip

ejbsample.env=CLASSPATH=/jdbc/fscontext.jar

ejbsample.env=CLASSPATH=/jdbc/providerutil.jar

- LD_LIBRARY_PATH는 한줄로 이어서 작성

ex) ejbsample.env=LD_LIBRARY_PATH=/opt/FSUNod/lib:/opt/FJSVawjbk/jdk13/jre/lib/sparc

Page 14: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

14

JServlet 환경 설정 file(2-1)

☞ /opt/FJSVjs2/conf/jsgw.conf (웹서버가 IPP인 경우)

Single Servlet Container

DefaultPort 8009

Timeout 300000

Mount /sample

Mount /myservlet

LogFile /opt/FJSVjs2/log/jsgw.log

ErrorPage 404 /opt/FJSVjs2/gateway/404.html

ErrorPage 500 /opt/FJSVjs2/gateway/500.html

Single Servlet Container

DefaultPort 8009

Timeout 300000

Mount /sample

Mount /myservlet

LogFile /opt/FJSVjs2/log/jsgw.log

ErrorPage 404 /opt/FJSVjs2/gateway/404.html

ErrorPage 500 /opt/FJSVjs2/gateway/500.html

Multiple Servlet Containers

DefaultPort 8009

Timeout 300000

Mount /sample ID1

Mount /myservlet ID2

Container ID1 ajpv12://localhost:8009/

Container ID2 ajpv12://localhost:8010/

LogFile /opt/FJSVjs2/log/jsgw.log

ErrorPage 404 /opt/FJSVjs2/gateway/404.html

ErrorPage 500 /opt/FJSVjs2/gateway/500.html

Multiple Servlet Containers

DefaultPort 8009

Timeout 300000

Mount /sample ID1

Mount /myservlet ID2

Container ID1 ajpv12://localhost:8009/

Container ID2 ajpv12://localhost:8010/

LogFile /opt/FJSVjs2/log/jsgw.log

ErrorPage 404 /opt/FJSVjs2/gateway/404.html

ErrorPage 500 /opt/FJSVjs2/gateway/500.html

Page 15: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

15

JServlet 환경 설정 file(2-2)

☞ /opt/FJSVjs2/conf/jsgw_apapi.conf (웹서버가 FJApache인 경우)

Single Servlet Container

ApJServDefaultPort 8009

ApJServLogFile /opt/FJSVjs2/log/jsgw_apapi.log

ApJServMount /sample ajpv12://localhost:8009/

Single Servlet Container

ApJServDefaultPort 8009

ApJServLogFile /opt/FJSVjs2/log/jsgw_apapi.log

ApJServMount /sample ajpv12://localhost:8009/

Multiple Servlet Containers

ApJServDefaultPort 8009

ApJServLogFile /opt/FJSVjs2/log/jsgw_apapi.log

ApJServMount /sample ajpv12://localhost:8009/

ApJServMount /myservlet ajpv12://localhost:8010/

Multiple Servlet Containers

ApJServDefaultPort 8009

ApJServLogFile /opt/FJSVjs2/log/jsgw_apapi.log

ApJServMount /sample ajpv12://localhost:8009/

ApJServMount /myservlet ajpv12://localhost:8010/

Page 16: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

16

JServlet 환경 설정 file(3)

☞ /opt/FJSVjs2/conf/jscontainer.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>

<Logger name="std_log" path="log/ejbsample-std.log" backup="true" />

<Logger name="tc_log" path="log/ejbsample-container.log" backup="true" />

<Logger name="servlet_log" path="log/ejbsample-servlet.log" backup="true" />

<ContextManager workDir="work/ejbsample" clientSession="permanent" version="5.0" >

<Parameter name="port" value="8009"/>

<!-- Add the definition of Web Application under this. -->

<Context path="/ejbsample"

docBase="/opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>

<Logger name="std_log" path="log/ejbsample-std.log" backup="true" />

<Logger name="tc_log" path="log/ejbsample-container.log" backup="true" />

<Logger name="servlet_log" path="log/ejbsample-servlet.log" backup="true" />

<ContextManager workDir="work/ejbsample" clientSession="permanent" version="5.0" >

<Parameter name="port" value="8009"/>

<!-- Add the definition of Web Application under this. -->

<Context path="/ejbsample"

docBase="/opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

Page 17: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

17

Jservlet 기본 운용(1)

☞ servlet engine 기동 / 정지

#cd /opt/FJSVjs2/bin

#jssvstart ( 기동 )

#jssvstop ( 정지 )

Ex))

#jssvstart

UX:FJSVjs2: INFO: 2001: Servlet service is starting.

UX:FJSVjs2: INFO: 2006: ejbsample has been started.

UX:FJSVjs2: INFO: 2002: Servlet service has been started.

#jssvstop

UX:FJSVjs2: INFO: 2007: Servlet service is stopping.

UX:FJSVjs2: INFO: 2012: ejbsample has been stopped.

UX:FJSVjs2: INFO: 2008: Servlet service has been stopped.

#cd /opt/FJSVjs2/bin

#jssvstart ( 기동 )

#jssvstop ( 정지 )

Ex))

#jssvstart

UX:FJSVjs2: INFO: 2001: Servlet service is starting.

UX:FJSVjs2: INFO: 2006: ejbsample has been started.

UX:FJSVjs2: INFO: 2002: Servlet service has been started.

#jssvstop

UX:FJSVjs2: INFO: 2007: Servlet service is stopping.

UX:FJSVjs2: INFO: 2012: ejbsample has been stopped.

UX:FJSVjs2: INFO: 2008: Servlet service has been stopped.

Page 18: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

18

Jservlet 기본 운용(2)

☞ servlet container 별 상태 확인

#cd /opt/FJSVjs2/bin

#jscontdisp

Ex))

# jscontdisp

PID STATUS Container Name

------ -------- --------------------------------

20663 ACTIVE ejbsample

#cd /opt/FJSVjs2/bin

#jscontdisp

Ex))

# jscontdisp

PID STATUS Container Name

------ -------- --------------------------------

20663 ACTIVE ejbsample

☞ servlet container 별 기동 / 정지

#cd /opt/FJSVjs2/bin

#jscontstart “container명” (특정 container 기동)

#jscontstop “container명” (특정 container 정지)

Ex))

# jscontstart ejbsample

UX:FJSVjs2: INFO: 2006: ejbsample has been started.

# jscontstop ejbsample

UX:FJSVjs2: INFO: 2012: ejbsample has been stopped.

#cd /opt/FJSVjs2/bin

#jscontstart “container명” (특정 container 기동)

#jscontstop “container명” (특정 container 정지)

Ex))

# jscontstart ejbsample

UX:FJSVjs2: INFO: 2006: ejbsample has been started.

# jscontstop ejbsample

UX:FJSVjs2: INFO: 2012: ejbsample has been stopped.

Page 19: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

19

Jservlet 기본 운용(3)

☞ servlet class file 위치 / Browser로 test

• /opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample/WEB-INF/classes directory에 위치

• http://<host명:portNo.>/<mount point>/servlet/<class명>

Ex)) http://localhost:81/ejbsample/servlet/HelloWorld

• /opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample/WEB-INF/classes directory에 위치

• http://<host명:portNo.>/<mount point>/servlet/<class명>

Ex)) http://localhost:81/ejbsample/servlet/HelloWorld

☞ JSP file 위치 / Browser로 test

• /opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample directory에 위치

• http://<host명:portNo.>/<mount point>/<jsp file명>

Ex)) http://localhost:81/ejbsample/HelloWorld.jsp

• /opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample directory에 위치

• http://<host명:portNo.>/<mount point>/<jsp file명>

Ex)) http://localhost:81/ejbsample/HelloWorld.jsp

Page 20: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

20

Jservlet 운용 tip – 업무 개발 시

☞ servlet class 추가나 수정 후에, servlet engine을 재기동

시키지 않더라도 engine이 자동으로 변화를 인식할 수 있는 기능

- 업무 개발시에 유용하게 사용하는 가능

- 단, 성능 저하의 가능성이 있으므로 개발 후 실제 운영 시에는 이 기능을 쓰지

않는 것을 추천

#cd /opt/FJSVjs2/conf

#vi jscontainer.xml

...

<!-- Add the definition of Web Application under this. -->

<Context path="/ejbsample"

docBase="/opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample"

dirList="false" tagPooling="true" reloadable="true" />

☞ 밑줄 부분 추가

...

#cd /opt/FJSVjs2/conf

#vi jscontainer.xml

...

<!-- Add the definition of Web Application under this. -->

<Context path="/ejbsample"

docBase="/opt/FJSVj2ee/var/deployment/deployed/webapp/ejbsample"

dirList="false" tagPooling="true" reloadable="true" />

☞ 밑줄 부분 추가

...

Note))

- jswatch.conf에 CLASSPATH로 지정되어 있는 location은 auto-reload가 적용되지

않음

Page 21: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

21

동일 어플리케이션의 멀티 컨테이너 운영 (1)동일한 어플리케이션을 부하 분산을 목적으로 여러 개의 컨테이너로 운영하는 경우를설명한다.

다음은 웹 서버로 InfoProvider Pro를 사용하고 /sample 이라는 URI로멀티 컨테이너를 운영하는 경우를 나타낸 것이다. 해당 어플리케이션 소스들이 위치하는경로는 /home/sample 라고 가정한다.

..Mount /sample ID1

Mount /sample ID2

Container ID1 ajpv12://localhost:8009/

Container ID2 ajpv12://localhost:8010/

..

..Mount /sample ID1

Mount /sample ID2

Container ID1 ajpv12://localhost:8009/

Container ID2 ajpv12://localhost:8010/

..

/opt/FJSVjs2/conf/jsgw.conf

/opt/FJSVjs2/conf/jswatch.conf

..sample.ipaddress=localhost

sample.port=8009

sample.containerconf=/etc/opt/FJSVjs2/jscontainer1.xml

..

sample2.ipaddress=localhost

sample2.port=8010

sample2.containerconf=/etc/opt/FJSVjs2/jscontainer2.xml

..

..sample.ipaddress=localhost

sample.port=8009

sample.containerconf=/etc/opt/FJSVjs2/jscontainer1.xml

..

sample2.ipaddress=localhost

sample2.port=8010

sample2.containerconf=/etc/opt/FJSVjs2/jscontainer2.xml

..

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8009"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8009"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

/opt/FJSVjs2/conf/jscontainer1.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8010"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8010"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

/opt/FJSVjs2/conf/jscontainer2.xml

Page 22: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

22

동일 어플리케이션의 멀티 컨테이너 운영 (2)동일한 어플리케이션을 부하 분산을 목적으로 여러 개의 컨테이너로 운영하는 경우를설명한다.

다음은 웹 서버로 Apache를 사용하고 /sample 이라는 URI로멀티 컨테이너를 운영하는 경우를 나타낸 것이다. 해당 어플리케이션 소스들이 위치하는경로는 /home/sample 라고 가정한다.

..ApJServMount /sample balance://balance1/

ApJServBalance balance1 sample1

ApJServBalance balance1 sample2

ApJServHost sample1 ajpv12://localhost:8009/

ApJServHost sample2 ajpv12://localhost:8010/

..ApJServMount /sample balance://balance1/

ApJServBalance balance1 sample1

ApJServBalance balance1 sample2

ApJServHost sample1 ajpv12://localhost:8009/

ApJServHost sample2 ajpv12://localhost:8010/

/opt/FJSVjs2/conf/jsgw_apapi.conf

/opt/FJSVjs2/conf/jswatch.conf

..sample.ipaddress=localhost

sample.port=8009

sample.containerconf=/etc/opt/FJSVjs2/jscontainer1.xml

..

sample2.ipaddress=localhost

sample2.port=8010

sample2.containerconf=/etc/opt/FJSVjs2/jscontainer2.xml

..

..sample.ipaddress=localhost

sample.port=8009

sample.containerconf=/etc/opt/FJSVjs2/jscontainer1.xml

..

sample2.ipaddress=localhost

sample2.port=8010

sample2.containerconf=/etc/opt/FJSVjs2/jscontainer2.xml

..

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8009"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8009"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

/opt/FJSVjs2/conf/jscontainer1.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8010"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

<?xml version="1.0" encoding="ISO-8859-1"?>

<Parameter name="port" value=“8010"/>

<Context path="/sample"

docBase="/home/sample"

dirList="false" tagPooling="true” />

</ContextManager>

</Server>

/opt/FJSVjs2/conf/jscontainer2.xml

Page 23: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

23

4. EJB Service4. EJB Service

Page 24: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

24

(1) EJB Application 개발 및 운용 절차

EJB Application을 개발하고 운용하는 절차는 크게 다음 3단계로 구분할 수 있다.

① 개발

Apworks 혹은 다른 개발 툴을 이용하여 EJB Application개발

[Apworks online Manual 참조]

② Deploy

개발 EJB Application을 서버에 Deploy

[Apworks Online Manual 참조]

③ Application 운영

Deploy 된 EJB를 운영하는 방법은 다음 3가지 형태로 구분된다.

본 문서의 5.IJServer 에서 설명IJServer 를 이용하여 운영

관련 있는 EJB 어플리케이션들을 워크 유닛으로

정의하여 운영한다.

Work Unit으로 운영

각각의 EJB를 별도로 운영한다.각각의 EJB를 별도 운영

설명운영 형태

본 문서에서는 서버측에서의 Deploy 및 운영 환경에 대해 설명한다.

Page 25: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

25

(2) DeploymentApplication을 Deploy하는 방법은 크게 3가지 방법으로 나눌 수 있다..

1) Apworks 개발 툴에서 Deploy

Apworks 의 메뉴를 이용하여 Deploy 한다.

이 방법은[Apworks online Manual를 참조할 것]

2) ejbinstalleb / ejbuninstalleb 명령어 이용

Apworks에서 Deployment Tool 을 실행하고 나면, C:\Interstage\J2EE\var\deployment\deployed 경로에 해당 EJB의 설치파일이생성된다.

이 파일들을 서버로 복사하고 ejbinstalleb 명령을 이용하여 Deploy할 수 있다.

① Deploy할 EJB설치 파일을 ftp로 서버 머신의 적당한 디렉토리에 업로드한다.

예) C:\Interstage\J2EE\var\deployment\deployed\ejb\HelloEJB 디렉토리를

서버측의 /tmp 디렉토리로 복사

② ejbinstalleb 명령으로 Deploy

# ejbinstalleb [설치파일이 존재하는 디렉토리]

예) # ejbinstalleb /tmp/HelloEJB

# ejbinstalleb -s [IJServer명] [설치파일이 존재하는 디렉토리]

예) # ejbinstalleb -s MyServer /tmp/HelloEJB

특정 IJServer에Deploy

# ejbuninstalleb [삭제할 EJB명]

예) # ejbuninstalleb HelloEJBDeploy된 EJB삭제

Page 26: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

26

(3) EJB Application 의 운영

1) Application 단위로 기동 정지

Ex>>

① Deploy된 EJB들의 리스트 확인

# ejbinfoapfolder -l

path : /opt/FJSVj2ee/var/deployment/deployed/ejbapp

name type sslHelloEJB EB/stateless OFFAccessMemberBmp EB/stateful OFFMemberBmp EB/BMP-entity OFFAccessMemberCmp EB/stateful OFFMemberCmp EB/CMP-entity OFF

② 기동

# ejbdstarteb HelloEJB

-> EJB Application 명을 지정

③ 정지

# ejbdstopeb HelloEJB

-> EJB Application 명을 지정

Ex>>

① Deploy된 EJB들의 리스트 확인

# ejbinfoapfolder -l

path : /opt/FJSVj2ee/var/deployment/deployed/ejbapp

name type sslHelloEJB EB/stateless OFFAccessMemberBmp EB/stateful OFFMemberBmp EB/BMP-entity OFFAccessMemberCmp EB/stateful OFFMemberCmp EB/CMP-entity OFF

② 기동

# ejbdstarteb HelloEJB

-> EJB Application 명을 지정

③ 정지

# ejbdstopeb HelloEJB

-> EJB Application 명을 지정

< 참조 >

1. ejbdstarteb/ejbdstopeb 의 실행결과는 시스템 콘솔 메시지 파일을 참조한다.

/var/adm/messages

2. EJB기동이 실패한 원인은 다음 log파일에서 참조할 수 있다.

/opt/FJSVejb/var/FJEJBconsole

Page 27: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

27

2) Work Unit 운영

관련 있는 업무에 대한 EJB Application 들을 하나의 Work Unit단위로 정의하여 운영할수 있다. Work Unit을 이용할 경우 다음과 같은 장점이 있다.

① 복수의 EJB어플리케이션을 일괄 기동, 정지② 각 EJB별 다중도 조정 가능 -> 부하 분산 효과③ EJB어플리케이션의 이상종료 시 자동 재기동④ 각 EJB별로 별도의 실행 환경변수 지정 가능.

워크 유닛의 운영순서는 다음과 같다.

워크 유닛 작성 및 등록

워크 유닛 기동/종료

※ 등록된 Work Unit 정보를 갱신할 때에는 반드시 해당 Work Unit을 종료한 뒤갱신한다.

< WorkUnit 정의 파일 작성 >

워크 유닛의 작성은 [WORK UNIT] , [CONTROL OPTION], [APPLICATION PROGRAM] 의3 개의 섹션으로 나누어 지며 워크 유닛에 등록할 EJB어플리케이션의 수만큼,[APPLICATION PROGRAM] 섹션을 복수로 기술한다.

[WORK UNIT]

#WorkUnit명

Name:SAMPLEWU

#WorkUnit 종류

kind:EJB

[CONTROL OPTION]

….

[APPLICATION PROGRAM]

Destination:SampleEJB1

[APPLICATION PROGRAM]

Destination:SampleEJB2

[WORK UNIT]

#WorkUnit명

Name:SAMPLEWU

#WorkUnit 종류

kind:EJB

[CONTROL OPTION]

….

[APPLICATION PROGRAM]

Destination:SampleEJB1

[APPLICATION PROGRAM]

Destination:SampleEJB2

[WORK UNIT] 옵션

[CONTROL OPTION] 옵션

[APPLICATION PROGRAM]에EJB Application들을 기술

Page 28: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

28

WorkUnit 정의 파일 예

[WORK UNIT]

#WorkUnit명

Name:SAMPLEWU

#WorkUnit 종류

kind:EJB

[CONTROL OPTION]

#EJB 어플리케이션의 동작 디렉토리/표준 출력 및 표준 에러 출력

Current Directory:c:\temp

#연속 이상종료(ABEND) 회수

Application Retry Count:

#어플리케이션 사용 PATH

Path for Application:C:\Oracle\Ora81\lib

#환경 변수

Environment Variable:ORACLE_HOME=C:\Oracle\Ora81

Environment Variable:ORACLE_SID=sv1

[APPLICATION PROGRAM]

#EJB 어플리케이션명

Destination:SAMPLEEB

#프로세스 다중도(1∼255 가능)

Concurrency:2

#어플리케이션 최대 처리 시간

Maximum Processing Time:

#최대 처리 시간 초과 시 강제 정지의 유무

Terminate Process for Time out:

#EJB 어플리케이션 최대 메모리양

Maximum Memory for EJB Application:

#어플리케이션 사용 클래스 패스

CLASSPATH for Application:C:\Oracle\ora81\jdbc\lib\classes12.zip

CLASSPATH for Application:C:\Oracle\ora81\jdbc\lib\nls_charset12.zip

CLASSPATH for Application:C:\classes\providerutil.jar

CLASSPATH for Application:C:\classes\fscontext.jar

#EJB 어플리케이션이 사용하는 JVM의 옵션 지정

Java Command Option:

#최대 큐잉수

Maximum Queuing Message:

[WORK UNIT]

#WorkUnit명

Name:SAMPLEWU

#WorkUnit 종류

kind:EJB

[CONTROL OPTION]

#EJB 어플리케이션의 동작 디렉토리/표준 출력 및 표준 에러 출력

Current Directory:c:\temp

#연속 이상종료(ABEND) 회수

Application Retry Count:

#어플리케이션 사용 PATH

Path for Application:C:\Oracle\Ora81\lib

#환경 변수

Environment Variable:ORACLE_HOME=C:\Oracle\Ora81

Environment Variable:ORACLE_SID=sv1

[APPLICATION PROGRAM]

#EJB 어플리케이션명

Destination:SAMPLEEB

#프로세스 다중도(1∼255 가능)

Concurrency:2

#어플리케이션 최대 처리 시간

Maximum Processing Time:

#최대 처리 시간 초과 시 강제 정지의 유무

Terminate Process for Time out:

#EJB 어플리케이션 최대 메모리양

Maximum Memory for EJB Application:

#어플리케이션 사용 클래스 패스

CLASSPATH for Application:C:\Oracle\ora81\jdbc\lib\classes12.zip

CLASSPATH for Application:C:\Oracle\ora81\jdbc\lib\nls_charset12.zip

CLASSPATH for Application:C:\classes\providerutil.jar

CLASSPATH for Application:C:\classes\fscontext.jar

#EJB 어플리케이션이 사용하는 JVM의 옵션 지정

Java Command Option:

#최대 큐잉수

Maximum Queuing Message:

Page 29: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

29

WorkUnit 정의 파일 예 ( 복수의 EJB정의 )

[WORK UNIT]

Name:psib

Kind:EJB

[Control Option]

Current Directory:/home/easy/log

Application Retry Count:5

Maximum Processing Time for Exit Program:300

Library for Application:/home/oracle/app/oracle/product/oracle9/lib32

[Application Program]

Destination:COMMPSIBLogin

Concurrency:1

Maximum Processing Time:300

#Maximum Memory for EJB Application:64

Terminate Process for Time out:YES

CLASSPATH for Application:/home/easy/www/webapps/psib/WEB-INF/classes

CLASSPATH for Application:/home/easy/src/datasource/driver/classes12.zip

CLASSPATH for Application:/home/easy/src/datasource/driver/nls_charset12.zip

CLASSPATH for Application:/home/easy/src/datasource/driver/fscontext.jar

CLASSPATH for Application:/home/easy/src/datasource/driver/providerutil.jar

Maximum Processing Time for Exit Program:300

Environment Variable:ORACLE_HOME=/home/oracle/app/oracle/product/oracle9

Environment Variable:ORACLE_SID=ISW

Environment Variable:NLS_LANG=American_America.KO16KSC5601

[Application Program]

Destination:COMMPSIBMenu

Concurrency:1

Maximum Processing Time:300

#Maximum Memory for EJB Application:64

Terminate Process for Time out:YES

CLASSPATH for Application:/home/easy/www/webapps/psib/WEB-INF/classes

CLASSPATH for Application:/home/easy/src/datasource/driver/classes12.zip

CLASSPATH for Application:/home/easy/src/datasource/driver/nls_charset12.zip

…….생략

[WORK UNIT]

Name:psib

Kind:EJB

[Control Option]

Current Directory:/home/easy/log

Application Retry Count:5

Maximum Processing Time for Exit Program:300

Library for Application:/home/oracle/app/oracle/product/oracle9/lib32

[Application Program]

Destination:COMMPSIBLogin

Concurrency:1

Maximum Processing Time:300

#Maximum Memory for EJB Application:64

Terminate Process for Time out:YES

CLASSPATH for Application:/home/easy/www/webapps/psib/WEB-INF/classes

CLASSPATH for Application:/home/easy/src/datasource/driver/classes12.zip

CLASSPATH for Application:/home/easy/src/datasource/driver/nls_charset12.zip

CLASSPATH for Application:/home/easy/src/datasource/driver/fscontext.jar

CLASSPATH for Application:/home/easy/src/datasource/driver/providerutil.jar

Maximum Processing Time for Exit Program:300

Environment Variable:ORACLE_HOME=/home/oracle/app/oracle/product/oracle9

Environment Variable:ORACLE_SID=ISW

Environment Variable:NLS_LANG=American_America.KO16KSC5601

[Application Program]

Destination:COMMPSIBMenu

Concurrency:1

Maximum Processing Time:300

#Maximum Memory for EJB Application:64

Terminate Process for Time out:YES

CLASSPATH for Application:/home/easy/www/webapps/psib/WEB-INF/classes

CLASSPATH for Application:/home/easy/src/datasource/driver/classes12.zip

CLASSPATH for Application:/home/easy/src/datasource/driver/nls_charset12.zip

…….생략

EJB 1

EJB 2

Page 30: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

30

< WorkUnit 정의 파일 등록 및 운영 >

예를 들어 다음과 같음 워크 유닛 정의를 작성하여 HelloEJB.wu이라는 이름으로 저장하였다면

[WORK UNIT]Name:HelloEJBKind:EJB[Control Option]Current Directory:/tmpApplication Retry Count:5Maximum Processing Time for Exit Program:300[Application Program]Destination:HelloEJBConcurrency:1Maximum Processing Time:300Maximum Memory for EJB Application:128Terminate Process for Time out:YESCLASSPATH for Application:/chunma/jslee/lib/classes12.zipMaximum Processing Time for Exit Program:300

# isaddwudef <워크유닛 파일명>

ex) # isaddwudef HelloEJB.wuWork Unit을 등록한다.

# isstartwu <워크유닛 명>

ex) # isstartwu HelloEJBWork Unit을 기동한다.

# islistwu 현재 기동중인 Work Unit을조회한다..

# isstopwu –c <워크유닛 명>

Ex) # isstopwu –c HelloEJB (강제 종료)-c 옵션으로 강제종료한다.

필요한 경우 다음 명령어로 WorkUnit정보의 수정 및 삭제를 할 수 있다.

# isaddwudef -o <워크유닛 파일명>

ex) # isaddwudef -o HelloEJB.wu

Work Unit정보를 수정한다.(반드시 Work Unit종료 후 수정한다.)

# isdelwudef <워크유닛 명>

ex) # isdelwudef HelloEJBWork Unit을 삭제한다.

※ 워크 유닛의 등록 및 운영작업은 웹 인터페이스의 Interstage Opreation Tool에서도가능하다. ( http://[서버 IP]:12000 )

Page 31: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

31

< WorkUnit의 어플리케이션의 standard log위치 >

EJB에서 출력한 standard log파일은 다음 경로에 위치하므로 디버깅 시 참조한다.

워크유닛의 Current Directory옵션에 지정한 디렉토리 내에 지정한다.

…[Control Option]Current Directory:/tmp…

/workunit 정의의 Current Directory에 지정한 디렉토리

어플리케이션의 실행 프로세스 ID (숫자)

/해당 워크유닛명

EJB 명

stdout ← 표준 출력stderr ← 표준 에러 출력

< 참고 : 등록되어 있는 Work Unit확인 >

등록되어 있는 Work Unit은 다음 명령어로 확인할 수 있다.

# islistwu -a

Page 32: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

32

(4) EJB Application 정보의 커스트마이징

Deploy된 EJB어플리케이션의 정보는 다음 명령어로 수정할 수 있다.( 자세한 내용은 매뉴얼 J2EE User’s Guide Chapter 50 참조 )

1) GUI툴 ejbcustx 를 이용하는 방법.

① X환경 접속 후 ejbcustx 명령 실행

# ejbcustx

② ejbcustx실행 후 [File]-[Open EJB Application Runtime Environment Definition] 메뉴를실행하여 수정할 EJB Application 을 open.

③ open 후 수정 가능한 정보를 수정한다..

Page 33: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

33

④ [Tool] – [Rapid Invocation] 을 메뉴를 실행하여 고속 호출정의를 한다.고속호출 정의는 호출하는 EJB와 호출되는 EJB를 동일한 JVM상에서 호출하기 위한기능이다.

JavaVM-1

EJB서버 고속호출

JavaVM-2

SessionBean 1

SessionBean 1

SessionBean 2

SessionBean 2

SessionBean 3

SessionBean 3

EntityBean 1

EntityBean 1

EntityBean 2

EntityBean 2

SessionBean 4

SessionBean 4

고속호출

EJB 클라이언트

[Tool] – [Rapid Invocation] 실행하고 ‘Setting’ 버튼을 클릭

Page 34: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

34

⑤ [Invoking Bean]과 [Invoked Bean] 을 세팅한다.

⑥ 사용할 Data Source 명과 커넥션 풀 개수를 지정한다.

Page 35: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

35

2) EJB 어플리케이션 정보를 직접 수정.

ejbcustx 에서 제공하는 GUI툴을 사용하지 않고 직접 EJB정보 xml파일을 수정하여적용하는 방법이다.

① 수정할 EJB정보를 export

# ejbdefexport EJB명 {-s EJBContainer명} -f xml파일명 -comment editable

Ex)# ejbdefexport HelloEJB -s MyServer -f /tmp/aaa.xml -comment editable

I start export.EJB container name:myserver

export EB name: HelloEJB A file name: /tmp/aaa.xml

I finished export.

※ EJB가 IJServer에 속해 있지 않다면 -s옵션은 지정할 필요가 없음.

② EJB 정보 수정생성된 aaa.xml 파일을 수정한다.

(EJB정보 XML파일의 정의 포맷은 매뉴얼 J2EE User’s Guide Chapter 50 참조 )

③ 수정한 EJB정보를 import..

# ejbdefimport [EJB명] -f [수정한 xml파일명]

# ejbdefimport HelloEJB -f aaa.xml

import is started.Definition file name:aaa.xmlEJB application name:HelloEJB….

Page 36: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

36

(5) Data Source 등록

Database에 대한 Data Source 를 등록하는 방법을 기술한다.먼저 PATH와 CLASSPATH환경 변수가 설정되어 있어야 한다.

PATH : /opt/FJSVj2ee/binCLASSPATH (ORACLE 드라이버 및 File System Provider JNDI Library): classes12.zip, providerutil.jar, fscontext.jar

1) GUI툴 j2eejndisetup 을 이용하는 방법.

① X환경 접속 후 j2eejndisetup 명령 실행

# j2eejndisetup

② 좌측메뉴에서 JDBC를 선택하고 [File] – [New Definition] 을 선택한다.Definition 명을 기술한다.

Page 37: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

37

③ 데이터 소스 바인딩파일을 생성할 디렉토리와 DB접속정보를 기술한다.

④ 데이터 소스명과 계정정보등을 설정한 다음 ‘Apply’버튼을 클릭한다.

Page 38: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

38

5. IJServer5. IJServer

Page 39: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

39

(1) IJServerIJServer란 EJB Container와 Servlet Container를 포함하는 논리적인 개념이다.

( 한 개의 IJServer ) = (한개의 EJB 그룹에 대한 Work Unit ) + ( 한 개의 Servlet Container 그룹 )

IJServer를 사용할 경우에는 다음과 같은 장점이 있다.

① 환경설정의 편리함

- IJServer를 새로 생성하게 되면, 자동으로 관련된 환경파일을 생성하고 설정한다.( jsgw_apapi.conf, jswatch.conf 수정, 관련 jscontainer.xml 생성)

② EJB 및 Web Container(war파일)을 간단하게 Deploy할 수 있는 기능을 제공한다.( 웹 콘솔에서 Deploy )

③ EJB Container와 Servlet Container의 프로세스 다중도를 조정함으로써쉽게 로드 밸런싱 설정을 할 수 있다.( 로드 밸런싱은 IJServer를 사용하지 않는 경우에도 가능함 )

④ 기동, 정지 등의 운영을 간단히 할 수 있다.IJServer에 포함된 EJB Container와 Servlet Container를 한 번에 기동, 정지 )

⑤ 컨테이너 프로세스 (JVM)이 이상 종료할 경우에 자동 재기동함으로써 운영상의부담을 덜어준다.

Page 40: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

40

(2) J2EE Management Tool 접속방법

J2EE Management Tool 은 IJServer와 J2EE환경을 관리하기 위한 툴로써,Interstage Operation Tool 의 메뉴에서 접속할 수 있다.

① http://server:12000 으로 접속한 후 root계정으로 로그인

② 왼쪽 메뉴에서 ‘J2EE Management Tool’ 클릭

③ 접속된 화면

Page 41: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

41

(3) J2EE 환경 설정JDBC2.0을 이용하여 ORACLE을 접속하기 위해서는 다음 2가지 라이브러리가 필요하다.

- 오라클 버전에 맞는 JDBC2.0 드라이버 : classes12.zip( 오라클 웹 사이트에서 다운로드 )

- JNDI 라이브러리 : fscontext.jar , providerutil.jar

providerutil.jarFile System Service Provider (JNDI)

Sun사의

http://java.sun.com/products/jndi/페이지의

‘Download JNDI 1.2.1 & More’에서

‘File System Service Provider, 1.2’를 선택하여 다운로드

fscontext.jarFile System Service Provider (JNDI)

오라클 웹 사이트에서 해당 버전다운로드

classes12.zip오라클 JDBC2.0 드라이버

다운로드파일명라이브러리 종류

※ 다운로드한 JNDI File System Library ( fscontext.jar , providerutil.jar )는/opt/FJSVj2ee/lib 경로로 복사할 것

① Interstage를 종료한다. ( 종료 타입은 Normal Termination 으로 종료할 것 )

[ InterstageManagement ] –[ Stop ] –[ Normal Termination ]

Page 42: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

42

② J2EE Management Tool의 ‘J2EE Property’ 에서 CLASSPATH 및 LD_LIBRARY_PATH 환경을 설정하고 ‘update’한다.

※ Classpath : ORACLE관련 라이브러리와 그 밖에 필요한 CLASSPATH를 설정

예) /home/jslee/j2ee/lib/classes12.zip:/opt/FJSVj2ee/lib/fscontext.jar:/opt/FJSVj2ee/lib/providerutil.jar:/oracle/app/oracle/product/9i/jdbc/lib/nls_charset12.zip

※ LD_LIBRARY_PATH : ORACLE관련 라이브러리와 그 밖의 필요한 경로를 설정( JDBC를 Thin 방식이 아니라 OCI방식으로 접속할 경우, ORACLE 라이브러리 경로를 설정하여야 한다.)

예)

/oracle/app/oracle/product/9i/lib32

Page 43: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

43

(4) Data Source생성

① 좌측 메뉴에서 JDBC 를 선택하고, 생성할 Data Source명을 기술한 다음 ( 예 : ORACLE )‘New’ 버튼을 클릭한다.

② DB정보를 입력하고 ‘Create’버튼을 누른다.

.bindings 파일 생성 위치

Data Source JNDI명

DB 접속 계정

Thin/Oci 방식 선택

URL 및 port명

<Connection Pool Type선택>* Pool connections in Interstage : OracleConnectionPoolDataSource 사용

* Pool connections in Oracle: OracleConnectionCacheImpl 사용

* Use the distributed transaction : OracleXADataSource 사용ORACLE SID명

Page 44: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

44

(5) IJServer 생성

① Interstage를 종료한다. ( 종료 타입은 Normal Termination 으로 종료할 것 )

Normal Termination으로 종료한 경우Component Transaction Service가Stop 상태임을 확인한다.

Page 45: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

45

③ IJServer의 세부 설정을 입력한고 Create버튼을 누른다.

•Maximum heap area size of the JavaVM : 웹 컨테이너와 EJB컨테이너의최대 Heap사이즈를 기술한다.

•Class path : 필요한 Classpath를 기술한다.

•Other Option : Java 기동옵션 중 추가로 필요한 부분이 있으면 기술한다.

•Process Concurrency : web컨테이너와 EJB컨테이너의 로드 밸런싱이 필요할 경우다중도를 결정한다.

•Data Source : IJServer에서 사용할 Data Source명과 , Isolation level, Connection Count를 기술한다.

※ Isolation Level을 default로 설정할 경우 DB의 Default Isolation Level이 사용된다.

Page 46: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

46

② J2EE Management Tool의 좌측 메뉴에서 IJServerList를 선택하면,새로운 IJServer를 생성하기 위한 초기화면을 볼 수 있다.

- IJServer name을 입력한다. - Set detailed information 을 선택하고 ‘Create’ 버튼을 누른다.

※ IJServer생성이 완료되면 jswatch.conf 에 (IJServer Name)_001 이라는 네이밍의형태로 Servlet Container명이 붙여진다.

위의 경우 fujitsu_001 이라는 이름으로 Servlet Container명이 설정될 것이다.

Page 47: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

47

④ 좌측 메뉴 중 ‘IJServer List’를 클릭하면, IJServer가 새로 생성되었음을 알 수 있다.차후 세부 정의 내용을 변경하고자 할 때는 ‘Definition Update’ 를 클릭하여 수정한다.

※ 주의 사항

새로운 IJServer가 생성되면, /opt/FJSVjs2/conf 경로에 Web Container설정파일인(IJServer_name)_001.xml 가 생성된다.

이 파일의 설정중 ContextManger의 clientSession 속성값을 default로 수정하길 권장한다.

- permanent : Client의 웹 브라우저가 종료되어도 Timeout시점까지 세션 유지.- default : Client의 웹 브라우저가 종료되면 세션이 없어짐.

…. <ContextManager workDir="/opt/FJSVjs2/work/fujitsu_001" clientSession="permanent"version="5.1">….

…. <ContextManager workDir="/opt/FJSVjs2/work/fujitsu_001" clientSession=“default"version="5.1">….

Page 48: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

48

(6) Web Application 및 EJB Deploy① 좌측 메뉴에서 Deploy하고자 하는 IJServer명을 선택하고, 오른쪽 화면에서

‘Deploy/Undeploy’ 를 클릭한다.

Page 49: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

49

② ‘찾아보기’ 버튼을 누른 다음 Deploy할 파일을 ( war, jar, ear 등) 입력한다.

③ 다음 설정들을 체크한 뒤 Deploy 버튼을 누른다.

* Reload : web application 을 디플로이 할 경우 웹 컨테이너 설정 중Reloadable 속성값을 “true”로 할 것인 지를 선택한다.

* Differential Deployment : 변경된 부분만을 Deploy한다.

* Start : 디플로이를 하게 되면, 해당 IJServer가 종료된다.디플로이 이후 IJServer를 기동하기 위한 옵션이다.

※ <참조1 >만약 다수의 EJB를 한 꺼번에 Install 해야 한다면, Deploy용 파일들을 모두 서버로ftp로 복사한 뒤 일괄적으로 Deploy할 수 있다.

EJB의 경우에는 Deploy용 파일들을 서버에 복사한 뒤 해당 디렉토리에서명령어로도 Install할 수 있다.

# ejbinstalleb -s [IJServer명]

예) # ejbinstalleb -s fujitsu

※ <참조2 >IJServer도 Work Unit이다. 작성된 WorkUnit 정보는 (IJServer명).def 의 파일명으로/opt/FJSVejb/etc 경로에 저장된다.

Page 50: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

50

※ <참조 3>Web Application 을 war파일을 이용하여 Deploy하지 않는 경우라면,

Jservlet 환경 파일을 수동으로 설정한다.

예를 들어

- 웹 어플리케이션 소스 디렉토리가 ‘/home/jslee/servlet’ 이고- 접속 URI 를 ‘edu’ 로 설정한다면

다음 환경파일들을 수정하고, 웹 서버와 Jservlet 엔진을 재시작한다.

[IPP Servlet Gateway설정 예][Apache Servlet Gateway설정파일]

..Mount /edu EDUContainer EDU ajpv12://localhost:8010…

…ApJServMount /edu ajpv12://localhost:8010…

[Servlet Container설정파일]

….<Context path="/edu" docBase=“/home/jslee/servlet"

reloadable="true" dirList="false" />….

Page 51: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

51

(7) IJServer의 기동 및 정지

① IJServer 를 기동하기 전에 Interstage를 기동해야 한다. [Start]버튼 클릭

② 기동 후 [Detail] 버튼을 클릭하여 모든 서비스가 기동 되었는 지 확인한다.

Page 52: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

52

③ 좌측메뉴에서 기동할 IJServer를 선택한후 , [Start] 버튼을 클릭한다.

[참조 1]

IJServer 의 상태는 Active, EJB Active, Web Active, Stopped 의 3가지가 있다.

- Active : Web 컨테이너와 EJB 컨테이너 모두가 기동되어 있음.- EJB Active : EJB컨테이너만 기동되어 있음.- Web Active : Web 컨테이너만 기동되어 있음.- Stopped : IJServer에 속한 Web컨테이너와 EJB컨테이너가 종료되어 있음.

[참조 2]

EJB Container의 standard log는 다음 경로에 위치한다.

/opt/FJSVejb/var/[IJServer명]/[IJServer명]/[Process ID]/

EJB Application 내에서 System.out.println(“…”); 함수로 출력한 내용은 stdout 파일에 기록됨.

[참조 3]

이 밖에 EJB 실행 시의 예외 상황에 대한 로그는 다음 파일을 참조할 수 있다.

/opt/FJSVejb/var/FJEJBconsole

Page 53: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

53

④ EJB Container만을 종료, 기동할 경우에는 다음 명령을 실행한다.

# islistwuwuname kind statusfujitsu EJB execute

# isstopwu -c fujitsuUX:isstopwu: INFO: is30199:The command was processed normally

워크 유닛 상태 조회

종료 후 Management Tool 에서 상태를 보면 Web Active 상태가 된다.

워크 유닛 종료

# isstartwu fujitsuUX:isstartwu: INFO: is30199:The command was processed normally

# islistwuwuname kind statusfujitsu EJB execute

워크 유닛 기동

워크 유닛 상태 조회

기동 후 Management Tool 에서 상태를 보면 Active 상태가 된다.

Page 54: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

54

⑤ Web Container만을 종료, 기동할 경우Console 혹은 Operation Tool 에서 실행할 수 있다.

- 명령창에서 실행

# jscontdispPID STATUS Container Name------ -------- --------------------------------18332 ACTIVE sample18335 ACTIVE sample218338 ACTIVE wscontainer18344 ACTIVE jslee_00118347 ACTIVE myke_00120688 ACTIVE fujitsu_001

# jscontstop fujitsu_001UX:FJSVjs2: INFO: 2012: fujitsu_001 has been stopped.

# jscontstart fujitsu_001UX:FJSVjs2: INFO: 2006: fujitsu_001 has been started.

Jservlet상태 확인

Web컨테이너 종료

Web컨테이너 기동

- Operation Tool에서 실행 ( Servlet Operation 메뉴를 선택하고 실행 )

종료, 기동할 Web Container명 선택

종료, 기동 버튼

Page 55: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

55

AppendixAppendix

Page 56: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

56

(1) EJB Performance Monitoring(자세한 내용은 매뉴얼 Interstage Operator’s Guide , Chapter 4 참조 )

EJB Container 및 각 EJB의 Performance에 대한 Trace를 채취하는 방법이다

①# isstart

②# ispmakeenv -i 1m -m 5 -d /home/jslee/log

③# isstopwu -c jslee

④ 모니터링 대상을 지정하는 Property 파일을 작성하여 적당한 파일명으로 저장한다.

예)

Interstage를 기동한다.( 기동되어 있지 않다면 )

Monitoring 환경을 설정한다.-i 1m : 1분간격 통계치 계산-m 5 : 5MB의 공유메모리 사용-d … : log저장 위치 지정

Monitoring 하고자 하는 EJB가속해 있는 Work Unit을 종료한다.

[EJBCONT]jsleefujitsu[EJB-APPLICATION]EJBCT1EJBCT2…

[EJBCONT] 섹션에는 모니터링 할 IJServer 이름들을지정한다.

[EJB-APPLICATION] 섹션에는 IJServer에 속해 있지않은 EJB들을 지정한다.

⑤# ispstart -f isp_property

⑥# ispstatusshm : 1time : 1 minute(s)dir : /home/jslee/logstatus : activeejb-cont : jslee

⑦# isstartwu jslee

⑧# ispreport -k EJBAPL isp20030813.log > aaa.csv

⑨# ispstop

④에서 저장한 파일명으로감시를 시작한다.

감시상태를 조회한다.

감시 대상이 되는 워크유닛을기동한다.

적당한 시간이 되면 결과를Csv형태의 파일로 추출한다.

필요한 경우 감시를 종료한다.

Page 57: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

57

⑩ 추출된 csv파일을 엑셀 등에서 편집, 분석한다.

Page 58: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

58

<참고 : 추출된 csv파일의 각 컬럼의 의미 >

Average size of memory area used in VM (KB)21

Maximum size of memory area used in VM (KB)20

Maximum Passivate number for Entity19

Number of EJB object (Session)18

Number of requests awaiting processing17

Number of requests Received16

Number of processes15

Average request processing Wait time (ms)14

Minimum request processing Wait time (ms)13

Maximum request processing Wait time (ms)12

Average request processing time (ms)11

Minimum request processing time (ms)10

Maximum request processing time (ms)9

Thread ID8

Process ID7

Method name + signature6

EJB application name5

Data collection end time4

Data collection end date3

Data collection start time2

Data collection start date1

의미컬럼순서

Page 59: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

59

F A QF A Q

Page 60: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

60

AA 1) 하나의 web application이 복수개의 container를 사용=>load balancing

예) 하나의 application이 2개의 container를 사용

① jsgw.conf

Mount /sample ID1

Mount /sample ID2

Container ID1 ajpv12://localhost:8009/

Container ID2 ajpv12://localhost:8010/

LogFile /opt/FJSVjs2/log/jsgw.log

ErrorPage 404 /opt/FJSVjs2/gateway/404.html

ErrorPage 500 /opt/FJSVjs2/gateway/500.html

② jswatch.conf

...

#첫번째 container

sample.port=8009

sample.containerconf=/opt/FJSVjs2/conf/jscontainer.xml

...

...

#두번째 container

sample2.port=8010

sample2.containerconf=/opt/FJSVjs2/conf/jscontainer2.xml

...

③ jscontainer.xml

#cp jscontainer.xml jscontainer2.xml

#vi jscontainer2.xml

...

<Logger name="tc_log" path="log/sample2-container.log" />

<Logger name="servlet_log" path="log/sample2-servlet.log" />

...

<Parameter name="port" value="8010"/>

...

QQ servlet container를 복수개로 운영하는 방법은 무엇입니까?

Page 61: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

61

AA 2) 각각의 application별로 container를 기동 => load sharing 및 편리한 관리

예) 두개의 application을 각각의 container로 운영

① jsgw.conf

Mount /sample ID1

Mount /park ID2

Container ID1 ajpv12://localhos:8009/

Container ID2 ajpv12://localhost:8010/

LogFile /opt/FJSVjs2/log/jsgw.log

ErrorPage 404 /opt/FJSVjs2/gateway/404.html

ErrorPage 500 /opt/FJSVjs2/gateway/500.html

② jswatch.conf

...

#첫번째 container

sample.port=8009

sample.containerconf=/opt/FJSVjs2/conf/jscontainer.xml

...

...

#두번째 container

park.port=8010

park.containerconf=/opt/FJSVjs2/conf/jscontainer2.xml

...

③ jscontainer.xml

#cp jscontainer.xml jscontainer2.xml

#vi jscontainer2.xml

...

<Logger name="tc_log" path="log/park-container.log" />

<Logger name="servlet_log" path="log/park-servlet.log" />

...

<Parameter name="port" value="8010"/>

...

<Context path="/park" docBase="/home/park" />

Page 62: Interstage Application Server V5.0.1 Operation Guide · 2005-12-22 · (1)..... … … … … … "/> … … …

All Rights Reserved, Copyright © FUJITSU LIMITED 2002

62

QQ servlet class file들을 두는 directory와 mount point를

변경하는 방법은 무엇입니까?

AA #cd /opt/FJSVjs2/conf

#vi jsgw.conf

...

Mount /sample ID1 ☞밑줄 수정

...

#vi jscontainer.xml

...

<!-- Add the definition of Web Application under this. -->

<Context path="/sample" docBase="webapps/sample" /> ☞밑줄 수정

...

Ex))

① #vi jsgw.conf

...

Mount /park ID1

...

② #vi jscontainer.xml

...

<!-- Add the definition of Web Application under this. -->

<Context path="/park" docBase="/home/park" />

...

③ #cd /opt/FJSVjs2/bin

#jssvstop

#jssvstart

④ servlet인 HelloWorld.class를 browser에서 확인

☞ http://localhost:8080/park/servlet/HelloWorld

Note))

- docBase는 절대path로 기술

( 상대path일 경우는 /opt/FJSVjs2 directory가 기준 )

- 새로 지정한 docBase directory에는 WEB-INF라는 directory가,

이 WEB-INF라는 directory에는 classes라는 directory가 존재해야 하며,

결국 servlet class file들은 이 classes directory 아래에 놓이게 된다.