• No results found

Code sets supported on

onpage46forinformationonmigratingtoaCCSIDthatsupportstheeuro character.

User exits

Check thatyouruser exitsarelinkedwith threadedlibrariesbefore usingthemon this versionoftheproduct.

v Forfurtherdetailsonthreaded libraries,and informationaboutdata-conversion exits,seetheWebSphereMQApplicationProgrammingGuide.

v Forinformationaboutchannelexits,seetheWebSphereMQIntercommunication book.

v Forinformationaboutcluster-workloadexits,seetheWebSphere MQQueue ManagerClustersbook.

Migration

Chapter3.InstallingtheWebSphereMQforSolarisserver

15

User exits

Chapter 4. Verifying the server installation

Thischapterdescribeshowto verifythattheWebSphereMQforSolarisserverhas been correctlyinstalledand configured.YoucanverifyaWebSphereMQserver installationat differentlevels:

v Alocal(stand-alone) installationthathasnocommunicationlinkswithother WebSphereMQinstallations.Thisisdescribedin“Verifyinga localinstallation.”

v Aserver-to-serverinstallationthatincludescommunicationlinksto other WebSphereMQinstallations.Thisisdescribedin“Verifyinga server-to-server installation”onpage18.

See Chapter6,“Verifyingtheclientinstallation,”onpage29ifyouhavea client/server installationthatincludescommunicationlinksbetweenaserver machine andaWebSphereMQclient.

Verifying a local installation

Toverify alocalinstallationwith asimpleconfigurationofonequeuemanager and onequeue,usesampleprogramstoputa messageontothequeueand toread themessagefromthequeue.

Note: WebSphereMQobjectdefinitionsarecase-sensitive.Anytextenteredasan MQSCcommandinlowercaseisconvertedautomaticallytouppercase unlessyouencloseitinsinglequotationmarks.Make surethatyoutype the examplesexactlyasshown.

Theproceduresoutlinedinthis sectiondescribehowtoconfigureyour default queuemanagerfromthecommandline.

Setting up the installation

From ashellwindow,usethese stepstoinstall aqueuemanagerand aqueue:

1. Createa defaultqueuemanager calledvenus.queue.managerbyentering the followingcommand:

crtmqm -q venus.queue.manager

Youwillseemessagestelling youthatthequeuemanagerhasbeen created, andthatthedefaultWebSphereMQobjectshavebeen created.

2. Tostart thequeuemanager,type:strmqm

Amessagetellsyouwhenthequeuemanagerhasstarted.

Thefirst timethatyoustarta queuemanager onamachine,youmightgetone of the following warnings: Purchased license units not set (use setmqcap) or Insufficientlicense units.See “Installation procedure”on page12 for howto correctthis.

3. EnableMQSC commandsbytyping:runmqsc

Amessagetellsyouthatan MQSCsessionhasstarted.MQSChasnocommand prompt.

4. Definea localqueuecalledORANGE.QUEUEbyenteringthefollowingcommand:

define qlocal (orange.queue)

©CopyrightIBMCorp. 1995,2004

17

Amessagetellsyouwhenthequeuehasbeencreated.

5. StopMQSCbytyping: end

Youwillseesomemessages,followedbythecommandprompt.

Youhavenowdefined:

v Adefaultqueuemanager calledvenus.queue.manager v AqueuecalledORANGE.QUEUE

Testing the installation

Totest thequeuemanagerand queue,usetheamqsputsampleprogramtoputa message onthequeue,andtheamqsgetsampleprogramtoget themessageback fromthequeue:

1. Changeintothe/opt/mqm/samp/bindirectory, whichcontains thesample programs.

2. Puta messageonthequeueusingthefollowingcommand:

./amqsput ORANGE.QUEUE

Thefollowingmessagesare displayed:

Sample amqsput0 start

target queue is ORANGE.QUEUE

3. Typesomemessagetext, ononeormorelines,followedbyablank line.The followingmessageisdisplayed:

Sample amqsput0 end

Yourmessageisnowonthequeueand thecommandpromptisdisplayed again.

4. Togetthemessagefromthequeue,usethefollowingcommand:

./amqsget ORANGE.QUEUE

Thesampleprogramstarts,andyour messageisdisplayed.Afterapause,the sampleendsandthecommandpromptisdisplayed again.

Youhavenowsuccessfullyverifiedthelocalinstallation.

Verifying a server-to-server installation

Thereare morestepsinvolvedinverifyingaserver-to-serverinstallation,because youneedtocheck thecommunicationslinkbetweenthetwomachines. Beforeyou cando this,youmust ensurethatthecommunicationsprotocolhasbeeninstalled and configuredonbothsystems.WebSphereMQforSolarissupportsbothTCP and SNA.Thisexampleexplainshow toverifyyourinstallationif youareusing TCP;ifyouareusingSNA,refertotheWebSphereMQIntercommunicationmanual.

Totest theinstallation,set uptwoworkstations,oneasasender andoneasa receiver.Youtestcommunicationsbetweensender andreceiverusingsample programs,whichyoumustinstall onbothworkstations.Theverification procedure assumesthatbothworkstationsare UNIXmachines;ifthis isnotthecase,someof thecommandsaredifferent(fordetails, refertothedocumentationforthe

workstation).

Verifying a local installation

Note: WebSphereMQobjectdefinitionsarecase-sensitive.Anytextenteredasan MQSCcommandinlowercaseisconvertedautomaticallytouppercase unlessyouencloseitinsinglequotationmarks.Make surethatyoutype the examplesexactlyasshown.

Setting up the sender workstation

From ashellwindow,usethese stepstoset upthesendermachine:

1. Createa defaultqueuemanager calledsaturn.queue.managerwith the followingcommand:

crtmqm -q saturn.queue.manager

Messagestellyouthatthequeuemanagerhasbeencreated,andthatthe defaultWebSphereMQobjectshavebeen created.

2. Tostart thequeuemanager,type: strmqm

Amessagetellsyouwhenthequeuemanagerhasstarted.

Thefirst timethatyoustarta queuemanager onamachine,youmightgetone of the following warnings: Purchased license units not set (use setmqcap) or Insufficientlicense units.See “Installation procedure”on page12 for howto correctthis.

3. StartMQSC commandsbytyping: runmqsc

Amessagetellsyouthatan MQSCsessionhasstarted.MQSChasnocommand prompt.

4. Definea localqueuecalledTRANSMIT1.QUEUE (tobeusedasatransmission queue)byentering thefollowingcommand:

define qlocal (transmit1.queue) usage (xmitq) Amessagetellsyouwhenthequeuehasbeencreated.

5. Definea localdefinitionof theremotequeuewith thefollowingcommand:

define qremote (local.def.of.remote.queue) rname (orange.queue) + rqmname (’venus.queue.manager’) xmitq (transmit1.queue)

ThenamespecifiedbytheRNAME parametermustbe thesame asthenameof thequeuetowhichyouaresendingthemessage(ORANGE.QUEUEonthereceiver workstation).

6. Definea senderchannelwiththefollowingcommand:

define channel (first.channel) chltype (sdr) +

conname (’con-name(port)’) xmitq (transmit1.queue) trptype (tcp) Thevalue con-nameistheTCPaddress ofthereceiverworkstation, andportis theportname,with 1414asdefault.

7. StopMQSCbytyping: end

Some messagesaredisplayed,followedbythecommandprompt.

Youhavenowdefinedthefollowingobjects:

v Adefaultqueuemanagercalled saturn.queue.manager v AtransmissionqueuecalledTRANSMIT1.QUEUE

v Alocaldefinitionofa remotequeuecalledLOCAL.DEF.OF.REMOTE.QUEUE v Asender channelcalledFIRST.CHANNEL

Verifying a server-to-server installation

Chapter4.Verifyingtheserverinstallation

19

Setting up the receiver workstation

Now followthesestepstosetupthereceiver:

1. Createa defaultqueuemanager calledvenus.queue.managerbyenteringthe followingcommand:

crtmqm -q venus.queue.manager

Messagestellyouthatthequeuemanagerhasbeencreated,andthatthe defaultWebSphereMQobjectshavebeen created.

2. Tostart thequeuemanager,type: strmqm

Amessagetellsyouwhenthequeuemanagerhasstarted.

Thefirst timethatyoustarta queuemanager onamachine,youmightgetone of the following warnings: Purchased license units not set (use setmqcap) or Insufficientlicense units. See“Installation procedure” onpage12 for how tocorrectthis.

3. Starta WebSphereMQlistenerasabackgroundtaskbyenteringthefollowing command:

runmqlsr -t tcp &

Youcanusethe-pparametertospecifythenumberofa portthatthelistener shouldlistenon.Ifyoudonotspecifyit,thedefaultof 1414isused. Theport numbermust bethesameastheonethatyouspecifywhensettingupthe sender.

4. EnableMQSC commandsbytyping:runmqsc

AmessagetellsyouthatanMQSCsession hasstarted.MQSChasnocommand prompt.

5. Definea localqueuecalledORANGE.QUEUEbyenteringthefollowingcommand:

define qlocal (orange.queue)

Amessagetellsyouwhenthequeuehasbeencreated.

6. Definea receiverchannelwiththefollowingcommand:

define channel (first.channel) chltype (rcvr) trptype (tcp) Amessagetellsyouwhenthechannelhasbeencreated.

7. StopMQSCbytyping:end

Some messagesaredisplayed,followedbythecommandprompt.

Youhavenowdefinedthefollowingobjects:

v Adefaultqueuemanager calledvenus.queue.manager v AqueuecalledORANGE.QUEUE

v AreceiverchannelcalledFIRST.CHANNEL

Testing communication between the workstations

Finally,usetheamqsputsampleprogramtoputamessagefromthesender workstationtoa queueat thereceiver,andtheamqsgetsampleprogramonthe receiverworkstationtogetthemessagefromthequeue:

1. Ifthequeuemanagersonthetwoworkstationshavestopped, restartthemnow bytyping: strmqm

Verifying a server-to-server installation

2. On thesenderworkstation,start thesenderchannelasabackgroundtaskby enteringthefollowingcommand:

runmqchl -c FIRST.CHANNEL -m saturn.queue.manager &

Thereceiverchannelonthereceiverworkstationstartsautomaticallywhenthe sender channelstarts.

3. On thesenderworkstation,change intothe/opt/mqm/samp/bin directory,which containsthesampleprograms.

4. Toputamessageonthelocaldefinitionoftheremotequeue(whichinturn specifiesthenameoftheremotequeue),usethefollowingcommand:

./amqsput LOCAL.DEF.OF.REMOTE.QUEUE Youwillseethefollowingmessages:

Sample amqsput0 start

target queue is LOCAL.DEF.OF.REMOTE.QUEUE

5. Typesomemessagetextononeormorelines,followedbya blankline.You willseethefollowingmessage:

Sample amqsput0 end

Yourmessageisnowonthequeueand thecommandpromptisdisplayed again.

6. On thereceiverworkstation, changeintothe/opt/mqm/samp/bindirectory, whichcontainsthesampleprograms.

7. Togetthemessagefromthequeueatthereceiver,enterthefollowing command:

./amqsget ORANGE.QUEUE

Thesampleprogramstarts,andyour messageisdisplayed.Afterapause,the sampleendsandthecommandpromptisdisplayed again.

Youhavenowsuccessfullyverifiedtheserver-to-serverinstallation.

Verifying a server-to-server installation

Chapter4.Verifyingtheserverinstallation

21

Verifying the installation using the JMS Postcard application

TousetheJMSPostcard,youmustinstall theoptionalJavaMessagingand sample programs featuresofWebSphereMQ,andyoumust haveaworkingJRE (Java Runtime Environment).

Note: IfyouwanttheJMSPostcardapplicationtousefontandcolorsettings differentfromtheJava VirtualMachinedefaults,changethePostcard.inifile.

Formore informationseeWebSphereMQUsingJava.

Use theJMSPostcardapplication toverifythatWebSphereMQissuccessfully installed,theassociatedcommunicationlinksare workingproperly,andthat WebSphereMQJavaMessaging supportissuccessfullyinstalled.

YoucanusetheJMSPostcardapplication toverifya localinstallation(whichdoes nothaveanycommunicationlinkswith otherWebSphereMQinstallations).For furtherinformation,see“UsingtheJMSPostcardapplication toverifyalocal installation”onpage23.

YoucanalsousetheJMSPostcardapplicationtoverifycommunicationbetween your machineandthemachineof anothernameduser,where thatmachineis runningWebSphereMQandusingTCP/IP.Therefore,youcanusetheJMS Postcard applicationtoverifythatyoucancommunicatewithanotherserver.To usetheJMSPostcardapplicationforthis typeofverification,eitherbothmachines must beinthesamecluster (thesimplestmethod),oryoumustconfigurechannels tocommunicatebetweenthetwomachines(see“Verifyinga server-to-server installation”onpage18)

Toensurethatbothmachinesarepart ofthesame cluster,youcandoeitherof the following:

v RuntheJMSPostcardapplication forthefirst timeoneachmachine.TheJMS Postcardapplicationdetectsthattherearenolocalqueuemanagersdefinedfor thatmachine,anddisplaystheDefaultConfigurationwizardsothatyoucan createthedefaultqueuemanagersandlinkthemtothedefaultcluster.

v Createyourownqueuemanagersonbothmachines,createacluster,and ensure thatthequeuemanagersthatyoucreateoneachmachinebelongtothesame cluster.

YoucanusetheJMSPostcardapplication withexistingqueuemanagers,aslong asbothqueuemanagersbelongtothesame cluster,orcommunicationchannels havebeen configuredbetweenthequeuemanagers.Alternatively,youcan

exchangepostcardsbetweentwoqueuesthatare usingthesamequeuemanageras theirmailbox.

For furtherinformation,see“UsingthePostcard applicationtoverifya server-to-serverinstallation”onpage25.

Setting up your system to run the JMS Postcard

Before youcanruntheJMSPostcardapplication, youmust ensurethat:

v Youare amemberoftheWebSphereMQadministratorsgroup(mqm).Ifyouare nota memberofmqm,ask someonewhoisamembertoruntheDefault

Configurationtoolonyourbehalf,eitherdirectly,orbyrunningtheJMS Postcardapplication,whichrunstheDefault Configurationtoolindirectly.

Verifying a server-to-server installation

v AsupportedJavaVirtualMachine isinstalledonyoursystem andsuitably configuredinthesystempathsothatthejavacommandcanbe executed.

v Therequiredenvironmentvariablesaredefined.

Definetheenvironmentvariablesasfollows:

1. Logonasuser mqm.

2. Addtherequiredenvironmentvariablestothe.profilefileusinga texteditor.

Theseareshowninthefollowingtable:

CLASSPATH /opt/mqm/java/lib/com.ibm.mq.jar:

/opt/mqm/java/lib/com.ibm.mqjms.jar:

/opt/mqm/java/lib/connector.jar:

/opt/mqm/java/lib/jms.jar:

/opt/mqm/java/lib/jndi.jar:

/opt/mqm/java/lib/jta.jar:

/opt/mqm/java

MQ_JAVA_INSTALL_PATH /opt/mqm/java MQ_JAVA_DATA_PATH /var/mqm

LD_LIBRARY_PATH /opt/mqm/java/lib PATH(forJREsettings) $PATH:/opt/java1.3/bin

Using the JMS Postcard application to verify a local installation

Note: Aqueuemanager thatcanbeusedasa mailboxmust bealreadysetup.

Thisqueuemanager canbe eitherthedefaultqueuemanager,whichisset upautomaticallywhenyouruntheDefault Configurationwizard,or anotherqueuemanagerthatyouhaveset upyourself.

Toverify thatthelocalinstallationisworking,youcanusetheJMSPostcard application. Thisapplication allowsyoutocreatetwopostcardsonthesame machine andsendmessages betweenthem,verifyingthatWebSphereMQ messaging isworking correctlyonthemachine,andthatWebSphereMQJava Messaging supportissuccessfullyinstalled.

Note: IfyouwanttheJMSPostcardapplicationtousefontandcolorsettings differentfromtheJava VirtualMachinedefaults,changethePostcard.inifile.

FormoreinformationseeWebSphereMQUsingJava.

1. Changedirectory to/opt/mqm/java/bin 2. RunthePostcardshellscript.

Iftherearenoqueuemanagersonyour machine,theIncompleteDefault Configuration windowisdisplayed.FromhereyoucaneitherruntheDefault ConfigurationwizardtocreateaqueuemanagertousewiththeJMSPostcard application, oryoucanclosetheapplication.

3. TheJMSPostcard -SignOnwindowisdisplayed.

Type inanicknametousetosend messageswithin thepostcard application (forexample,user1).

Iftheonlyqueuemanager onyourmachineisthedefaultqueuemanagerthat youcreatedbyrunningtheDefaultConfigurationwizard,this queuemanager isusedasyourmailboxforpostcards.ClickOKtodisplayyour firstpostcard, then gotostep 5.

4. Select thequeuemanagertouseasthemailbox:

Verifying a server-to-server installation

Chapter4.Verifyingtheserverinstallation

23

v Ifyouhavecreatedoneormoreof yourownqueuemanagers,but you havenotruntheDefault Configurationwizard,selecttheappropriatequeue managerfromthelistdisplayed.

v IfyouhaveruntheDefault Configurationwizardandyouwanttousethe defaultqueuemanager,but thereismorethanonequeuemanageronyour machine,selecttheAdvancedcheckbox,then selectUseDefault

Configurationasmailbox.

v IfyouhaveruntheDefault Configurationwizardandalso createdoneor moreofyourown queuemanagers,andyoudonotwanttousethedefault queuemanager,selecttheAdvancedcheckbox,selectChoosequeue

managerasmailbox,then selecttheappropriatequeuemanagerfromthe listdisplayed.

Whenyourselectioniscomplete,click OKtodisplayyourfirst postcard window.

5. RunthePostcardshellscriptagain.Thisopensa secondpostcardwindow.

6. The JMSPostcard -SignOnpanelisdisplayedagain. Typeinasecond nicknametousetosendmessageswithin thePostcardapplication(for example,user2).

7. Repeattheselectionofthequeuemanager thatyouwanttouseasthe mailbox(asdescribedearlier).Thequeuemanageryouselectforthis second postcard musteitherbe inthesameclusterasthequeuemanager forthefirst postcard, orcommunicationlinksmust havebeen setupbetweenthem.

8. Younow havetwopostcards,onewith thenicknameuser1 andonewiththe nicknameuser2.

9. Inoneofthepostcards(forexample,user1),typesomemessagetextinthe Message:fieldand thenicknameoftheotherpostcard(forexample,user2)in theTo: field.

Note: Becausethesenderandreceiverareonthesamemachine,youdonot needtotype anythingintheOn:field.

Ifthereceiverisonadifferentmachine,andisusingthedefaultqueue managerasthemailbox,youneedtotypetherecipient’smachine in theOn:field.

Ifthereceiverisonadifferentmachine,andisnotusingthedefault queuemanagerasthemailbox,youneed totypetherecipient’squeue managerintheOn:field.

10. Click Send.

11. ThePostcardssentandreceived areaof thepostcard showsdetailsofthe message.Inthesendingpostcard,themessageisdisplayedassent.Inthe receivingpostcard,themessageisdisplayedasreceived.

12. From thereceivingpostcard,double-click themessageinthePostcardssent andreceived areatoview it.

Ifyoucompletethisproceduresuccessfully,itverifiesthatWebSphereMQis working correctly,andthattheWebSphereMQJavamessaging supportis successfullyinstalled.

Verification local installation

Whatnext?

Depending onyour situation,youmight wanttodo thefollowing:

v InstallWebSphereMQonothermachines.Followthesameinstallation procedurethatyouusedforthefirst machine.EnsurethatyouusetheJoin DefaultClusterwindow intheDefault Configurationwizardtoaddthe othermachinestoyourfirst machine’scluster.

v InstalltheWebSphereMQclientonothermachines.SeetheChapter5,

“InstallingtheWebSphereMQforSolarisclient,” onpage27.

v Continuewith furtheradministrationtasks.SeetheWebSphereMQSystem AdministrationGuide.

v Continuewith furtheradministrationtasks.SeetheWebSphereMQSystem AdministrationGuide.

Related documents