An idea came to me - the thought is to perform the following procedure: extract the websphere EARs and put extracted files in a folder, migrate the EARs into another folder, perform another extract on the migrated EARs into a third folder. Then, I can readily compare differences between the extracted files and inspect the XML for any issues I'll need to address or such things I may want to research or call in the lifeline forum support team :)
This project consists of 9 related applications. The majority of the applications deploy 3 or 4 of the EARs with many EJB EARs being reused. I'll pick an application that is composed of 4 EARs called "cbci_app". Within the file structure provided by the hosting entity, I see there are 4 EARs:
- cbci_app
- cwmmanager_ejb
- cwsmanager_ejb
- offline_ejb
So, I created a testing area, set up four "parent" folders named for their EAR name. Within each, I created 3 folders labeled "IBM_extraction", "Sun_migration", "Sun_extraction". I placed the original EAR files in the root area containing the 4 parents and renamed all 4 files by appending "ibm_". Then, I extracted the files and moved all them into the specific "IBM_extraction" folder for that EAR.
H:\Testing\cbci_app\ibm_extraction\>%java_home%\bin\jar -xvf ..\..\ibm_cbci_app.earThen, I invoked the migration tool and copied the resultant files into the specific "Sun_extraction" folder.
inflated: META-INF/MANIFEST.MF
inflated: .j2ee
created: META-INF/
inflated: cbci_app.war
inflated: .compatibility
inflated: itext-1.3.jar
inflated: META-INF/ibm-application-ext.xmi
inflated: META-INF/application.xml
inflated: .runtime
inflated: META-INF/.modulemaps
H:\Testing\cbci_app\ibm_extraction\>cd ..\..
H:\Testing\>
H:\Testing\>%asmt_home%\bin\asmigrate -c -S ws50 -T glassfish -t h:\testing\cbci_app\sun_migration h:\testing\ibm_cbci_app.earNext, I see that the resulting EAR filename still has the ibm prefix, so I remove that in order to use this later as the "real" tool within my development environment. Then, I copy the EAR to the sun_extraction folder as well as the root and extract...
JAVA_HOME=C:\Java\jdk5
ASMT_HOME=c:\Java\SDK\asmt
J2EE_HOME=C:\Java\SDK
Extracting archives :-
-------------------
Extracting: cbci_app.ear
xxx
Extracting: cbci_app.war
xxxxxx
Clean up...
Pre-processing input :-
-------------------
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||
Migration Status :-
----------------
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---------------------- Output SUMMARY ------------------------
Java:
Total files processed : - 36
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 36
JSP:
Total files processed : - 33
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 33
XML:
Total files processed : - 4
Succeded : - 4
Failed : - 0
Partially Processed : - 0
Unchanged : - 0
HTML:
Total files processed : - 17
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 17
Configuration:
Total files processed : - 0
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 0
--------------------- End of SUMMARY ------------------------
H:\Testing>
H:\Testing\>ren cbci_app\sun_migration\ibm_cbci_app.ear cbci_app.ear
H:\Testing\>copy cbci_app\sun_migration\cbci_app.ear .\sun_cbci_app.ear1 files copied
H:\Testing\>copy sun_cbci_app.ear cbci_app\sun_extraction1 files copied
H:\Testing\>cd cbci_app\sun_extraction
H:\Testing\cbci_app\sun_extraction\>%java_home%\bin\jar -xvf ..\..\sun_cbci_app.ear
inflated: .compatibility
inflated: .j2ee
inflated: .runtime
inflated: cbci_app.war
inflated: itext-1.3.jar
inflated: META-INF\.modulemaps
inflated: META-INF\application.xml
inflated: META-INF\ibm-application-ext.xmi
inflated: META-INF\MANIFEST.MF
inflated: META-INF\sun-application.xml
H:\Testing\cbci_app\sun_extraction\>cd ..\..
H:\Testing\>
And I continue until all four EARs are extracted... (I wish it would be that easy...)
And wouldn't ya know it... I saw that 5 Java files failed to successfully migrate in the very next EJB EAR.
H:\Testing\cwmmanager_ejb>%asmt_home%\bin\asmigrate -c -S ws50 -T glassfish -t sun_migration ibm_cwmmanager_ejb.earOpening the HTML report and navigating to the #Failed section, all 5 files reference "unsupported proprietary" websphere classes:
JAVA_HOME=C:\Java\jdk5
ASMT_HOME=c:\Java\SDK\asmt
J2EE_HOME=C:\Java\SDK
Extracting archives :-
-------------------
Extracting: ibm_cwmmanager_ejb.ear
xxx
Extracting: cwmmanager_ejb.jar
xxxxxxxxx
Clean up...
Pre-processing input :-
-------------------
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Migration Status :-
----------------
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---------------------- Output SUMMARY ------------------------
Java:
Total files processed : - 23
Succeded : - 0
Failed : - 5
Partially Processed : - 0
Unchanged : - 18
JSP:
Total files processed : - 0
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 0
XML:
Total files processed : - 3
Succeded : - 3
Failed : - 0
Partially Processed : - 0
Unchanged : - 0
HTML:
Total files processed : - 0
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 0
Configuration:
Total files processed : - 0
Succeded : - 0
Failed : - 0
Partially Processed : - 0
Unchanged : - 0
--------------------- End of SUMMARY ------------------------
H:\Testing\cwmmanager_ejb>
- com.ibm.websphere.csi.CSIServant
- com.ibm.websphere.csi.TransactionalObject
- com.ibm.ejs.container.*
well... Ain't this a monkey wrench? Now we're in for some work trying to figure out what is needed from those classes and what would be a Sun equivalent. No one promise a rose garden (but I was hoping). Inspecting some of the code for the classes, it turns out these are all generated RMI stubs - hrmmmpffff - I might need some help with this.
Anyhow, I will continue with the rest of the EARs and see what else falls out...
Same thing occurred with the cwsmanager_ejb EAR and offline_ejb EAR, same classes falling out, same RMI stubs. Maybe it won't be all that bad. I'll just have to figure out a Sun equivalent for those 2 com.ibm.websphere.csi classes and figure out an equivalent to the com.ibm.ejs.container tree. I believe I have all the source code...
Now, with that issue in mind, I'll investigate and compare the application.xml files in all the EARs... (note, I'll insert spaces to confuse the blog's parser)
WEBSPHERE ==--> cbci_app\ibm_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"? >
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
< application id="Application_ID">
< display-name>cbci_app.ear< /display-name>
< module id="WebModule_1127318530434">
< web>
< web-uri>cbci_app.war< /web-uri>
< context-root>/app/cbci< /context-root>
< /web>
< /module>
< /application>
GLASSFISH ==--> cbci_app\sun_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"? >
< application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
< display-name>cbci_app.ear< /display-name>
< module>
< web>
< web-uri>cbci_app.war< /web-uri>
< context-root>/app/cbci< /context-root>
< /web>
< /module>
< /application>
GLASSFISH ==--> cbci_app\sun_extraction\sun-application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
< sun-application/>
WEBSPHERE ==--> cwmmanager_ejb\ibm_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
< application id="Application_ID">
< display-name>cwmmanager_ejb.ear< /display-name>
< module id="EjbModule_1199742798007">
< ejb>cwmmanager_ejb.jar< /ejb>
< /module>
< /application>
GLASSFISH ==--> cwmmanager_ejb\sun_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
< display-name>cwmmanager_ejb.ear< /display-name>
< module>
< ejb>cwmmanager_ejb.jar< /ejb>
< /module>
< /application>
GLASSFISH ==--> cwmmanager_ejb\sun_extraction\sun-application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
< sun-application/>
WEBSPHERE ==--> cwsmanager_ejb\ibm_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
< application id="Application_ID">
< display-name>cwsmanager_ejb.ear< /display-name>
< module id="EjbModule_1123102691856">
< ejb>cwsmanager_ejb.jar< /ejb>
< /module>
< /application>
GLASSFISH ==--> cwsmanager_ejb\sun_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
< display-name>cwsmanager_ejb.ear< /display-name>
< module>
< ejb>cwsmanager_ejb.jar< /ejb>
< /module>
< /application>
GLASSFISH ==--> cwsmanager_ejb\sun_extraction\sun-application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
< sun-application/>
WEBSPHERE ==--> offline_ejb\ibm_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
< application id="Application_ID">
< display-name>offline_ejb.ear< /display-name>
< module id="EjbModule_1074111948423">
< ejb>offline_ejb.jar< /ejb>
< /module>
< /application>
GLASSFISH ==--> offline_ejb\sun_extraction\application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
< display-name>offline_ejb.ear< /display-name>
< module>
< ejb>offline_ejb.jar< /ejb>
< /module>
< /application>
GLASSFISH ==--> offline_ejb\sun_extraction\sun-application.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
< sun-application/>
Now all that's done, I should do a graphic display of what I have so far:
H:\Testing>tree
Folder PATH listing for volume Data
Volume serial number is 7FFDC000 FC69:DF84
H:.
+---cbci_app
¦ +---IBM_extraction
¦ ¦ +---META-INF
¦ +---Sun_extraction
¦ ¦ +---META-INF
¦ +---SUN_migration
¦ +---Input_Archives
¦ +---META-INF
¦ +---Utilities
¦ +---Wars
¦ +---cbci_app
¦ +---META-INF
¦ +---WEB-INF
¦ +---classes
¦ ¦ +---US
¦ ¦ +---IL
¦ ¦ +---state
¦ ¦ +---revenue
¦ ¦ +---CBC
¦ ¦ +---CBCI
¦ +---lib
+---cwmmanager_ejb
¦ +---IBM_extraction
¦ ¦ +---META-INF
¦ +---Sun_extraction
¦ ¦ +---META-INF
¦ +---Sun_migration
¦ +---Input_Archives
¦ +---Jars
¦ ¦ +---cwmmanager_ejb
¦ ¦ +---com
¦ ¦ ¦ +---ibm
¦ ¦ ¦ +---ejs
¦ ¦ ¦ ¦ +---container
¦ ¦ ¦ +---websphere
¦ ¦ ¦ +---csi
¦ ¦ +---META-INF
¦ ¦ +---org
¦ ¦ ¦ +---omg
¦ ¦ ¦ +---stub
¦ ¦ ¦ +---java
¦ ¦ ¦ ¦ +---lang
¦ ¦ ¦ ¦ +---util
¦ ¦ ¦ +---javax
¦ ¦ ¦ +---ejb
¦ ¦ +---US
¦ ¦ +---IL
¦ ¦ +---state
¦ ¦ +---revenue
¦ ¦ +---CWM
¦ ¦ +---CWMManager
¦ ¦ +---ejb
¦ +---META-INF
¦ +---Utilities
+---cwsmanager_ejb
¦ +---IBM_extraction
¦ ¦ +---META-INF
¦ +---Sun_extraction
¦ ¦ +---META-INF
¦ +---Sun_migration
¦ +---Input_Archives
¦ +---Jars
¦ ¦ +---cwsmanager_ejb
¦ ¦ +---com
¦ ¦ ¦ +---ibm
¦ ¦ ¦ +---ejs
¦ ¦ ¦ ¦ +---container
¦ ¦ ¦ +---websphere
¦ ¦ ¦ +---csi
¦ ¦ +---META-INF
¦ ¦ +---org
¦ ¦ ¦ +---omg
¦ ¦ ¦ +---stub
¦ ¦ ¦ +---java
¦ ¦ ¦ ¦ +---lang
¦ ¦ ¦ ¦ +---util
¦ ¦ ¦ +---javax
¦ ¦ ¦ +---ejb
¦ ¦ +---US
¦ ¦ +---IL
¦ ¦ +---state
¦ ¦ +---revenue
¦ ¦ +---CWS
¦ ¦ +---CWSManager
¦ ¦ +---ejb
¦ +---META-INF
¦ +---Utilities
+---offline_ejb
+---IBM_extraction
¦ +---META-INF
+---Sun_extraction
¦ +---META-INF
+---Sun_migration
+---Input_Archives
+---Jars
¦ +---offline_ejb
¦ +---com
¦ ¦ +---ibm
¦ ¦ +---ejs
¦ ¦ ¦ +---container
¦ ¦ +---websphere
¦ ¦ +---csi
¦ +---META-INF
¦ +---org
¦ ¦ +---omg
¦ ¦ +---stub
¦ ¦ +---javax
¦ ¦ +---ejb
¦ +---US
¦ +---IL
¦ +---state
¦ +---revenue
¦ +---offline
¦ +---ejb
+---META-INF
+---Utilities
H:\Testing>
Just had a thought... Isn't it interesting that all the application.xml files actually have a defined module - at least one? This is what prompted me to start this exercise anyhow... Makes me wonder if I can load the web app in Eclipse. Sounds like a job for tomorrow.
No comments:
Post a Comment