Web Methods Integration Server JMS Client Developer's Guide 7.1
Web Methods Integration Server JMS Client Developer's Guide 7.1
Integration Server
Version 7.1
Cerebra,Glue,InfravioXBroker,InfravioXRegistry,Infravio,MywebMethodsServer,MywebMethods,webMethodsAccess,webMethodsAdministrator, webMethodsBroker,webMethodsCentralConfiguration,webMethodsDashboard,webMethodsDesigner,webMethodsDeveloper,webMethodsFabric, webMethodsGlue,webMethodsInfrastructureDataCollector,webMethodsInfravioXBroker,webMethodsInfravioXRegistry,webMethodsInstaller, webMethodsIntegrationServer,webMethodslogo,webMethodsMainframe,webMethodsManager,webMethodsModeler,webMethodsMonitor, webMethodsOptimizeforInfrastructure,webMethodsOptimizeforProcess,webMethodsOptimize,webMethodsPortal,webMethodsProcessEngine, webMethodsServicenet,webMethodsTaskEngine,webMethodsTradingNetworks,webMethodsWorkflow,andwebMethodsareeitherregistered trademarksortrademarksofwebMethods,Inc. Acrobat,Acrobat,andReaderareregisteredtrademarksofAdobeSystemsIncorporated.AmdocsandClarifyCRMareregisteredtrademarksofAmdocs. AribaisaregisteredtrademarkofAriba,Inc.BEA,BEAWebLogicServer,Jolt,andTuxedoareregisteredtrademarks,andBEAWebLogicPlatformisa trademarkofBEASystems,Inc.ActionRequestSystem,BMCSoftware,PATROL,andRemedyareregisteredtrademarksofBMCSoftware,Inc.BroadVision isaregisteredtrademarkofBroadVision,Inc.ChemeStandardsandCIDXaretrademarksofCIDX,TheChemicalIndustryDataExchange.SiteMinderand UnicenterareregisteredtrademarksofCA,Inc.PopChartisaregisteredtrademarkofCORDATechnologies,Inc.KenanandArborareregisteredtrademarks ofAlcatelLucent.DataConnectionandSNAPIXareregisteredtrademarksofDataConnectionCorporation.D&BandDUNSareregisteredtrademarksof Dun&BradstreetCorporation.EclipseisatrademarkofEclipseFoundation,Inc.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregistered trademarkoftheEuropeanUnionandtheUnitedStates.FinancialInformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd. UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCandTransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PA RISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isaregisteredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,ClearCase,DB2, Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390,OS/400,RACF,RS/6000,SQL/400,S/390,System/390,VTAM,andWebSphere,and z/OSareregisteredtrademarks;andCommunicationsSystemforWindowsNT,DB2UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBM Corporation.InnoDBisatrademarkofInnobaseOy.ItaniumisaregisteredtrademarkofIntelCorporation.LinuxisaregisteredtrademarkofLinus Torvalds.W3Cisaregisteredtrademark,andXWindowSystemisatrademarkoftheMassachusettsInstituteofTechnology.MetaSolvisaregistered trademarkofMetasolvSoftware,Inc.ActiveX,Microsoft,Outlook,VisualBasic,VisualSourceSafe,Windows,WindowsNT,andWindowsServerare registeredtrademarksofMicrosoftCorporation.SixSigmaisaregisteredtrademarkofMotorola,Inc.FirefoxandMozillaareregisteredtrademarksofthe MozillaFoundation.MySQLisaregisteredtrademarkofMySQLAB.nCipherisatrademarkofnCipherCorporationLtd.EclipseisatrademarkofEclipse Foundation,Inc.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregisteredtrademarkoftheEuropeanUnionandtheUnitedStates.Financial InformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd.UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCand TransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PARISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isa registeredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,ClearCase,DB2,Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390, OS/400,RACF,RS/6000,SQL/400,S/390,System/390,VTAM,andWebSphere,andz/OSareregisteredtrademarks;andCommunicationsSystemforWindows NT,DB2UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBMCorporation.InnoDBisatrademarkofInnobaseOy.Itaniumisaregistered trademarkofIntelCorporation.TeradataisaregisteredtrademarkofNCRCorporation.NetscapeisaregisteredtrademarkofNetscapeCommunications Corporation.ServletExecisaregisteredtrademark,andNewAtlantaisatrademarkofNewAtlantaCommunications,LLC.SUSEisaregisteredtrademark ofNovell,Inc.AppiaisaregisteredtrademarkandJavelinTechnologiesisatrademarkofNYFIX,Inc.CORBAisaregisteredtrademarkofObject ManagementGroup,Inc.JDEdwards,OneWorld,Oracle,PeopleSoft,Siebel,andVantiveareregisteredtrademarks;andInfranet,PeopleSoftPureInternet Architecture,Portal,andWorldSoftwarearetrademarksofOracleCorporation.PerforceisatrademarkofPerforceSoftware.JBossandRedHatare registeredtrademarksofRedHat,Inc.PIPandRosettaNetaretrademarksofRosettaNet,anonprofitorganization.SAPandR/3areregisteredtrademarks ofSAPAG.PVCSisaregisteredtrademarkofSerenaSoftware,Inc.SWIFTandSWIFTNetareregisteredtrademarksofSocietyforWorldwideInterbank FinancialTelecommunicationSCRL.SPARCandSPARCStationareregisteredtrademarksofSPARCInternational,Inc.BAANandSSAareregistered trademarks;andSSAGlobalisatrademarkofSSAGlobalTechnologies,Inc.EJB,EnterpriseJavaBeans,Java,JavaServer,JDBC,JSP,J2EE,Solaris,Sun,and SunMicrosystemsareregisteredtrademarks;andJavaNamingandDirectoryInterface,JavaServerPages,SOAPwithAttachmentsAPIforJava,andSunSoft aretrademarksofSunMicrosystems,Inc.SybaseisaregisteredtrademarkofSybase,Inc.VERITASisaregisteredtrademark,andVERITASClusterServeris atrademarkofSymantecCorporation.UNIXisaregisteredtrademarkofTheOpenGroup.UnicodeisatrademarkofUnicode,Inc.VeriSignisaregistered trademarkofVerisign,Inc. SoftwareAGandallSoftwareAGproductnamesareeithertrademarksorregisteredtrademarksofSoftwareAG. Otherproductandcompanynamesmentionedhereinmaybethetrademarksoftheirrespectiveowners. Copyright2007webMethods,Inc.Allrightsreserved. Copyright2007SoftwareAGand/oritssuppliers,Uhlandstrasse12,64297Darmstadt,Germany.Allrightsreserved.
Contents
Contents
About This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
8 8
9
10 10 10 12 13 13 13 14 17 18 18 19 19 20 20
21
22 22 22 23 24 24 24 24 25 25 25 26 26 26 26
Contents
26 27 27 28
29
30 30 30 34 35 38 39 39 40 44 45 46 46 47
49
50 50 50 51 56 56 57 58 59 59 60 60 61 62 62 62 63 63 64
Contents
Handling Fatal Errors for Non-Transacted JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling Transient Errors for Non-Transacted JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring Retry Behavior for Trigger Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Service Requirements for Retrying a Trigger Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling Retry Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Throw Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Suspend and Retry Later . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring Transient Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generating Events for JMS Retrieval Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Debugging a JMS Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Building JMS Triggers with Multiple Routing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65 66 67 67 68 68 69 70 72 73 74
77
78 78 79 79 80 80 82 83 84 85
87
88 88 91 92 94 95 96 97 97 99 99 100 100 101 101 102
Contents
ThewebMethodsIntegrationServerJMSClientDevelopersGuideisdesignedforthe developerwhoisresponsiblefordevelopingsolutionsthatusewebMethodsIntegration ServertosendandreceivemessagesusingJavaMessagingService(JMS). Thisguidedoesthefollowing: ExplainshowtoestablishconnectionstooneormoreJMSproviders. DescribeshowtobuildaJMStriggertouseforreceivingJMSmessages. ExplainshowtobuildservicesthatsendandreceiveJMSmessagesusingbuiltin services. Thisguideassumesthatyouarefamiliarwiththefollowing: BasicconceptsofwebMethodsarchitectureandterminology. UsageofwebMethodsDevelopertocreateelementsandbuildservices. Generalknowledgeofprogramming,theJavaprogramminglanguage,andtheJMS API. Note: Anindepthtreatmentofmessagingarchitectureisbeyondthescopeofthisguide, butisavailableelsewhere.ForinformationabouttheJMSAPI,pleaserefertotheJava MessageService,Version1.1specificationontheSunMicrosystemsJavaMessageService (JMS)Website. Note: WithwebMethodsDeveloper,youcancreateBroker/localtriggersandJMStriggers. ABroker/localtriggeristriggerthatsubscribestoandprocessesdocuments published/deliveredlocallyortotheBroker.AJMStriggerisatriggerthatreceives messagesfromadestination(queueortopic)onaJMSproviderandthenprocessesthose messages.ThisguidediscussesdevelopmentanduseofJMStriggersonly.Wheretheterm triggersappearsinthisguide,itreferstoJMStriggers.Forinformationaboutcreating Broker/localtriggers,seethePublishSubscribeDevelopersGuide.
Document Conventions
Convention Bold Italic Description Identifieselementsonascreen. Identifiesvariableinformationthatyoumustsupplyorchange basedonyourspecificsituationorenvironment.Identifiestermsthe firsttimetheyaredefinedintext.Alsoidentifiesserviceinputand outputvariables. IdentifiesstoragelocationsforservicesonthewebMethods IntegrationServerusingtheconventionfolder.subfolder:service. Identifiescharactersandvaluesthatyoumusttypeexactlyor messagesthatthesystemdisplaysontheconsole. Identifieskeyboardkeys.Keysthatyoumustpresssimultaneously arejoinedwiththe+symbol. Directorypathsusethe\directorydelimiterunlessthesubjectis UNIXspecific. Optionalkeywordsorvaluesareenclosedin[].Donottypethe[] symbolsinyourowncode.
Narrow font
Typewriter font
UPPERCASE \ []
Additional Information
ThewebMethodsAdvantageWebsiteathttp://advantage.webmethods.comprovidesyou withimportantsourcesofinformationaboutwebMethodsproducts: Troubleshooting Information.ThewebMethodsKnowledgeBaseprovides troubleshootinginformationformanywebMethodsproducts. Documentation Feedback.ToprovidefeedbackonwebMethodsdocumentation,goto theDocumentationFeedbackFormonthewebMethodsBookshelf. Additional Documentation.Startingwith7.0,youhavetheoptionofdownloadingthe documentationduringproductinstallationtoasingledirectorycalled _documentation,locatedbydefaultunderthewebMethodsinstallationdirectory.In addition,youcanfinddocumentationforallwebMethodsproductsonthe webMethodsBookshelf.
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Working with JNDI Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Working with JMS Connection Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Creating Administered Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Load Balancing Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Overview
ToconfigureIntegrationServerforJMSmessaging,youneedto: CreateoneormoreJNDIprovideraliasestospecifywhereIntegrationServercanlook upadministeredobjectswhenitneedscreateaconnectiontoJMSproviderorspecify adestinationforsendingorreceivingmessages. CreateoneormoreconnectionaliasesthatencapsulatethepropertiesthatIntegration ServerneedstocreateaconnectionwiththeJMSprovider. IntegrationServeralsoincludesvariousserverconfigurationpropertiesthatyoucanuse tochangethedefaultserverbehavior.Foralistofserverconfigurationparametersrelated toJMS,seeAppendix A,JMSServerConfigurationParameters.
10
Specify... ThealiasnamethatyouwanttoassigntothisJNDIprovider. AdescriptionforthisJNDIalias. TheJNDItemplatethatyouwanttouse. TheJNDItemplatesprovideinformationthatyoucanuseto completealiasconfigurationforaspecificprovider. Note: AfteryoucreateaJNDIprovider,IntegrationServer AdministratordisplaysCurrentSettingsasthevalueofthe Predefined JNDI Templates field.ThisindicatesthatIntegration ServerusesthecurrentlyspecifiedsettingsfortheJNDI provideralias.
Provider URL
Security Principal
11
Other Properties
AnyadditionalpropertiestheJNDIproviderrequiresfor configuration.Forexample,youmightneedtospecifythe classpathforanyadditional.jarorclassfilesthattheJNDI providerneedstoconnecttotheJNDI. WhenyouselectapredefinedJNDItemplate,Integration Serverpopulatesthisfieldwithanyadditionalpropertiesand placeholderinformationrequiredbytheJNDIprovider. Formoreinformationaboutadditionalpropertiesorclasses requiredbyaJNDIproviderandthelocationofthosefiles,see theproductdocumentationfortheJNDIprovider.
ClickSave Changes.
5 6
12
To delete a JNDI provider alias 1 2 3 4 OpenIntegrationServerAdministratorifitisnotalreadyopen. IntheSettingsmenuoftheNavigationpanel,clickMessaging. UnderJMSConfiguration,clickJNDI Settings. Locatethealiasyouwanttodeleteandclickthe iconintheDeletefield.Integration Serverdisplaysadialogboxthatpromptsyoutoverifyyouraction.ClickOKtoverify thatyouwanttodeletetheJNDIprovideralias.
IntegrationServerreturnsalistoftheObjectslocatedintheJNDInamespace.
13
14
XA_TRANSACTION
Password (optional)
InCreate Connection Usinglist,selectoneofthefollowingtoindicatehowadministered objects(connectionfactoriesanddestinations)willbelookedup: IfyouintendtouseaJNDIprovider,selectJNDI Lookup andproceedtostep7. IfyouintendtousethenativewebMethodsAPItocreatetheconnectiondirectly onthewebMethodsJMSProvider,selectNative webMethods APIandproceedto step8.
IfyouselectedJNDI Lookupinstep6,dothefollowingintheremainingfieldsunder Connection Protocol Settings: a IntheJNDI Provider Alias Namefield,selectthealiastotheJNDIproviderthatyou wanttothisJMSconnectionaliastousetolookupadministeredobjects.For informationaboutcreatingaJNDIprovideralias,seeCreatingaJNDIProvider Aliasonpage 10. IntheConnection Factory Lookup Namefield,specifythelookupnameforthe connectionfactorythatyouwanttousetocreateaconnectiontotheJMSprovider specifiedinthisJMSconnectionalias.
15
ConfiguretheconnectiontotheBrokerServerthatyouwanttouseasthe webMethodsJMSProviderforthisJMSconnectionalias.Forinformationabout configuringaconnectiontoaBrokerServer,seethewebMethodsIntegrationServer AdministratorsGuide. IntheClient Groupfield,specifythenameoftheclientgrouptowhichyouwant IntegrationServertobelongwhenitactsasaJMSclient.Theclientgroupthatyou specifymustalreadyexistontheBrokerServer.ThedefaultisISJMS. IntheBroker Listfield,specifyacommadelimitedlistofBrokerServersonwhich theconnectionbetweentheIntegrationServer(actingastheJMSclient)andthe webMethodsJMSProvidercanexist.Thisprovidesconnectionfailover.Ifa connectionfailureoccurstothefirstBrokerServerinthelist,aconnectionattempt willbemadetothenextBrokerServerlisted.Usethefollowingformatforeach Broker: {BrokerName]@<host>[:port] Note: IfaconnectiontoaBrokerServerisalreadyconfigured(viaSettings > Messaging > Broker Settings),IntegrationServerpopulatesthefieldsunder ConnectionProtocolSettingswithinformationaboutthatBrokerServer.Ifthat BrokerServerfunctionsasthewebMethodsJMSProvider,youmaynotneedto editanyinformation.However,makesurethattheClientGroupfieldspecifies theclientgrouptowhichyouwantIntegrationServertobelongwhenitfunctions asaJMSclient.
UnderAdvanced Settings,specifythefollowinginformationfortheJMSconnection alias: For this field... Class Loader Specify... Thenameoftheclassloaderthatyouwanttousewiththis JMSconnectionalias.IntegrationServerwillusethespecified classloaderwhenperformingcertainactivitieswiththeJMS connectionalias(sendamessage,receiveamessage,createa connection,createadestination,etc.) Bydefault,IntegrationServerusestheserverclassloader. However,youcanspecifytheclassloaderforapackage instead.Thismaybehelpfulwhenworkingwiththirdparty JMSproviders.Forexample,youmightplacethethirdparty jarsneededforeachJMSproviderinseparatepackages, specifically,inthe IntegrationServer_directory/packageName/code/jarsdirectory. Thiscanhelppreventconflictsbetweenthejarsrequiredfor differentJMSproviders.
16
Specify... Themaximumnumberofmessagesthatcanexistintheclient sidequeueforthisJMSconnectionalias.IntegrationServer writesmessagestotheclientsidequeueiftheJMSprovideris notavailablewhenmessagesaresent.EachJMSconnection aliashasitsownclientsidequeue. Specify1ifyouwanttheclientsidequeuetobeableto containanunlimitednumberofmessages.Thatis,specify1if youdonotwanttosetamaximumlimit. Ifyouspecify0,IntegrationServerwillnotwritemessagesto theclientsidequeueforthisJMSconnectionalias.
WhetherIntegrationServerdrainstheclientsidequeueby sendingthemessagestotheJMSproviderinthesameorderin whichIntegrationServerplacedthemessagesintheclientside queue. SelectthecheckboxifyouwantIntegrationServertosend messagesfromtheclientsidequeueinthesameorderin whichIntegrationServeroriginallyplacedthemessagesinthe clientsidequeue. WhentheDrain CSQ in Ordercheckboxisselected,afterthe connectiontotheJMSproviderisreestablished,Integration Servercontinuestowritenewmessagestotheclientside queueuntiltheclientsidequeueiscompletelydrained.Ifthe Drain CSQ in Ordercheckboxisnotselected,aftertheconnection totheJMSproviderisreestablished,IntegrationServersends newmessagesdirectlytotheJMSproviderwhileitdrainsthe clientsidequeue. Note: YoucanalsospecifythenumberofmessagesIntegration Serverretrievesfromtheclientsidequeuefordeliverytothe JMSprovideratonetime.Bydefault,IntegrationServersends 25messagesatatime.Formoreinformationaboutthe watt.server.jms.csq.batchProcessingSize property,see Appendix A,JMSServerConfigurationParameters.
10 ClickSave Changes.
17
5 6
18
19
20
21
2. JMS Basics
JMS Messaging
TheJavaMessageService(JMS)isaJavaAPIthatallowsapplicationstocommunicate witheachotherusingacommonsetofinterfaces.JMSispartoftheJava2Platform, EnterpriseEdition(J2EE)suite.TheJMSAPIprovidesmessaginginterfaces,butnotthe implementations. AJMSprovider,suchasthewebMethodsJMSProvider,isamessagingsystemthat implementstheJMSmessageinterfacesandprovidesadministrativeandcontrolfeatures. ItsupportsroutinganddeliveryofmessagesthroughtheimplementationoftheJMSAPI ontheclient.AgoalofJMSistomaximizetheportabilityofJMSapplicationsacross differentJMSproviders. JMSclientsaretheprogramsorcomponents,writteninJava,thatproduceandconsume messages.
Messaging Styles
Amessagingstylereferstohowmessagesareproducedandconsumed.JMSsupportsthe publishsubscribe(pubsub)andpointtopoint(PTP)messagingstyles.
22
2. JMS Basics
Sending Clients
Integration Server (Sender)
JMS Provider
Receiving Client
Integration Server
Queue
Publish-Subscribe Messaging
Inpublishsubscribemessaging,messageproducersandconsumersareknownas publishersandsubscribers. Thecentralconceptinthepublishsubscribemessagingisadestinationcalledatopic. Messagepublisherssendmessagesofspecifiedtopics.Clientsthatwanttoreceivethat typeofmessagesubscribetothetopic. Thepublishersandsubscribersnevercommunicatewitheachotherdirectly.Instead,they communicatebyexchangingmessagesthroughaJMSprovider
Publishing Clients
Integration Server (Publisher)
Subscribing Clients
Integration Server JMS Trigger (Subscriber)
JMS Provider
23
2. JMS Basics
Durable Subscriptions
Durablesubscriptionsallowsubscriberstoreceiveallthemessagespublishedonatopic, includingthosepublishedwhilethesubscriberisinactive.Whenthesubscribing applicationsarenotrunning,themessagingproviderholdsthemessagesinnonvolatile storage.Itretainsthemessagesuntileither: Thesubscribingapplicationbecomesactive,identifiesitselftotheprovider,andsends anacknowledgmentofreceiptofthemessage. Theexpirationtimeforthemessagesisreached.
Non-durable Subscriptions
Nondurablesubscriptionsallowsubscriberstoreceivemessagesontheirchosentopic,only ifthemessagesarepublishedwhilethesubscriberisactive.Yougenerallyusethistypeof subscriptionforanykindofdatathatistimesensitive,suchasfinancialinformation.
Administered Objects
Administeredobjectsarepreconfiguredobjectsthatanadministratorcreatesforusewith JMSclientprograms.Administeredobjectsserveasthebridgebetweentheclientcode andtheJMSprovider.
24
2. JMS Basics
25
2. JMS Basics
Connections
AconnectionobjectisanactiveconnectionfromaclienttoitsJMSprovider.InJMS, connectionssupportconcurrentuse.Aconnectionservesthefollowingpurposes: AconnectionencapsulatesanopenconnectionwithaJMSprovider.Ittypically representsanopenTCP/IPsocketbetweenaclientandtheserviceprovidersoftware. Thecreationofaconnectionobjectisthepointwhereclientauthenticationtakesplace. Aconnectionobjectcanspecifyauniqueclientidentifier. AconnectionobjectsupportsausersuppliedExceptionListenerobject. Aconnectionshouldalwaysbeclosedonceitsuseisnolongerrequired.
Sessions
Asessionobjectisasinglethreadedcontextforproducingandconsumingmessages.Ifa clientusesdifferentthreadsfordifferentpathsofmessageexecution,thenasessionmust becreatedforeachofthethreads. Asessionisusedtocreatemessageproducers,messageconsumers,temporarytopics,and temporaryqueues;italsosuppliesprovideroptimizedmessagefactories. InJMS,asessionprovidesthecontextforgroupingasetofsendandreceivemessagesinto atransactionalunit.
Message Producer
Amessageproducerisanobjectthatasessioncreatestosendmessagestoadestination(a topicoraqueue).
Message Consumer
Amessageconsumerisanobjectthatasessioncreatestoreceivemessagessenttoa destination.Amessageconsumerallowsaclienttoregisterinterestinadestination, whichmanagesthedeliveryofmessagestotheregisteredconsumersofthatdestination.
Message Selector
Aclientmaywanttoreceivesubsetsofmessages.Amessageselectorallowsaclienttofilter themessagesitwantstoreceivebyuseofaSQL92stringexpressioninthemessage header.Thatexpressionisappliedtopropertiesinthemessageheader(nottothemessage bodycontent)containingthevaluetobefiltered. IftheSQLexpressionevaluatestotrue,themessageissenttotheclient;iftheSQL expressionevaluatestofalse,itdoesnotsendthemessage.
26
2. JMS Basics
Messages
Messagesareobjectsthatcommunicateinformationbetweenclientapplications.Following aredescriptionsofseveralkeyconceptsrelatedtoJMSmessages.
Message Structure
Messagesarecomposedofthefollowingparts: Header.Allmessagessupportthesamesetofheaderfields.Headerfieldscontain predefinedvaluesthatallowclientsandproviderstoidentifyandroutemessages. Eachofthefieldssupportsitsownsetandgetmethodsformanagingdata;some fieldsaresetautomaticallybythesendandpublishmethods,whereasothersmust besetbytheclient. Examplesofheaderfieldsinclude:
JMSDestination,whichholdsadestinationobjectrepresentingthe
destinationtowhichthemessageistobesent.
JMSMessageID,whichholdsauniquemessageidentifiervalueandisset
automatically.
JMSCorrelationID,whichisusedtolinkareplymessagewithitsrequesting
message.Thisvalueissetbytheclientapplication.
JMSReplyTo,whichissetbytheclientandtakesasavalueaDestinationobject
representingwherethereplyisbeingsent.Ifnoreplyisbeingsent,thisfieldisset tonull. SeethedescriptionoftheMessageinterfaceintheJavaMessageService,Version1.1 specificationforinformationaboutthecompletesetofmessageheaderfieldsandthe methodsforsettingandgettingtheirdata. Properties (optional).Propertiesareusedtoaddoptionalfieldstothemessageheader. Thereareseveraltypesofmessagepropertyfields. Applicationspecificpropertiesaretypicallyusedtoholdmessageselectorvalues. Messageselectorsareusedtofilterandroutemessages. Standardproperties.TheAPIprovidessomepredefinedpropertynamesthata providermaysupport.SupportfortheJMSXGroupIDandJMSXGroupSeqis required;however,supportforallotherstandardpropertiesisoptional. Providerspecificpropertiesareuniquetothemessagingproviderandtypicallyrefer tointernalvalues. Body (optional).JMSdefinesvarioustypesofmessagebodyformatsthatarecompatible withmostmessagingstyles.Eachformisdefinedbyamessageinterface:
StreamMessage.AmessagewhosebodycontainsastreamofJavaprimitive values.Itisfilledandreadsequentially.
27
2. JMS Basics
MapMessage.Amessagewhosebodycontainsasetofnamevaluepairswhere namesareStringsandvaluesareJavaprimitivetypes.Theentriescanbeaccessed sequentiallybyenumeratororrandomlybyname.Theorderoftheentriesis undefined. TextMessage.Amessagewhosebodycontainsajava.lang.String. ObjectMessage.AmessagethatcontainsaSerializableJavaobject. BytesMessage.Amessagethatcontainsastreamofuninterpretedbytes.This messagetypeisforliterallyencodingabodytomatchanexistingmessage format.Inmanycases,itwillbepossibletouseoneoftheother,selfdefining, messagetypesinstead.
BothStreamMessageandMapMessagesupportthesamesetofprimitivedatatypes. Conversionsfromonedatatypetoanotherarepossible.
Message Acknowledgment
Amessageisnotconsideredtobesuccessfullyconsumeduntilitisacknowledged. Dependingonthesessionacknowledgmentmode,themessagingprovidermaysenda messagemorethanoncetothesamedestination.Thereareseveralmessage acknowledgmentconstants: Value
AUTO_ACKNOWLEDGE
CLIENT_ACKNOWLEDGE
DUPS_OK_ACKNOWLEDGE
28
The JMS Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Sending a JMS Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Sending a JMS Message and Waiting for a Reply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Replying to a JMS Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Receiving a JMS Message Using Built-In Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Sending a JMS Message as Part of a Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Setting Properties in a JMS Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
29
30
com.wm.app.b2b.server.jms.producer.ProducerFacade.createTextMessage(String) TheJavaservicecallingthisAPImustreturnanObjectoftypejavax.jms.Message, whichcanthenbemappedtotheJMSMessage/body/messageinputparameterofthe pub.jms:sendservice. Whencreatingthejavax.jms.Messagewiththe com.wm.app.b2b.server.jms.producer.ProducerFacade,youcanusethe javax.jms.Messagesettermethodstosetthevaluesofthemessageheadersand propertiesdirectly.Youcanalsosetthevalueofmessageheadersandproperties usingtheinputparametersofthepub.jms* servicethatyouusetosendthemessage.If yousetthemessageheadersandpropertiesbothways,thevaluesprovidedtothe pub.jms* servicetakeprecedence. Software AGrecommendsthatyouuseapub.jms*servicetocreateandsendtheJMS message.Thismayprovidebetterperformanceonaverage.However,ifyouwantto sendaStreamMessageoraMapMessage,youneedtousetheappropriate com.wm.app.b2b.server.jms.producer.ProducerFacadeAPI. 3 Invoke pub.jms:send.ThisservicecreatesaJMSmessage(javax.jms.Message)basedon inputprovidedtotheserviceortakesanexistingJMSmessageandsendsittotheJMS provider. Specify the JMS connection alias.TheJMSconnectionaliasindicateshowIntegration ServerconnectstotheJMSprovider. Name connectionAliasName Description NameoftheJMSconnectionaliasthatyouwanttouseto sendthemessage.
Specify the destination to which you want to send the message. IftheJMSconnectionaliasyouspecifiedinstep4usesthenativewebMethodsAPIto createtheconnectiondirectlyonthewebMethodsJMSProvider,youneedtospecify thedestinationNameaswellasthedestinationType
31
Name destinationName
Description NameorlookupnameoftheDestinationtowhichyouwantto sendthemessage. SpecifythelookupnameoftheDestinationobjectwhen theJMSconnectionaliasusesJNDItoretrieve administeredobjects. SpecifytheproviderspecificnameoftheDestination whentheJMSconnectionaliasusesthenative webMethodsAPItoconnectdirectlytothewebMethods JMSProvider.
destinationType
SpecifieswhethertheDestinationisaqueueoratopic.The defaultisqueue.
Set values for the header fields in the JMS message.Alloftheheaderfieldsareoptional. Name deliveryMode Description Specifiesthemessagedeliverymodeforthemessage.Specify oneofthefollowing:
PERSISTENT providesonceandonlyoncedeliveryforthe message.ThemessagewillnotbelostifaJMSprovider failureoccurs. NON_PERSISTENT providesatmostoncedeliveryforthe message.Themessagehasnoguaranteeofbeingsavedifa JMSproviderfailureoccurs.
ThedefaultisPERSISTENT priority Specifiesthemessagepriority.JMSdefinesprioritylevelsfrom 0to9,with0asthelowestpriorityand9asthehighest. Thedefaultis4. timeToLive Specifiesthelengthoftime,inmilliseconds,thattheJMS providerretainsthemessage. Thedefaultis0,meaningthatthemessagedoesnotexpire. JMSType Messagetypeidentifierforthemessage.
32
Set values for the Integration Server-specific properties. Thepropertiesfieldsareoptional fieldsaddedtothemessageheaderandareoftenusedtoholdmessageselector values.IntegrationServeraddsthefollowingpropertiestoJMSmessagesitsends. Youcansetthesevaluesasfollows. Name activation Description SpecifiestheactivationIDforthemessage.AJMStriggeruses theactivationIDtojointogethermessagesitreceives.For moreinformationaboutsettingtheactivation,seeAssigning anActivationtoaJMSMessageonpage 46. Specifiesauniversallyuniqueidentifierforamessage.For moreinformationaboutsettingaUUID,seeSettingthe UUIDonpage 47.
uuid
Ifyoucreatedajavax.jms.Messageandyousetthemessagepropertyfieldsusingthe javax.jms.Messagesettermethods,youdonotneedtoprovideinputstothefieldsin JMSMessage/properties.Ifyoudosetmessagepropertyfieldsusingbothapproaches, IntegrationServerusesthevaluesprovidedasinputtothepub.jms:sendservice. 8 Add any custom properties to the JMS message. ToaddanewpropertytoJMSMessage/properties,click onthePipelinetab. Selectadatatypeforthepropertyandassignitaname.Makesuretoplacethenew propertyintheJMSMessage/propertiesfield. Assignavaluetoanycustompropertiesthatyouadd. 9 Map data to the body of the JMSMessage document. Specifically,mapthefieldthatcontains thedatayouwanttoincludedinthemessagebodytothefieldinJMSMessage/body withtheappropriatedatatype. Map to this field... string bytes object data If you... UsedafieldoftypeStringforthemessagebodycontent Usedaonedimensionalbytearrayforthemessagebody content. UsedaSerializableJavaobjectforthemessagebodycontent. UsedaDocument(IData)fortheJMSmessagebodycontent. KeepinmindthattheIDatamessageformatcanonlybeused whensendingaJMSmessagefromoneIntegrationServerto another. UsedaJavaservicetocreateanobjectoftype javax.jms.Message.
message
33
10 Specify client side queueing. Whenclientsidequeueingisenabled,IntegrationServer placesmessagesintheclientsidequeueiftheJMSproviderisnotavailableatthetime thepub.jms:send serviceexecutes. Name useCSQ Description IndicateswhetherIntegrationServerplacesthesentmessage intheclientsidequeueiftheJMSproviderisnotavailableat thetimethemessageissent
TruespecifiesthatIntegrationServerwritesmessagesto theclientsidequeueiftheJMSproviderisnotavailableat thetimethisserviceexecutes.WhentheJMSprovider becomesavailable,IntegrationServersendsmessages fromtheclientsidequeuetotheJMSprovider. FalseindicatesthatIntegrationServerthrowsan
34
Specify the destination to which you want to send the message. IftheJMSconnectionaliasyouspecifiedinstep 4usesthenativewebMethodsAPIto createtheconnectiondirectlyonthewebMethodsJMSProvider,youneedtospecify thedestinationNameaswellasthedestinationType. Name destinationName Description NameorlookupnameoftheDestinationtowhichyouwantto sendthemessage. SpecifythelookupnameoftheDestinationobjectwhen theJMSconnectionaliasusesJNDItoretrieve administeredobjects. SpecifytheproviderspecificnameoftheDestination whentheJMSconnectionaliasusesthenative webMethodsAPItoconnectdirectlytothewebMethods JMSProvider. destinationType SpecifieswhethertheDestinationisaqueueoratopic.The defaultisqueue.
Specify the destination to which message recipients should send the reply message. (Optional) Ifyoudonotspecifyadestinationforreplymessages,IntegrationServerusesa temporaryQueuetoreceivethereply.AtemporaryQueueisaqueueobjectcreatedfor thedurationofaparticularconnection.
35
IftheJMSconnectionaliasyouspecifiedinstep 4usesthenativewebMethodsAPIto createtheconnectiondirectlyonthewebMethodsJMSProvider,youneedtospecify thedestinationNameReplyToaswellasthedestinationTypeReplyTo. Name destinationNameReplyTo Description NameorlookupnameoftheDestinationtowhichyou wantthereplymessagesent. SpecifythelookupnameoftheDestinationobject whentheJMSconnectionaliasusesJNDItoretrieve administeredobjects. Specifytheproviderspecificnameofthe DestinationwhentheJMSconnectionaliasusesthe nativewebMethodsAPItoconnectdirectlytothe webMethodsJMSProvider. destinationTypeReplyTo SpecifieswhethertheDestinationisaqueueoratopic. Thedefaultisqueue.
Set the request timeout. ThetimeoutindicateshowlongIntegrationServerwaitsfora replymessage.Thetimeoutparameteronlyappliestosynchronoussendandwait requests. Name timeout Description Timetowait(inmilliseconds)fortheresponsetoarrive.If novalueisspecified,theservicedoesnotwaitatall.
8 9
Populate the JMS message. TopopulatetheJMSmessageheader,properties,andbody, followsteps59inthesectionHowtoSendaJMSMessageonpage 30. Determine whether the request is synchronous or asynchronous. Thepub.jms:sendAndWait providesaparameterthatyoucansettoindicatewhethertherequestissynchronous orasynchronous.Bydefault,therequestissynchronous.
36
Name async
request/reply.Aftersendingthemessage, IntegrationServerwaitsforareplybeforeexecuting thenextstepintheflowservice. ThedefaultisFalse. 10 Specify client side queueing. Whenclientsidequeueingisenabled,IntegrationServer placesmessagesintheclientsidequeueiftheJMSproviderisnotavailableatthetime thepub.jms:send serviceexecutes. Clientsidequeueingcanbeusedwithasynchronousrequestsonly. Name useCSQ Description IndicateswhetherIntegrationServerplacesthesentmessage intheclientsidequeueiftheJMSproviderisnotavailableat thetimethemessageissent
TruespecifiesthatIntegrationServerwritesmessagesto theclientsidequeueiftheJMSproviderisnotavailableat thetimethisserviceexecutes.WhentheJMSprovider becomesavailable,IntegrationServersendsmessages fromtheclientsidequeuetotheJMSprovider. FalseindicatesthatIntegrationServerthrowsan
37
Specifythefollowinginputvaluesforthepub.jms:waitForReplyservice. Name correlationID Description Auniqueidentifierusedtoassociatethereplymessagewith theinitialrequest.IntegrationServerusesthevalueoftheuuid orJMSMessageIDfieldsintherequestingJMSmessageto correlatetheresponsetotherequest IfyousettheuuidintheJMSmessagerequest,youcan linkthevalueoftheuuidfieldfromtheJMSMessage producedbypub.jms:sendAndWaittothecorrelationID. Ifyoudidnotspecifyauuid,youcanlinkthe JMSMessageIDfieldfromtheJMSMessageproducedby pub.jms:sendAndWaittothecorrelationID. timeout Optional.Timetowait(inmilliseconds)forthereplytoarrive. Ifnovalueisspecified,theservicedoesnotwaitforareply.
38
2 3
message
39
Specify the destination from which you want to receive the message.Specifythe messagesthatyouwanttheconsumertoreceivebyselectingadestinationandby creatingamessageselector.Amessageselectorisanfilterthatisevaluatedbythe JMSprovider.Ifamessagedoesnotmeetthecriteriaspecifiedinthefilter,the consumerdoesnotreceivethemessage.Useamessageselectorreceiveasubsetof messagesfromadestination.
40
Name destinationName
Description NameorlookupnameoftheDestinationfromwhich youwanttoreceivethemessage. SpecifythelookupnameoftheDestinationobject whentheJMSconnectionaliasusesJNDIto retrieveadministeredobjects. Specifytheproviderspecificnameofthe DestinationwhentheJMSconnectionaliasuses thenativewebMethodsAPItoconnectdirectlyto thewebMethodsJMSProvider.
destinationType
messageSelector
durableSubscriberName
Optional.Nameofthedurablesubscriberthatyou wantthisservicetocreate/useontheJMSprovider.A durablesubscribercreatesadurablesubscriptionon theJMSprovider.Ifadurablesubscriberofthisname alreadyexistsontheJMSprovider,thisservice resumesthepreviouslyestablishedsubscription. Note: Thisparameteronlyapplieswhenthe destinationTypeissettoTOPIC.IfyouselectTOPIC,but donotspecifyadurableSubscriberName,thisservice createsanondurablesubscriber.IfdestinationTypeisset toQUEUE,thisparameterisignored.
41
acknowledgethereceiptofmessages,which reducessystemoverheadbutmayresultin duplicatemessagesbeingsent. ThedefaultisAUTO_ACKNOWLEDGE. d Indicate whether locally published messages are ignored.IfyouspecifiedTOPICasthe destinationType,youcanconfigureaconsumertoignoremessagespublishedusing thesameJMSconnectionaliasusedbytheconsumer. IntegrationServerconsidersamessagetobelocalifitis: SentbythesameIntegrationServer,and SentusingthesameJMSconnectionalias. Name noLocal Description Indicateswhethertheconsumerignoreslocally publishedmessages:
True indicatestheconsumerwillnotreceive
locallypublishedmessages.
False indicatestheconsumercanreceivelocally publishedmessages
42
InthePipelinetab,makesuretheconsumercreatedbythepub.jms:createConsumer serviceislinkedtothe pub.jms:receiveserviceinputparameterconsumer.Developer shouldlinktheseautomatically. SpecifyhowlongtheconsumershouldwaittoreceiveamessagefromtheJMS provider. Name timeout Description Specifiesthetimetowait,inmilliseconds,foramessagetobe receivedfromtheJMSprovider. Ifyouspecify0(zero),theconsumerwillnotwait. Thedefaultis0(zero). 4 Process the received JMS message.Invokeaserviceorasequenceofservicestoprocess themessagereceivedfromtheJMSprovider.InthePipelinetab,linktheJMSMessage returnedbypub.jms:receivetotheinputfortheservicethatprocessesthemessage. Ifthetimeoutperiodelapsesbeforeamessageisreceived,thevalueofJMSMessageis null.Makesuretocodeyourservicetohandlethissituation. 5 Invoke pub.jms:acknowledge. Iftheacknowledgmentmodeoftheconsumerthatreceived themessageissettoCLIENT_ACKNOWLEDGEusethepub.jms:acknowledgeserviceto acknowledgethemessagetotheJMSprovider.Amessageisnotconsideredtobe successfullyconsumeduntilitisacknowledged. Providethefollowinginputparameter. Name message Description Ajavax.jms.Messageobjectthatidentifiesthemessagefor whichyouwantIntegrationServertosendan acknowledgementtotheJMSprovider. YoucanmapthevalueoftheJMSMessage/body/messagefieldin theJMSmessageretrievedbythe pub.jms:receive servicetothis field. Ifyouusetheconsumercreatedbythepub.jms:createConsumerservicetoreceivemultiple messages,keepinmindthatacknowledgingamessageautomaticallyacknowledges thereceiptofallmessagesreceivedinthesamesession.Thatis,allmessagesreceived bythesameconsumerwillbeacknowledgedwhenjustoneofthereceivedmessagesis acknowledged.Therefore,iftheconsumerreceivesmultiplemessages,invokethe pub.jms:acknowledgeserviceafterprocessingallofthereceivedmessages. Anymessageconsumerscreatedduringtheexecutionofaservicewillbeclosed automaticallywhentheservicecompletes.Iftheconsumercloseswithout
43
acknowledgingmessages,messagesareimplicitlyrecoveredbacktotheJMS provider.
44
rollsbackthetransactionwhenoneoftheserviceswithinthetransactionfailswith anytypeofexception.
Ifyoudonotusepub.art.transaction:startTransactiontostartanexplicittransaction, IntegrationServerstartsanimplicittransactionwhenitexecutesapub.jms:sendservice thatspeechifiesatransactedJMSconnectionalias. 4 5 Invoke pub.jms:send.ThisservicetakestheJMSmessageyoucreatedandsendsittothe JMSprovider. Specify the JMS connection alias.TheJMSconnectionaliasindicateshowIntegration ServerconnectstotheJMSprovider. Name connectionAliasName Description NameoftheJMSconnectionaliasthatyouwanttouseto sendthemessage. ThespecifiedJMSconnectionaliasmusthaveatransaction typeofLOCAL_TRANSACTIONor XA_TRANSACTION,dependingonthekindof transaction. 6 Finish supplying inputs to the pub.jms:send service.Followsteps59underHowtoSenda JMSMessageonpage 30.
45
7 8
Add any additional services to the transaction. Forexample,youmightwanttoinvoke anotherbuiltinJMSserviceoranadapterservice. Insert logic to commit and/or rollback the transaction explicitly. Youmaybuildyourservice tocommitthetransactionifallservicesexecutesuccessfullyandtorollbackthe transactionifallservicesdonotexecutesuccessfully. Invokepub.art.transaction:commitTransactiontocommitthetransactionandsendthe JMSmessage.OnthePipelinetab,mapthecontentsof startTransactionOutput/transactionNametocommitTransactionInput/transactionName. Invokepub.art.transaction:rollbakTransactiontorollbackthetransaction.Themessage willnotbesenttotheJMSprovider.OnthePipelinetab,mapthecontentsof startTransactionOutput/transactionNametorollbackTransactionInput/transactionName. Ifyoudonotspecificallyinvokepub.art.transaction:commitTransactionor pub.art.transaction:rollbakTransaction,IntegrationServerimplicitlycommitsthetransaction whentheserviceswithinthetransactionaresuccessful.IntegrationServerimplicitly rollsbackthetransactionwhenoneoftheserviceswithinthetransactionfailswith anytypeofexception.
46
BecauseaJMStriggercanreceivemultiplemessagesfromthedestinations,Integration Serverusestheactivationvaluetoidentifythesetofmessagesprocessedbyaninstanceof ajoin. ForanAll(AND)join,IntegrationServerwaitsuntilitreceivesmessageswiththe sameactivationfromeachdestinationbeforeexecutingtheroutingrule. ForanOnlyone(XOR)join,IntegrationServerexecutestheroutingruleafterit receivesamessagefromanydestinationinthejoin;however,theJMStriggerdiscards messageswiththesameactivationreceivedfromtheotherdestinationsforthe durationofthejointimeout. ForanAny(OR)join,IntegrationServerexecutestheroutingrulewhenitreceives messagesfromanydestinationinthejoin.IntegrationServerdoesnotusethe activationvaluewhenprocessingJMStriggerswithanAny(OR)join. WhentheJMStriggerreceivesmessageswithadifferentactivationfromonethe destinations,IntegrationServertreatsitasanotherinstanceofthejoin. IntegrationServerstorestheactivationintheactivationfieldofaJMSmessage,specifically, JMSMessage/properties/activation.TheactivationfieldisoftypeString.Youassignan activationtoamessagemanually.IntegrationServerdoesnotassignanactivation automatically.
47
48
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Overview of Building a JMS Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 JMS Trigger Service Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Creating a JMS Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Enabling or Disabling a JMS Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Setting an Acknowledgment Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Setting a Join Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Specifying the Execution User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Specifying Message Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Handling Fatal Errors for Non-Transacted JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Handling Transient Errors for Non-Transacted JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Generating Events for JMS Retrieval Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Debugging a JMS Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Building JMS Triggers with Multiple Routing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
49
Introduction
AJMStriggerspecifiesthedestinations(queuesortopics)onaJMSproviderfromwhich theJMStriggerwouldliketoreceivemessages.TheJMStriggeralsocontainsrouting rules,whichspecifytheservicethatIntegrationServerinvokestoprocessamessage receivedbytheJMStrigger.
Description Create a new JMS trigger on Integration Server. Duringthisstage,youuse DevelopertocreatethenewJMStriggerontheIntegrationServerwhere youwilldoyourdevelopmentandtesting.Formoreinformation,see CreatingaJMSTriggeronpage 51. Specify a JMS connection alias.Duringthisstage,youspecifytheJMS connectionaliasthatIntegrationServerusestocreateconnectionstothe JMSprovider.ThetransactiontypeoftheJMSconnectionaliasdetermines whetherornottheJMStriggerreceivesandprocessesmessagesaspartof transaction. Specify JMS destinations and message selectors. Duringthisstage,youspecify thedestinations(queuesortopics)ontheJMSprovidertowhichtheJMS triggersubscribes.Thatis,thedestinationisthesourceofthemessages thattheJMStriggerconsumes.Youalsospecifyanymessageselectorsthat youwanttheJMSprovidertousetofilterthemessagesitenqueuesforthe JMStrigger. Create routing rules. Duringthisstage,youspecifytheservicethat IntegrationServerinvokeswhentheJMStriggerreceivesmessages.You canalsospecifyalocalfilterthatIntegrationServerappliestomessages. Set JMS trigger properties. Duringthisstage,youdeterminethetypeof messageprocessing,theacknowledgementmode,fatalandtransienterror handling,andexactlyonceprocessing. Test and debug the JMS trigger. Duringthisstage,youtestanddebugthe triggerusingthetoolsprovidedbyIntegrationServer.Formore information,seeDebuggingaJMSTriggeronpage 73.
50
BeforeaJMStriggercanbeenabled,thetriggerservicemustalreadyexistonthesame IntegrationServer.Additionally,thesignatureforthetriggerservicemustreferenceoneof thefollowingspecifications: Usepub.jms:triggerSpecasthespecificationreferenceifthetriggerservicewillprocess onemessageatatime. Usepub.jms:batchTriggerSpecasthespecificationreferenceifthetriggerservicewill processmultiplemessagesatonetime.Thatis,thetriggerservicewillreceiveabatch ofmessagesasinputandprocessallofthosemessagesinasingleexecution.Atrigger thatreceivesandprocessesabatchofmessagesissometimesreferredtoasabatch trigger. Formoreinformationaboutbatchtriggers,seeProcessingMessagesinBatcheson page 63.
51
AJMStriggerthatcontainsanAll(AND)orOnlyone(XOR)joincanonlyhaveone routingruleandcannothaveabatchprocessingsize(Max batch messagesproperty) greaterthan1.AJMStriggerwithanAny(Or)joincanhavemultipleroutingrules. Formoreinformationaboutbatchprocessing,seeProcessingMessagesinBatches onpage 63. TouseAll(AND)orOnlyone(XOR)joins,theISInternalaliasneedstopointtoan externaldatabase.Formoreinformationaboutsettingupanexternaldatabase,seethe webMethodsInstallationGuide. To create a JMS trigger 1 2 3 OntheFilemenu,clickNew. IntheNewdialogbox,selectTrigger,andclickNext. IntheNewTriggerdialogbox,dothefollowing: a b InthelistnexttoFolder,selectthefolderinwhichyouwanttosavethetrigger. IntheNamefield,typeanameforthetriggerusinganycombinationofletters, and/ortheunderscorecharacter.Foralistofreservedwordsandsymbolsor elementnames,seethewebMethodsDeveloperUsersGuide. ClickNext. InthenewTriggerNamedialogbox,selectJMS TriggerandclickFinish. DevelopergeneratesthenewtriggeranddisplaysitintheDeveloperwindow. 4 5 IntheJMStriggereditor,intheJMS Connection Alias Namefield,click .
c d
IntheSelectaJMSconnectionaliasfortriggerNamedialogbox,selecttheJMS connectionaliasthatyouwantthisJMStriggertousetoreceivemessagesfromthe JMSprovider.ClickOK.DevelopersetstheTransaction typepropertytomatchthe transactiontypespecifiedfortheJMSconnectionalias. IfaJMSconnectionaliashasnotyetbeenconfiguredonIntegrationServer,Developer displaysamessagestatingtheJMSsubsystemhasnotbeenconfigured.For informationabutcreatingaJMSconnectionalias,seeWorkingwithJMSConnection Aliasesonpage 13.
6 7
UnderJMSdestinationsandmessageselectors,click
52
theDestinationwhentheJMSconnectionaliasusesthenativewebMethodsAPI toconnectdirectlytothewebMethodsJMSProvider. b IntheDestination Typecolumn,selectthetypeofdestination: Select... Queue If... Thedestinationisaqueue. Thisisthedefault. Topic c Thedestinationisatopic.
IntheJMS Message Selector column,click .IntheJMSMessageSelectordialog box,entertheexpressionthatyouwanttousetoreceiveasubsetofmessages fromthisdestinationandclickOK. AmessageselectorisafilterevaluatedbytheJMSprovider.Ifamessagedoesnot meetthecriteriaspecifiedinthemessageselector,theJMStriggerdoesnotreceive themessage.FormoreinformationaboutcreatingaJMSmessageselector,see CreatingaMessageSelectoronpage 56.
8 9
53
Any (OR)
IntegrationServertoinvokethetriggerservicewhenthe triggerreceivesamessagefromanyofthespecified destinations. Thisisthedefaultjointype. Note: UsinganAny(OR)joinissimilartocreatingmultiple JMStriggersthatlistentodifferentdestinations.WhileaJMS triggerwithanAny(OR)joinwillusefewerresources(a singlethreadwillpolleachdestinationformessages),itmay causeadecreaseinperformance(itmaytakelongerforone threadtopollmultipledestinations).
10 UnderMessagerouting,click
toaddanewroutingrule.
11 Createaroutingrulebyprovidingthefollowinginformation: a b IntheNamecolumn,typeanamefortheroutingrule.BydefaultDeveloper assignsthefirstrulethenameRule1. IntheServicecolumn,click tonavigatetoandselecttheservicethatyouwant toinvokewhenIntegrationServerreceivesmessagesfromthespecified destinations. IntheLocal Filtercolumn,click toenterthefilterthatyouwantIntegration ServertoapplytomessagesthisJMStriggerreceives.
54
IntegrationServerevaluatesalocalfilterafteritreceivesthemessagefromthe JMSprovider.Formoreinformationaboutcreatingalocalfilter,seeCreatinga LocalFilteronpage 56. 12 InthePropertiespanel,setpropertiesfortheJMStrigger. Property group or name... Enabled Acknowledgement mode Join expires and Expire after Execution user Message processing Fatal error handling Transient error handling Exactly once Permissions Refer to... EnablingorDisablingaJMSTriggeronpage 57 SettinganAcknowledgmentModeonpage 58 SettingaJoinTimeoutonpage 59 SpecifyingtheExecutionUseronpage 61 SpecifyingMessageProcessingonpage 62 HandlingFatalErrorsforNonTransactedJMS Triggersonpage 65 HandlingTransientErrorsforNonTransactedJMS Triggersonpage 66 Chapter 6,ExactlyOnceProcessingforJMSTriggers webMethodsDeveloperUsersGuide
13 OntheFilemenu,clickSave. Notes: WhenyouselectTopicasthedestinationtypeandspecifyadurablesubscriber name,IntegrationServercreatesaadurablesubscriberfortheJMStriggerontheJMS provider.Adurablesubscriberestablishesadurablesubscriptionwithauniqueidentity ontheJMSprovider.Adurablesubscriptionallowssubscriberstoreceiveallthe messagespublishedonatopic,includingthosepublishedwhilethesubscriberis inactive(forexample,iftheJMStriggerisdisabled).WhentheassociatedJMStrigger isdisabled,theJMSproviderholdsthemessagesinnonvolatilestorage.Ifadurable subscriptionalreadyexistsforthespecifieddurablesubscriberontheJMSprovider, thisserviceresumesthesubscription. WhenyouselectTopicasthedestinationtype,butdonotspecifyadurable subscribername,IntegrationServercreatesanondurablesubscriberfortheJMS trigger. Anondurablesubscriptionallowssubscriberstoreceivemessagesontheirchosen topiconlyifthemessagesarepublishedwhilethesubscriberisinactive.Anon durablesubscriptionlaststhelifetimeofitsmessageconsumer. IntegrationServerusesaconsumertoreceivemessagesforaJMStrigger.This consumerencapsulatestheactualjavax.jms.MessageConsumerandjavax.jms.Session.
55
NotethateventhoughthepropertiesfieldisachildoftheJMSMessagedocument,the JMSMessagedocumentdoesnotneedtoappearinthefilterexpression.
56
Thefollowingfiltermatchesthosemessageswherethedatadocumentwithinthe JMSMessagebodydocumentcontainsafieldnamedmyFieldwhosevalueisA:
%body/data/myField% == A
Disabled Suspended
To enable or disable a JMS trigger 1 2 IntheNavigationpanel,opentheJMStriggerthatyouwanttoenableordisable. InthePropertiespanel,underGeneral,settheEnabledpropertytooneofthefollowing: Select... True False 3 To... EnableaJMStriggerthatiscurrentlydisabled. DisableaJMStriggerthatiscurrentlyenabled.
OntheFilemenu,clickSave.
57
Notes: WhenyoudisableaJMStrigger,IntegrationServerinterruptsanyserverthreadsthat areprocessingmessages.IftheJMStriggeriscurrentlyprocessingmessages, IntegrationServerwaits3secondsbeforeforcingtheJMStriggertostopprocessing messages.Ifitdoesnotcompletewithin3seconds,IntegrationServerstopsthe messageconsumerusedtoreceivemessagesfortheJMStriggerandclosestheJMS consumer.AtthispointtheserverthreadfortheJMStriggermaycontinuetorunto completion.However,theJMStriggerwillnotbeabletoacknowledgethemessage whenprocessingcompletes.Ifthemessageispersistent,thiscanleadtoduplicate messages. YoucandisableoneormoreJMStriggersusingthepub.triggers:disableJMSTriggers service. YoucanenableoneormoreJMStriggersusingthepub.triggers:enableJMSTriggersservice. Youcanenable,disable,andsuspendoneormoreJMStriggersusingIntegration ServerAdministrator.Formoreinformation,seeEnabling,Disabling,and SuspendingJMSTriggersonpage 106.
58
InthePropertiespanel,underGeneral,selectoneofthefollowingforAcknowledgment mode: Select... AUTO_ACKNOWLEDGE To... Automaticallyacknowledgethemessagewhen itisreceivedbytheJMStrigger.Integration Serverwillacknowledgethemessagebeforethe triggercompletesprocessing.TheJMSprovider cannotredeliverthemessageifIntegration Serverbecomesunavailablebeforemessage processingcompletes. Acknowledgeorrecoverthemessageonlyafter theJMStriggerprocessesthemessage completely. Thisisthedefault. DUPS_OK_ACKNOWLEDGE Lazilyacknowledgethedeliveryofmessages. Thismayresultinthedeliveryofduplicate messages.
CLIENT_ACKNOWLEDGE
OntheFilemenu,clickSave.
59
60
Select... True
False
OntheFilemenu,clickSave.
61
To assign an execution user 1 2 IntheNavigationpanel,opentheJMStriggerthatyouwanttoenableordisable. InthePropertiespanel,underGeneral,intheExecution userproperty,typethenameof theuseraccountwhosecredentialsIntegrationServerusestoexecuteaservice associatedwiththeJMStrigger.Youcanspecifyalocallydefineduseraccountora useraccountdefinedinacentralorexternaldirectory. OntheFilemenu,clickSave.
Serial Processing
Inserialprocessing,IntegrationServerprocessesmessagesreceivedbyaJMStriggerone aftertheotherintheorderinwhichthemessageswerereceivedfromtheJMSprovider. IntegrationServerusesasinglethreadforreceivingandprocessingamessageforaserial JMStrigger.IntegrationServerevaluatesthefirstmessageitreceives,determineswhich routingrulethemessagesatisfies,andexecutestheservicespecifiedintheroutingrule. IntegrationServerwaitsfortheservicetofinishexecutingbeforeprocessingthenext messagereceivedfromtheJMSprovider. IfyouwanttoprocessmessagesinthesameorderinwhichJMSclientssentthemessages totheJMSprovider,youwillneedtoconfiguretheJMSprovidertoensurethatmessages arereceivedbytheJMStriggerinthesameorderinwhichthemessagesarepublished. Tip! Ifyourtriggercontainsmultipleroutingrulestohandleagroupofmessagesthat mustbeprocessedinaspecificorder,useserialprocessing.
Concurrent Processing
Inconcurrentprocessing,IntegrationServerprocessesmessagesreceivedfromtheJMS providerinparallel.Thatis,IntegrationServerprocessesasmanymessagesfortheJMS triggersasitcanatthesametime,usingaseparateserverthreadtoprocesseachmessage. IntegrationServerdoesnotwaitfortheservicespecifiedintheroutingruletofinish executingbeforeitbeginsprocessingthenextmessage.Youcanspecifythemaximum numberofmessagesIntegrationServercanprocessconcurrently.Thisequatesto specifyingthemaximumnumberofserverthreadsthatcanprocessmessagesfortheJMS triggeratonetime.
62
63
duplicatemessage,IntegrationServerdoesnotincludeitinthemessagebatchsenttothe triggerservice. Note: Thewatt.server.jms.trigger.maxDeliveryCountpropertydeterminesthe maximumnumberoftimestheJMSprovidercandeliveramessagetoaJMStrigger. IntegrationServeracknowledgesallthemessagesreceivedinabatchfromtheJMS provideratonetime.Thisincludesmessagesthatfailedpreprocessing.Accordingtothe JavaMessageService,Version1.1,whenaclientacknowledgesonemessage,theclient acknowledgesallofthemessagesreceivedbythesession.BecauseIntegrationServeruses aconsumerthatincludesajavax.jms.MessageConsumerandajavax.jms.Session,when IntegrationServeracknowledgesonemessageinthebatch,iteffectivelyacknowledgesall themessagesreceivedinthebatch. IfabatchofmessagesisnotacknowledgedortheyarerecoveredbacktotheJMS provider,theJMSprovidercanredeliverallofthemessagesinthebatchtotheJMS trigger.However,whenusingthewebMethodsJMSProvider,IntegrationServercan acknowledgeindividualmessagesthatfailpreprocessing. WhenconfiguringJMStriggerforbatchprocessing,keepthefollowinginmind: Thetriggerservicemustbecodedtohandlemultiplemessagesasinput.Thatis,the triggerservicemustusethepub.jms.batchTriggerSpecastheservicesignature. Whenreceivingabatchofmessages,IntegrationServerevaluatesthelocalfilterinthe routingruleagainstthefirstmessageinthebatchonly. TheJMStriggermustnotbepartofatransaction.TheJMSconnectionaliasspecified bythetriggermusthaveatransactiontypeofNOTRANSACTION. AJMStriggerthatcontainsanAll(AND)orOnlyone(XOR)joincannotusebatch processing.
64
Ifyouwantthistriggertoperformbatchprocessing,nexttoMax batch messages, specifythemaximumnumberofmessagesthatthetriggerservicecanreceiveatone time.Ifyoudonotwantthetriggertoperformbatchprocessing,leavethisproperty setto1.Thedefaultis1. Important! ForatransactedJMStrigger,Max batch messagesmustbesetto1.Formore informationabouttransactedJMStriggers,seeChapter 5,BuildingaTransactedJMS Trigger.
OntheFilemenu,clickSave.
65
suspendsthetrigger,youhaveanopportunitytodeterminewhythetriggerservicedid notexecutesuccessfully. YoucanhandletheexceptionthatcausesthefatalerrorbyconfiguringIntegrationServer togenerateJMSretrievalfailureeventsforfatalerrorsandbycreatinganeventhandler thatsubscribestoJMSretrievalfailureevents.IntegrationServerpassestheeventhandler thecontentsoftheJMSmessageaswellasinformationabouttheexception.Formore informationaboutJMSretrievalfailureevents,seeGeneratingEventsforJMSRetrieval Failureonpage 72. IntegrationServerhandlesfatalerrorsfortransactedJMSdifferentlythanfornon transactedJMStriggers.ForinformationaboutfatalerrorhandlingfortransactedJMS triggers,seeHandlingFatalErrorsforTransactedJMSTriggersonpage 80. To configure fatal error handling 1 2 IntheNavigationpanel,opentheJMStriggerforwhichyouwanttospecify documentprocessing. InthePropertiespanel,underFatal error handling,settheSuspend on errorpropertyto TrueifyouwantIntegrationServertosuspendthetriggerwhenatriggerserviceends withanerror.Otherwise,selectFalse.ThedefaultisFalse. OntheFilemenu,clickSave.
66
Atransienterroroccursonthebackendresourceforanadapterservice.Adapter servicesbuiltonIntegrationServer6.0orlater,andbasedontheARTframework, detectandpropagateexceptionsthatsignalaretryautomaticallyifatransienterroris detectedontheirbackendresource. YoucanconfiguretransienterrorhandlingforatriggertoinstructIntegrationServerhow andwhentoretrythetriggerservice.Thefollowingsectionsprovidemoreinformation aboutconfiguringretrybehaviorfortransienterrors. ForinformationaboutconfiguringtransienterrorhandlingforJMStriggersthatarepart ofatransaction,seeChapter 5,BuildingaTransactedJMSTrigger.
67
IfthetriggerserviceiswritteninJava,theservicecanuse com.wm.app.b2b.server.ISRuntimeException().Formoreinformationabout constructingISRuntimeExceptionsinJavaservices,seethewebMethodsIntegration ServerJavaAPIReferenceforthecom.wm.app.b2b.server.ISRuntimeExceptionclass. Whenaserviceinvokesapub.jms*servicethatsendsaJMSmessageandtheservicefails becausearesourceneededbythepub.jms*serviceisnotavailable,IntegrationServer automaticallydetectsandpropagatesanISRuntimeException. AdapterservicesbuiltonIntegrationServer6.0orlater,andbasedontheART framework,detectandpropagateexceptionsthatsignalaretryifatransienterroris detectedontheirbackendresource.Thisbehaviorallowsfortheautomaticretrywhen theservicefunctionsasatriggerservice. Note: IntegrationServerdoesnotretryatriggerservicethatfailsbecauseaservice exceptionoccurred.Aserviceexceptionindicatesthatthereissomethingfunctionally wrongwiththeservice.AservicecanthrowaserviceexceptionusingtheEXITstep.For moreinformationabouttheEXITstep,seethewebMethodsDeveloperUsersGuide.
68
Step
1 2 3
Description IntegrationServermakesthefinalretryattemptandthetriggerservicefails becauseofanISRuntimeException. IntegrationServersuspendstheJMStriggertemporarily. Note: Thechangetothetriggerstateistemporary.Messageprocessingwill resumeforthetriggerifIntegrationServerrestarts,thetriggerisenabledor disabled,orthepackagecontainingthetriggerreloads.Youcanalsoenable triggersmanuallyusingIntegrationServerAdministratororbyinvokingthe pub.trigger:enableJMSTriggersservice.
69
Step
4
Description Optionally,IntegrationServerschedulesandexecutesaresourcemonitoring service.Aresourcemonitoringserviceisaservicethatyoucreatetodetermine whethertheresourcesassociatedwithatriggerserviceareavailable.A resourcemonitoringservicereturnsasingleoutputparameternamed isAvailable. Iftheresourcemonitoringserviceindicatesthattheresourcesareavailable (thatis,thevalueofisAvailableistrue),IntegrationServerenablesthetrigger. MessageprocessingandmessageretrievalresumefortheJMStrigger. Iftheresourcemonitoringserviceindicatesthattheresourcesarenot available(thatis,thevalueofisAvailableisfalse),IntegrationServerwaitsa shorttimeinterval(bydefault,60seconds)andthenreexecutestheresource monitoringservice.IntegrationServercontinuesexecutingtheresource monitoringserviceperiodicallyuntiltheserviceindicatestheresourcesare available. Tip! Youcanchangethefrequencywithwhichtheresourcemonitoring serviceexecutesbymodifyingthevalueofthe watt.server.jms.trigger.monitoringIntervalproperty.
70
reexecutethetriggerservice.Thedefaultis0retries(thetriggerservicedoesnot retry). 3 4 IntheRetry interval property,specifythetimeperiodtheIntegrationServerwaits betweenretryattempts.Thedefaultis10seconds. SettheOn retry failurepropertytooneofthefollowing: Select... Throw exception To... SpecifythatIntegrationServershouldthrowa serviceexceptionwhenthelastallowedretryattempt endsbecauseofanISRuntimeException. Thisisthedefault. FormoreinformationabouttheThrow exception option,seeOverviewofThrowExceptionon page 68. Suspend and retry later SpecifythatIntegrationServershouldrecoverthe messagebacktotheJMSproviderandsuspendthe triggerwhenthelastallowedretryattemptends becauseofanISRuntimeException.Formore informationabouttheSuspend and retry lateroption, seeOverviewofSuspendandRetryLateron page 69. Note: IfyouwantIntegrationServertoautomatically enablethetriggerwhenthetriggersresources becomeavailable,youmustprovidearesource monitoringservicethatIntegrationServercan executetodeterminewhentoresumethetrigger.For moreinformationaboutbuildingaresource monitoringservice,seeAppendix B,Buildinga ResourceMonitoringService. 5 IfyouselectedSuspend and retry later,thenintheResource monitoring serviceproperty specifytheservicethatIntegrationServershouldexecutetodeterminetheavailability ofresourcesassociatedwiththetriggerservice.Multipletriggerscanusethesame resourcemonitoringservice.Forinformationaboutbuildingaresourcemonitoring service,seeBuildingaResourceMonitoringServiceonpage 115. OntheFilemenu,clickSave.
71
Notes: Triggersandservicescanbothbeconfiguredtoretry.Whenatriggerinvokesaservice (thatis,theservicefunctionsasatriggerservice),IntegrationServerusesthetrigger retrypropertiesinsteadoftheserviceretryproperties. WhenIntegrationServerretriesatriggerserviceandthetriggerserviceisconfigured togenerateauditdataonerror,IntegrationServeraddsanentrytotheauditlogfor eachfailedretryattempt.EachoftheseentrieswillhaveastatusofRetriedandan errormessageofNull.However,ifIntegrationServermakesthemaximumretry attemptsandthetriggerservicestillfails,thefinalauditlogentryfortheservicewill haveastatusofFailedandwilldisplaytheactualerrormessage.IntegrationServer makestheauditlogentryregardlessofwhichretryfailureoptionthetriggeruses. IntegrationServergeneratesthefollowingjournallogmessagebetweenretry attempts: [ISS.0014.0031D]ServiceserviceNamefailedwithISRuntimeException.Retryxofywill begininretryIntervalmilliseconds. Ifyoudonotconfigureserviceretryforatrigger,setthe Max retry attemptspropertyto 0.Becausemanagingserviceretriescreatesextraoverhead,settingthispropertyto0 canimprovetheperformanceofservicesinvokedbythetrigger. Youcaninvokethepub.flow:getRetryCountservicewithinatriggerservicetodetermine thecurrentnumberofretryattemptsmadebyIntegrationServerandthemaximum numberofretryattemptsallowedforthetriggerservice.Formoreinformationabout thepub.flow:getRetryCountservice,seethewebMethodsIntegrationServerBuiltInServices Reference.
72
ThemaximumdeliverycountfromtheJMSproviderhasbeenmetforthemessage andthewatt.server.jms.trigger.raiseEventOnRetryFailurepropertyissetto true(thedefault). The watt.server.jms.trigger.maxDeliveryCountpropertyspecifiesthe maximumnumberoftimestheJMSprovidercandeliveramessagetoIntegration Server.Thedefaultis100.InaJMSmessage,thepropertyJMSXDeliveryCount specifiesthenumberoftimestheJMSproviderdeliveredthemessage.MostJMS providerssetthisvalue. Whileperformingexactlyonceprocessing,theconnectiontothedocumenthistory databaseisunavailable,andtransienterrorhandlingfortheJMStriggerisconfigured to Throw exception(nontransactedJMStrigger)orRecover only (transactedJMS trigger).Inaddition,thewatt.server.jms.trigger.raiseEventOnRetryFailure propertyissettotrue(thedefault). Whileperformingexactlyonceprocessing,thedocumentresolverserviceendswith anISRuntimeException,andtransienterrorhandlingfortheJMStriggerisconfigured to Throw exception(nontransactedJMStrigger)orRecover only (transactedJMS trigger).Inaddition,thewatt.server.jms.trigger.raiseEventOnRetryFailure propertyissettotrue(thedefault). Whileperformingexactlyonceprocessing,thedocumentresolverserviceendswith anexceptionotherthananISRuntimeException.Inaddition,the watt.server.jms.trigger.raiseEventOnRetryFailurepropertyissettotrue(the default). AservicethatfunctionsasaneventhandlerforaJMSretrievalfailureeventshoulduse thepub.event:jmsReceiveErrorEventspecificationasitsservicesignature.Formoreinformation aboutthepub.event:jmsReceiveErrorEventspecification,seethewebMethodsIntegrationServer BuiltInServicesReference.Formoreinformationaboutbuildingeventhandlers,seethe webMethodsDeveloperUsersGuide.
73
4 5 6
UnderExtended Settings,typethefollowing:
watt.server.jms.debugTrace=true
To enable debug trace logging for a specific JMS trigger 1 2 3 4 OpenIntegrationServerAdministratorifitisnotalreadyopen. IntheSettingsmenuoftheNavigationpanel,clickExtended. ClickEdit Extended Settings. UnderExtended Settings,typethefollowing:
watt.server.jms.debugTrace.triggerName=true
WheretriggerNameisthefullyqualifiednameofthetriggerintheformat folder.subfolder:triggerName. 5 6 ClickSave Changes. Disableandthenenablethetrigger. FormoreinformationaboutenablinganddisablingJMStriggersusingDeveloper,see EnablingorDisablingaJMSTriggeronpage 57.Forinformationaboutenabling anddisablingJMStriggersusingIntegrationServerAdministrator,seeEnabling, Disabling,andSuspendingJMSTriggersonpage 106.
74
Youmightwanttousemultipleroutingrulestocontrolserviceexecutionwhenaservice thatprocessesamessagedependsonsuccessfulexecutionofanotherservice.For example,toprocessapurchaseorder,youmightcreateoneservicethataddsanew customerrecordtoadatabase,anotherthataddsacustomerorder,andathirdthatbills thecustomer.Theservicethataddsacustomerordercanonlyexecutesuccessfullyifthe newcustomerrecordhasbeenaddedtothedatabase.Likewise,theservicethatbillsthe customercanonlyexecutesuccessfullyiftheorderhasbeenadded.Youcanensurethat theservicesexecuteinthenecessaryorderbycreatingatriggerthatcontainsonerouting ruleforeachexpectedmessage. UsethefollowinggeneralguidelinestobuildaJMStriggerthatperformsorderedservice execution. BecausetheJMSprovidercannotguaranteemessageorderacrossdestinations,the JMStriggermustspecifyasingledestination.Thatis,theJMStriggercannotincludea join. Eachroutingrule,exceptthelastone,mustcontainalocalfilter.Forexample,you mightcreateafilterbasedonacustompropertythatthesendingclientaddstothe message.IntegrationServerusesthelocalfilterstodifferentiatebetweenthe messages.Withoutalocalfilter,onlythefirstroutingrulewouldeverexecute. Routingrulesmustappearintheorderinwhichyouwantthemessagestobe processed.Eachroutingrulemusthaveauniquename. SettheProcessing modepropertytoserialtoensurethattheIntegrationServer processesthemessagesinthesameorderinwhichtheJMStriggerreceivesthem. Serialprocessingensuresthattheservicesthatprocessthemessagesdonotexecuteat thesametime. SetMax batch messages to1(thedefault).Whenatriggerserviceprocessesabatchof messages,IntegrationServeronlyappliesthefiltertothefirstmessageinthebatch. Important! MessagesmustbesenttoJMSproviderinthesameorderinwhichyouwantthe messagestobeprocessed.
75
76
What Is a Transacted JMS Trigger? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Overview of Building a Transacted JMS Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Handling Fatal Errors for Transacted JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Handling Transient Errors for Transacted JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
77
78
79
Description CreateanewJMStriggeronIntegrationServer. SpecifyaJMSconnectionaliaswithatransactiontypeofXA TRANSACTIONorLOCALTRANSACTION. Specifythedestination(queuesortopics)ontheJMSproviderfromwhich youwanttoreceivemessages.Youalsospecifyanymessageselectorsthat youwanttheJMSprovidertousetofiltermessagesfortheJMStrigger. CreateroutingrulesandspecifytheservicesthatIntegrationServer invokeswhentheJMStriggerreceivesmessages. SetthefollowingJMStriggerproperties: Property name... Enabled Execution user Message processing Fatal error handling Transient error handling Exactly once Permissions For additional information, see... EnablingorDisablingaJMSTriggeron page 57 SpecifyingtheExecutionUseronpage 61 SpecifyingMessageProcessingonpage 62 HandlingFatalErrorsforTransactedJMS Triggersonpage 80 HandlingTransientErrorsforTransactedJMS Triggersonpage 82 Chapter 6,ExactlyOnceProcessingforJMS Triggers webMethodsDeveloperUsersGuide
4 5
80
Step
1 2
Description ThetriggerserviceforatransactedJMStriggerfailsbecauseofaService Exception. IntegrationServerrollsbacktheentiretransactionandIntegrationServer recoversthemessagebacktotheJMSprovider.TheJMSprovidermarksthe messageasredeliveredandincrementsthevalueoftheJMSXDeliveryCount propertyintheJMSmessage. IftheJMStriggerisconfiguredtouseadocumenthistorydatabasefor exactlyonceprocessing,IntegrationServeraddsanentrywithastatusof completedforthemessagetothedocumenthistorydatabase. BecauseIntegrationServerdoesnotacknowledgethemessagewhenitis rolledback,theJMSprovidermakesthemessageavailableforredeliveryto theJMStrigger.However,amessagethatcausesatriggerservicetoend becauseofaServiceExceptiontypicallydoesnotprocesssuccessfullyupon redelivery.IntegrationServeraddsthecompletedentrysothatthe messageistreatedasaduplicatewhenitisreceivedfromtheJMSprovider. Themessageisrejectedafteritisresent. IftheJMStriggerdoesnotuseadocumenthistorydatabase,Integration Servercontinuestoreceiveandattemptmessageprocessinguntilthe messageprocessessuccessfullyorthemaximumdeliverycounthasbeen met.Themaximumdeliverycountdeterminesthemaximumnumberof timetheJMSprovidercandeliverthemessagetotheJMStrigger.Itis controlledbythewatt.server.jms.trigger.maxDeliveryCount property.
4 5
81
To configure fatal error handling for a transacted JMS trigger 1 2 IntheNavigationpanel,opentheJMStriggerforwhichyouwanttospecify documentprocessing. InthePropertiespanel,underFatal error handling,settheSuspend on errorpropertyto TrueifyouwantIntegrationServertosuspendthetriggerwhenatriggerserviceends withanerror.Otherwise,selectFalse.ThedefaultisFalse. ConfigureexactlyonceprocessingfortheJMStrigger.Formoreinformationabout configuringexactlyonceprocessing,seeConfiguringExactlyOnceProcessingon page 99. OntheFilemenu,clickSave.
82
ThefollowingsectionsprovideanoverviewofhowIntegrationServeractsineach situation.
IntegrationServerreceivesthesamemessagefromtheJMSproviderand processesthemessage. BecauseIntegrationServerreceivesthemessagealmostimmediatelyafter transactionrollback,itislikelythatthetemporaryconditionthatcaused theISRuntimeExceptionhasnotresolvedandthetriggerservicewillend withatransienterroragain.Consequently,settingOn transaction rollbackto Recover onlycouldresultinwastedprocessing. Note: IntegrationServerenforcesamaximumdeliverycount,which determinesthemaximumnumberoftimetheJMSprovidercandeliverthe messagetotheJMStrigger.Ifthemaximumdeliverycounthasbeenmet, theJMSproviderwillnotdeliverthemessagetotheJMStrigger.Instead, theJMSproviderwillacknowledgeandremovethemessage.The maximumdeliverycountiscontrolledbythe watt.server.jms.trigger.maxDeliveryCountproperty.
83
IntegrationServersuspendstheJMStriggertemporarily. TheJMStriggerissuspendedonthisIntegrationServeronly.Ifthe IntegrationServerispartofacluster,otherserversintheclustercanretrieve andprocessmessagesforthetrigger. Note: Thechangetothetriggerstateistemporary.Messageprocessingwill resumeforthetriggerifIntegrationServerrestarts,thetriggerisenabledor disabled,orthepackagecontainingthetriggerreloads.Youcanalsoenable triggersmanuallyusingIntegrationServerAdministratororbyinvokingthe pub.trigger:enableJMSTriggersservice.
84
Step
5
Description Iftheresourcemonitoringserviceindicatesthattheresourcesareavailable (thatis,thevalueofisAvailableistrue),IntegrationServerenablesthetrigger. MessageprocessingandmessageretrievalresumefortheJMStrigger. Iftheresourcemonitoringserviceindicatesthattheresourcesarenot available(thatis,thevalueofisAvailableisfalse),IntegrationServerwaitsa shorttimeinterval(bydefault,60seconds)andthenreexecutestheresource monitoringservice.IntegrationServercontinuesexecutingtheresource monitoringserviceperiodicallyuntiltheserviceindicatestheresourcesare available. Tip! Youcanchangethefrequencyatwhichtheresourcemonitoringservice executesbymodifyingthevalueofthe watt.server.jms.trigger.monitoringIntervalproperty.
85
SpecifythatIntegrationServerdoesthefollowingaftera transactionisrolledbackduetoatransienterror: SuspendstheJMStrigger Recoversthemessageafteraresourcemonitoring serviceindicatesthattheresourcesneededbythe triggerserviceareavailable FormoreinformationabouttheSuspend and recoveroption, seeOverviewofSuspendandRecoveronpage 84.
IfyouselectedSuspend and recover,intheResource monitoring serviceproperty,specify theservicethatIntegrationServershouldexecutetodeterminetheavailabilityof resourcesassociatedwiththetriggerservice.Multipletriggerscanusethesame resourcemonitoringservice.Forinformationaboutbuildingaresourcemonitoring service,seeAppendix B,BuildingaResourceMonitoringService. OntheFilemenu,clickSave.
86
Overview of Exactly-Once Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Duplicate Detection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Extenuating Circumstances for Exactly-Once Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Exactly-Once Processing and Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Configuring Exactly-Once Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Building a Document Resolver Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Viewing Exactly-Once Processing Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
87
88
Document resolver serviceisaservicecreatedbyausertodeterminethemessagestatus. Thedocumentresolverservicecanbeusedinsteadoforinadditiontothedocument historydatabase. ThestepsthatIntegrationServertakestodetermineamessagesstatusdependonthe exactlyoncepropertiesconfiguredfortheJMStrigger.Formoreinformationabout configuringexactlyonceproperties,seeConfiguringExactlyOnceProcessingon page 99. ThetablebelowsummarizestheprocessIntegrationServerfollowstodeterminea messagesstatusandtheactiontheservertakesforeachduplicatedetectionmethod.
1
Check Delivery Count Whenthetriggerisconfiguredtodetectduplicates,IntegrationServerwill checkthemessagesdeliverycounttodetermineiftheJMStriggerprocessedthe messagepreviously.Specifically,IntegrationServerchecksthevalueofthe JMSXDeliveryCountpropertyinthemessage. Delivery Count 1 Action Ifusingdocumenthistory,IntegrationServerproceeds to 2 tocheckthedocumenthistorydatabase. Ifdocumenthistoryisnotused,IntegrationServer considersthemessagetobeNew.IntegrationServer executesthetriggerservice. >1 Ifusingdocumenthistory,IntegrationServerproceeds to 2 tocheckthedocumenthistorydatabase. Ifdocumenthistoryisnotused,IntegrationServer proceedsto 3 toexecutethedocumentresolver service. Ifneitherdocumenthistorynoradocumentresolver serviceareused,IntegrationServerconsidersthe messagetobeInDoubt. 1(Undefined) Ifusingdocumenthistory,IntegrationServerproceeds to 2 tocheckthedocumenthistorydatabase. Ifdocumenthistoryisnotused,IntegrationServer proceedsto 3 toexecutethedocumentresolver service. Otherwise,IntegrationServerconsidersthemessageto beNew.IntegrationServerexecutesthetriggerservice.
89
Check Document History Ifadocumenthistorydatabaseisconfiguredandthetriggerusesittomaintain arecordofprocessedmessages,IntegrationServerchecksforthemessages UUIDinthedocumenthistorydatabase.IfthemessagedoesnothaveaUUID, IntegrationServerusesthevalueoftheJMSMessageIDfieldfromthemessage header. UUID or JMSMessageID Exists? No. Yes. Action MessageisNew.IntegrationServerexecutesthetrigger service. IntegrationServercheckstheprocessingstatusofthe entry. Iftheprocessingstatusindicatesthatmessage processingcompleted,thenIntegrationServer considersthemessagetobeaDuplicate.Integration Serveracknowledgesthemessage,butdoesnot executetriggerservice. Iftheprocessingstatusindicatesthatprocessing startedbutdidnotcomplete,IntegrationServer considersthemessagetobeInDoubt. Ifprovided,IntegrationServerproceedsto 3 to invokethedocumentresolverservice.Otherwise, IntegrationServerconsidersthemessagetobeIn Doubt.IntegrationServeracknowledgesthe message,butdoesnotexecutethetriggerservice.
Execute Document Resolver Service Ifadocumentresolverserviceisspecified,IntegrationServerexecutesthe documentresolverserviceassignedtothetrigger. Returned Status NEW DUPLICATE INDOUBT Action IntegrationServerexecutesthetriggerserviceand acknowledgesthemessage. IntegrationServeracknowledgesthemessage,butdoes notexecutethetriggerservice. IntegrationServeracknowledgesthemessage,butdoes notexecutethetriggerservice.
Thefollowingsectionsprovidemoreinformationabouteachmethodofduplicate detection.
90
Delivery Count
ThedeliverycountindicatesthenumberoftimestheJMSproviderhasdeliveredor attemptedtodeliveramessagetotheJMStrigger.MostJMSproviderstrackthemessage deliverycountintheJMSdefinedpropertyJMSXDeliveryCount.Theinitialdeliveryis1, theseconddeliveryis2,andsoforth.Adeliverycountotherthan1indicatesthatthe triggermighthavereceivedandprocessed(orpartiallyprocessed)themessagebefore. Forexample,whenIntegrationServerfirstretrievesamessageforaJMStrigger,the JMSXDeliveryCountcountis1(one).Ifaresource(JMSproviderorIntegrationServer) shutsdownbeforethetriggerprocessesandacknowledgesthemessage,Integration Serverwillretrievethemessageagainwhentheconnectionisreestablished.Thesecond timeIntegrationServerretrievesthemessage,theJMSXDeliveryCountwillbe2.Adelivery countgreaterthan1indicatesthattheJMSprovidermayhavedeliveredthemessageto thetriggerbefore. Thefollowingtableidentifiesthepossibledeliverycountvaluesandthemessagestatus associatedwitheachvalue. A delivery count of... 1 Indicates... TheJMSproviderthatdeliveredthemessagedoesnot maintainaJMSXDeliveryCountortherewasanerrorwhen retrievingtheJMSXDeliveryCount.Asaresult,thedelivery countisundefined.IntegrationServerusesavalueof1to indicatethatthedeliverycountisabsent. Ifothermethodsofduplicatedetectionareconfiguredforthis trigger(documenthistorydatabaseordocumentresolver service),IntegrationServerusesthesemethodstodetermine themessagestatus.Ifnoothermethodsofduplicatedetection areconfigured,IntegrationServerassignsthemessageastatus ofNewandexecutesthetriggerservice. 1 ThisisthefirsttimetheJMStriggerreceivedthemessage. IftheJMStriggerusesadocumenthistorytoperform duplicatedetection,IntegrationServerchecksthedocument historydatabasetodeterminethemessagestatus.Ifnoother methodsofduplicatedetectionareconfigured,Integration ServerassignsthemessageastatusofNewandexecutesthe triggerservice.
91
Indicates... TheJMSproviderhasdeliveredthemessagemorethanonce. Thetriggermightormightnothaveprocessedthemessage before.Thedeliverycountdoesnotprovideenough informationtodeterminewhetherthetriggerprocessedthe messagebefore. Ifothermethodsofduplicatedetectionareconfiguredforthis trigger(documenthistorydatabaseordocumentresolver service),IntegrationServerusesthesemethodstodetermine themessagestatus.Ifnoothermethodsofduplicatedetection areconfigured,IntegrationServerassignsthemessageastatus ofInDoubtandacknowledgesthemessage.
92
documenthistorydatabase.TheexistenceorabsenceofthemessagesUUID (JMSMessageID)canindicatewhetherthemessageisneworaduplicate. If the UUID or JMSMessageID... Doesnotexist. Then Integration Server... AssignsthemessageastatusofNewandexecutesthe triggerservice.TheabsenceoftheUUID(JMSMessageID) indicatesthatthetriggerhasnotprocessedthemessage before. AssignsthemessageastatusofDuplicate.Theexistence oftheprocessingandcompletedentriesforthe messagesUUID(JMSMessageID)indicatethetrigger processedthemessagesuccessfullyalready.Integration Serveracknowledgesthemessage,discardsit,andwrites ajournallogentryindicatingthataduplicatemessage wasreceived. Cannotdeterminethestatusofthemessageconclusively. Theabsenceofanentrywithacompletedstatusfor theUUID(JMSMessageID)indicatesthatthetrigger servicestartedtoprocessthemessage,butdidnotfinish. Thetriggerservicemightstillbeexecutingortheserver mighthaveunexpectedlyshutdownduringservice execution. IfadocumentresolverserviceisspecifiedfortheJMS trigger,IntegrationServerinvokesit.Ifadocument resolverserviceisnotspecified,IntegrationServer assignsthemessageastatusofInDoubt,acknowledges themessage,andwritesajournallogentrystatingthat anInDoubtmessagewasreceived. Existsinacompleted entryonly. DeterminesthemessageisaDuplicate.Theexistenceof thecompletedentryindicatestheJMStrigger processedthemessagesuccessfullyalready.Integration Serveracknowledgesthemessage,discardsit,andwrites ajournallogentryindicatingthataDuplicatemessage wasreceived.
Existsinaprocessing entryonly.
93
94
For a transacted JMS trigger... If On transaction rollback is set to... Suspend and recover Integration Server does the following... Ifthedocumenthistorydatabaseisproperly configured,IntegrationServersuspendstheJMS triggerandschedulesasystemtaskthatexecutesa servicethatchecksfortheavailabilityofthe documenthistorydatabase.IntegrationServer enablesthetriggerandreexecutesitwhenthe serviceindicatesthatthedocumenthistorydatabase isavailable. Ifthedocumenthistorydatabaseisnotproperly configured,IntegrationServersuspendsthetrigger, butitdoesnotscheduleasystemtasktocheckfor thedatabasesavailabilityanditdoesnotresume thetriggerautomatically.Youmustmanuallyenable theJMStriggerafterconfiguringthedocument historydatabaseproperly. Recover only GeneratesaJMSretrievalfailureeventand acknowledgesthemessage.
95
To clear expired entries from the document history database 1 2 3 4 OpenIntegrationServerAdministrator. FromtheSettingsmenuintheNavigationpanel,clickResources. ClickExactly Once Statistics. ClickRemove Expired Document History Entries.
96
97
Ifthedocumentresolverserviceincorrectlydeterminesthestatusofamessagetobe new(whenitis,infact,aduplicate),theserverprocessesthemessageasecondtime. Ifaclientsendsamessagetwice,andthesecondmessageissentafterIntegration ServerremovestheexpiredmessageUUIDentriesfromthedocumenthistorytable, IntegrationServerdeterminesthesecondmessageisnewandprocessesit.Because thesecondmessagearrivesafterthefirstmessagesentrieshavebeenremovedfrom thedocumenthistorydatabase,IntegrationServerdoesnotdetectthesecondmessage asaduplicate. IfthetimedriftbetweenthecomputershostingaclusterofIntegrationServersis greaterthantheduplicatedetectionwindowforthetrigger,oneoftheIntegration Serversintheclustermightprocessaduplicatemessage.(Thesizeoftheduplicate detectionwindowisdeterminedbytheHistory time to livepropertyunderExactly Once.) Forexample,supposetheduplicatedetectionwindowis15minutesandthattheclock onthecomputerhostingoneIntegrationServerintheclusteris20minutesaheadof theclocksonthecomputershostingtheotherIntegrationServers.Atriggerononeof theIntegrationServerswithaslowerclockprocessesamessagesuccessfullyat10:00 GMT.TheIntegrationServeraddstwoentriestothedocumenthistorydatabase.Both entriesusethesametimestampandbothentriesexpireat10:15GMT.However,the IntegrationServerwiththefasterclockis20minutesaheadoftheothersandmight reaptheentriesfromthedocumenthistorydatabasebeforeoneoftheother IntegrationServersintheclusterdoes.IftheIntegrationServerwiththefasterclock removestheentriesbefore15minuteshaveelapsedandaduplicateofthemessage arrives,theIntegrationServersintheclusterwilltreatthemessageasanewmessage. Note: Timedriftoccurswhenthecomputersthathosttheclusteredserversgradually developdifferentdate/timevalues.Eveniftheadministratorsynchronizesthe computerdate/timewhenconfiguringthecluster,thetimemaintainedbyeach computercangraduallydifferastimepasses.Toalleviatetimedrift,synchronizethe clusternodetimesregularly. InsomecircumstancesIntegrationServermightnotprocessanew,uniquemessage becauseduplicatedetectiondeterminesthemessageisduplicate.Forexample: IfthesendingclientassignstwodifferentmessagesthesameUUID,theIntegration Serverdetectsthesecondmessageasaduplicateanddoesnotprocessit. Ifthedocumentresolverserviceincorrectlydeterminesthestatusofamessagetobe duplicate(whenitis,infact,new),IntegrationServerdiscardsthemessagewithout processingit.
98
99
100
a b
4 5
101
To clear exactly-once processing statistics 1 2 3 4 StartwebMethodsIntegrationServerandopentheIntegrationServerAdministrator. UndertheSettingsmenuinthenavigationarea,clickResources. ClickExactly-Once Statistics. ClickClear All Duplicate or In Doubt Document Statistics.
102
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Controlling Thread Usage for JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Enabling, Disabling, and Suspending JMS Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
103
Introduction
IntegrationServerAdministratorprovidescontrolsformanagingJMStriggersandthe resourcesusedbyJMStriggers.Specifically,youcanusethecontrolsprovidedby IntegrationServerAdministratorto: IncreaseordecreasethemaximumnumberofserverthreadsusedforJMStriggers. ChangethemaximumexecutionthreadsforconcurrentJMStriggers. Enable,disable,orsuspendoneoremoreJMStriggers. ThefollowingsectionsprovidemoreinformationaboutmanagingJMStriggers.
104
Reducemaximumexecutionthreadsbythesamepercentageacrossallconcurrent JMStriggers.ThisalsodecreasestherateatwhichconcurrentJMStriggersprocess messages. To increase or decrease thread usage for JMS triggers 1 2 3 4 5 OpentheIntegrationServerAdministratorifitisnotalreadyopen. IntheSettingsmenuoftheNavigationpanel,clickMessaging. ClickJMS Trigger Management. ClickEdit JMS Global Trigger Controls. IntheThread Pool Throttlefield,typethemaximumpercentageoftheserverthread poolthatcanbeusedforJMStriggers.Thisincludesthreadsusedtoretrievemessages fromtheJMSproviderandthreadsusedtoprocessmessages.Youmustenteravalue greaterthanzero. IntheIndividual Trigger Processing Throttlefield,selectthevalue,asapercentageofthe configuredmaximumexecutionthreadsvalue,atwhichyouwanttotheserverto function.IntegrationServerappliesthispercentagetothemaximumexecution threadsvalueforallconcurrentJMStriggers. ThisvalueappliestoconcurrentJMStriggersonly. 7 ClickSave Changes.
Notes: IftheThread Pool Throttlepercentagedoesnotevaluatetoawholenumberwhen appliedtothesizeoftheserverthreadpool,IntegrationServerroundsupordownto thenearestwholenumber. SerialJMStriggersalwaysprocessonemessageatatime.Foraserialtrigger, IntegrationServerusesthesamethreadforreceivingandprocessingamessage.The Individual Trigger Processing ThrottledoesnotaffectserialJMStriggers. ConcurrentJMStriggersuseapoolofconsumerstoreceiveandprocessmessages. Eachconsumerwilluseathreadfromtheserverthreadpooltoreceiveandprocessa message.AconcurrentJMStriggerdedicatesanadditionalthreadtomanagingthe poolofconsumers.Forexample,aconcurrentJMStriggerconfiguredtoprocessupto 10messagesatatimecanuseamaximumof11serverthreads. IfthepercentagebywhichyoureduceconcurrentJMStriggerexecutionthreadsdoes notresolvetoawholenumberforaJMStrigger,IntegrationServerroundsupor roundsdowntothenearestwholenumber.However,ifroundingdownwouldsetthe valueto0,theIntegrationServerroundsupto1.Forexample,ifyoureduceIndividual Trigger Processing Throttleto10%ofmaximum,aconcurrentJMStriggerwitha maximumexecutionthreadsvalueof12wouldhaveanadjustedvalueof1 (IntegrationServerrounds1.2downto1).AconcurrentJMStriggerwithamaximum
105
executionthreadsvalueof4wouldhaveanadjustedvalueof1(IntegrationServer rounds0.4upto1). WhenyoureducetheIndividual Trigger Processing Throttleandsaveyourchanges, IntegrationServerdoesnotmeettheadjustedmaximumbyterminatinganythreads currentlyexecutingconcurrentJMStriggers.IntegrationServerallowsserverthreads processingmessagesforconcurrentJMStriggerstoexecutetocompletion.Integration ServerwaitsuntilthenumberofthreadsexecutingforaconcurrentJMStriggerisless thantheadjustedmaximumbeforedispatchinganotherserverthreadforthatJMS trigger.
Disabled Suspended
UsingtheIntegrationServerAdministrator,youcan: Enable,disable,orsuspendallJMStriggers. Enable,disable,orsuspendspecificJMStriggers. YoumightwanttochangethestateofallJMStriggersatonceasaquickwayoffreeingup serverresources.ThiscanbeespeciallyhelpfulinasituationinwhichIntegrationServer isfunctioningunderheavyloadandadditionalresourcesareneededimmediately. YoumightwanttochangethestateforaspecificJMStriggerinthefollowingsituations: Whenabackendsystemneedsmaintenanceorisbecomingunresponsive,youmight wanttosuspendJMStriggersthatinteractwiththebackendsystem.Whentheback endsystembecomesavailable,youcanenabletheJMStriggers. AftersuspendingordisablingallJMStriggers,youmightenablespecificJMStriggers. Forexample,iftheserverisfunctioningunderanunusuallyheavyload,youmight firstsuspendallJMStriggersandthengraduallyenableJMStriggers,startingwith theJMStriggersinvolvedinkeyprocesses.
106
AfterIntegrationServersuspendsaserialJMStriggerautomaticallybecauseafatal erroroccurredduringmessageprocessing.ForinformationaboutconfiguringaJMS triggerforfatalerrorhandling,seeHandlingFatalErrorsforNonTransactedJMS Triggersonpage 65. ThefollowingprocedureexplainshowtouseIntegrationServerAdministratortochange thestateofallorindividualJMStriggers. To enable, disable, or suspend JMS triggers 1 2 3 4 OpentheIntegrationServerAdministratorifitisnotalreadyopen. IntheSettingsmenuoftheNavigationpanel,clickMessaging. ClickJMS Trigger Management. IfyouwanttochangethestateofallJMStriggers,dothefollowing: a b 5 UnderIndividualJMSTriggerControls,intheEnabledcolumn,clickedit all. OntheSettings > Messaging > JMS Trigger Management > Edit Statescreen,intheNew Statelist,selectthestatethatyouwanttoapplytoallJMStriggers.
IfyouwanttochangethestateofaspecificJMStrigger,dothefollowing: a b UnderIndividualJMSTriggerControls,intherowfortheJMStriggerthatyou wanttoenable,disable,orsuspend,clickthetextintheEnabledcolumn OntheSettings > Messaging > JMS Trigger Management > Edit State: triggerNamescreen, intheNew Statelist,selectthestatethatyouwanttoapplytothisJMStrigger.
ClickSave Changes.
Notes: IfyouwanttodisableaJMStrigger,firstsuspendtheJMStriggerandwaitforallthe processingthreadscomplete.Then,disabletheJMStrigger.Youcanviewthenumber ofthreadscurrentlyusedbyaJMStriggerontheSettings > Messaging > JMS Trigger Managementscreen. WhenyoudisableaJMStrigger,IntegrationServerdoesthefollowing: IftheJMStriggeriswaitingbeforemakingaretryattempt,IntegrationServer interruptsprocessingfortheJMStrigger. IftheJMStriggeriscurrentlyprocessingmessages,IntegrationServerwaitsa specifiedamountoftimebeforeforcingtheJMStriggertostopprocessing messages.Ifitdoesnotcompleteintheallottedtime,IntegrationServerstopsthe messageconsumerusedtoreceivemessagesfortheJMStriggerandclosesthe JMSsession.AtthispointtheserverthreadfortheJMStriggercontinuestorunto completion.However,theJMStriggerwillnotbeabletoacknowledgethe
107
messagewhenprocessingcompletes.Ifthedeliverymodeofthemessageissetto persistent,thiscanleadtoduplicatemessages. ThetimeIntegrationServerwaitsbetweentherequesttodisabletheJMStrigger andforcingthetriggertostopisspecifiedbythe watt.server.jms.trigger.stopRequestTimeoutproperty. Becauseadministeredobjects,likedestinations,areconfiguredoutsideofIntegration Server,disablingaJMStriggerhasnoimpactonthesubscription. IfaJMStriggerisprocessingmessagesatthetimeitissuspended,theJMStriggerwill completeprocessingofthosemessages.TheJMStriggeralsoacknowledgesthe messagestotheJMSprovider. Youcanusebuiltinservicestoenable,disable,andsuspendoneormoretriggers.For informationaboutthepub.trigger:disableJMSTriggers,pub.trigger:enableJMSTriggers,and pub.trigger:suspendJMSTriggersservices,seethewebMethodsIntegrationServerBuiltIn ServicesReference.
108
109
Introduction
ThisappendixcontainsadescriptionoftheJMSrelatedparametersyoucanspecifyinthe serverconfigurationfile(server.cnf),whichislocatedinthe IntegrationServer_directory\configdirectory.TypicallyyouwillusetheSettings > Extended screenfromtheIntegrationServerAdministratortoupdatethisfile,buttheremightbe timeswhenyouneedtoeditthefiledirectlyusingatexteditor.Ifyoueditthefiledirectly, youshouldfirstshutdowntheIntegrationServerbeforeupdatingthefile.Afteryoumake thechanges,restarttheserver. Theserverusesdefaultvaluesformanyoftheparameters.Ifaparameterhasadefault,it islistedwiththedescriptionoftheparameter.Manyoftheseparametersaresetasyou administerthewebMethodsIntegrationServerusingtheIntegrationServer Administrator.
watt.server.jms
watt.server.jms.connection.pingPeriod Specifieshowoften,measuredinseconds,IntegrationServershouldpingtheJMS provider.ThepingservesasakeepaliverequestsenttotheJMSprovider.Thedefaultis 300seconds(5minutes). Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.connection.retryPeriod Specifiesthelengthoftime,inseconds,thatIntegrationServerwaitsbetweenconnection attemptswhenaconnectiontotheJMSproviderorJNDIproviderfails.Thedefaultis20 seconds. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.csq.batchProcessingSize SpecifiesthemaximumnumberofmessagesIntegrationServerretrievesfromtheclient sidequeueandthensendstotheJMSprovider.IntegrationServerplacessentmessagesin theclientsidequeuewhentheconnectiontotheJMSproviderfails.IntegrationServer beginstodraintheclientsidequeueaftertheconnectiontotheJMSproviderbecomes available.Thedefaultis25. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.debugTrace EnablesanextralevelofverboseloggingforJMStriggersthatcanbecontrolledglobally orattheindividualJMStriggerlevel.
110
ToenabledebugTraceloggingforallJMStriggers,setthewatt.server.jms.debugTrace propertytotrue.Forthissettingtotakeeffect,youneedtodisableandthenenableall JMStriggers.ForinformationaboutusingIntegrationServerAdministratortoenable anddisableallJMStriggers,seeEnabling,Disabling,andSuspendingJMSTriggers onpage 106. ToenabledebugTraceloggingforanspecificJMStrigger,appendthefullyqualified JMStriggernametothewatt.server.jms.debugTracepropertyandsetthatpropertyto true.Forexample,toenabledebugTraceloggingfortheJMStriggernamed myFolder:myJMSTrigger,enterthefollowingontheEditExtendedSettingspage: watt.server.jms.debugTrace.myFolder:myJMSTrigger=true Forthissettingtotakeeffect,youneedtodisableandthenenabletheJMStrigger specifiedintheproperty.ForinformationaboutusingIntegrationServer Administratortodisableandenableanindividualtrigger,seeEnabling,Disabling, andSuspendingJMSTriggersonpage 106. watt.server.jms.trigger.maxDeliveryCount SpecifiesthemaximumnumberoftimestheJMSprovidercandeliveramessageto IntegrationServer.Thedefaultis100. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.trigger.maxPrefetchSize SpecifiesthemaximumnumberofmessagesthatthewebMethodsJMSAPIwillretrieve andcacheperrequestforaJMStrigger.Usingprefetchcachecanspeeduptheretrievalof messagesfromthewebMethodsJMSProvider.Becausemessageswillbeplacedin IntegrationServermemory,youmaywanttodecreasethissettingifyouhaveJMStriggers receivingverylargemessages.Otherwise,memoryissuescanoccur.Thispropertyonly appliestoJMStriggersreceivingmessagesfromthewebMethodsJMSProvider.The defaultis10messages. IntegrationServerchecksthisvaluewhenaJMStriggerstarts.Toapplyanewvaluetoall JMStriggers,useIntegrationServerAdministratortodisableandthenenableJMS triggers.FormoreinformationaboutenablinganddisablingJMStriggers,seeEnabling, Disabling,andSuspendingJMSTriggersonpage 106. WhenworkinginaclusterofIntegrationServers,thebehaviorcontrolledbythisproperty mightappearatfirsttobemisleading.Forexample,supposethatyouhaveaclusterof twoIntegrationServerss.EachIntegrationServercontainsthesameJMStrigger.Twenty messagesaresenttoadestinationfromwhichJMStriggerreceivesmessages.Itmightbe expectedtheJMStriggeronIntegrationServer1willreceivethefirstmessage,theJMS triggeronIntegrationServer1willreceivethesecondmessage,andsoforth.However, whatmayhappenisthattheJMStriggeronIntegrationServer1willreceivethefirst10 messagesandtheJMStriggeronIntegrationServer2willreceivethesecond10messages.
111
watt.server.jms.trigger.monitoringInterval Specifiestheinterval,measuredinseconds,atwhichIntegrationServerexecutesresource monitoringservicesforJMStriggers.Aresourcemonitoringserviceisaservicethatyou createtochecktheavailabilityofresourcesusedbyaJMStriggerservice.AfterIntegration ServersuspendsaJMStriggerbecauseallretryattemptshavefailed,itschedulesasystem tasktoexecutetheresourcemonitoringserviceassignedtotheJMStrigger.Thedefaultis 60seconds.ChangestothispropertytakeeffectthenexttimeIntegrationServerschedules asystemtasktoexecutearesourcemonitoringserviceforaJMStrigger. FormoreinformationaboutbuildingresourcemonitoringservicesforJMStriggers,see Appendix B,BuildingaResourceMonitoringService. watt.server.jms.trigger.pooledConsumer.timeout Specifiesthelengthoftime,inmilliseconds,thatapooledconsumershouldremainactive. IntegrationServerusesapoolofconsumerstoretrieveandprocessmessagesfor concurrentJMStriggers.Eachconsumerinthepoolencapsulatesanactual javax.jms.MessageConsumerandjavax.jms.Session.Thedefaultis60,000milliseconds(60 seconds). Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.trigger.raiseEventOnException IndicateswhetherIntegrationServergeneratesaJMSretrievalfailureeventwhenaJMS triggerexperiencesafatalexception,suchasanontransienterrororamessagethat cannotbereprocessed,duringmessageprocessing.SpecifytrueifyouwantIntegration ServertogenerateaJMSretrievalfailureevent.Thedefaultistrue. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.trigger.raiseEventOnRetryFailure IndicatesthatIntegrationServergeneratesaJMSretrievalfailureeventwhenaJMS triggerexperiencesaretryfailure.AretryfailurecanoccurwhentheJMSproviderhas reachedthemaxdeliverycountforamessageorwhenanISRuntimeExceptionisthrown andtheJMStriggerisnotconfiguredtorecoverthemessage(forexample,ifretryfailure handlingforanontransactedJMStriggerissettoThrowexceptioninsteadofSuspend andRetryLater.)Whensettotrue,IntegrationServergeneratesaJMSretrievalfailure eventforaJMStriggerwhenretryfailureoccurs.Thedefaultistrue. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.trigger.reuseSession IndicateswhetherinstancesofaJMStriggerusethesamesessiononIntegrationServer Whenthispropertyissettotrue,theJMStriggerusesasharedsession.Eachofthetrigger servicesexecutedbytheJMStriggerwillusethesamesessionID.Whenthispropertyis settofalse,IntegrationServerusesanewsessionforeachinstanceofaJMStrigger. ReusingsessionsforaJMStriggermightimproveperformance.However,thisproperty
112
doesnotworkwithalladapters.Ifyouareworkingwithanadapter,suchastheSAP adapter,thatrequiresthesessionIDtobeunique,setthispropertytofalse.Thedefaultis false. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.trigger.stopRequestTimeout Specifiesthemaximumamountoftime,measuredinsecondsthatIntegrationServer waitsafteraJMStriggerisdisabledbeforeforcingtheJMStriggertostopprocessing messages.Thedefaultis3seconds. YoucandisableaJMStriggerbyinvokingthepub.trigger:disableJMSTriggerserviceorbyusing orviatheSettings > Messaging > JMS Trigger ManagementscreensinIntegrationServer Administrator.FormoreinformationaboutdisablingJMStriggers,seeEnabling, Disabling,andSuspendingJMSTriggersonpage 106. WhenyousaveaJMStriggerinDeveloper,IntegrationServerstopsandthenrestartsthe trigger.Inthissituation,IntegrationServerwaits3secondsbeforeforcingtheJMStrigger tostopprocessingmessages.Thisvaluecannotbeconfigured. Important! YoumustrestartIntegrationServerforthenewvaluetotakeeffect. watt.server.jms.wmjms.lms.readTimeout Specifiestheamountoftime(measuredinmilliseconds)thatIntegrationServerwaitsfor thenextportionofaninputstreambeforethrowingWmReadTimeoutException.Theread timeoutonlyappliesafterIntegrationServerretrievestheinitialpieceoftheinputstream. Thedefaultis30000milliseconds.
113
114
115
Overview
Aresourcemonitoringserviceisaservicethatyoucreatetochecktheavailabilityof resourcesusedbyatrigger.IntegrationServerschedulesasystemtasktoexecutea resourcemonitoringserviceafteritsuspendsatrigger.Specifically,IntegrationServer suspendsatriggerandinvokestheassociatedresourcemonitoringservicewhenoneof thefollowingoccurs: Duringexactlyonceprocessing,thedocumentresolverserviceendsbecauseofan ISRuntimeExceptionandthe watt.server.trigger.preprocess.suspendAndRetryOnErrorpropertyissetto true(thedefault). Aretryfailureoccursforanontransactedtriggerandtheconfiguredretrybehavioris suspendandretrylater. AtransienterroroccursforatransactedJMStriggerandtheconfiguredbehavior whentransactionrollbackoccursistosuspendtheJMStriggerandrecoverthe message Thesameresourcemonitoringservicecanbeusedformultipletriggers.Whentheservice indicatesthatresourcesareavailable,IntegrationServerresumesallthetriggersthatuse theresourcemonitoringservice.
Service Requirements
Aresourcemonitoringservicemustdothefollowing: Usethepub.trigger:resourceMonitoringSpecastheservicesignature. Checktheavailabilityoftheresourcesusedbythedocumentresolverserviceandall thetriggerservicesassociatedwithatrigger.Keepinmindthateachconditionina triggercanbeassociatedwithadifferenttriggerservice.However,youcanonly specifyoneresourcemonitoringservicepertrigger. ReturnavalueoftrueorfalsefortheisAvailableoutputparameter.Theauthorof theresourcemonitoringservicedetermineswhatcriteriamakesaresourceavailable. Catchandhandleanyexceptionsthatmightoccur.Iftheresourcemonitoringservice endsbecauseofanexception,IntegrationServerlogstheexceptionandcontinuesasif theresourcemonitoringservicereturnedavalueoffalsefortheisAvailableoutput parameter.
116
117
C. Transaction Management
Transactions
IntegrationServerconsidersatransactiontobeoneormoreinteractionswithoneormore resourcesthataretreatedasasinglelogicalunitofwork.Theinteractionswithina transactionareeitherallcommittedorallrolledback.Forexample,ifatransaction includesmultipledatabaseinserts,andoneormoreinsertsfail,allinsertsarerolledback.
Transaction Types
IntegrationServersupportsthefollowingkindsoftransactions: Alocaltransaction(LOCAL_TRANSACTION)whichisatransactiontoaresources localtransactionmechanism AnXAResourcetransaction(XA_TRANSACTION)whichisatransactiontoa resourcesXAResourcetransactionmechanism IntegrationServercanautomaticallymanagebothkindsoftransactions,without requiringtheusertodoanything.Formoreinformationaboutimplicittransactions,see ImplicitandExplicitTransactionsonpage 119. However,therearecaseswhereusersneedtoexplicitlycontrolthetransactionalunitsof work.ExamplesofthesecasesareprovidedinImplicitandExplicitTransactionson page 119. Tosupporttransactions,theIntegrationServerreliesonabuiltinJ2EEbasedtransaction manager.Thetransactionmanagerisresponsibleforbeginningandendingtransactions, maintainingatransactioncontext,enlistingnewlyconnectedresourcesintoexisting transactions,andensuringthatlocalandXAResourcetransactionsarenotcombinedin illegalways. Thetransactionmanageronlymanagesoperationsperformedbyadapterservices,a transactedJMStrigger,orabuiltinJMSservicethatusesatransactedJMSconnection alias. Important! Youcannotsteportraceaflowthatcontainsatransactedadapterserviceora transactedJMSservice.
118
C. Transaction Management
XA Transactions
IfanXAtransactionalconnectionthrowsanexceptionduringaservicetransactionand theexceptionresultsinaninconsistentstate,youmayneedtoresolvethetransaction usingthetoolsprovidedwiththedatabase. ForinformationaboutusingtheIntegrationServertomanageXAtransactions,seethe webMethodsIntegrationServerAdministratorsGuide.
Implicit Transactions
Withimplicittransactions,IntegrationServerautomaticallymanagesbothlocaland XAResourcetransactionswithoutrequiringyoutoexplicitlydoanything.Thatis,the IntegrationServerstartsandcompletesanimplicittransactionwithnoadditionalservice callsrequiredbytheuser. Atransactioncontext,whichthetransactionmanagerusestodefineaunitofwork,starts whenoneofthefollowingoccurs: Anadapterserviceisencounteredduringflowserviceexecution.Theconnection requiredbytheadapterserviceisregisteredwiththenewlycreatedcontextandused bytheadapterservice.Ifanotheradapterserviceisencountered,thetransaction contextissearchedtoseeiftheconnectionisalreadyregistered.Iftheconnectionis alreadyregistered,theadapterserviceusesthisconnection.Iftheconnectionisnot registered,anewconnectioninstanceisretrievedandregisteredwiththetransaction. IntegrationServerusesatransactedJMSconnectionaliastoreceivemessagesfrom theJMSproviderforaJMStrigger.AJMSconnectionaliasisconsideredtobe transactedwhenithasatransactiontypeofXATRANSACTIONorLOCAL TRANSACTION. AbuiltinJMSservicethatusesatransactedJMSconnectionaliastoconnecttothe JMSproviderisencounteredduringflowserviceexecution. Notethatifthetoplevelflowserviceinvokesanotherflow,servicesinthechildflowuse thesametransactioncontext. Whenthetoplevelflowservicecompletes,thetransactioniscompletedandiseither committedorrolledback,dependingonthestatus(successorfailure)ofthetoplevelflow serviceortheJMStriggerservice.
119
C. Transaction Management
Explicit Transactions
Youuseexplicittransactionswhenyouneedtoexplicitlycontrolthetransactionalunitsof work.Todothis,youuseadditionalservices,knownasbuiltinservices,inyourflow. Atransactioncontextstartswhenthepub.art.transaction:startTransactionserviceisexecuted. Thetransactioncontextiscompletedwheneitherthepub.art.transaction:commitTransactionor pub.art.transaction:rollbackTransactionserviceisexecuted.Aswithimplicittransactions,asingle transactioncontextcancontainanynumberofXA_TRANSACTIONconnectionsbutno morethanoneLOCAL_TRANSACTIONconnection. Note: Withexplicittransactions,youmustbesuretocalleithera pub.art.transaction:commitTransactionorpub.art.transaction:rollbackTransactionforeach pub.art.transaction:startTransaction;otherwiseyouwillhavedanglingtransactionsthatwill requireyoutoreboottheIntegrationServer.Youmustalsoensurethatthe startTransactionisoutsidetheSEQUENCE. Anewexplicittransactioncontextcanbestartedwithinatransactioncontext,provided thatyouensurethatthetransactionswithinthetransactioncontextarecompletedinthe reverseordertheywerestartedthatis,thelasttransactiontostartshouldbethefirst transactiontocomplete,andsoforth. Forexample,considerthefollowingisavalidconstruct:
pub.art.transaction:startTransaction pub.art.transaction:startTransaction pub.art.transaction:startTransaction pub.art.transaction:commitTransaction pub.art.transaction:commitTransaction pub.art.transaction:commitTransaction
Thefollowingexampleshowsaninvalidconstruct:
pub.art.transaction:startTransaction pub.art.transaction:startTransaction pub.art.transaction:commitTransaction pub.art.transaction:commitTransaction
120
C. Transaction Management
pub.art.transaction:rollbackTransaction
pub.art.transaction:setTransactionTimeout
pub.art.transaction:startTransaction
121
C. Transaction Management
122