### JEUS/WEBTOB 연동하기 ###

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

1. webtob 설정

   - 웹투비홈/config/http.m의 각 항목에 추가합니다.

   *NODE

       JSVPORT = 9900

   *SVRGROUP

       jsvg     NODENAME=노드이름, SVRTYPE=JSV

   *SERVER

      MyGroup    SVGNAME=jsvg, MinProc=10, MaxProc=10

   *URI

      uri2    Uri="/examples/", Svrtype=JSV

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

2. jeus 설정

   - 제우스홈/config/노드이름/노드이름_servlet_engine1/WEBMain.xml 수정

        <webserver-connection>
            <webtob-listener>
                <listener-id>webtob1</listener-id>
                <port>9900</port>
                <hth-count>1</hth-count>
                <webtob-address>IP 혹은 127.0.0.1(동일서버에 JEUS와 WEBTOB존재시)</webtob-address>
                <registration-id>MyGroup</registration-id>
                <thread-pool>
                    <min>4</min>
                    <max>10</max>
                    <step>2</step>
                    <max-idle-time>30000</max-idle-time>
                    <max-wait-queue>4</max-wait-queue> 
                </thread-pool>
            </webtob-listener>
        </webserver-connection>


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

3. 제우스홈/bin/jeus.properties 조정

    - JEUS_WSDIR 부분을 주석처리 하거나 삭제

    - PATH 에서 $JEUS_HOME/webserver 부분도 제거

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

4. webtob 와 jeus 를 부팅 후 확인

   http://주소:8080/exapmples/index.jsp 에서 테스팅 페이지 보기

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

### DB 연동 ###

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

* MySQL 커넥션풀 샘플 (WEBMain.xml에 추가)

JEUS에서 제공하는 ConnectionPool은 JDBC Drive를 통해 얻은 Connection의 관리는 
엔진에서 해주는 것이므로 JDBC Driver를 $JEUS_HOME/lib/datasource 아래에 두고
DBConnectionPool은 container.xml에 DataSource는 JeusMain.xml에 다음과 같이 
설정을 하시면 사용하실 수가 있습니다. 
 
1) DBConnectionPool
------------------------------------------------------------------------------
<DBConnectionPool MaxUseCount="-1" 
                  ConnectionPoolType="shared" 
                  CloseDelayMillis="-1" 
                  MaxActiveTimeSecs="-1" 
                  ConnectionPoolID="mysql-shared" 
                  ConnectionArguments="user=root;password=" 
                  DriverClassName="org.gjt.mm.mysql.Driver" 
                  DynamicIncrement="true" 
                  ConnectionURL="jdbc:mysql://localhost:3306/mysql" 
                  LoginDelayMillis="-1" 
                  CloseLongActiveConnection="false" 
                  ConnectionTimeOutSecs="10"> 
        <DBPoolControl MaxCapacity="30" 
                   InitCapacity="20" 
                   MaxIdleTimeSecs="300" 
                   IncrementRate="4" /> 
        <DBAConnection ForcedClose="false" />
</DBConnectionPool>
 
 
2) DataSource
------------------------------------------------------------------------------
<DataSource> 
    <Database> 
            <Vendor>others</Vendor> 
            <ExportName>mysql</ExportName> 
            <DataSourceClassName>
                jeus.jdbc.driver.blackbox.BlackboxConnectionPoolDataSource
            </DataSourceClassName> 
            <Property> 
                <Name>URL</Name> 
                <Type>java.lang.String</Type> 
                <Value>jdbc:mysql://localhost:3306/mysql</Value> 
            </Property> 
            <Property> 
                <Name>DriverClassName</Name> 
                <Type>java.lang.String</Type> 
                <Value>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</Value> 
            </Property> 
            <Property> 
                <Name>Password</Name> 
                <Type>java.lang.String</Type> 
                <Value></Value> 
            </Property> 
            <Property> 
                <Name>User</Name> 
                <Type>java.lang.String</Type> 
                <Value>root</Value> 
            </Property> 
            <DataSourceType>ConnectionPoolDataSource</DataSourceType> 
            <ConnectionPool> 
                <MinPoolSize>4</MinPoolSize> 
                <MaxPoolSize>4</MaxPoolSize> 
                <IncreasingStep>1</IncreasingStep> 
                <ResizingPeriod>10</ResizingPeriod> 
                <OperationTimeout>30000</OperationTimeout> 
                <WaitForFreeConnection> 
                    <WaitingTime>10000</WaitingTime> 
                </WaitForFreeConnection> 
            </ConnectionPool> 
        </Database> 
  </DataSource>
--------------------------------------------------------------------------------------

* Oracle 커넥션풀 샘플 (JEUSMain.xml의 </node>하단에 추가)

    <resource>
        <data-source>
            <database>
                <vendor>oracle</vendor>
                <export-name>오라클UID</export-name>
                <data-source-class-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-class-name>
                <data-source-type>DataSource</data-source-type>
                <database-name>디비명</database-name>
                <data-source-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-name>
                <network-protocol>tcp</network-protocol>
                <user>scott</user>
                <password>tiger</password>
                <port-number>1521</port-number>
                <server-name>아이피 또는 127.0.0.1</server-name>
                <driver-type>thin</driver-type>
                <connection-pool>
                    <pooling>
                        <max>20</max>
                        <step>1</step>
                        <period>500000</period>
                    </pooling>
                </connection-pool>
            </database>
        </data-source>
    </resource>

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

* DB2

  1) JEUS 3.x ($JEUS_HOME/config/<NODENAME>/JeusMain.xml
        <Database> 
            <Vendor>db2</Vendor> 
            <ExportName>db2local</ExportName> 
            <DatabaseName>SAMPLE</DatabaseName> 
            <DataSourceClassName>COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource</DataSourceClassName>
            <DataSourceName/> 
            <ServiceName/> 
            <Description/> 
            <NetworkProtocol/> 
            <Password>jeus2013</Password> 
            <PortNumber>포트번호</PortNumber> 
            <ServerName>DB서버 IP</ServerName> 
            <User>db2inst1</User> 
            <DataSourceType>LocalXADataSource</DataSourceType> 
            <ConnectionPool> 
                <MinPoolSize>2</MinPoolSize> 
                <MaxPoolSize>4</MaxPoolSize> 
                <IncreasingStep>1</IncreasingStep> 
                <ResizingPeriod>600000</ResizingPeriod> 
                <OperationTimeout>30000</OperationTimeout> 
                <WaitForFreeConnection> 
                    <WaitingTime>10000</WaitingTime> 
                </WaitForFreeConnection> 
            </ConnectionPool> 
        </Database>  
  2) JEUS 4.x ($JEUS_HOME/config/<NODENAME>/JEUSMain.xml
           <database>
                <vendor>db2</vendor>
                <export-name>db2XADatasource1</export-name>
<data-source-class-name>COM.ibm.db2.jdbc.DB2XADataSource</data-source-class-name>
                <data-source-type>XADataSource</data-source-type>
                <database-name>sample</database-name>
                <description>Customer DB</description>
                <password>db2inst1</password>
                <encryption>false</encryption>
                <port-number>포트번호</port-number>
                <server-name>DB서버 IP</server-name>
                <user>db2inst1</user>
                <connection-pool>
                    <pooling>
                        <min>2</min>
                        <max>4</max>
                        <step>1</step>
                        <period>600000</period>
                    </pooling>
                    <wait-free-connection>
                        <enable-wait>false</enable-wait>
                        <wait-time>10000</wait-time>
                    </wait-free-connection>
                    <operation-to>30000</operation-to>
                </connection-pool>
            </database>
--------------------------------------------------------------------------------------


 

### TIPS ###

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

* 파일경로설정

1) 파일 실제경로 (기본값)

- servlet : 제우스홈\webhome\servlet_home\webapps\examples\WEB-INF\classes

- jsp : 제우스홈\webhome\servlet_home\webapps\examples

2) 기존의 examples 컨텍스트 이외에 새로운 aaa라는 컨텍스트를 추가하는 방법 (컨텍스트 설정법)
- WEBMain.xml에서 다음 부분을 추가한다. 
  <context> 
    <context-name>aaa</context-name> 
    <context-path>/aaa</context-path> 
  </context> 
- aaa 컨텍스트의 DD(deployment descriptor)파일을 작성 
  제우스홈\config\노드명\[SERVLET_ENGINE_NAME]\jeus-web-dd_examples.xml 파일을 jeus-web-dd_aaa.xml 파일로 복사  

  하여 편집. context-name, docbase 만 설정하면 됩니다. WEBMain.xml의 이름과 동일해야 함. 
  <?xml version="1.0"?> 
  <!DOCTYPE jeus-web-dd PUBLIC "-//Tmax Soft., Inc.//DTD JEUS WEB Deployment Info 4.0//EN" 
                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-web-dd.dtd"> 
  <jeus-web-dd> 
    <context> 
        <context-name>aaa</context-name> 
        <docbase>서버의 물리적 절대경로</docbase> 
        <auto-reload> 
            <enable-reload>true</enable-reload> 
            <check-on-demand>true</check-on-demand> 
        </auto-reload> 
    </context> 
  </jeus-web-dd> 
- WebtoB의 환경설정파일(http.m)의 URI 절에 aaa 컨텍스트 경로를 다음과 같이 추가한다. 
  *URI 
  uri8 Uri = "/aaa/",Svrtype = JSV 
- WebtoB의 환경파일 수정 후에는 반드시 환경파일 컴파일 후 WebtoB를 재기동 : wscfl -i http.m 
- JEUS 를 재기동


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

* index.jsp를 자동으로 인식시키려면

- 제우스홈\config\노드명\[SERVLET_ENGINE_NAME]\webcommon.xml 파일에 index.jsp추가

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
  </welcome-file-list>

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

* jspwork 디렉토리 변경

1. JEUS 3.x
$JEUS_HOME/config/<HOSTNAME>/<SERVLET_ENGINE_NAME>/container.xml의
<JSPEngine> 태그 안에 JspWorkDir을 설정하면 됩니다.
<Container>
  ...
  <ContextGroup>
    ...
    <JSPEngine ... 
      JspWorkDir="/app/jwork" 
      ...
    />
2. JEUS 4.x
$JEUS_HOME/config/<HOSTNAME>/<SERVLET_ENGINE_NAME>/WEBMain.xml의
<jsp-engine> 태그 안에 <jsp-work-dir>를 설정하면 됩니다.
<web-container>
  <context-group>
    ...
    <jsp-engine>
      ...
      <jsp-work-dir>/app/jwork</jsp-work-dir>
      ...
    </jsp-engine>
--------------------------------------------------------------------------------------

* 폴더관리 (webtob, jeus 연동시)

- image, js, css, html 등은WebToB홈\docs 에 폴더로 관리해서 WEBTOB가 처리

- jsp, servlet은 context를 별도 설정 (컨텍스트 설정법 참조)해서 JEUS가 처리

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

* 오라클 데이터베이스 사용시 C:/jeus/lib/datasource 폴더에 classes12.zip 복사

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

* trouble shooting

- Out Of Memory 에러

  JVM에서 사용할 수 있는 memory가 부족할 때 발생합니다. 
  이것을 해결하는 방법으로는 버전별로 다음과 같이 JEUS 환경 파일에서
  추가하면 됩니다. -Xms가 min 값이고 -Xmx가 max 값입니다.
  1) JEUS 3.x ($JEUS_HOME/config/<HOSTNAME>/JeusMain.xml)
  <JeusSystemConfig>
      <NodeConfig>
          ...
          <EngineContainer>
              ...
              <CommandOption>-Xms256m -Xmx256m<CommandOption>
  2) JEUS 4.x ($JEUS_HOME/config/<HOSTNAME>/JEUSMain.xml)
  <jeus-system>
      <node>
          ...
          <engine-container>
             ...
              <command-option>-Xms256m -Xmx256m<command-option>
- 노드명에 '-' 문자를 썼을 경우 또는 노드명에 공백이 있는 경우

  wscfl -i http.m 부분에서 오류 -> 노드명을 ""으로 묶어준다.

- 8080포트 사용하려고 할때 XDB 인증창이 뜬다면... 

  =====> 오라클의 XDB포트와 충돌하는 경우이므로 오라클의 XDB포트를 아래와 같이 변경해준다.

  [시작] -> [프로그램] -> [Oracle - OraHome92] -> [Configuration and Migration Tools] 

  -> [Database Configuration Assistant]   선택

  프로그램이 실행이되면.....

  [다음] 버튼을 Click -> [데이터베이스의 데이이터베이스 옵션구성] 선택 -> [사용 가능한 데이터베이스] 선택 

  -> [표준데이터베이  스 기능...] 버튼을 Click -> Oracle XML DB 의 [사용자 정의 ...] 버튼을 Click 

  -> [포트 번호 구성] 항목의 [사용자 정의 값 지정] 을 선택하셔서 HTTP 포트를 바꿔줍니다. 

  그리고 FTP 및 WebDAV 포트는 기본 설정인 2100 을 사용합니다. -> [확인] 버튼을 Click 하시고 

  [다음] 버튼을 Click 하셔서 데이터베이스를 실행할 기본모드를 선택하시고 [완료] 버튼을 눌러주시면 

  요약 메세지창이 뜨고 [확인] 버튼을 눌러주시면 XDB 의 Port 설정이 끝나게 됩니다.

- 다음과 같은 nullpointer exception 발생시

  <<__Exception__>>
  java.lang.NullPointerException
          at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:20
  5)
          at javax.servlet.GenericServlet.log(GenericServlet.java:300)
          at javax.servlet.GenericServlet.init(GenericServlet.java:257)
          at jeus.servlet.common.WebContainerManager.startContainer(WebContainerMa
  nager.java:538)
          at jeus.servlet.syscontext.SystemContext.startup(SystemContext.java:64)
          at jeus.servlet.deployment.SystemWebContainer.startup(SystemWebContainer
  .java:35)
          at jeus.server.SystemEngineController.startEngine(SystemEngineController
  .java:26)
          at jeus.server.JeusServer.boot(JeusServer.java:720)
          at jeus.server.ControlThread.acceptRequests(ControlThread.java:181)
          at jeus.server.ControlThread.run(ControlThread.java:86)
  java.lang.NullPointerException : null
  [SystemEngineController] fail to start System Engine [devserver_system_engine] :
   jeus.server.JeusServerException
  <<__!Exception__>>
  [2005.05.26 10:30:05][2] [ControlThread] command (210.117.198.62:1063) : disconn
  ect()

 =====> j2sdk1.4.1_07 이하 버젼으로 jdk를 다시 설치한 수 jeus/webtob 다시설치 해보세요.

- C:\Program Files\Java\j2re1.4.1_07\bin\server\jvm.dll 파일을 찾지 못할때

  =====> C:\j2sdk1.4.1_07\jre\bin\server 폴더를 카피해서 

             C:\Program Files\Java\j2re1.4.1_07\bin 폴더에 복사하세요.

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

* 클래스파일 변경시 실시간으로 변경 반영

소스가 WEB-INF/classes 아래에 있으면 리부팅이 필요 없습니다. 
단, 확인 하실 것이 container.xml(WEBMain.xml)에 context 태그 내에 AutoReload="true"가 설정되어 있으면 됩니다.
WEB-INF/lib/*.jar는 라이브러리와 같이 수정하지 않는다는 의미를 포함하고 있으므로(J2EE 스펙에 준하면...) 
jar 파일 내의 수정은  반드시 제우스를 리부팅 해야 적용됩니다.
--------------------------------------------------------------------------------------

* 인클루드된 파일 변경시 즉시 적용(<%@ include 자동 반영하기)

JSP의 include의 방식에는 <%@ include (action), <jsp:include (directive) 가 있다.

이 중 <jsp:include (action) 는 include하는 JSP(a.jsp)와 include되는 JSP(b.jsp)가 각각 별도의 servlet으로 변환된다.
a.jsp가 수행 도중 b.jsp의 include 구문을 만나면 b.jsp로 제어권이 넘어가서 수행된 후 다시 a.jsp로 제어권이 넘어와서 계속 수행된다.
그래서 b.jsp가 변경된 경우 변경사항이 자동으로 반영된다.

그리고 <%@ include (directive)는 include하는 JSP(a.jsp)와 include되는JSP(b.jsp)가  하나의 servlet으로 변환되어서 a.jsp 내에 b.jsp가 완전히 포함되는 형태로 변환된다.
<%@ include (directive)의 목적은 JSP가 Servlet으로 변환되어 컴파일 될 때에
특정 코드나 text를 포함하기 위해서 이다.
따라서 b.jsp가 변경된 경우 a.jsp는 b.jsp가 변경되었는지 모르기 때문에 include 된 JSP의 변경시 이것을 인지하지 못한다.

<%@ include (directive) 를 사용하는 경우 JSP container가 include된 파일이 변경된경우 자동으로 반영해 주기 위해서는 include하는 파일이 수행될 때 마다 include된 파일의 변경 여부를 검사해서변경되었다면 include 하는 파일을 recompile 해 주어야 한다.
이것은 JSP container에게는 상당히 부하를 주는 작업이다.
그래서 JSP Spec에서는 include된 파일의 변경시 반영 여부는 명시하지 않고 있다.

JEUS에서는 개발과 운영의 편의성을 위해서 이것을 옵션으로 지정하여 변경시 자동 반영이 되게 설정할 수 있다.
하지만 이 옵션을 true로 설정하는 경우 불필요한 검사가 들어가게 되므로 수행 속도에 지장을 주게됩니다. 반드시 JSP 파일의 변경이 빈번한 경우에만 설정하면 된다.

1. JEUS 3.x
$JEUS_HOME/config/<HOSTNAME>/<SERVLET_ENGINE_NAME>/container.xml에 설정
---------------------------------------------------------
<Container>
    ...
    <ContextGroup>
        ...
        <JSPEngine ...
            CheckIncludedJspFile="true"
            ... />
2. JEUS 4.x
$JEUS_HOME/config/<HOSTNAME>/<SERVLET_ENGINE_NAME>/WEBMain.xml에 설정
---------------------------------------------------------
<web-container>
    ...
    <context-group>
        ...
        <jsp-engine>
            ...
            <check-included-jspfile>true</check-included-jspfile>
            ...
        </jsp-engine>
        ...
    </context-group>
    ...
</web-container>
--------------------------------------------------------------------------------------

* http.m 샘플

*DOMAIN
WebtoB

*NODE
devserver WEBTOBDIR="C:/webtob", 
  SHMKEY = 54000,
  DOCROOT="C:/tmax/webdocs",
  IndexName="index.jsp,index.html,index.htmm",
  PORT = "80", 
  LOGGING = "log1",
  ERRORLOG = "log2",
  HTH = 1,
  JSVPORT = 9900

*SVRGROUP
htmlg  NODENAME = devserver, SvrType = HTML
cgig  NODENAME = devserver, SVRTYPE = CGI
ssig  NODENAME = devserver, SVRTYPE = SSI
jsvg  NODENAME = devserver, SVRTYPE=JSV

*SERVER
html  SVGNAME = htmlg, MinProc = 3, MaxProc = 10
cgi  SVGNAME = cgig, MinProc = 3, MaxProc = 10
ssi  SVGNAME = ssig, MinProc = 3, MaxProc =10
MyGroup  SVGNAME=jsvg, MinProc=10, MaxProc=10

*URI
uri1  Uri = "/cgi-bin/", Svrtype = CGI
uri2  Uri="/examples/", Svrtype=JSV
uri3  Uri="/", Svrtype=JSV

*ALIAS
alias1  URI = "/cgi-bin/", RealPath = "C:/webtob/cgi-bin/"

*LOGGING
log1  Format = "DEFAULT", FileName = "C:/webtob/log/access.log", Option = "sync"
log2  Format = "ERROR", FileName = "C:/webtob/log/error.log", Option = "sync"

*EXT
htm  MimeType = "text/html", SvrType = HTML
--------------------------------------------------------------------------------------

* JEUSMain.xml 샘플

<?xml version="1.0"?>
<!DOCTYPE jeus-system PUBLIC "-//Tmax Soft, Inc.//DTD JEUS Main Config 4.0//EN"
                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-main-config.dtd">
<jeus-system>
    <node>
        <name>devserver</name>
        <class-ftp>true</class-ftp>
        <sequential-start>true</sequential-start>
        <enable-webadmin>true</enable-webadmin>
        <system-log>
            <level>debug</level>
        </system-log>
        <engine-container>
            <name>container1</name>
            <engine-command>
                <type>servlet</type>
                <name>engine1</name>
                <startup-mode>xml</startup-mode>
            </engine-command>
            <tm-config>
                <pooling>
                    <min>10</min>
                    <max>20</max>
                    <step>2</step>
                    <period>600000</period>
                </pooling>
                <active-timeout>300000</active-timeout>
                <commit-timeout>120000</commit-timeout>
                <capacity>20000</capacity>
            </tm-config>
        </engine-container>
    </node>
</jeus-system>

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

* WEBMain.xml 샘플

<?xml version="1.0"?>
<!DOCTYPE web-container PUBLIC "-//Tmax Soft., Inc.//DTD WEB Main Config 4.0//EN"
                               "http://www.tmaxsoft.com/jeus/dtd/4.0/web-main-config.dtd">
<web-container>
    <context-group>
        <group-name>MyGroup</group-name>
        <group-docbase>webapps</group-docbase>
        <session-config>
            <timeout>20</timeout>
            <shared>true</shared>
        </session-config>
        <logging>
            <error-log>
                <target>stdout</target>
                <level>information</level>
                <buffer-size>0</buffer-size>
                <valid-day>1</valid-day>
            </error-log>
            <user-log>
                <target>file</target>
                <buffer-size>0</buffer-size>
                <valid-day>1</valid-day>
            </user-log>
            <access-log>
                <target>file</target>
                <buffer-size>0</buffer-size>
                <valid-day>1</valid-day>
                <log-format>
                    <time-format>default</time-format>
                </log-format>
            </access-log>
        </logging>
        <context>
            <context-name>examples</context-name>
            <context-path>/examples</context-path>
        </context>
  <context> 
   <context-name>ngi</context-name> 
   <context-path>/</context-path> 
  </context> 
        <webserver-connection>
            <webtob-listener>
                <listener-id>webtob1</listener-id>
                <port>9900</port>
                <hth-count>1</hth-count>
                <webtob-address>127.0.0.1</webtob-address>
                <registration-id>MyGroup</registration-id>
                <thread-pool>
                    <min>4</min>
                    <max>10</max>
                    <step>2</step>
                    <max-idle-time>30000</max-idle-time>
                    <max-wait-queue>4</max-wait-queue> 
                </thread-pool>
            </webtob-listener>
        </webserver-connection>
    </context-group>
</web-container>
--------------------------------------------------------------------------------------

### 실무 적용 예 (버츄얼호스팅 사용) ###

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

프로젝트 실제환경을 로컬에서 구현해 작업해야 하는 상황에서...

두대의 IBM서버로 돌아가는 JEUS/WEBTOB의 환경설정 입니다.

<<< 실제환경 >>>

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

- 서버1 : WindowsServer2003Standard, 웹서버 (WEBTOB)

- 서버2 : WindowsServer2003Standard, 웹컨테이너 (JEUS), DB(Oracle9i)

- 두 서버는 9999포트를 통해 연동한다.

- images,css,js는 서버1에 jsp,java는 서버2에 위치시킨다.

- 서버구조는 1 WEBSERVER, 2 CONTAINER (원래 4개에서 필요한 두개만 가동)

- 윈도우 hosts파일에 localhost2, localhost3 추가

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

<<< sample.m >>>

*DOMAIN
WebtoB

*NODE
realchokyCompaq
  WebtobDir="C:/webtob",
  Shmkey=54000,
  Docroot="C:/center",
  HTH=1,
  port="9900",
  JSVPort=9999,
  IndexName="index.jsp,index.htm,index.html",
  Logging="log1",
  ErrorLog="log2"

*VHOST
center
  NodeName="realchokyCompaq",
  HostName="localhost2",
  DocRoot="C:/center",
  Port="9900",
  SSLFlag=N,
  IndexName="index.jsp,index.htm,index.html"

admin
  NodeName="realchokyCompaq",
  HostName="localhost3",
  DocRoot="C:/admin",
  Port="9900",
  IndexName="index.jsp,index.htm,index.html"

*SVRGROUP
htmlg
  NodeName="realchokyCompaq",
  SvrType=HTML

jsvg
  NodeName="realchokyCompaq",
  SvrType=JSV,
  VHostName=center

jsvg2
  NodeName="realchokyCompaq",
  SvrType=JSV,
  VHostName=admin

*SERVER
html
  SvgName=htmlg,
  MinProc=30,
  MaxProc=60

Center
  SvgName=jsvg,
  MinProc=30,
  MaxProc=30,
  HttpInBufsize=0,
  HttpOutBufsize=0

Admin
  SvgName=jsvg2,
  MinProc=10,
  MaxProc=10,
  HttpInBufsize=0,
  HttpOutBufsize=0

*URI
images
  Uri="/images/",
  SvrType=HTML

center
  Uri="/",
  SvrType=JSV,
  VhostName=center

admin
  Uri="/",
  SvrType=JSV,
  VhostName=admin

*LOGGING
log1
  FileName="C:/webtob/log/access.log",
  Format="DEFAULT",
  Option="sync"

log2
  FileName="C:/webtob/log/error.log",
  Format="ERROR",
  Option="sync"

*EXT
htm
  Mimetype="text/html",
  Svrtype=HTML

jsp
  Mimetype="application/jsp",
  Svrtype=JSV

<<< JEUSMain.xml >>>

<?xml version="1.0"?>
<!DOCTYPE jeus-system PUBLIC "-//Tmax Soft, Inc.//DTD JEUS Main Config 4.0//EN"
                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-main-config.dtd">
<jeus-system>
    <node>
        <name>realchokyCompaq</name>
        <class-ftp>true</class-ftp>
        <sequential-start>true</sequential-start>
        <system-log>
            <level>debug</level>
        </system-log>
        <engine-container>
            <name>container1</name>
            <engine-command>
                <type>servlet</type>
                <name>engine1</name>
                <startup-mode>xml</startup-mode>
            </engine-command>
            <tm-config>
                <pooling>
                    <min>10</min>
                    <max>20</max>
                    <step>2</step>
                    <period>600000</period>
                </pooling>
                <active-timeout>300000</active-timeout>
                <commit-timeout>120000</commit-timeout>
                <capacity>20000</capacity>
            </tm-config>
        </engine-container>
        <engine-container>
            <name>container2</name>
            <engine-command>
                <type>servlet</type>
                <name>engine2</name>
                <startup-mode>xml</startup-mode>
            </engine-command>
            <tm-config>
                <pooling>
                    <min>10</min>
                    <max>20</max>
                    <step>2</step>
                    <period>600000</period>
                </pooling>
                <active-timeout>300000</active-timeout>
                <commit-timeout>120000</commit-timeout>
                <capacity>20000</capacity>
            </tm-config>
        </engine-container>
    </node>
    <resource>
        <data-source>
            <database>
                <vendor>oracle</vendor>
                <export-name>오라클UID</export-name>
                <data-source-class-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-class-name>
                <data-source-type>DataSource</data-source-type>
                <database-name>디비명</database-name>
                <data-source-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-name>
                <network-protocol>tcp</network-protocol>
                <user>아이피</user>
                <password>패스워드</password>
                <port-number>1521</port-number>
                <server-name>아이피 혹은 127.0.0.1</server-name>
                <driver-type>thin</driver-type>
                <connection-pool>
                    <pooling>
                        <max>20</max>
                        <step>1</step>
                        <period>500000</period>
                    </pooling>
                </connection-pool>
            </database>
        </data-source>
    </resource>
</jeus-system>

<<< WEBMain.xml (컨테이너 1) >>>

<?xml version="1.0"?>
<!DOCTYPE web-container PUBLIC "-//Tmax Soft., Inc.//DTD WEB Main Config 4.0//EN"
                               "http://www.tmaxsoft.com/jeus/dtd/4.0/web-main-config.dtd">
<web-container>
    <context-group>
        <group-name>Center</group-name>
        <group-docbase>webapps</group-docbase>
        <servlet-home>c:\</servlet-home>
        <context>
            <context-name>Center</context-name>
            <context-path>/</context-path>
        </context>
        <session-config>
            <shared>true</shared>
            <timeout>20</timeout>
        </session-config>
        <webserver-connection>
            <webtob-listener>
                <listener-id>Center</listener-id>
                <port>9999</port>
                <output-buffer-size>0</output-buffer-size>
                <webtob-address>127.0.0.1</webtob-address>
                <thread-pool>
                    <min>30</min>
                    <max>30</max>
                </thread-pool>
            </webtob-listener>
        </webserver-connection>
        <logging>
            <error-log>
                <target>stdout</target>
                <buffer-size>0</buffer-size>
                <level>information</level>
            </error-log>
            <user-log>
                <buffer-size>0</buffer-size>
            </user-log>
            <access-log>
                <buffer-size>0</buffer-size>
                <valid-day>1</valid-day>
                <log-format>
                    <time-format>default</time-format>
                </log-format>
            </access-log>
        </logging>
    </context-group>
</web-container>

<<< jeus-web-dd_Center.xml >>>

<?xml version="1.0"?>
<!DOCTYPE jeus-web-dd PUBLIC "-//Tmax Soft., Inc.//DTD JEUS WEB Deployment Info 4.0//EN"
                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-web-dd.dtd">
<jeus-web-dd>
    <context>
        <context-name>center</context-name>
        <docbase>center</docbase>
        <auto-reload>
            <enable-reload>true</enable-reload>
            <check-on-demand>true</check-on-demand>
        </auto-reload>
    </context>
</jeus-web-dd>

<<< WEBMain.xml (컨테이너 2) >>>

<?xml version="1.0"?>
<!DOCTYPE web-container PUBLIC "-//Tmax Soft., Inc.//DTD WEB Main Config 4.0//EN"
                               "http://www.tmaxsoft.com/jeus/dtd/4.0/web-main-config.dtd">
<web-container>
    <context-group>
        <group-name>Admin</group-name>
        <group-docbase>webapps</group-docbase>
        <servlet-home>c:\</servlet-home>
        <context>
            <context-name>Admin</context-name>
            <context-path>/</context-path>
        </context>
        <session-config>
            <shared>true</shared>
            <timeout>20</timeout>
        </session-config>
        <webserver-connection>
            <webtob-listener>
                <listener-id>Center</listener-id>
                <port>9999</port>
                <output-buffer-size>0</output-buffer-size>
                <webtob-address>127.0.0.1</webtob-address>
                <thread-pool>
                    <min>30</min>
                    <max>30</max>
                </thread-pool>
            </webtob-listener>
        </webserver-connection>
        <logging>
            <error-log>
                <target>stdout</target>
                <buffer-size>0</buffer-size>
                <level>information</level>
            </error-log>
            <user-log>
                <buffer-size>0</buffer-size>
            </user-log>
            <access-log>
                <buffer-size>0</buffer-size>
                <valid-day>1</valid-day>
                <log-format>
                    <time-format>default</time-format>
                </log-format>
            </access-log>
        </logging>
    </context-group>
</web-container>


 

<<< jeus-web-dd_Admin.xml >>>

<?xml version="1.0"?>
<!DOCTYPE jeus-web-dd PUBLIC "-//Tmax Soft., Inc.//DTD JEUS WEB Deployment Info 4.0//EN"
                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-web-dd.dtd">
<jeus-web-dd>
    <context>
        <context-name>admin</context-name>
        <docbase>admin</docbase>
        <auto-reload>
            <enable-reload>true</enable-reload>
            <check-on-demand>true</check-on-demand>
        </auto-reload>
    </context>
</jeus-web-dd>

'개발도 하냐?' 카테고리의 다른 글

웹로직 DB 접속설정  (0) 2009.11.04
자동화 빌드도구 ANT  (0) 2009.11.04
전자세금계산서/세금계산서 업체 정보리스트  (0) 2009.10.29
Anyframe Doc  (0) 2009.09.16
JSP_MVC 형식  (0) 2009.09.16
필수 파일
1. eclipse3.2
-http://www.eclipse.org

2. JMaker 3.2 plug-in
-http://technet.tmax.co.kr

3. JMaker license
-http://technet.tmax.co.kr

4. JEUS5.0

5. 이클립스에서 제우스 서버 구동하기
※ JMaker 3.2 plug-in 삽입
- 압축 풀기 후 eclipse3.2/  폴더 안에
   features 폴더와 plugins 폴더를 덮어쓰기 한다.

※ JMaker license 삽입
   신청하여 받은 license 파일을
   eclipse3.2/  폴더 안에 license 폴더를 생성하여 해당 파일을 추가한다.

※ Local JEUS Server 설정 및 실행
- eclipse를 실행하여 Servers View를 선택하고
   오른쪽 마우스를 클릭하여 New -> Server를 선택한다.

- Server's host name 은 'localhost' 삽입 후 Next

- JRE 와 JEUS Home Directory 확인 후 Next

- Node Name 은 '로컬 PC의 hostname',
  WebHome Directory는  JEUS의 'webhome'까  지 설정,
  유저 이름과 비밀번호를 작성한후 Finish

- JEUS Server를 start하여 jboot 확인한다.

- Ant Build(Alt + Shift + X + Q)를 시켜 jeus 서버로 컴파일한다.


[WebtoB, JEUS and Eclipse]

이번 포스트에서는 TmaxSoft 사의 JEUS와 WebtoB, 그리고 대표적인 자바 개발 툴인 Eclipse와 연동하는 방법에 대해 얘기하기 위해 필요사항을 정리하고, 설치하는 방법까지 알아보도록 하자.

    * 요구사항
          o JEUS 5.0 Fix#14 이상(http://technet.tmax.co.kr/)
          o WebtoB 4.1 이상(http://technet.tmax.co.kr/)
          o Eclipse 3.2(http://www.eclipse.org/)
          o JMaker 3.2 plugin(http://technet.tmax.co.kr/)

    이번 포스트에서는 MyEclipse나 TmaxSoft 사의 JMaker 3.2 SDK를 이용하지 않고, 오리지널 Eclipse과의 연동을 하므로 JMaker 3.2 plugin만 있으면 된다.

    JEUS, WebtoB, JMaker plugin은 TmaxSoft Technet 가입 후, 다운로드를 받아야 한다. 또한, 라이센스가 필요한데, 이 또한, Technet에서 신청 가능하다. 신청 즉시, 이메일로 발송되므로 기다리지 않아도 된다.

    각 제품 별로 데모 기간이 다르므로 라이센스 페이지의 '제품별 발급 라이센스 정보'를 잘 참조하도록 하자. 한가지 설명을 덧붙이자면, 라이센스 신청 시, Host ID 혹은 Host Name을 입력하도록 되어 있는데, 이는 윈도우 콘솔(윈도우키 + R)에서 각각 vol 명령과 hostname 명령으로 확인 가능하다. 단, vol명령의 경우, 해당 제품이 설치되는 디스크 드라이브으로 이동한 뒤, 확인해야 한다.(디스크 드라이브는 각자 고유의 volume이 존재한다.)

    * WebtoB 설치
          o 다운로드 받은 설치 파일을 실행하여 원하는 위치에 설치 하도록 한다.
          o 설치 중간, WebtoB + Servlet 설치 혹은 WebtoB 설치를 물어보는데 Servlet은 필요없으므로 WebtoB만 설치해도 무방하다.
          o 발급받은 라이센스 파일(license.dat)을 license 밑에 복사하여 옮긴다.
          o WebtoB 설정은 WebtoB 기동과 함께 JEUS와의 연동 부분에서 설명하도록 하겠다.
    * JEUS 설치
          o 다운로드 받은 설치 파일을 실행하여 원하는 위치에 설치 하도록 한다.
          o 발급받은 라이센스 파일의 확장자를 제거하고 license 밑에 복사하여 옮긴다.
          o JEUS를 설치하고 나면, Quick Start를 기동할 수 있는데, Quick Start에서 서버를 기동해 볼 수 있다. 정상적으로 서버가 기동되면 설치가 정상적으로 이루어진 것이다.
    * Eclipse 설치
          o Eclipse의 경우, 따로 설치가 필요하지 않고, 압축을 풀어놓기만 하면 된다.
    * JMaker 3.2 plugin 설치
          o JMaker 3.2 plugin은 Eclipse용 plugin이다. 압축 파일을 Eclipse 폴더에 풀기만 하면 설치가 된다.
          o JMaker 3.2 plugin에도 라이센스가 필요하다. Eclipse 폴더에 license 폴더를 새로 만들고 발급된 라이센스 파일을 확장자(dat)를 제거하고 옮겨놓도록 한다.
          o 설치 후, Eclipse를 기동해서, 아무런 경고 메세지가 발생하지 않는다면 정상적으로 설치된 것이다.

'개발도 하냐?' 카테고리의 다른 글

Anyframe Doc  (0) 2009.09.16
JSP_MVC 형식  (0) 2009.09.16
약도 만들기  (0) 2009.08.14
아키텍쳐에 대한 정의  (0) 2009.08.07
허드슨(Hudson)을 이용한 지속적인 통합(Continuous integration with Hudson)  (0) 2009.07.31

+ Recent posts