Sei sulla pagina 1di 69

Using IBM WebSphere Application Server and IBM WebSphere MQ Together

Chris Matthewson, IBM Hursle c!atth"u#$ib!$co!

Session %%&%'

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

Wh are we here(
Some reasons for #eing here$$$
We currently have applications using WebSphere MQ, and now we have applications running in WebSphere Application Server that need to access the same data

Were writing applications for WebSphere Application Server, were trying to choose a messaging provider and are thin ing that WebSphere MQ might fit the bill %

How do we achieve this(


We#S!here A!!lication Ser"er is a fully com!liant Ja"a &nter!rise &dition ')**( A!!lication Ser"er
)ro"ides integrated su!!ort for a!!lication messaging using Ja"a Message Ser"ice ')MS( !ro"iders$

We#S!here MQ is a fully com!liant JMS !ro"ider$ *herefore+ JMS is the answer,

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

What is )MS(
A standardi-ed Ja"a A). to allow a!!lications to !erform messaging
A!!lications can #e unaware of im!lementation Not a wire !rotocol

ses administered o#/ects to define !ro"ider and configuration


Can #e changed without recom!iling a!!lication

Su!!orts !oint0to0!oint messaging+ and !u#lish1su#scri#e messaging

+otes
J&& a!!lication ser"ers must !ro"ide su!!ort for JMS J&& 2$3 and later also must su!!ort the Ja"a Connector Architecture+ which WMQ now uses within WAS 74 JMS is a standardised !rogramming interface Allows Ja"a a!!lication interactions to #e loosely cou!led JMS a!!lications can #e coded to #e ignorant of the underlying JMS !ro"ider Can easily change the !ro"ider without altering the a!!lication

How does a )MS based application wor#(


My JMS A!!lication

Queue Manager

Connection 6actory 5estination


5eli"ery Ser"ice

Administrati"e Store

A!!lication Ser"er

T pes o, )MS applications in WAS


Message0dri"en 7eans 'M57(
S!ecial ty!e of &J7 that has an 8onMessage9 Ja"a method to recei"e messages J&& Container 'WAS( deals with getting the message+ transactions+ and running the a!!lication$ A!!lication only needs to !rocess the message data :ecommended way of getting messages into WAS

&nter!rise Ja"a 7ean '&J7( and Ser"lets1JS)s


A!!lication needs to create connection and send1recei"e message Container !ro"ides connection !ooling and transaction management

+otes
)ro"ider s!ecific configuration+ such as how to connect to a messaging !ro"ider+ is contained within !MS resources held in )+-I+ defined at a!!lication de!loyment time JMS is not a trans!ort !rotocol No standardised a#ility to cou!le different JMS !ro"iders JMS Su!!orts two messaging models .oint/to/point ; using <ueues .ublish0subscribe ; using to!ics

Message/driven beans

Code dri"en when a message is a"aila#le


public void onMessage(Message message) { try { if (message instanceof TextMessage) { TextMessage textMsg = (TextMessage) message; System.out.println("Message text is " + textMsg.getText()); } } catch (JMSException ex) { System.out.println("JMSException occurre } } ! " + ex);

*nterprise )ava Beans 1*)B2


"#esource() private $onnection%actory c&; "#esource() private 'ueue ;

5efine &J7 = :esource references that will #e initialised at runtime More code re<uired to get a message

public void recei(eMessage() { com!ared to an M57+ and less efficient try { $onnection conn = c&.create$onnection(); conn.start(); Session sess = conn.createSession(true)Session.*+T,-*$./,01E23E); Message$onsumer consumer = sess.create$onsumer( ); Message msg = consumer.recei(e(45555); if (msg instanceof TextMessage) { System.out.println(6Message recei(e !6 + ((TextMessage) msg).getText()); } conn.close(); } catch (Exception ex) { System.out.println("Exception ! " + ex); } }

WAS3 )MS !essaging in a slide


We#S!here A!!lication Ser"er !ro"ides first class su!!ort for two JMS messaging !ro"iders An em#edded messaging !ro"ider+ the Default Messaging provider 'or Service Integration Bus( WebSphere MQ *he nature of JMS and J&& allows easy switching #etween !ro"iders WAS
Application Server
Application
WebSphere MQ

Default Messaging

WebSphere MQ in a slide
We#S!here MQ 'WMQ(
WMQ is .7M>s flagshi! asynchronous messaging !roduct Queues are managed #y Queue Managers A!!lications connect to Queue Managers to access Queues
Many A).s+ such as JMS+ are a"aila#le

Queue Managers can #e connected together to form a networ?+ or cluster WMQ su!!orts the !oint0to0!oint and !u#lish1su#scri#e messaging models

WMQ as the JMS !ro"ider in WAS


WMQ JMS messages are standard WMQ messages WMQ V7 has new features to sim!lify and im!ro"e JMS Configuration of WMQ JMS o#/ects is fully integrated into the WAS administration tools

WebSphere MQ !essaging provider


WMQ JMS messages are standard WMQ messages+ and can therefore #e e@changed with either other WMQ JMS clients+ or any other WMQ a!!lication+ as long as the format of the message is understood$ WAS a!!lications connect to a <ueue manager usingA 7indings 'shared memory( ; when a!!lication and <ueue manager are on the same ser"er Client '*C)1.)( ; when a!!lication ser"er and <ueue manager are on se!arate+ networ?ed+ ser"ers .n WAS VB$C and VB$2+ the We#S!here MQ Client came with WAS as !art of the li# directory structure and was referenced with the use the We#S!here en"ironment "aria#le MQD.NS*AEED:FF*$ *his allowed the "ersion of the client to #e changed to one installed locally on the machine$ Changing the install location is re<uired when running in #indings mode as it is also the method used to locate the We#S!here MQ nati"e li#raries .n WAS V7+ the client has #een re!laced with the We#S!here MQ V7 JCA 2$G :A and is installed as a resource ada!ter$ *he MQD.NS*AEED:FF* "aria#le is no longer used 'e@ce!t for migration !ur!oses and the client container(+ instead the nati"e li#rary !ath for the :A is used to identify the location of the re<uired nati"e li#raries Version of WMQ shi!!ed with WASA htt!A11www0C2$i#m$com1su!!ort1doc"iew$wss?rsH272IuidHswgJ2J3KCKL &nsuring the correct WMQ "ersion is used in your WAS !rofileA htt!A11!u#li#$#oulder$i#m$com1infocenter1wasinfo1"7rC1to!ic1com$i#m$we#s!here$e@!ress$doc1i nfo1e@!1ae1tm/Dwm<raDmaint$html

Service Integration Bus 4verview


Ser"ice .ntegration 7us 'S.7us(
S.7us is a nati"e com!onent of WAS+ !ro"iding JMS messaging *he 8#us9 is a logical entity Messaging engines in a!!lication ser"ers manage the 8!hysical9 messages

S.7us as the JMS !ro"ider in WAS


S.7us su!!orts the JMS !rogramming interface for Ja"a a!!lications$ S.7us has features that allow it to connect to and #e !art of a WMQ messaging solution$

S.7us forms the asynchronous messaging !latform for a!!lication ser"er #ased !roducts +otes )hysicallyA A!!lication ser"ers can #e made a mem#er of a #us "estinations are assigned to bus members 7us mem#ers run messaging engines that manage messages Messages are routed from any messaging engine in the #us to the a!!lication A WAS cell contains a!!lication ser"ers+ or clusters of a!!lication ser"ers #hese can optionally be made a member of a bus 5estinations are assigned to #us mem#ers 7us mem#ers run messaging engines within the a!!lication ser"er JVMs Messaging engines manage the runtime and !ersistent state of messages in the #us Messaging a!!lications form a connection to a messaging engine Messages are routed from any messaging engine in the #us to the a!!lication EogicallyA A #us is a logical entity that contains destinations 'e$g$ <ueues1to!ic s!aces( Messaging a!!lications connect to the #us to access the destinations A #us is location trans!arent+ all destinations and their messages are a"aila#le from anywhere in the #us

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

Wa s o, accessing WMQ ,ro! WAS


*hree ?ey o!tions
2$ J$ =$ se WMQ as the JMS !ro"ider in WAS se the ser"ice integration #us in WAS and connect that messaging system with your WMQ #ac?#one se a mi@ture of #oth ; S$%us for intra&WAS messaging ; WMQ for inter&system messaging

4ption %
We#S!here MQ as the JMS !ro"ider in WAS

WAS
Application Server
Application

Application Server
Application

*5isting WMQ application

CICS application

A!!lications connect directly into the WMQ #ac?#one

WMQ QMgr

WMQ QMgr

WMQ QMgr

WMQ QMgr

WMQ bac#bone

4ption %6 WMQ as the )MS provider in WAS


.ros

*he most direct route to WMQ <ueues 7est !erforming way to get messages on and off a WMQ <ueue Eeast mo"ing !arts 'east things to configure 'east places where things can go wrong A single messaging system to maintain rather than two
Cons

WAS a!!lication de!loyment de!ends on ?nowledge of WMQ to!ology


e$g$ the WMQ <ueue location is re<uired when connecting a!!lications

WAS a!!lications de!endent on two systems #eing simultaneously a"aila#le Can #e com!le@ to e@!loit WAS and WMQ high a"aila#ility and scala#ility features

4ption 7
S.7us for WAS a!!lication messaging$
S.7us interacts with WMQ to access the messaging #ac?#one
WAS
Application Server Application Application Server Application Application Server Application

Messaging Engine

Messaging Engine

SIBus

MQ 8in#
Messages flow #etween S.7us and WMQ where interactions with the WMQ #ac?#one are necessary

WMQ bac#bone
WMQ QMgr WMQ QMgr WMQ QMgr

*5isting WMQ application

CICS application

+otes WAS manual descri#es this in more detailA


htt!A11!u#li#$#oulder$i#m$com1infocenter1wasinfo1"KrC1to!ic1c om$i#m$we#s!here$nd$multi!latform$doc1info1ae1ae1t/f!CC2G D$html

Can connect using either the 8We#S!here MQ Ein?9+ or using a WMQ client connection
MQ Ein? is a ser"er0ser"er connection+ WMQ a!!ears as a S.7us 8foreign #us9 WMQ client connection ma?es the <ueue manager a!!ear as a mem#er of the S.7us

4ption 76 SIBus !essaging s


.ros

ste!

Messaging runtime is em#edded into the same runtime as the a!!lications A#ility to asynchronously <ueue messages in the WAS system while connecti"ity with the WMQ #ac?#one is una"aila#le JMS resource configuration relates to WAS0defined S.7us configuration o#/ects WMQ0aware configuration in WAS is minimised A!!lications can #e unaware of actual <ueue locations Cons *wo messaging systems to configure and maintain Additional com!le@ity in configuring interactions #etween S.7us and WMQ )erformance o"erhead when !assing from one messaging system to another

+otes
*ranslating messages #etween WMQ and WAS formats introduces an o"erhead As #oth WMQ and S.7us allow for asynchronous messaging+ if one end of the lin? is down+ messages will #e <ueued u! until the other is a"aila#le$
)otentially allows a!!lications to continue o!erating if one of the systems goes down$

4ption '
S.7us for WAS0WAS a!!lication messaging+ WMQ for WAS0Mother messaging
WAS
Application Server Application Application Server Application Application Server Application Application

Messaging Engine

Messaging Engine

SIBus

WMQ bac#bone
WMQ QMgr WMQ QMgr WMQ QMgr

*5isting WMQ application

CICS application

WebSphere MQ as the !essaging provider


)re0de!loyed and ready to go 6ully integrated into WAS administrati"e tools
Can e"en do limited WMQ administration from WAS

Access to WMQ "ia *C) or shared memory '8#indings9( Su!!orts connections to "ariety of WMQ <ueue manager "ersions .nterfaces with WAS using the well0defined JCA interface
We#S!here MQ !ro"ided as a single unit 8:esource Ada!ter9

WMQ :esource Ada!ter is a com!onent of WAS


!dates a!!lied using WAS !rocess+ not WMQ

+otes
WMQ su!!ort is #uilt directly into WAS
WMQ already de!loyed to WAS+ no need to de!loy WMQ When creating a JMS resource+ you are as?ed to choose #etween 8default9 messaging and WMQ messaging$ Maintenance of the WMQ :esource Ada!ter ':A( is through WAS ser"ice channels+ such as WAS interim fi@es1fi@ !ac?s

WMQ JMS code can connect to any "ersion of WMQ <ueue manager
No tight cou!ling #etween WMQ JMS client "ersion and QM "ersion$ WMQ JMS "ersion in use detailed hereA htt!A11www0C2$i#m$com1su!!ort1doc"iew$wss? rsH272IuidHswgJ2J3KCKL

*he WMQ trans!ort can #e either *C)+ or shared memory1#indings mode


7indings mode a"aila#le when <ueue manager and a!!lication ser"er on the same machine
ses JN. interface+ re<uires nati"e li#rary to #e loaded into the WMQ :esource Ada!ter$ Need to configure the nati"e li#rary using the :A configuration !anel

JCA .nterface+ well defined interface for a!!lication ser"ers to access &nter!rise .nformation Systems$
Same WMQ interface used in other J&& a!!lication ser"ers Same connector interface as used #y S.7 and other !ro"iders in WAS

MQD.NS*AEED:FF* "aria#le no longer used to locate WMQ JMS code


Can still #e used to locate nati"e li#raries used #y WMQ$

Con,iguring ,or WMQ 6 Activation Speci,ications


Acti"ation S!ecs are the standardised way of deli"ering messages to an M57
;esources < )MS < Activation Speci,ications < =+ew>

*he We#S!here MQ messaging !ro"ider in WAS 9: adds su!!ort for Acti"ation S!ecs Eistener )ort functionality is sta#ili-ed$ Acti"ation S!ecs com#ine the configuration of connecti"ity+ the JMS destination to #e !rocessed and the runtime characteristics of the M57 itself Can #e tested during creation to "erify they wor?$ Acti"ation s!ecs can #e defined at all WAS configuration sco!es+ as can #e done for Connection6actories and 5estinations$

Activation Specs
.n WAS V7+ the introduction of the We#S!here MQ V7 JCA 2$G ada!ter ena#les M57>s to use acti"ation s!ecs to connect to <ueue managers rather than using listener !orts$ Acti"ation s!ecs are the strategic direction for deli"ering JMS messages to M57s Acti"ation s!ecs are easier to administer as they are defina#le at any sco!e where as listener !orts are defined on a !er ser"er #asis A new wi-ard has #een created which assists in the migration of e@isting listener !orts to acti"ation s!ecs+ note that this only creates a new acti"ation s!ec with the same configuration as the listener !ort+ it does not modify a!!lication de!loyments to use the newly created acti"ation s!ec

Con,iguring ,or WMQ 6 Connection ?actories N S!ecify how an a!!lication connects to a WMQ <ueue manager N *y!ically re<uiresA
; Queue manager name ; Hostname and !ort ; Channel name ; Fther !arameters such asA
N *rans!ort ty!e 'client or #indings( N se of SSE
;esources < )MS < Connection ,actories < =+ew>

N Fr+ can use WMQ client channel de,inition table 'CC5*( :E

Con,iguring ,or WMQ 6 -estinations


;esources < )MS < Queues 0 Topics < =+ew>

5efines references to the resources in WMQ that a JMS a!!lication will use
; *he WMQ resources must #e created using WMQ administration

Queues
; .dentifies the actual <ueue in WMQ
N Can #e used to set !ro!erties such as !ersistence+ !riority+ etc$

Topics
; 5efines the WMQ !u#lish1su#scri#e destination

Con,iguration ,or SIB 6 MQ 8in#


Queue manager as a #us mem#er
WMQ Queues lin?ed as #us destinations No asynchronous deli"ery+ if QM is una"aila#le+ destinations cannot #e used Can easily read and write messages to <ueues

Queue manager as a foreign #us


WMQ Queues lin?ed as foreign destinations Messages stored on S.7us if QM is una"aila#le Cannot read messages directly fromWMQ

SIB @ WMQ lin#s


Queue Manager as a #us mem#er
6irst define the <ueue manager as a We#S!here MQ ser"er in the 8Ser"ers9 section .n the Ser"ice .ntegration O 7uses O %us(ame ) 7us mem#ers "iew+ Add the <ueue manager Add the destinations you want to ma?e a"aila#le on the #us+ for e@am!le in the Ser"ice .ntegration O 7uses O %us(ame ) 5estinations "iew+ add a new <ueue destination$
S!ecify the a!!ro!riate We#S!here MQ #us mem#er+ and use the <ueue filter to locate the e@isting WMQ <ueue

Create JMS connection factories and JMS destinations+ and then use as normal Can read and write messages directly from WMQ Queues+ with confidence that messages arri"e at their destination$ .n the Ser"ice .ntegration O 7uses O %us(ame ) 6oreign 7us connections "iew+ clic? New+ and create a 5irect connection to a We#S!here MQ <ueue manager
5efine uni<ue 6oreign 7us name and MQEin? name S!ecify sender1recei"er channels on WMQ to use 'and ensure they e@ist on WMQ,( *he WMQ !ort used #y WAS is defined #y the !ort "alue S.7DMQD&N5)F.N*DA55:&SS 'e$g$GGGK(

Queue Manager as a foreign #us

Create JMS destinations that reference the foreign #us destination 'Connection 6actories still connect to the local #us( ses WMQ Sender1recei"er channels+ and so messages are sent to e@isting <ueues$ :eturn !ath uses remote <ueue definitions1transmission <ueues$ ndeli"ered messages sent to dead0letter <ueues$

QM as a #us mem#er is strongest for incoming messages+ QM as a foreign #us is strongest for outgoing 'it can <ueue u! messages when the QM is una"aila#le($
Can use a com#ination of methods$

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

+ew ,unctional areas in WMQ 9: o, interest to )MS


Message )ro!erties 4 Selectors Asynchronous Consum!tion of messages Sim!lified 7rowse 4 Co0o!erati"e 7rowse Asynchronous )ut :es!onse :ead0ahead of messages Connection changes Multi0instance Queue Managers 'WMQ 7$C$2(

Message properties and Selectors


JMS Selectors allow messages from a destination to #e filtered
6ilter on system or user message !ro!erties

WMQ V7 <ueue manager understands JMS message !ro!erties Queue manager e"aluates JMS selector
Fnly transmits matching messages to the client &fficient deli"ery of messages
JMS Application

As nchronous Consu!e
JMS has had conce!t of asynchronous consumer since ince!tion
MessageEistener 1 onMessage code

&"ent dri"en !rocessing Mnatural> for the Ja"a &n"ironment


AppServer

WMQ V7 introduced a#ility of <ueue manager to dri"e consumer when suita#le message a"aila#le
A"oids need for P!olling threadP More efficient message deli"ery+ es!ecially with selectors$

MQQ&*

9A Queue Manager

M57

AppServer

9: Queue Manager

With !ro!er su!!ort in WMQ ; JMS im!lementation sim!lified Eess client C) thread o"erhead of this #usy

M57

As nchronous Consu!er and Browse/with/!ar#


Multi!le a!!lication ser"ers will contend for messages when !rocessing the same <ueue$ Can result in failed message deli"ery and wasted resources 7rowse0with0mar? allows the a!!lication ser"er to hide messages it has #rowsed and intends to !rocess No contention for messages+ and im!ro"ed Queue Manager through!ut$ *he M57 #rowse thread always starts at to! Message !riority honored
AppServer AppServer AppServer

M57

M57

M57

Browse / Mar#
)rior to WMQ "7 ; only -1FS WMQ had a feature of M7rowse0Mar?>
Now all MQ "7 Queue Managers ha"e #rowse mar?

Eet a #rowser mar? messages when it had #rowsed them Fther #rowsers can re<uest to not see mar?ed messages
Messages mar?ed for a !eriod of time defined on the <ueue manager 7rowsers that do not o!t to hide mar?ed messages can see all messages
VB style JMS clients can still remo"e messages and cause message contention

*his lets asynchronous message deli"ery #e more efficient Eess chance of contention when scaled u! to multi!le JVMs
Contention can still occur if a!!lication ser"ers ta?e a long time 'R message #rowse mar? inter"al( time to !rocess message$ JMSCCC2CK error re!orts this condition in WAS SystemFut$log
.ndication that ser"er needs to #e tuned+ e$g$ increase M57 sessions+ num#er of M57 !rocessing threads+ or decrease M57 !rocessing time$

:eduction in failed MQQ&*s and rolled #ac? transactional wor? in WAS gi"es significant !erformance #enefit

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

WMQ Connection ?actor .roperties6 .rovider 9ersion


*he "ersion of WMQ that the <ueue manager this 6actory is !ointing to is running on$
*he client is o!timi-ed to connect to Version 7 <ueue managers+ and ma?es use of Version 7 functionality+ such as asynchronous message deli"ery$

*he WMQ JMS client can #e used to connect to Version G$2 <ueue managers and a#o"e$
*his uses a slightly modified "ersion of the WMQ Version B JMS Client+ which is em#edded in the Version 7 code$ No tight cou!ling #etween WMQ JMS client and <ueue manager "ersions

8)re0warning9 the WMQ JMS code it is connecting to a Version B or earlier <ueue manager s!eeds u! connection time$

Connection +a!e 8ist


*his !ro!erty s!ecifies a list of hostnames and !orts to attem!t to connect to$
Comma0se!arated list of 8hostname'!ort(9 entries

&ntries in the list are tried until a wor?ing connection is found+ or the end of the list is reached$ AppServer sed with multi0instance <ueue managers M57 automatically reconnect to stand#y Must #e same QM data if using SA Standard !ro!erty in WAS VK
WAS V7 custom !ro!erty
Queue Manager Queue Manager Queue Manager

Connection +a!e 8ist +otes


Similar to a CC5* with multi!le entries
5oes not do connection #alancing that is !ossi#le with CC5*s

.f a!!lications are transacted+ the entries in the list must refer to the same QM data 'such as the acti"e and stand#y <ueue manager instances(
WAS transaction manager will #e unaware that connection is to a different hostname1!ort+ and will e@!ect the same transactions to #e "isi#le when connecting to the Connection6actory$ .f different QMs are referenced+ SA transaction reco"ery will not wor?+ and transactions will re<uire manual resolution$ Same restriction a!!lies to CC5*s

Setting the custom !ro!ertyA


Configuring custom WAS !ro!erties
htt!A11www0C2$i#m$com1su!!ort1doc"iew$wss? uidHswgJ7CJC7CCImynsHswgwsImyn!HFCSS6TSJImyn!HFCSS&Q*)ImyncH:
Connection 6actoriesA Set a custom !ro!erty called SMSCDWMQDCFNN&C*.FNDNAM&DE.S* to the list of host1!ort names that you wish to connect to$ 6or e@am!leA host2'!ort2(+hostJ'!ortJ( Acti"ation S!ecsA Set a custom !ro!erty called connectionNameEist on the acti"ation s!ec with the same format as a#o"eA host2'!ort2(+hostJ'!ortJ(

Shared Conversation Allowed


*his !ro!erty s!ecifies whether JMS a!!lications that use this 6actory can share their connection to a Version 7 <ueue manager$
Conn$ Conn$ Conn$
Queue Manager

*C) Soc?et JVM

seful to reduce the num#er of networ? connections to a <ueue manager$

Can ha"e slight !erformance im!act$ Multi!le JMS a!!lications will #e sending data to a <ueue manager and waiting for a res!onse o"er the same channel$ Set ser"er connection channel SHA:&CNV to 2 for ma@imum !erformance

Shared Conversation Allowed +otes


)ossi#le Values
Ues
JMS a!!lications running in the same Ja"a Virtual Machine can use this 6actory and share their connections to the <ueue manager$ *he amount of sharing is controlled #y the Ser"er Connection Channel

No
&"ery JMS a!!lication that uses this 6actory will create a new connection to the <ueue manager$

JMS a!!lications tend to use more QM connections+ as there is one !er JMS connection and JMS session$ Historically+ this has led to the QM Ma@ Channels limit #eing reached more easily+ and re<uiring the limit to #e increased$ Shared Con"ersations mitigate this$

Using WMQ )MS with e5isting WMQ apps


MQM5 :ead1Write ena#led
5etermines if MQM5 !ro!erties can #e set "ia JMS get1set message !ro!erty methods$ Allows full access to the MQM5 header "alues seful for sending or recei"ing messages from MQ a!!lications that use s!ecific header !ro!erties$ JMS message !ro!erty names #egin with 8JMSD.7MDMQM5%9

*arget Client 'JMS1MQ(


.ndicates what the recei"ing a!!lication is :emo"es the :6HJ header from sent messages WMQ a!!lications may ha"e issues with

MQM5 :6HJ

MQM5

5ata 5ata

JMS Messages

Non0JMS Messages

MQM- ;ead0Write B Target Client +otes


*hese are destination !ro!erties+ set on the JMS Queue1*o!ic in use WMQ Manual !age on MQM5 :ead1WriteA
htt!A11!u#li#$#oulder$i#m$com1infocenter1wm<"71"7rC1to!ic1c om$i#m$m<$cs<-aw$doc1/m32C=CD$htm Note that MQM5 Message Conte@t also needs to #e set to allow some !ro!erties to #e set on the message Care should #e ta?en with direct access to the MQM5+ as it is !ossi#le to "iolate the JMS s!ecification

;ead Ahead Allowed


.n general+ messages are sent to JMS a!!lications one at a time$ *he :ead Ahead Allowed !ro!erty tells the <ueue manager whether non0!ersistent messages can #e streamed to the client a!!lication in !re!aration for them #eing consumed$ Messages are stored in a #uffer on the client$ .f the client a!!lication terminates une@!ectedly+ all unconsumed non0!ersistent messages are discarded$

JMS A!!lication

)MS Client

Queue Manager

WAS Con,iguration6 Activation Speci,ications


How are messages destined for M57s !rocessed?

*hread )ool Wor? Manager

Ser"erSessions

Msg Q Acti"ation S!ecification

QM

Activation Speci,ications / Threads


*o !rocess a message+ a Ser"erSession and thread are re<uired Acti"ation S!ecification !arameter Ma@imum ser"er sessions configures Ser"erSession !ool+ default 2C
Ser"erSession !ool !er M57

A!!lication Ser"er *hread !ool WMQJCA:esourceAda!ter used+ default Ma@imum si-e JG


*hread !ool used #y all M57s$

So+ #y default+ = M57s could e@haust the threads


Will cause slower !rocessing :ecommendation is that thread !ool ma@imum accounts for all M57 ma@imums

Activation Speci,ications / ;ecover


What ha!!ens if the connection to a <ueue manager used #y Acti"ation S!ecifications is #ro?en? *he Acti"ation S!ecification has reco"ery features to allow it to attem!t se"eral reconnection attem!ts #efore sto!!ing$ 5efault is to try G times in G minute inter"als$
Configured using reconnection:etryCount 1 reconnection:etry.nter"al 'ms( on the :esource Ada!ter+ for all Acti"ation S!ecifications$

.f the Acti"ation S!ecification sto!s+ this is only re!orted in A!!lication Ser"er SystemFut$log logs$

Activation Speci,ications / ;ecover


*o configure WMQ :A settings+ go to :esources O :esource Ada!ters+ select a sco!e to configure+ and in the )references+ select 8Show #uilt0in resources9+ and A!!ly$ Select the 8We#S!here MQ :esource Ada!ter9 Select custom !ro!erties+ and modify the 8reconnection:etryCount9 and 8reconnection:etry.nter"al9 !ro!erties !on first failure+ the :A will try an immediate reconnection attem!t+ and if that fails+ retry at the configured inter"al$ *he !ro!erties are configured on the :A+ and so affect AEE Acti"ation S!ecifications using that :A

)MS User authentication


create$onnection(user)pass7or ) .n J&&+ JMS a!!lication0s!ecified user and !asswords are not necessarily used$ 8Container0managed9 authentication Acti"ation S!ecifications 1 Connection 6actories can #e associated with authentication data
JAAS ; JJC Authentication 5ata defines username and !assword details *he a!!lication needs to use J&& resource0references to access the connection factory *he authentication#ype !arameter needs to #e set to container for container0managed authentication$

As for other WMQ clients+ security e@its are re<uired to "alidate !asswords+ WMQ only chec?s user id ser ids more im!ortant with WMQ 7$2 channel authentication

)MS User Authentication


WAS has #uilt0in user credential re!ositories that can #e defined with username and !assword details JAAS ; JJC Authentication 5ata Acti"ation S!ecifications allow this to #e configured in the Security !arameters Connection 6actories also allow this to #e configured+ although a!!lication configuration determines if it will #e used$ *he a!!lication needs to use J&& resource0references to access the connection factory *he res0auth !arameter needs to #e set to 8container9 for container managed authentication$ <res-auth>application</res-auth>+ or not using resource0references means the a!!lication is res!onsi#le for any authentication information :esource references ha"e other #enefits+ such as decou!ling a!!lication configuration names from real JN5. names$ As for other WMQ clients+ security e@its are re<uired to "alidate !asswords+ WMQ only chec?s user id ser ids more im!ortant with WMQ 7$2 channel authentication .f nothing s!ecified+ #y default WMQ JMS !asses a #lan? id Custom !ro!erty 8com$i#m$m<$/ms$6orce ser.5Htrue9 will !ass the JVM !rocess id$ htt!A11www0C2$i#m$com1su!!ort1doc"iew$wss?uidHswgJ237CKC2 e/#0/ar$@ml resource0ref "alues need a res0auth of container to use the C6 security settings$ sing annotations+ will need to use the V:esource authentication*y!e

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

High Availabilit
*reat WAS and WMQ as se!arate resources WMQ V7$C$2 features ma?e it easier for WAS to reconnect during failo"er
Quic?er detection of #ro?en connections Connection Name Eists

FS0le"el HA solutions 'HACM) etc$(


Acti"e ; )assi"e failo"er *rans!arent as resources such as .) addresses are mo"ed o"er Can include WMQ as well as other resources in the same failo"er *hird !arty solution+ introduces e@!ense

Multi/instance Queue Managers


WMQPs #asic im!lementation of Acti"e ; )assi"e failo"er
Fnly mo"es WMQ resources Can #e faster than FS0le"el HA

Needs data to #e stored in e@ternal storage with loc?ing+ such as N6S V3 Fne acti"e <ueue manager+ with other stand#y instance Stand#y instance can detect failure and ta?e o"er
Can also trigger failo"er

Same data is shared+ so itPs the SAM& <ueue manager$


Ser"er 2
Queue Manager

Ser"er J
QM 5ata
Queue Manager

Multi/instance Queue Managers


N 7asic failo"er su!!ort without HA coordinator
6aster ta?eo"erA fewer mo"ing !arts Chea!erA no s!ecialised software or administration s?ills needed Windows+ ni@+ Einu@ !latforms Needs WMQ 7$C$2 or later

N Queue manager data is held in networ?ed storage


NAS+ N6S+ Q)6S etc so more than one machine sees the <ueue manager data .m!ro"es storage management o!tionsA formal su!!ort for these e"en without failo"er config

N Multi!le instances of a <ueue manager on different machines


Fne is 8acti"e9 instanceW other is 8stand#y9 instance Acti"e instance 8owns9 the <ueue manager>s files and will acce!t a!! connections Stand#y instance does not 8own9 the <ueue manager>s files and a!!s cannot connect
.f acti"e instance fails+ stand#y !erforms <ueue manager restart and #ecomes acti"e

N .nstances share data+ so it>s the SAM& <ueue manager

Multi/instance and )ava **


Connection to Multi0.nstance Queue Managers is su!!orted
Minimum of WAS 7$C$C$2= re<uired 'contains WMQ 7$C$2$=( Can #e configured using CC5* Can #e configured using Connection Name Eists

Automatic Client :econnect is not supported 'in &J71We# container(


M57 #ased a!!lications use Eistener)ort1Acti"ation S!ecification #ased reconnection Automatic Client :econnect can #e used in unmanaged1client en"ironments

High Availabilit continued$$$


Acti"e ; Acti"e WMQ
Multi!le acti"e running <ueue managers )ro"ides ser"ice resilience and load #alancing
e$g$ WMQ Clusters+ -1FS Queue Sharing Qrou!s 'QSQ(

Can ha"e stranded messages !ro#lems if <ueue manager #ecomes una"aila#le$


Can use HACM)1Multi0instance <ueue managers to a"oid
Ser"er 2
Queue Manager A

Ser"er J
QM A 5ata
Queue Manager A

Queue Manager B

QM 7 5ata

Queue Manager B

Use,ul In,or!ation6 .roduct Connectivit Scenarios


Scenario0#ased instructions for im!lementing a solution in a #usiness conte@t )ro"iding a thorough+ com!lete+ and single end0to0end main !ath from the #usiness need 'high le"el( to the tas?s 'low le"el( F!tional features hel! you learn as you !rogress through each tas?
; .nformation a#out why you are instructed to do something ; .nformation a#out what else you might do+ or want to learn a#out+ related to what you are reading in the main window

.ncludes sam!les that you can try out and ada!t htt!A11!u#li#$#oulder$i#m$com1infocenter1!rodconn1"2rCmC1ind e@$/s!

Use,ul in,or!ation6 .roduct Connectivit Scenarios


*wo Connecting WebSphere Application Server to WebSphere MQ scenarios are already a"aila#leA
; *he *etting Started scenario guides you through the tas? ste!s that are re<uired to allow a Ja"a Message Ser"ice 'JMS( a!!lication running on We#S!here A!!lication Ser"er to connect to We#S!here MQ$ ; Starting with an e@isting We#S!here A!!lication Ser"er and We#S!here MQ Version B installation+ the Migrating from +ersion , to +ersion - scenario leads you through the ?ey tas?s re<uired to migrate to Version 7$

?urther In,or!ation
WAS !roduct information htt!A11www0=CB$i#m$com1software1we#ser"ers1a!!ser"1was1 WAS .nfo Center htt!A11!u#li#$#oulder$i#m$com1infocenter1wasinfo1"BrC1inde@$/s! htt!A11!u#li#$#oulder$i#m$com1infocenter1wasinfo1"Br21inde@$/s! htt!A11!u#li#$#oulder$i#m$com1infocenter1wasinfo1"7rC1inde@$/s! )roduct Connecti"ity .nformation Center htt!A11!u#li#$#oulder$i#m$com1infocenter1!rodconn1"2rCmC1inde@$/s! sing We#S!here MQ Ja"a .nterfaces in JJ&&1J&& &n"ironments htt!A11www0C2$i#m$com1su!!ort1doc"iew$wss?rsH272Iconte@tHSS6TSJIdcH57GJCIuidHswgJ2JBBG=GIlocHenD SIcsH *60 KIlangHenIrssHct272we#s!here .7M de"elo!erWor?s htt!A11www$i#m$com1de"elo!erwor?s 'Searching on 8Ser"ice .ntegration 7us9 returns a num#er of interesting articles( htt!A11www$i#m$com1de"elo!erwor?s1we#s!here1tech/ournal1CLC2Dleming1CLC2Dleming$html 0 WASV7 htt!A11www$i#m$com1de"elo!erwor?s1we#s!here1tech/ournal1CBC2Dratnasinghe1CBC2Dratnasinghe$html 0 Security htt!A11www$i#m$com1de"elo!erwor?s1we#s!here1tech/ournal1CBC2Dsmithson1CBC2Dsmithson$html 0 Security .7M :ed7oo?s htt!A11www$red#oo?s$i#m$com We#S!here A!!lication Ser"er V7A Messaging Administration Quide SQJ30777C0CC We#S!here A!!lication Ser"er V7A Conce!ts+ )lanning and 5esign+ SQJ3077CK0CC We#S!here A!!lication Ser"er V7A *echnical F"er"iew+ :&5)033KJ0CC We#S!here A!!lication Ser"er VB$2A JMS )ro#lem 5etermination+ :&5)03==C0CC We#S!here A!!lication Ser"er VB$2A System Management I Configuration+ SQJ307=C30CC We#S!here A!!lication Ser"er VB Scala#ility and )erformance Hand#oo?+ SQJ30B=LJ0CC We#S!here A!!lication Ser"er VB$2 Security Hand#oo?+ SQJ30B=2B0C2 We#S!here A!!lication Ser"er VB$2A *echnical F"er"iew+ :&5)032L20CC We#S!here A!!lication Ser"er VB$2A )lanning and 5esign+ SQJ307=CG0CC We#S!here A!!lication Ser"er VB$2A .nstallation )ro#lem 5etermination+ :&5)03=CG0CC

?urther In,or!ation 172


.7M :ed7oo?s ; htt!A11www$red#oo?s$i#m$com
N N N N N N N N N N We#S!here A!!lication Ser"er V7A Messaging Administration Quide SQJ30777C0CC We#S!here A!!lication Ser"er V7A Conce!ts+ )lanning and 5esign+ SQJ3077CK0CC We#S!here A!!lication Ser"er V7A *echnical F"er"iew+ :&5)033KJ0CC We#S!here A!!lication Ser"er VB$2A JMS )ro#lem 5etermination+ :&5)03==C0CC We#S!here A!!lication Ser"er VB$2A System Management I Configuration+ SQJ307=C30 CC We#S!here A!!lication Ser"er VB Scala#ility and )erformance Hand#oo?+ SQJ30B=LJ0 CC We#S!here A!!lication Ser"er VB$2 Security Hand#oo?+ SQJ30B=2B0C2 We#S!here A!!lication Ser"er VB$2A *echnical F"er"iew+ :&5)032L20CC We#S!here A!!lication Ser"er VB$2A )lanning and 5esign+ SQJ307=CG0CC We#S!here A!!lication Ser"er VB$2A .nstallation )ro#lem 5etermination+ :&5)03=CG0CC

Agenda
Why are we here? Messaging in WAS
What is JMS?

Accessing WMQ from WAS


How to configure New WMQ V7 features useful for WAS

Configuring WMQ and WAS


seful tuning !arameters High A"aila#ility and clusters

This was session %%&%' / The rest o, the wee# CC


Monday *uesday Wednesday *hursday 6riday CKACC CLA=C
Clustering ; the easier way to connect your Queue Managers MQ on -1FS ; "i"isection *he 5ar? Side of Monitoring MQ 0 SM6 22G and 22B record reading and inter!retation Eoc? it down 0 We#S!here MQ Security *he 5octor is .n and Eots of Hel! with the MQ family 0 Hands0on Ea# &@tending .7M We#S!here MQ and We#S!here Message 7ro?er to the Cloud nder the hood of Message 7ro?er on -1FS 0 WEM+ SM6 and more 5iagnosing !ro#lems for MQ 6or your eyes only 0 We#S!here MQ Ad"anced Message Security MQ )erformance and *uning on distri#uted including internals *he 5o>s and 5on>ts of -1FS Queue Manager )erformance sing .7M We#S!here A!!lication Ser"er and .7M We#S!here MQ *ogether S!reading the message ; MQ !u#su# 6ree MQ, 0 MQ Clients and what you can do with them

22ACC

5iagnosing !ro#lems for Message 7ro?er

2JA2G

Highly A"aila#le Messaging 0 :oc? solid MQ We#S!here MQ 2C2A .ntroduction to the worldPs leading messaging !ro"ider 6irst ste!s with We#S!here Message 7ro?erA A!!lication integration for the messy *he MQ A). for 5ummies 0 the 7asics

)utting the we# into We#S!here MQA A loo? at We# J$C technologies What>s new in the We#S!here MQ )roduct 6amily WhatPs new in Message 7ro?er VK$C

C2A=C

C=ACC

C3A=C CBACC

What the XXXX is going on in my Queue Manager,?

Shared Q using Shared Message 5ata Sets MQ Q07o@ 0 F!en Micro!hone to as? the e@!erts <uestions

Using IBM WebSphere Application Server and IBM WebSphere MQ Together

Cop right and Trade!ar#s Y .7M Cor!oration JC2J$ All :ights :eser"ed$
.7M+ the .7M logo+ and i#m$com are trademar?s or registered trademar?s of .nternational 7usiness Machines Cor!$+ registered in many /urisdictions worldwide$ Fther !roduct and ser"ice names might #e trademar?s of .7M or other com!anies$ A current list of .7M trademar?s is a"aila#le on the We# at 8Co!yright and trademar? information9 at www$i#m$com1legal1co!ytrade$shtml$

Potrebbero piacerti anche