JBoss to Web Sphere Migration

October 28, 2011 Leave a comment

1.0 Installation of Install Manager
1. Download Install Manager from IBM website for AIX.
2. In our case the following file got downloaded.
CZM8SML.zip
3. Unzip the files.
4. Login as root user to AIX System with xstart(For remote Installation).
5. Goto the location of unzipped files.
1.1 Installation Manager user interface
1. Open a command prompt to the directory where you extracted the compressed file.
2. Run the command:
 Windows: install.exe Linux and UNIX: ./install
 Follow the installer wizard pages to install Installation Manager.
1.2 Silent Installation
1. Open a command prompt to the directory where you extracted the compressed file.
2. Run the command:
 Windows: installc.exe -acceptLicense
 Linux, UNIX, IBM i and z/OS: ./installc –acceptLicense
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 5 Confidential
22..00 IInnssttaallllaattiioonn ooff WWeebbSSpphheerree
1. Download WebSphere 8.0 for AIX.
2. Following files would get downloaded .
a. CZM9HML.zip
b. CZM9IML.zip
c. CZM9JML.zip
d. CZVG3ML.zip
3. Unzip All the files.
4. Now go to following path (For remote installation login through xStart as root)
/opt/IBM/InstallationManager/eclipse.
5. Run ./IBMIM . A window will popup .
6. Click on install icon.
7. Click on repositories link.
8. A window will popup There give the path of the directory where you unzipped the WebSphere package. For eg. If one has extracted the files in WebSphere folder then give path upto /home/dbill/WebSphere/repository.config. Click OK.
9. Select the packages from the list.Click install on the IBM Install manager window.
10. Accept the licence agreement and click next.
11. Use default installation directory or give the path to install(/usr/IBM/WebSphere/AppServer) and click next.
12. Click next (in language page).
13. Select IBM 32- bit SDK for java, version 6. Click next.
14. Click on install button. (The WebSphere Application server would get installed).
15. After installation click on finish button to complete the installation.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 6 Confidential
2.1 Creating profile in WebSphere
1. Goto following path.
/usr/IBM/WebSphere/AppServer/bin/ProfileManagement/eclipse32
2. Run command ./pmt.sh. A window will popup. Click on create.
3. Another window will popup. Select Application Server on this window and click next.
4. Select Advance Profile Creation and click next.
5. While keeping Default Administrative Console (recommended) selected click next.
6. To change default profile name and profile directory give your profile name and profile directory and keeping Server Runtime Performance Tuning setting to Standard click next.
7. To change default node name ,server name and host name give name according to your convenience and click next.
8. While keeping Enable Administrative Security unselected Click next.
9. While keeping Create a New Default Personal Certificate selected click next.
10. While keeping everything as it is click next.
11. On this screen you will see the default port number allotted to each service. One can change them accordingly.(for eg. default Administrative console port is 9060 and default Http port is 9080). Click next.
12. While keeping Create a Webserver Definition unselected. Click next.
13. Click create on this screen.
14. After creation click Finish to complete the profile creation.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 7 Confidential
33..00 IInnssttaalllliinngg DDBB22
1. Dowload DB2 9.7.
2. In our case the file downloaded was v9.7fp4_aix64_server.tar . untar the file using following command.
Untar –xvf v9.7fp4_aix64_server.tar
3. The setup would untar in server folder. Change directory to server.
4. For remote installation Login through xstart as root user. Go to the untarred directory. Run the following command.
./db2setup
5. A window will popup. Goto Install a Product Link on left side pane.
6. Now click on Install New. Click next.
7. Accept license agreement and click next.
8. While keeping Typical selected Click next.
9. While keeping the All setting as it is.Click next.
10. On this screen. Give the installation directory to the location where you want to install the DB2. Click next.
11. While keeping the setting as it is click next.
12. While keeping the Create a DB2 Instance selected click next.
13. While keeping selected Single Partition Instance click next.
14. To change User Name,Group Name and Home Directory enter the required values . Enter Password. Click next.
15. To change fenced User Name,Group Name and Home Directory enter the required values. Enter Password for the user. Click next.
16. While keeping selected the Do Not Prepare DB2 Tools Catalog. Click next.
17. Click next.
18. Click finish.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 8 Confidential
3.1 Setting DB2 Compatibility Vector to ORA
1. Login using userId and password (default userId is db2inst1).
2. Set the db2 compatibility vector.
db2set DB2_COMPATIBILITY_VECTOR=ORA
3. Stop the DB2 server with db2stop.
4. Start the DB2 server with db2start.
3.2 Creating Database
1. Login as (default db2ins1) database user name.
2. Run the command with database name in place of dbillse.
db2 create database dbillse pagesize 32 k
3. Run the following command for the connecting to the connected database.
db2 connect to dbillse user db2inst1 using db2inst1
4. To catalog database run the following command.
db2 catalog database dbillse on /home/db2inst1
3.3 Migrating DB Objects from Oracle to DB2
1. Download the IDMT tool and extract it.(Doing it from a remote computer.)
2. Open command prompt goto the download location of IDMT.
3. Run IBMDataMovementTool.cmd. A window will pop up.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 9 Confidential
Source Database Configuration
1. Vendor (for eg. oracle).
2. Server name or server IP.
3. Port number (Default for oracle is 1521).
4. Database name (The name of the database ).
5. User ID.
6. Password.
7. JDBC drivers : This is the driver required for the migration we have used odbc14.jar.
8. To test the connection click connect to oracle.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 10 Confidential
Destination Database Configuration
1. Vendor here it is db2luv for DB2.
2. Server name or server IP.
3. Port number (Default is 50000).
4. Database name.
5. User ID.
6. Password.
7. JDBC drivers : (db2jcc.jar and db2jcc_license_cu.jar).
8. To test the connection click connect to DB2.
3.3.1 To Migrate DDL and Objects
1. Select the database from the list of Source Schema which you want to migrate(in our case it is SE ; For doing migration both the databases should be connected first).
2. Select DDL and Objects (Note : Do not select Data while migrating DDL and Objects).
3. Click on Extract DDL/Data.
4. This will extract all your database objects.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 11 Confidential
5. Now click Interactive Deploy tab and click refresh icon to see your database objects and tables.
6. One can select objects to be deployed (select the object and click deploy button) Since we need to migrate whole database click on deploy all icon.After deploying all red icons should be changed to blue ticks.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 12 Confidential
7. The objects with red icons are not deployed so you can deploy it manually.
8. One can also see the script generated by IDMT tool for objects by selecting that object and can modify the script and redeploy that object.
9. Verify the DB2 database for successful migration(Tables and Objects).
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 13 Confidential
3.3.2 To Migrate Data
1. Unselect DDL and Object and select Data and click on Extract Data.
2. Click on the Deploy button to migrate data to the DB2.
3. Verify that all data has been migrated or not.
4. If unsuccessful need to migrate data manually.
5. Take the Data dump from oracle with following command.
exp UserId/Password file=export.sql compress=n statistics=none direct=y log=export.log
where
file : name of the file in which dump need to be created
log : name of the file in which dump log need to be created
6. Append schema name before every table name in the query.
For example table name ACTIVE_COMVIVA_SUB should be replaced by
SE. ACTIVE_COMVIVA_SUB.
7. Remove semicolon “;” from the end of each query.
8. Remember to make single line query. Put this file on the home directory of this user (for example /home/db2inst1).
9. Login to the DB2 using userId and Password(default user is db2inst1).
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 14 Confidential
10. Connect to the DB2 database using following command.
db2 connect to dbill user db2inst1 using db2inst1
where
UserId : db2inst1
Password : db2inst1
Database : dbillse
11. Run the command.
db2 WebSphere variables.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 15 Confidential
8. Click New to create new WebSphere variables.
9. Type DB2UNIVERSAL_JDBC_DRIVER_PATH in the Name field and give its value as the path where db2jcc.jar and db2jcc_license_cu.jar are present.
For eg. In our case it is /home/dbill/.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 16 Confidential
10. Click Ok. Save directly to the Master Configuration.
11. Once again click create new Type DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH in the name field and give its value com.ibm.db2.jcc.DB2Driver. Click ok and save as above.
12. Now Goto Security->Global security and expand Java Authentication and Authorization Service.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 17 Confidential
13. Click on J2C authentication data.
14. Click on new. Give Alias,User ID and Password of database(DB2).
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 18 Confidential
15. Click ok and save.
16. Now goto Resources->JDBC->JDBC providers and click on scope.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 19 Confidential
17. Select desired scope where one need this JDBC provider and click new.
18. Select Database type as DB2,Provider type to DB2 universal JDBC Driver Provider,Implementation type to Connection pool data source and give name DB2 Universal JDBC Driver Provider.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 20 Confidential
19. Click next. Enter classpath(i.e. Path of the db2jcc.jar, db2jcc_license_cu.jar).
Directory location to path where db2jcc.jar, db2jcc_license_cu.jar are located for eg. /home/dbill.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 21 Confidential
.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 22 Confidential
20. Click next.
21. Verify the details and click finish and then save.
22. Now goto Resources-> JDBC-> Data sources.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 23 Confidential
23. Select scope and click new. Enter Data Source Name and JNDI Name and click next. Select existing JDBC Provider and from drop down select DB2 Universal JDBC Driver Provider(Created earlier).
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 24 Confidential
24. Click next. Select Database Type. Type Database Name and Server Name (Server IP). Default port for DB2 is 50000. Change if it is different.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 25 Confidential
25. Click next. Select Component-managed authentication alias to newNode01/DB2/Alias (created earlier).
26. Click next. Verify detail and click finish and save.
27. Now one can see the created connection in the list. One can also test by selecting the desired connection and clicking test connection.
28. Goto Resources-> JDBC-> Data sources and On this page goto dbillDb2 ->Custom properties->currentSchema. Enter the value of currentSchema e.g. it is SE in our case.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 26 Confidential
4.2 Changes needed in persistence.xml
1. Change jta-data-source to the JNDI name to the datasource that we have created.
jdbc/db2
2. Change the value of hibernate dilect to org.hibernate.dialect.DB2Dialect
3. Add the following properties(User ID ,Password,Schema and manager_lookup_class) in persistence.xml

4. Add the following property in case some entity beans are not recognized

Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 27 Confidential
Sample persistence.xml file

jdbc/db2

5.0 Code Level Change(Specific to dBill Only)
1. Write Local and Remote Interface of all the session beans.
2. Declare these variable in Macros.java.
public static final String provider_url_local_prefix = “ejblocal:”;
public static final String provider_url_remote_prefix = “”;
public static final String provider_url_local_suffix = “”; public static final String provider_url_remote_suffix = “”;
3. Change the lookup code as:
hbsmSmSmscSession=(HbsmSmSmscSessionLocal)initial.lookup(Macros.provider_url_local_prefix+ “HbsmSmSmscSession” + Macros.provider_url_local_suffix);
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 28 Confidential
4. Change all @id from declaration level to method level and comment setter and getter of @EmbeddedId in virtual table mapping classes.
@Id
String pkgPlan;
To
@Id
@Column(name=”PACKAGE_PLAN”)
public String getPkgPlan() {
return pkgPlan;
}
public void setPkgPlan(String pkgPlan) {
this.pkgPlan = pkgPlan;
}
/*HbsmDbillPricePointPk hbsmDbillPricePointPk=null;
@EmbeddedId
public HbsmDbillPricePointPk getHbsmDbillPricePointPk() {
return hbsmDbillPricePointPk;
}
public void setHbsmDbillPricePointPk(HbsmDbillPricePointPk hbsmDbillPricePointPk) {
this.hbsmDbillPricePointPk = hbsmDbillPricePointPk;
}*/
5. Change all Timestamp in entity beans to Date and accordingly in files where it is
Used.
java.sql.Timestamp modifiedOn;
@Column(name=”MODIFIED_ON”) public java.sql. Timestamp getModifiedOn() {
return modifiedOn;
}
public void setModifiedOn(java.sql. Timestamp modifiedOn) {
this.modifiedOn = modifiedOn;
}
To
java.sql.Date modifiedOn;
@Column(name=”MODIFIED_ON”) public java.sql.Date getModifiedOn() {
return modifiedOn;
}
public void setModifiedOn(java.sql.Date modifiedOn) {
this.modifiedOn = modifiedOn;
}
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 29 Confidential
6. Specify the positions of variable in queries in createstatement.
query = “SELECT OPERATION, COUNT(*) totalCount FROM HBSM_SM_SUBSCRIPTION_HIST WHERE SERVICE_NODE = ?1 ” +
” AND OPERATION in (‘SN’, ‘SR’, ‘RR’, ‘RN’, ‘GR’, ‘YR’) AND REQUEST_TIME >= ?2 and REQUEST_TIME Application Types-> WebSphere enterprise applications.
2. Click on install and browse the ear.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 30 Confidential
3. Click next and without changing anything again click next.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 31 Confidential
4. One can change the application name here . Click next . Select war checkbox.
5. Click next again click next. Select the checkbox of war.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 32 Confidential
6. Click next. Verify all details.
7. Click finish and then save.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 33 Confidential
6.2 Setting up Shared libraries for the project
1. Goto Environment-> Shared libraries.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 34 Confidential
2. Click on create new give Name, Classpath(Fully qualified name of each jar file).
3. Click ok and save.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 35 Confidential
6.2.1 Linking the library to Application
1. Goto Applications-> Application Types-> WebSphere enterprise applications and click on the project to which the libraries need to be linked.
2. Select Shared libraries references and select the module to which the shared library need to be referenced.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 36 Confidential
3. Click Reference shared library. Select the library and click forward arrow button.
4. Click OK. Similarly do the same for other module if it is needed. And click ok and save.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 37 Confidential
6.3 Binding Enterprise Bean with business interface to JNDI names
1. Goto Applications-> Application Types-> WebSphere enterprise applications and click on the project in which the libraries need to be inserted and click Bind EJB Business .
2. Enter the desired JNDI name with ejblocal: prefixed for local interface and same name without any prefix for remote interface.For eg.
TrfDialTariffDaySession ocs_jar.jar,META-INF/ejb-jar.xml ocs.ejbs.TrfDialTariffDaySession. TrfDialTariffDaySessionLocal
Enter JNDI name as
ejblocal: TrfDialTariffDaySession
And for
TrfDialTariffDaySession ocs_jar.jar,META-INF/ejb-jar.xml ocs.ejbs.TrfDialTariffDaySession. TrfDialTariffDaySessionRemote
Enter JNDI name as
TrfDialTariffDaySession
3. Now the application is ready to run on the WAS and DB2.
4. To run the application Goto Applications-> Application Types-> WebSphere enterprise applications Select the application and click start it will start the application and to stop click stop.
Migration Document (WAS & DB2)
T-DSD/A/01/19.10.11 Page 38 Confidential
Appendix
 Log path
/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/
SystemOut.log : Application success logs.
SystemErr.log : Application Error logs.
stopServer.log : Log of the server when it stop.
startServer.log : Log of the server startup.
 Abbreviations
WAS : WebSphere Application Server.
 Application Installation Directory
/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/
 For more information refer the following links

http://www.publib.boulder.ibm.com

Categories: Uncategorized

in ignorance

May 12, 2011 Leave a comment

It all started in ignorance,
long ago, in juvenile days.

I was gratified and lively ,
she was engaging and lovely.

It evolved and proliferated,
under the warmth she offered.

I was on a heaven ride,
as I saw her beside.

It was absolute and chaste,
life was at halt with no haste.

Time took a turn in yoU,
We became I and you.

This also happened in ignorance,
perhaps just now, when I am hapless.

Categories: Poetry Tags: , , , ,

Leadership vs Kinship

December 8, 2010 2 comments

In her quest of hegemony,
she misplaced the harmony.

It’s neither about her influence,
nor that we are henchmen.

But somewhere in her line of attack,
she got herself in a deadlock.

The impasse of old kinship,
heavy on new leadership.

And the result is of great worry,
at both ends she feels sorry.

Yes i will

November 25, 2010 3 comments

Yes, I am dejected, and low
But still I can maintain the glow.

Yes, I don’t have that edge now,
But still I can make you hollow.

Yes, I am extinguished and doused,
But still I can blow your wood.

Yes they keep saying that I am reticent,
But why I always found them in my tent.

Yes, I am drunk and fainted,
But still it is you, feeling dim witted.

Yes I am defeated and in setback,
But I will definitely bounce back.

Categories: Hypocrisy, Poetry Tags: , ,

Reality check #1

November 22, 2010 Leave a comment

The other day, I was leaving from my office to my home as usual, and then I realized that I was stuck in a serious traffic jam. I thought it was just another regular hubbub of city life, but when it turned out to be irrationally extensive; I peeked out of window and discovered that it is the cavalcade of a congress party leader who was at the heart of problem. The already crowded roads were encroached by the party flags, party workers and other onlookers, which resulted in a severe traffic deadlock. While one third of nation is suffering from inadequate supply of electricity, the tracks used by our leaders were over-lit with fancy tube lights at every meter.
Well, you may argue that, because I happen to be a part of conspiring opposition, I am making these unnecessary voices, but let me give you one hint, I do not belong to any political party. But I belong to a nation of billion people, whose one third population is suffering from malnutrition and other countless deficiencies and where such profligacy is simply unviable and illogical. One side, the largest party of largest democracy has been vowing for austerity for so long on public stage and on real platform, they are just the new but same landlords of old school.
So am I suggesting, they should travel in cattle class (a famous proverb, now a day)? No, I am not that heartless, you see. What I want to say very humbly is, like we take that extra mile of effort at our home at time of crises, shouldn’t we feel the country as our home? Or that is too much of asking? If yes, I beg your pardon. I happened to be silly, cynical idealist in this hopelessly practical world.

Categories: Hypocrisy, India, politics, vision

Rain

November 17, 2010 5 comments

Rain, Rain and Rain,
on grounds and mountain,
on ordinary and main,
ubiquitous and ample,
like that God of temple,
mosque and cathedral.

Oh! I love this returning monsoon,
feeling relief from scorching sun.

Categories: India, Poetry Tags: , ,

it was your name

November 12, 2010 1 comment

My spirit was at fight,
throughout the whole night,
loggerheaded with spirited mind,
blown away with the wicked wind.

It was indomitable and adamant,
like that of a spoiled adolescent,
geared up to take next level,
with deaf mind and no self-control.

It wanted an answer,
without any counter
all it wanted to extract,
was a effortless fact,
spirit was not complying,
and mind was not listening,
Aha! At last it came,
It was your name,

Categories: Poetry Tags: , , , ,
Follow

Get every new post delivered to your Inbox.