WebSphere2WebLogicMigrationToolkit_차의중_

Download Report

Transcript WebSphere2WebLogicMigrationToolkit_차의중_

IBM Websphere
WebLogic to WebSphere Migration Process
차의중
WebSphere Field Technical Professional
2010.MAR
© Copyright IBM Corporation 2010
IBM WebSphere
Typical Migration Effort and Tasks
9%
마이그레이션 계획 수립
설치 및 환경설정
마이그레이션 수행
최적화
시스템분석및준비
테스트
17%
4%
13%
34%
13%
10%
교육및기술이전
1
© Copyright IBM Corporation 2010
IBM WebSphere
Typical Migration process
준비(1~2주)
* 기획 (1주)
- 시스템 현황 및 성능 분석
- 일정 계획
- 마이그레이션 목표 설정
- 마이그레이션 방안 마련
- 마이그레이션 과정
- 인력 운용 방안
- 테스트 방안
- 비상시 대처 방안
* 교육
- 관리자 및 투입 인원 대상
수행(1~2주)
•
WAS 및 개발 툴 설치(1일)
* 어플리케이션 마이그레이션
(1~2주)
- 어플리케이션 코드
수정(Optional)
- 설정파일 수정
- 어플리케이션 설치
- Unit-Test
테스트/최적화(1주)
* 통합 기능 테스트
* 성능 테스트
* 테스트 결과에 따라
추가적인 코드 및 설정
변경
* 튜닝
오픈/안정화
* 오픈 및 모니터링
장애시 - 원복 후 임시 운영
Application Migration Tool
* 시스템 도입,설치,업그레이드(1~3일)
- 머신 및 각종 드라이버 설치 및
업그레이드
2
© Copyright IBM Corporation 2010
IBM WebSphere
Typical Migration Challenges
Challenges / Risks
3
Migration Plans
새로운 제품에 대한 기술 습득 필요
기술지원 및 교육 제공
시스템 환경의 변화(기존 사용 중인 H/W, OS, DB, 3rd
party 제품 등이 최신 J2EE 스펙이나 최신 WAS 에
맞지 않을 경우)
J2EE 및 WAS의 스펙을 낮은 버전으로 하거나, 관련 시스템 환경을
높은 버전으로 Upgrade 필요
개발 및 관리 환경의 변화
교육 등을 통해 WAS 의 관리, 개발 환경에 적합한 개발 및 관리 기술
습득
빌드 및 관리용 스크립트 수정
–스크립트 변환 유틸리티 및 가이드를 이용하여 신속히 수행 가능
개발 환경 마이그레이션
–수작업으로 수행 필요
J2EE 버전 변화에 따른 어플리케이션 업그레이드
(최신 WAS 에서도 기존 J2EE 버전의
어플리케이션을 운영 할 수 있으나, 최신 J2EE 스펙의
장점을 활용 하고자 할 경우, 새로운 스펙으로의
어플리케이션 업그레이드 필요)
업그레이드 시, 다소의 코드나 설정 변경이 있을 수 있으나,
기본적으로 코드 및 설정의 하향 호환성이 보장되므로 작업량은 많지
않음.
J2EE 표준이 아닌, 비표준 확장 기능이나, 기존
제품에 특화된 설정 및 코드의 마이그레이션
기본적으로, 수작업에 의한 수정 필요
–일반적으로 매우 소량임
–Application Migration Tool 등의 자동화 툴을 활용함으로써
신속,정확하며 안정성 있게 수행 가능
서비스 품질 보장
현업 사용자들과 테스트 툴 등을 통한 기능 및 성능의 사전 테스트
–기존 시스템의 성능을 측정 후, 이에 대비한 목표치 설정
–목표치 달성 시까지 성능 튜닝
© Copyright IBM Corporation 2010
IBM Websphere
Application Migration Toolkit (AMT)
© Copyright IBM Corporation 2010
IBM WebSphere
What is Application Migration Tool (AMT)?
•WebLogic Application Server 에서 WebSphere Application Server 로의 Application Migration 을 도와주는 도구
•Eclipse Plugin 으로 제공
•Based on Rational Software Analyzer Technology
지원 플랫폼
요구 내역
Source Application
J2EE 1.4 이하
Target WAS
WebSphere Application Server v7.0
실행 환경
Eclipse for JEE 또는 IBM RAD(Rational
Application Developer)
비고
WebLogic 9 이하에서 개발된 어플리케이션
eClipse 3.4.2 이상 필요
•제품 가격 : 무료
•http://www.ibm.com/developerworks/websphere/downloads/migration_toolkit.html
•기술 지원 :
•WebSphere Application Server 에 대한 기술 지원 계약 고객에 한하여 IBM 측에서 기술 지원.
•기타 고객은 AMT Forum 게시판을 통하여 기술 지원.
•http://www.ibm.com/developerworks/forums/forum.jspa?forumID=2106
5
© Copyright IBM Corporation 2010
IBM WebSphere
Fix Points
Classpath setup
Convert Enterprise Archive (EAR) classpaths to J2EE specifications
WebLogic Server Startup Classes
Detect and convert T3StartupDef and T3ShutdownDef classes
Non-Portable JNDI lookups
Detect and refactor JNDI lookups to use the parameter-less InitialContext
JSPs
Enforce case sensitivity of JSP tag/attribute names against the TLD file
Deployment Descriptors
Detect and convert WebLogic specific deployment descriptor elements to
industry standard deployment descriptor elements
WebLogic proprietary java package
references
Detect and convert proprietary package references to standards based
package references
Web Services
Generate ANT script, Service Endpoint Interface, WSDL, Deployment
Descriptors, Mapping Files and other JAXRPC Webservice artifacts
* 상세 한 Conversion Rule은 문서 후반부 참조
6
© Copyright IBM Corporation 2010
IBM WebSphere
설치 및 활용 절차
1. 이클립스 또는 RAD 설치
2. 이클립스 또는 RAD 위에 Application Migration Toolkit 설치
3. 소스 어플리케이션 반입 (Application Import)
4. 어플리케이션 빌드를 위한 설정 추가
5. 코드 분석 설정 창 열기 > 코드 분석에 필요한옵션 선택 > ‘분석’ 버튼 클릭
6. 분석 결과 리뷰 및 필요 시 코드 수정
7. (Optional) 추가적인 코드 개선 필요 시, 코드 분석 기능을 이용하여 재분석 /리뷰/수정
8. 수정이 완료된 어플리케이션을 반출(Application Export), 디플로이(Deploy) 및 테스트
7
© Copyright IBM Corporation 2010
IBM WebSphere
이클립스 또는 RAD 다운로드 및 설치
1. eclipse SDK또는 RAD 다운로드 및 설치
• eclipse : http://www.eclipse.org
• RAD : http://www.ibm.com/developerworks/downloads/r/rad/?amp;S_TACT=105AGX10&S_CMP=LP
2. ecipse 의 경우 필수 플러그인 추가
• Ganimede : Charting and Reporting , Web and Java EE Development
• update site : http://download.eclipse.org/releases/ganymede
• Galileo : Business Intelligence, Reporting and Charting , Web, XML and Java EE Development
• update site : http://download.eclipse.org/releases/galileo
필수 플러그인 설치 (Ganimede)
8
필수 플러그인 설치 (Galileo)
© Copyright IBM Corporation 2010
IBM WebSphere
Application Migration Toolkit 다운로드 및 설치
1. migration toolkit Download (약 10MB)
http://www.ibm.com/developerworks/websphere/downloads/migration_toolkit.html
2. Eclipse 의 Plugin install 툴을 이용하여 AMT 설치 (통상의 Eclipse Plugin 설치 방식과 동일)
다운로드 받은 파일의 위치 지정
9
Next & Finish
© Copyright IBM Corporation 2010
IBM WebSphere
소스 어플리케이션 반입
1. Eclipse 의 반입 (Import) 기능을 이용하여 소스 어플리케이션 반입 (EAR, WAR, EJB-JAR, 유틸리티 Jar 등.)
10
© Copyright IBM Corporation 2010
IBM WebSphere
어플리케이션 빌드를 위한 설정 추가
1. (Optional) Build 및 Packaging 형태 변경 필요 시, Module Dependency 설정
2. J2EE Runtime Library 설정
3. (Optional) 기타 빌드에 필요한 설정
J2EE 모듈 간 종속성 설정
J2EE 런타임 라이브러리 설정
11
© Copyright IBM Corporation 2010
IBM WebSphere
코드 분석 옵션 선택 및 분석 실행
1. 툴바 > Software Analyzer Configurations
2. 분석 시 필요한 옵션 선택 후 분석 실행 버튼 클릭
분석 설정 창 열기
분석 설정 및 실행 창
12
‘분석’ 실행 버튼
© Copyright IBM Corporation 2010
IBM WebSphere
AMT 설치 및 활용 절차 > 분석 결과 리뷰 및 수정
1. 분석 결과 확인 후 수정
• Quick fix 를 활용하여 자동 수정
• 일부 Quick fix 미제공 항목은 수동 수정 필요
13
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (Java Source Code)
Rule name
Quick
fix
Action
Do not use WebLogic
RMI API calls
Yes
This rule detects the use of references to the proprietary weblogic.rmi packages.
The quick fix changes weblogic.rmi to java.rmi to use the Java provided classes.
Do not use WebLogicspecific JNDI name
values
Yes
Scans Java files detecting the usage of the JNDI name values:
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url= t3://localhost:7001
If found, users are given the option to change the JNDI names to default portable
JNDI Name values:
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
java.naming.provider.url=corbaloc:iiop:localhost:2809
Note: the JNDI Name values must be in the same java source file where the
context is initialized with the javax.naming.InitialContext(Hashtable) constructor.
Do not use WebLogic
startup or shutdown
classes
14
Yes
This rule looks for classes that implement the WebLogic startup and shutdown
interfaces.
The quick fix converts these classes to use the
javax.servlet.ServletContextListener interface and registers it in the application's
web.xml file.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (Java Source Code)
15
Rule name
Quick
fix
Action
Use compliant
UserTransaction
lookup name
Yes
This rule looks for references to ctx.lookup(“javax.transaction.UserTransaction”).
Within bean managed transaction (BMT) beans, the quick fix converts the
flagged line to ctx.getUserTransaction().
Within servlets, Web applications and client code, the flagged line is converted
to the JNDI lookup:
ctx.lookup(“java:comp/UserTransaction”)
Use matching throws
clause in EJB bean
class
Yes
This rule looks for mismatches between the enterprise bean implementation
and the method definitions in the home and remote interfaces.
The quick fix adds any missing exceptions and removes any extra exceptions.
The interfaces are not changed.
Do not use
weblogic.apache
packages
Yes
This rule flags import and code references to classes where the class package
starts with weblogic.apache and the class maps directly to an org.apache class.
The quick fix changes the code to org.apache
Download the appropriate Apache open source .jar file, and include it with your
application.
Do not use
UserTransaction
interface from CMT
beans
No
This rule detects references to ctx.lookup(“javax.transaction.UserTransaction”)
within container managed transaction enterprise beans. References to the
UserTransaction object are not allowed from CMT beans.
These references are flagged so that you can remove this Java EE violation.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (Java Source Code)
16
Rule name
Quick
fix
Action
Use portable JNDI
Names
No
Detects the usage of the constructor: javax.naming.InitialContext(Hashtable),
informing not to put any proprietary WebLogic JNDI name values into the
Hashtable.
Do not use nonmapping
weblogic.apache
packages
No
This rule flags import and code references to classes where the class package
starts with weblogic.apache and the class does not map to an open source
Apache class.
You must modify the code to use different classes. See the rule help for more
information.
Do not use WebLogicspecific packages
No
This rule flags imported classes that begin with weblogic but not including the
weblogic.apache classes. The flagged server specific APIs must be migrated.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (JSP)
17
Rule name
Quick
fix
Action
Avoid using a .jsp
extension for JSP
fragments
Yes
This rule looks for JSP fragments included in another JSP. If the JSP fragment
file has the .jsp extension rather than .jspf extension, it is flagged.
The quick fix takes you to the refactor dialog to change the file name and all of
its references.
Use correct case for
tag attribute names
Yes
JSP taglib attributes are case-sensitive in WebSphere Application Server. This
rule flags any taglib attribute that is not case correct.
The quick fix changes the case as it is defined in the tag library.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (XML – DD, WebServices, etc – standard 한 방식으로 기술 가능한 것들)
18
Rule name
Quick
fix
Action
Use standard
deployment
descriptors for EJB
reference names
Yes
WebLogic-specific deployment descriptors (weblogic.xml or weblogic-ejb-jar.xml)
might contain EJB references. These references map the EJB reference to the
JNDI name. For the references to work on WebSphere Application Server, they
must be moved to the standard Java EE deployment descriptors (web.xml or
ejb-jar.xml).
The quick fix provided moves all EJB references defined in WebLogic-specific
deployment descriptors to standard deployment descriptors.
Use standard
deployment
descriptors for
resource reference
names
Yes
WebLogic-specific deployment descriptors (weblogic.xml or weblogic-ejb-jar.xml)
might contain resource references. These references map the EJB reference to
the JNDI name. For the references to work on WebSphere Application Server,
they must be moved to the standard Java EE deployment descriptors (web.xml
or ejb-jar.xml).
The quick fix provided moves all resource references defined in WebLogicspecific deployment descriptors to standard deployment descriptors.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (XML – DD, WebServices, etc - standard 한 방식으로 기술 가능한 것들 )
19
Rule name
Quick
fix
Action
Do not use local JNDI
names
No
Select the rule and press F1 for manual conversion instructions.
Use WebSphere
bindings to define
JNDI names
No
Select the rule and press F1 for manual conversion instructions.
Use WebSphere
bindings to define
message driven
descriptor
No
Select the rule and press F1 for manual conversion instructions.
Use WebSphere
extensions to define
concurrency strategy
No
Select the rule and press F1 for manual conversion instructions.
Use WebSphere
extensions to define
transaction timeout
seconds
No
Select the rule and press F1 for manual conversion instructions.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (XML – WebLogic unhandled or partially handled -웹로직에서만 적용가능한 파일들)
20
Rule name
Quick
fix
Action
Do not use
weblogic.xml file
No
Select the rule and press F1 for manual conversion instructions.
Do not use weblogicapplication.xml file
No
Select the rule and press F1 for manual conversion instructions.
Do not use weblogiccmp-jar.xml file
No
Select the rule and press F1 for manual conversion instructions.
Do not use weblogiccmp-rdbms-jar.xml file
No
Select the rule and press F1 for manual conversion instructions.
Do not use weblogicdiagnostics.xml file
No
Select the rule and press F1 for manual conversion instructions.
Do not use weblogicejb-jar.xml file
No
Select the rule and press F1 for manual conversion instructions.
Do not use weblogicra.xml file
No
Select the rule and press F1 for manual conversion instructions.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (XML – 웹로직 웹서비스 관련)
Rule name
Do not use WebLogic
Web services
deployment descriptor
21
Quick
fix
Yes
Action
This rule looks for the Web services deployment descriptor as follows:
The presence of web-services.xml or
The presence of weblogic-webservices.xml and the Java EE deployment descriptor
(webservices.xml) in the same folder.
The quick fix generates an ANT script that uses IBM WebSphere ANT tasks, which
generates the appropriate artifacts for the list of Web services based on the
information collected from the deployment descriptors. Depending on the deployment
descriptor, the fix might also generate the Service Endpoint Interface (SEI) for the
service and add it to the project class path. The user can then run the ANT script, copy
the generated artifacts to the project, and possibly add additional targets such as the
endpoint enabler, for example.
© Copyright IBM Corporation 2010
IBM WebSphere
Conversion Rules
Rules and Quick fixes (ClassPath)
22
Rule name
Quick
fix
Action
Use MANIFEST.MF
for application class
path
Yes
This rule looks for any classes or libraries contained within an APP-INF
directory of an EAR file.
The quick fix adds an entry to the class path of each affected Web module by
updating the Class-Path entry of the module's MANIFEST.MF file.
© Copyright IBM Corporation 2010
IBM WebSphere
참고자료
Applictaion Migration Tool Introduction and Download
http://www.ibm.com/developerworks/websphere/downloads/migration_toolkit.html
Application Migration Tool Users guide
http://freeman98.hosting.paran.com/xe/?document_srl=2002
Application Migration Tool Forum
http://www.ibm.com/developerworks/forums/forum.jspa?forumID=2106
Eclipse
http://www.eclipse.org
Rational Application Developer (RAD) Product
http://www.ibm.com/developerworks/downloads/r/rad/?amp;S_TACT=105AGX10&S_CMP=LP
Rational Software Analyzer product
http://www.ibm.com/developerworks/rational/products/rsar/
23
© Copyright IBM Corporation 2010