Plants by WebSphere |
|
시작하기 |
디렉토리 구조 식별 |
샘플 재빌드 및 설치 |
J2EE 플랫폼에서 응용프로그램을 개발하는 가장 큰 이점 중 하나는
이식성입니다. 샘플 갤러리의 모든 샘플 프로그램은 워크스테이션에서
개발되어 Java 코드 행을 변경하지 않고도 z/OS 및 iSeries 시스템에서 실행됩니다.
개발자는 Intel이나 UNIX 시스템에서 J2EE 응용프로그램을 빌드하여
EBCDIC을 ASCII로 또는 ASCII를 EBCDIC으로 파일 변환하는 데 인증 확인을
제거할 수 있습니다.
도구를 통해 개발자는 개발 워크스테이션에서 EAR(Enterprise Archive)
파일을 더 쉽게 작성 및 테스트할 수 있고 z/OS 및 iSeries 시스템에
더 쉽게 설치할 수 있습니다.
모든 z/OS 및 iSeries용 WebSphere Application Server(Application Server)
고객은 다중 플랫폼용 Application Server 매체를 사용할 수 있습니다.
WebSphere Application Server
기본 제품과 샘플을 이 패키지에서 지원하는 플랫폼 중 하나에 설치할 경우, 샘플
갤러리가 표시됩니다. 한 가지 예외는 sample_name > Ant로 빌드 > 플랫폼 > sample.ear 파일 다시 빌드 및 설치를 클릭할 경우, 해당 플랫폼에 EAR 파일을 다시 빌드할 수 있는 지시사항을 가져오는 것입니다. EAR 파일(XML, xmi, JSP(JavaServer Pages) 파일 등)의 텍스트 파일은 ASCII
형식이어야 하므로 해당 파일을 ASCII 시스템에서 더 쉽게 편집할 수 있습니다.
ASCII 시스템에서 변경할 경우 EBCDIC을 ASCII로 변환하지 않고 만들어진
EAR 파일을 z/OS 또는 iSeries 플랫폼에서 전개 및 설치할 수 있습니다.
선택한 분산된 플랫폼에 WebSphere Application Server를 설치하고 Application Server 샘플 응용프로그램 설치를 표시하십시오.
샘플을 수정하거나 다시 빌드하기 전에 <profile_root>/samples 디렉토리의 백업 사본을 작성하십시오. samples 디렉토리의 zip 파일을 작성하십시오. zip 파일의 압축을 풀어 samples 디렉토리를 원래 상태로 복원할 수 있습니다.
샘플은 다음 디렉토리에 설치됩니다.
<profile_root>/samples/src/PlantsByWebSphere | Plants by WebSphere 샘플에 대한 샘플 소스 코드가 있습니다. |
<profile_root>/samples/lib/PlantsByWebSphere | Plants by WebSphere 샘플에 대한 WAR(Web archive) 파일, JAR(Java archive) 파일 및 최종 PlantsByWebSphere.ear 파일이 있습니다.이 디렉토리는 Plants by WebSphere 샘플이 다시 빌드된 후 작성됩니다. |
<profile_root>/samples/javadoc/PlantsByWebSphere | Javadoc 문서가 포함됩니다. 이 디렉토리는 Plants by WebSphere 샘플이 다시 빌드된 후 작성됩니다. |
<profile_root>/samples/bld/PlantsByWebSphere | 생성된 클래스 파일이 포함됩니다. 이러한 클래스 파일을 사용하여 최종 PlantsByWebSphere.ear 파일을 생성하십시오. 이 디렉토리는 Plants by WebSphere 샘플이 다시 빌드된 후 작성됩니다. |
Plants by WebSphere 샘플은 WebSphere Application Server를 사용하여 자동으로 설치합니다. 샘플을 사용하기 전에 Plants by WebSphere 샘플을 빌드할 필요는 없습니다. 다음 지시사항에는 수정사항에 대한 추가 정보와 함께 샘플을 다시 빌드하는 단계를 설명합니다.
샘플 빌드 스크립트 실행 |
이 샘플을 다시 빌드하려면 profile_root/bin이 PATH 환경 변수에 있는지 확인하십시오. 다음 단계를 따라 샘플을 재빌드하는 샘플 빌드 스크립트를 실행하십시오.
이제 샘플이 빌드되었습니다.
profile_root/samples/bin/PlantsByWebSphere 디렉토리에서 buildplantsby.bat 및 buildplantsby.sh 스크립트는 적절한 클래스 경로 정보를 설정하고 Ant 빌드 유틸리티를 실행합니다. Ant는 샘플을 빌드하는 방법을 설명하는 build.xml 파일을 읽습니다. Ant에 대한 추가 문서는 Jakarta 웹 사이트를 참조하십시오.
빌드 프로세스 중 변경사항이 있는 클래스 파일만 재빌드됩니다.
나머지 클래스 파일은 새 EAR 파일로 다시 패키지됩니다.
다음 지시사항을 사용하여 FTP(File Transfer Protocol)를 통해 2진 EAR 파일을 z/OS 또는 iSeries 서버로 전송하십시오.
기본적으로 Plants by WebSphere 샘플은 profile_root/installedApps/<cell
name> 디렉토리에 설치됩니다. 여기서 <cell name>은
응용프로그램이 설치되는 셀의 이름입니다. 다음과 같이 샘플을 다시 설치하십시오.
wsadmin -conntype none -lang jython -c "AdminApp.uninstall('PlantsByWebSphere')"
wsadmin.sh -conntype none -lang jython -c "AdminApp.uninstall('PlantsByWebSphere')"
wsadmin.sh -conntype none -lang jython -c "AdminApp.uninstall('PlantsByWebSphere')"
wsadmin -conntype none -lang jython -c "AdminApp.uninstall('PlantsByWebSphere')"
wsadmin -conntype none -lang jython -c "AdminApp.install('PlantsByWebSphere.ear', ['-appname', 'PlantsByWebSphere', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb', '-deployejb.dbtype', 'DERBY_V10'] )"여기서 <node>는 노드의 이름이고 <server>는 샘플을 설치할 서버의 이름입니다.
wsadmin.sh -conntype none -lang jython -c "AdminApp.install('PlantsByWebSphere.ear', ['-appname', 'PlantsByWebSphere', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb', '-deployejb.dbtype', 'DERBY_V10'] )"여기서 <node>는 노드의 이름이고 <server>는 샘플을 설치할 서버의 이름입니다.
wsadmin.sh -conntype none -lang jython -c "AdminApp.install('PlantsByWebSphere.ear', ['-appname', 'PlantsByWebSphere', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb', '-deployejb.dbtype', 'DERBY_V10'] )"
wsadmin -conntype none -lang jython -c "AdminApp.install('PlantsByWebSphere.ear', ['-appname', 'PlantsByWebSphere', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb', '-deployejb.dbtype', 'DERBY_V10'] )"여기서 <node>는 노드의 이름이고 <server>는 샘플을 설치할 서버의 이름입니다.
재빌드된 PlantsByWebsphere.ear 파일이 이제 Application Server에 전개됩니다.