Tuesday, December 16, 2008

How to Use MQ JMSJCA to connect to IBM WebSphere Message Queue 6.0 in 5.1.3

Instructions on how to use MQ JMSJCA to connect to IBM WebSphere Message Queue 6.0 in 5.1.3

In the Environment->WebSphereMQ->Configuration

1) Use the "IBM MQ Message Server URL" field to specify a host name and a port number. For example:
wmq://localhost:1414

Content of the "QueueManager" field will be appended to the "IBM MQ Message Server URL field" to form a complete URL
wmq://[hostname]:[port]?QueueManager=[queue manager name]&option1=value1&option2=value2

2) Use the "QueueManager" field to specify the name of a queue manager. For example:
QM_myQMgr

3) If you want to add options to the URL, you have to add them to the "QueueManager" field. For example to turn off XA and to switch to the "binding" mode, type the following in the "QueueManager" field:

QM_myQMgr&JMSJCA.NoXA=true&TransportType=JMSC.MQJMS_TP_BINDINGS_MQ

In the above you need to replace QM_myQMgr with the name of a real queue manager. And for the rest, you need to type exactly as shown. Options are separated by the "&" character which is "&" in HTML. The following options are supported:

TransportType
Channel
JMSJCA.NoXA

The default transport type is "client" TCP, if you do not have
TransportType=JMSC.MQJMS_TP_BINDINGS_MQ
option in the "QueueManager" field.

The default transaction mode is XA if you do not have the
JMSJCA.NoXA=true
option in the "QueueManager" field.

3) The "TransportType" field in the GUI is ignored due to a defact. It does not matter what
you enter here. You have to use the "QueueManager" field to switch to the "binding" mode.

4) Before deploying your project, copy the following jar files to \logicalhost\is\lib or add the path to the jar files to the classpath of the Integration Server:

* com.ibm.mqjms.jar
* com.ibm.mq.jar
* com.ibm.mqetclient.jar
* dhbcore.jar

com.ibm.mqetclient.jar is not needed for "binding" mode.

5) MQ JMS supports JMS API. You can use it just like a normal JMS server. However you have to use tools provided by IBM (e.g., MQ Explorer) to monitor the MQ. Enterprise Manager management functionality is not supported for WebSphere MQ. Only JMQ, Grid and STCMS are supported.

Monday, December 15, 2008

WebSphere Application Server 5.1/Network Deployment



Installation and Initial Configuration Instructions



I. Software Installation List
Note: This workshop was developed and tested under Windows 2000 with SP2 (US English). It should also work under Windows NT 4.0 with SP 6a (US English).
Operating System:
Windows 2000 with SP 2
• TCP/IP configured and operational
• SVGA/XGA with 256 or more colors configured
• Page File configured to >300MB (using Start -> Settings -> Control Panel -> System Settings -> Advanced -> Performance Options )
Windows NT 4.0 (Workstation or Server) with SP 6a:
• TCP/IP configured and operational
• MS Loopback driver is configured and operational
• SVGA/XGA with 256 or more colors configured
• Page File configured to >300MB
Important Notes:
• If you are using a non-English version of Windows, you MUST change the locale to English PRIOR TO installing ANY of the software. To change the locale on Windows 2000:
o ___ Open the Regional Options panel by clicking on Start->Settings->Control Panel->Regional Options
o On the Regional Options panel under the General tab
 ___Change Your locale to English (United States) .
 ___Make sure Language settings for the system is set to WesternEurope and United States.
 ___Press the Set default... key and make English (United States) the system local.
• You must be using a userid with administrative authority.
• We do not recommend using the Windows 2000/NT userid of Administrator or any userid longer than 8 characters or which contains spaces. We recommend a userid of db2admin and password of db2admin. The userid you use must be a member of the Windows Administrators group.
Overview of Required Software
This STEW requires the following software:
1. Microsoft Internet Explorer 5 or higher ( http://www.microsoft.com/windows/ie )
2. Unzipping utility (WinZip 8.1 is recommended) ( http://www.winzip.com )
3. Adobe Acrobat Reader (http://www.adobe.com )
4. DB2 Universal Database Enterprise Edition 7.2 with fixpak 7
5. WebSphere Application Server 5.1
6. WebSphere Application Server Network Deployment 5.1
II. Additional Software/Components Required
1. WS50STEW.zip (Labs/Presentations/etc) should have been installed
III. Installation Steps
1. Install Internet Explorer 5.0
Note: If you have Windows 2000 installed, Internet Explorer 5.0 is already installed. You can skip the Internet Explorer Installation.
Internet Explorer Installation Steps
1. ___ Execute ie5setup.exe
2. ___ On 'Windows Update: Internet Explorer and Internet tools' panel, click I accept the agreement radio button and click Next> button.
3. ___ On 'Windows Update: Internet Explorer and Internet tools' panel, click Install Now - Typical set of components radio button and clickNext>button.
4. ___ On 'Restart Computer' panel, click Finish button.
2. Install WinZip
WinZip Installation Steps
1. ___ Execute winzip81.exe.
2. ___ On 'WinZip 8.0 Setup' press the Setup button.
3. ___ On 'WinZip Setup' select an appropriate installation path and install WinZip.
3. Install Adobe Acrobat Reader
Adobe Installation Steps
1. ___ Execute ar505enu.exe.
2. ___ Select an appropriate installation directory and install Adobe Acrobat Reader.
4. Install DB2 UDB 8.1(If you already have DB2 8.1 installed, you can skip this step. Issue the DB2LEVEL command from a command prompt. You should see DB2 code release SQL07025.)
DB2 Installation Steps
1. 1. ___ Make sure the Windows userid you are logged into has the Administrator privileges. A recommended userid and password is db2admin .
2. 2. ___ From CD # 1, navigate to :\and run setup.exe (Note: typically this autostarts when you insert the CD).
3. 3. ___ On 'Setup' panel, click on the Install Products choice.
4. 4. ___ On 'Select Products' panel, check DB2 UDB Enterprise Server Edition. Click the Next> button.
5. 5. ___ On 'Welcome' panel, click Next> button
6. 6. ___ On 'License Agreement' panel, check Accept the terms in license agreement. Click the Next> button.
7. 7. ___ On 'Select Installation Type' panel, click the Custom button. Click the Next> button.
8. 8. ___ On the 'Select Components' panel, select ONLY the following components:
o o Application Development Interfaces
o o Documentation (optional)
o o Base DB2 UDB Support
o o Administration and Configuration Tools (optional)
o o Getting Started (optional)
9. 9. ___ On 'Choose Destination Location' panel, click Browse... button and change the location from C:\Program Files\SQLLIB to C:\SQLLIB if sufficient space exists on C: or x:\SQLLIB where x: is your preferred install drive and click the Next> button.
10. 10. ___ If you get a 'Create DB2 Instance' panel, select 'Yes' and click the Next> button.
11. 11. ___ On 'Configure DB2 Services' panel click the Next> button.
12. 12. ___ On 'Enter Username and Password for the Administration Server' panel, enter db2admin for userid and db2admin for password. Click the Next> button.
13. 13. ___ If an 'Information' messagebox pops up saying the logged on user ("computername\username") does not have the necessary "User Rights" to validate the username db2admin or any other usernames, click OK to continue.
14. 14. ___ If a 'Question' messagebox pops up saying the username db2admin doesn't exist, click Yes button to create userid.
15. 15. ___ On 'Start Copying Files' panel, click Next> button. Note that this may take several minutes.
16. 16. ___ On 'Setup Complete' panel, click the Finish button.
17. 17. ___ If the 'First Steps' panel appears, choose the ' Exit ' choice.
18. 18. ___ On the 'IBM Product Registration' panel, click the Exit button. When the 'IBM Product Registration' panel confirmation dialogue box appears, click the Yes button to exit registration.
19. 19. ___ If the Startup folder appears, delete the 'Register DB2 Universal Database Enterprise Edition' shortcut by selecting the shortcut and pressing the 'Delete' key. When the 'Confirm File Delete' dialogue box appears, click the Yes button to delete the shortcut.
20. 20. ___ Close the Startup folder.

5. Install WebSphere Application Server (WAS) 5.1. (If you already have WAS 5.1 installed, you can skip this step).

NOTES:
1. If for some reason you abort your WAS install process. Perform an uninstall prior to attempting to install again.
2. If you encounter conflicts during the install as the result of the installer detecting a pre-existing version of MQSeries on your computer, follow the directions in MQ_Seek_and_Destroy.pdf located in the bin directory for this lab.
1. 1. ___ Using CD # 3, navigate to ibmwas5_appserv_nt.zip, and unzip this archive to a directory on your harddrive (e.g. C:\Temp\was5install). Open a DOS window and the navigate to the directory that you unzipped into, and go to the directory ibmwas5_appserv_nt (e.g. C:\Temp\wasv5install\ibmwas5_appserv_nt) and run Launchpad.bat. This will launch the installer program. You will see a graphic where you will select the language. Click OK.

2. 2. ___The following graphic appears.
3. 3. ___ Select Install the product
4. 4. ___ From the 'Choose Setup Language' panel, choose English. Click the OK button.
5. 5. ___ From the 'Welcome' panel, click the Next> button.
6. 6. ___ From the 'License Agreement' panel, click the 'I accept the terms of the license agreement' radio-button. Click the Next> button.
7. 7. ___ From the 'Choose Setup Type' panel, choose Custom. Click the Next> button.
8. 8. ___ On the next panel, you can select the components to install. Select all the components as shown below.
9. 9. Click Next.
10. 10. ___ From the 'Destination Folder' panel, change:
1. 1. The IBM WebSphere Application Server, Version 5 destination to C:\WASV5\AppServer(or whatever drive you wish).
2. 2. The IBM HTTP Server Version 1.3.26 destination to C:\WASV5\IBMHttpServer (or whatever drive you wish).
3. 3. The Embedded Messaging Server and Client destination toC:\WASV5\WebSphereMQ (note you will need to remove the space between WebSphere and MQ).
11. 11. ___ Click the Next> button.
12. 12. ___ The 'Node Name' panel allows you to enter your WebSphere Node name and Host name/IP Address. These two values default to the name of your Windows 2000 machine. The value enter here should be the value returned from the "hostname" command, you cannot assign an arbitrary hostname. You should make a note of the Node name as subsequent labs may make use of this value. Generally, these two values can remain the name of the Windows 2000 machine. They may be different, if for example, you had two network adapters in your machine.If an IP address is displayed in the Host Name or IP Address, you should enter the Host Name as depicted below. Use of an IP address is not recommended with a laptop since with DHCP the IP address can change every time you connect to a network.



13. 13. Click Next.
14. 14. ___ On the next panel, unselect the option to Run WebSphere Application Server as a service. You will be starting and stopping the WebSphere Application Server throughout the lab exercises using a Command Prompt.NOTE:If you select to run the Application Server as a Windows 2000 service, you can start, stop, andconfigure startup/recovery options. By choosing to run the Application Server as a service, you can, from a central location (Control Panel > Administrative Tools > Services), manage the Application Server. The option to run IBM HTTP Server service should be unselected.
15. 15. ___ Click the Next> button.
16. 16. ___ From the 'IBM WebSphere Application Server will be installed' panel, click the Next> button.
17. 17. ___ The installation begins and the files are copied. After all the files have been copied, an uninstaller is also created. During the install process several applications are installed in the Application Server as well. They are the DefaultApplication, AdminConsole,IVTApp, Samples (if selected), and you will see several dialogs such as the one below during this part of the process.


18. 18. ___ When installation completes (it will take some time), deselect 'Register this product now' and click the Next> button.
19. 19. ___ Select Exit on the window titled “WebSphere Application Server - First Steps” window. This action will close the command prompt titled FirstSteps as well.
20. 20. On the WebSphere Application Server LaunchPadwindow, select Exit.



21. 21. ___ On the Installation Wizard panel, select Finish.
6. Backup the WebSphere Installation
In order to have independent labs, you will save a copy of the entire WebSphere folder. A future lab may instruct the student to ‘replace’ the WebSphere folder with this copied version of the WebSphere folder.
1. __ On the Installation Wizard panel, select Finish.
2. __ Type backupconfig. This will perform a backup of the WebSphere configuration without the installed applications. This is somewhat similar to the install_initial_config directive in the V3/V4 admin.config files. The output from this is depicted below.
C:\WASV5\AppServer\bin>
C:\WASV5\AppServer\bin>backupconfig
ADMU0116I: Tool information is being logged in file
C:\WASV5\AppServer\logs\backupConfig.log
ADMU5001I: Backing up configdirectory C:\WASV5\AppServer\config to file
WebSphereConfig_2002-09-21.zip
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: server1
ADMU2010I: Stopping all server processes for node alcott
ADMU0512I: Server server1 cannot be reached. It appears to be stopped.
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................................
ADMU5002I: 496 files successfully backed up
C:\WASV5\AppServer\bin>
7. Running the Samples
In order to have independent labs, you will save a copy of the entire WebSphere folder. A future lab may instruct you to ‘replace’ the WebSphere folder with this copied version of the WebSphere folder.
1. ___ Using the DOS Command Prompt from part two above type startServer server1. This will launch the “default server” in V5; server1.Wait until you see the message Server server1 open for e-business; process id is xxxx
2. ___ Open your browser and enter the URL http://localhost:9090/admin/ . This will launch the V5.1 Administrative console.
3. ___ Enter in the Login window and press OK.The userid entered can be any user name and does not even need to exist in the local OS unless security is enabled.
4. ___ In the left hand panel, Navigate to Environment-> Update web server plugin configuration

5. ___ Press OK.

6. ___ Wait for message indicating that the plugin was updated

7. ___ Open a command prompt and run C:\WASV5\IBMHttpServer\Apache to start the IBM HTTP Server service

8. ___ Open another browser window and entry the following URL http://localhost/snoop
9. ___ Open another browser window and entry the following URL http://localhost/hitcount Try the options provided.
10. ___ Close all your browser windows, when exiting the Administration Console, select logout
11. ___ From the DOS command window that you started the server in type stopServer server1 this and wait for the message ADMU4000I: Server server1 stop completed.
Close the DOS window.