IBM_MQ_培训教材
- 格式:ppt
- 大小:2.47 MB
- 文档页数:50
WebSphere MQ V6概述•很容易连接应用程序和系统•一次性安全提供数据•许多环境o大量操作系统和硬件平台o支持许多程序设计语言o通信协议o点对点和发布/订阅方式o通过简单 API 全部可用•行业消息的行业标准•最近庆祝了成立十周年!WebSphere MQ V6主题•IBM 在 204-126 号发布书(2004 年 6 月)中发表了一项指导方针:“IBM 计划......在 2005 年上半年......发布新版 WMQ。
这些发布将使 ESB 创建和扩充变得更容易......”•提高适用性o文件传输简单,浏览速度快o新增跨平台配置工具•改进可管理性o了解系统正在运行的服务,并影响它o更容易确定问题和避免问题•增强可用性o利用 z/OS 服务•扩充性能、容量和伸缩性o利用 64 位地址空间•本演示说明 IBM 如何达到此陈述的要求由于计划推出新版 WMQ,我们尝试把要进行的各项工作分成几个主题。
这些是该版本要优先实施的功能,而一个功能应当在实施之前归入一个或多个主题。
(记住候选功能太多,总是超过我们在可接受的时间里或用接受的代码可以开发的功能数量。
一个版本不能集成的功能可能会集成在下一个版本里。
)我们这次想研究的两个领域是:a.使 WMQ 新用户很容易选择并快速使用b.即使你有使用早期版本的经验,也更容易管理 WMQ。
我们一直在开展 z/OS 特定的某些活动,完成共享队列工作最后阶段的开发同时使许多增强功能反映更广泛的行业活动。
后面的幻灯片将详细说明其中的许多项目WebSphere MQ V6时间表•2004 年 9 月开始开发 beta 程序o该程序针对有限客户和合作伙伴•2005 年 4 月 19 日发布o发布之后在某些平台上公开进行 beta 测试•2005 年 5 月发布分布式平台 Electronic GA(可下载)•2005 年 5 月发布物理介质和 z/OS GAWebSphere MQ V6初期支持的平台•AIX 5(仅 64 位系统)•Solaris(仅 64 位 Sparc 系统)•HP-UX 11i(仅 64 位 PA-RISC)•Linux/Intel(32 位)、Linux/pSeries(仅 64 位 distros)和 Linux/zSeries o RHEL3、(RHEL4)、SuSE8 和 SuSe9•z/OS 1.4•Windows 2000、XP、2003•OS/400 V5R2 和 i5/OS V5R3虽然某些操作系统的基本要求提高了,但 WMQ V6 支持的平台与 V5.3 基本相同。
IBMMQ入门IBM WMQ1.技术介绍1.1. 总体介绍消息队列(MQ)是一种应用程序对应用程序的通信方法。
应用程序通过写和检索出入列队的针对应用程序的数据(消息)来通信,而无需专用连接来链接它们。
消息传递指的是程序之间通过在消息中发送数据进行通信,而不是通过直接调用彼此来通信,直接调用通常是用于诸如远程过程调用的技术。
排队指的是应用程序通过队列来通信。
队列的使用除去了接收和发送应用程序同时执行的要求。
IBM WebSphere MQ 产品支持应用程序通过不同组件如处理器、子系统、操作系统以及通信协议的网络彼此进行通信。
例如,IBM WebSphere MQ 支持35 种以上的不同操作系统。
IBM WebSphere MQ 支持两种不同的应用程序编程接口:Java 消息服务(JMS)和消息队列接口(MQI)。
在IBM WebSphere MQ 服务器上,JMS 绑定方式被映射到MQI。
如图所示,应用程序直接与其本地队列管理器通过使用MQI 进行对话,MQI 是一组要求队列管理器提供服务的调用。
MQI 的引人之处是它只提供13 次调用。
这意味着对于应用程序编程员它是一种非常易于使用的接口,因为大部分艰苦工作都将透明完成的。
1.2. 术语定义2.安装2.1. 下载最新版本:7.0.1.3有多个版本:linux_32,linux_64,linux_win2.2. 硬件环境2.3. 安装上传文件到相关目录,1.解压文件CZJ3YML.tar.gz3.安装安装后会自动创建系统用户及用户组:mqm 程序安装目录:/opt/mqm数据相关目录:/var/mqmJava相关jar包:/opt/mqm/java/lib4.更改mqm用户密码后续操作用mqm用户操作2.4. 卸载1.用root帐号登录系统2.停止所有队列管理器//查看正在运行的队列管理器dspmq//停止所有跟队列管理器相关的监听程序,注意:QueueManagerName是队列队列管理器名称,具体名称用命令dspmq查询endmqlsr -m QueueManagerNam e//停止所有正在运行的队列管理器endmqm QueueManagerName3. //确认所有跟MQ有关的进程都已经停止ps -ef | grep mq4.//查看安装了那些相关的包rpm -q -a | grep MQSeries//一次性删除所有安装的包,以下命令只是一个示例,命令后面的包名称是命令“rpm -q -a | grep MQSeries” //查询所得的所有包名称,包名之间用空格分隔,rpm -ev MQSeriesRuntime-6.0.0-0 MQSeriesServer-6.0.0-0 MQSeriesServer-6.0.0-05.删除用户userdel mqm6.删除文件rm -rf /opt/mqm/rm -rf /var/mqm/7.重启主机2.5. 重新启动MQ1、切换到mqm用户2、启动队列管理器3、启动服务启动命令服务器:非必须启动侦听器:验证队列管理器和侦听器在两台计算机上运行,然后启动通道:3.配置配置过程包括以下几个步骤:1.创建队列管理器。
(转)IBMmq基本使⽤⼀、下载7.5 Trial版本这是下载⽹址,下载前先必须注册IBM ID,下载完成后⼀路Next即可(注:windows上安装时,会询问是否域环境,初次学习时,为简单起见,建议选择No)安装完成后,MQ的Bin⽬录会⾃动添加到环境变量Path中,以后就可以直接⽤Dos命令⾏窗⼝操作(当然,也可以⽤图形化GUI⽅式通过IBM WebSphere MQ Explorer来管理)注:安装时,强烈建议⽤管理员Administrator⾝份安装,否则安装完成后,有可能license⽆法⽣效、runmqsc命令模式下⽆法正常执⾏命令.⼆、创建队列管理器WIN + R键,输⼊cmd,进⼊命令⾏窗⼝,键⼊:crtmqm QM_TEST创建⼀个队列管理器QM_TEST(你可以改成⾃⼰想要的名字),如果把整个MQ理解成⼀个数据库实例,QM_TEST相当于就是db instance中的schema(或user)命令⾏创建的队列管理器默认是不活动状态的,可以⽤strmqm QM_TEST来启动队列管理器三、创建队列如果说“队列管理器”是db中的schema,那么"队列"就相当于db中的Table了,⽽队列中的每条"消息",就相当于Table中的每条记录,继续在命令⾏窗⼝模式下,输⼊runmqsc QM_TEST将进⼊MQ的交互命令模式,继续输⼊define qlocal(Q1)将创建⼀个本地队列Q1(你可以改成⾃⼰需要的名字),如果此时你打开 "开始菜单->程序->IBM WebSphere MQ->WebSphere MQ Explorer (Installation1)"也能同步在图形界⾯下,看到这个队列最后键⼊end,退出MQ的交互命令模式。
四、发送消息继续在Windows命令模式下,输⼊amqsput Q1 QM_TEST这⾥系统将处于等待⽤户输⼊的状态,随便输⼊⼀些消息,然后连敲⼆次回车,完成消息发送五、接收消息amqsget Q1 QM_TEST把刚才的put换成了get,将从队列管理器QM_TEST的队列Q1中,把消息取出来六、进阶指南熟悉以上命令⾏操作后,还可以⽤图形化的操作⽅式再强化⼀遍(建议还是多⽤命令⾏模式,因为有些操作只能⽤命令⾏完成,⽐如后⾯要提到的修改队列管理器编码)WebSphere MQ Explorer中,从"帮助"菜单⾥调出帮助⽂档,⾥⾯有⼀个不错的教程,强烈推荐新⼿看⼀遍不过,"教程2:将消息发送⾄远程队列"这⾥,帮助⽂档上有⼏个细节没讲透,导致初次⽤命令⾏照着做,可能会不成功,⼏个要点如下:1、通道命名问题发送⽅与接收⽅的通道名称,必须⼀样,这样⼆边才能对应起来2、接收⽅必须要有侦听器,⽽且要处于激活状态3、发送⽅的发送通道中,连接名称格式为:"<接收⽅HostName或IP地址>(接收⽅-队列管理器-侦听器的TCP端⼝) ,不包括"<>“,⽐如⽐如:yangjm(1514)或172.12.134.14(1514)4、发送⽅的发送通道必须处于激活状态,如果通道启动失败,尝试右键->ping/复位,如果还不⾏,检查上述要点1-3是否设置有问题七、远程连接问题图形⽅式添加“远程队列管理器”时,如果远程队列也是7.x或以上版本,当前登录⽤户是管理员时,将提⽰权利不⾜,拒绝连接,原因是7.0以上,MQ提⾼了安全性,会默认拦截管理员,详情可参考IBM上的解释解决⽅式:1. 更换当前⽤户,建⼀个mqm⽤户组(MQ安装后,会默认创建该Windows⽤户组)的⽤户,然后以该⽤户⾝份登录操作2.参考IBM上的解释,如果出于学习⽬的,最简单的做法,就是在runmqsc交互模式下,键⼊ALTER QMGR CHLAUTH(DISABLED) 直接关闭通道认证(⽣产环境不推荐这么做)另外,要想本机上的队列能被远程管理,前提是该队列管理器允许远程管理,操作⽅式:队列管理器上右击->选择"远程管理...",接下来的事情⼤家都知道⼋、字符集编码问题每个队列管理器,都有⼀个CCSID的属性,对应的就是字符集编码,在windows系统中,这个编码应该是1381,如果你是⽤其它OS(⽐如linux)的配置通过脚本导⼊MQ的,可能编码就不是1381了,这会导致在windows上⽆法连接\启动队列管理器,可以通过MQ交互命令⾏修改,runmqsc QM_TEST 进⼊QM_TEST的MQ交互模式DISPLAY QMGR CCSID 查看当前的CCSID属性ALTER QMGR CCSID(1381) 修改字符集编码为1381九、如何从“试⽤版”升级成“正式版”试⽤版默认只能⽤90天,到期后,如果购买了正式版的license,可以通过命令⾏导⼊license,命令如下:setmqprd x:\license\amqpcert.lic注:amqpcert.lic中的P即代表这是Product⽣产版本,setmqprd 后⾯的路径即为license⽂件的所在路径⼗、java连接⽰例代码import com.ibm.mq.MQC;import com.ibm.mq.MQEnvironment;import com.ibm.mq.MQException;import com.ibm.mq.MQGetMessageOptions;import com.ibm.mq.MQMessage;import com.ibm.mq.MQPutMessageOptions;import com.ibm.mq.MQQueue;import com.ibm.mq.MQQueueManager;/** 可以在MQ的资源管理器的某⼀个队列上放⼊测试消息、浏览消息等* 可以放⼊多条消息,按先进先出的⽅式取得*/public class MQTest {private String qManager;// QueueManager名private MQQueueManager qMgr;private MQQueue qQueue;String HOST_NAME;int PORT = 0;String Q_NAME;String CHANNEL;int CCSID;String Msg;public void init() {try {HOST_NAME = "yangjm";//Hostname或IPPORT = 1414;//要有⼀个侦听器,处于活动状态,且监听1414端⼝qManager = "QM_APPLE";Q_NAME = "Q1";//Q1是⼀个本地队列CHANNEL = "DC.SVRCONN";//QM_APPLE上要建⼀个名为DC.SVRCONN的服务器连接通道CCSID = 1381; // 表⽰是简体中⽂,// CCSID的值在AIX上⼀般设为1383,如果要⽀持GBK则设为1386,在WIN上设为1381。
IBM MQVersion 9.1Quick Start GuideUse this guide to get started with IBM MQ Version 9.1.National Language Version:To obtain the Quick Start Guide in other languages, print the language-specific PDF from the Quick Start DVD.Product overviewIBM ®MQ is robust messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. IBM MQ facilitates the assured, secure and reliable exchange of information betweenapplications, systems, services and files by sending and receiving message data via messaging queues, thereby simplifying the creation and maintenance of business applications. It delivers Universal Messaging with a broad set of offerings to meet enterprise-wide messaging needs, and can be deployed across a range of different environments including on-premise, in cloud environments and supporting hybrid cloud deployments.IBM MQ supports a number of different application programming interfaces (APIs) including Message Queue Interface (MQI),Java ™Message Service (JMS), .NET, IBM MQ Light, MQTT, and the messaging REST API.Product documentation for all supported versions of IBM MQ is available through IBM Knowledge Center(https:///support/knowledgecenter/SSFKSJ). Specifically, the IBM MQ Version 9.1 product documentation is also available in IBM Knowledge Center (/support/knowledgecenter/SSFKSJ_9.1.0/com.ibm.mq.helphome.v91.doc/WelcomePagev9r1.htm).Service and support information is provided in the documentation.Information about how to use MQ Explorer can be accessed either from within MQ Explorer or in the product documentation.3Step 3: Review the installation architectureIBM MQ architectures range from simple architectures that use a single queue manager, to more complex networks of interconnected queue managers. For more information about planning your IBM MQ architecture, see the Planning section of the product documentation in IBM Knowledge Center (https:///support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.pla.doc/q004690_.htm).For links to additional information, see the IBM MQ information roadmap in IBM Knowledge Center(/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.pro.doc/q123810_.htm).4Step 4: Install the productFor installation instructions for IBM MQ on all supported pltforms, and for details of the hardware and software configurations that are required, see the Installing section of the product documentation in IBM Knowledge Center (https:///support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.ins.doc/q008250_.htm).IBM®started quickly.Further scenarios help you to configure or use product features by taking you through the appropriate task steps. The scenarios include links to other content that helps you to gain a better understanding of the area in which you are interested.More informationFor more information about IBM MQ, see the following resources:IBM FAQ for Long Term Support and Continuous Delivery releasesFrom IBM MQ Version 9.0, IBM MQ introduced a Continuous Delivery (CD) support model. Following the initialrelease of a new version, new function and enhancements are made available by incremental updates within thesame version and release. There is also a Long Term Support release available for deployments that requiresecurity and defect fixes only. For more information, see IBM MQ FAQ for Long Term Support and ContinuousDelivery releases (/support/docview.wss?uid=swg27047919).Online product readme fileThe latest version of the online product readme file is available on the IBM MQ product readmes web page(/support/docview.wss?rs=171&uid=swg27006097).IBM Support informationSupport information includes the following resources:v IBM Support web page (https:///support/home/)v IBM Support Assistant (/software/support/isa/)v Social Media Channels within Cloud Technical Support (/support/docview.wss?uid=swg21410956#2IBM MQ Version 9.1 Licensed Materials - Property of IBM. © Copyright IBM Corp. 2006, 2018. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. IBM, the IBM logo, , and Passport Advantage are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” (/legal/copytrade.shtml).Part Number:CF4LGMLPrinted in Ireland。
Unit 04 -Project SelectionOctober 2004 | Project Management | Wilhelm F. Neuhäuser©IBM Corporation 2003AgendaUnit 4: Project SelectionObjectivesNonnumeric selection modelsProject selection overviewLife-cost cycleProfitability measuresUsing financial measures to select projects andalternative strategiesKey messages -Unit 4ObjectivesAt the end of this module, you will be able to -Understand project selection and its role in theoverall projectUnderstand processes that drive the projectselection processesDescribe financial analysis approaches used forproject selectionNon-numeric Selection Models Sacred cowOperating necessityCompetitive necessityProduct line extensionsComparative benefit modelJust do it!Numeric Project Selection ModelsPortfolio AnalysisOpportunitiesFuturePerceivedWhy notProfitability measuresReturn on salesReturn on investments and return on assets (ROA)Net present value (NPV)Portfolio Analysis in Project SelectionAnalytical tool to determine investments inproducts, systems, businesses, and servicesResults in -Investment prioritiesAlternative strategiesPerformance improvement initiativesFinancial measurementsTypically used by corporate planning, businesssegments, and portfolio management/marketplanning teamsPortfolio Management -Logical ViewPortfolio ManagementCollect Market Segment Data Assess Capabilitiesby Segment Define Market Segments Priorities InvestmentsSegment Data Define customer market segments Select current and future markets Map current offerings into market segments Identify new market opportunitiesLink vision, mission, and goals to segmentsCollect and rank customer requirements Determine competitive environmentUnderstand market environment and trendsDetermine financial performance of segmentsAssess markets Assess market attractivenessAssess competitive positionAssess financial performancePerform strategic position analysis Perform financial performance analysisEvaluate alternative strategiesOptimize coverage by segment and businessOptimize financials Evaluate linkage to vision, mission, and goalsFinalize customer offerings portfolioCommit to businessLife-Cycle CostTechnique assesses "total cost" of project fromConcept to End-of-LifeNormalizes all risks to measure their effect onbaseline life-cycle cost (LCC)Usually uses computer modelGenerally used for complex projects that arerelatively expensive and multiyear in durationProfitability MeasuresAssess the relative levels of return to anorganization from various alternativesMay be applied to factors having nothing to do withmonetary profit or loss -are a means to evaluatethe relative desirability of a given optionAre selected for use based on the relative length ofan option, the level of investment, and the timing ofinflow and outflowProfitability Measures (continued)In order of increasing complexity, the mostcommon profitability measures are -Present valueReturn on sales (ROS) or simple profitReturn on assets (ROA) or return on investment(ROI)Economic value added (EVA)Using Financial Measures to select Projects and Alternative StrategiesPresent value = PVPayment today is worth more than paymenttomorrowPresent value is the value of a future paymentFor a given future payment t years from now -M tPV =(1 + r)tM t= amount of payment t years from nowr= interest rate (sometimes called "discount rate")Sample Calculation of Net Present Value (NPV)30,83917,9620.513235,00015,00050,000712,86722,5800.564540,00010,00050,0006-9,70327,9410.620945,0005,00050,0005-37,64423,9050.683035,0005,00040,0004-61,54918,7820.751325,0005,00030,0003-80,331-1,2400.8264-1,50015,00013,5002-79,091-29,0910.9091-32,00035,0003,0001-50,000-50,0001.0000-50,00050,0000Net Present Value V t d tDiscounted Cash Flow V t d tDiscount factor d tNet Cash Flow V tYear CostYear Revenue tYearReturn on Sales (ROS)ROS is a simple, non-time-dependent measure ofnet profit or return as a percentage of a project'stotal sales or revenue generatedNet ProfitROS =SalesNegative return on sales indicates a lossROS ExampleComponents of a compute system are purchased for$500,000. Additional systems integration andprogramming work is performed for $200,000.Indirect (overhead) expenses of 50% of labor costsare allocated to the project. Once assembled, thecomputer system is sold for $1 million. Income taxesare 40%.Calculate net profit and return on sales.ROS Example (continued)Sales =$1,000,000Material =500,000Labor =200,000Overhead =100,000Profit =200,000Taxes =80,000Net Profit=120,000Net Profit ROS =Sales=$120,000$1,000,000=12%Profit & Loss Calculation ExampleRevenue -Cost (royalties, warranty, maintenance, base manufacturing cost, goods,...) = Gross profit (GP); % GP (percentage from revenue)-Unique expenses (development expense, direct marketing and services,...)-SG&A (sales, general administration & allocations)= NEBT (net earnings before tax) = Profit contribution % NEBT (percentage from revenue)Return on AssetA relative measure of profitability comparing anorganization's return on an effort with its overallinvestment in assets required to perform the effortSometimes referred to as return on investment(ROI)Net ProfitROA =Total assetsROA ExampleIn the previous example, assume the computerassembly operation required an asset base of $2million to support its operation.Calculate ROA.Net Profit ROA =Total assets =$120,000 $2,000,000=6%Economic Value Added (EVA) andEconomic Value Loss (EVL)Approach that evaluates the return-on-capitalpercentage versus the cost-of-capital percentageCan be calculated using various methodsAssesses the effectiveness of creating value forshareholdersWhat is the Cost of CapitalRepresents the cost of financing an organization'soperationsReflects the minimum rate of return required byinvestorsDebt holders require interest and principle repaymentShareholders require dividends and stock priceappreciationFocusing on the cost of capital enables anorganization to identify development projects thatcreate value for shareholdersEVA Approach and ExampleEVA is used to measure financial value created forshareholdersEVA = net operating profits after taxes minus theweighted average cost of capital (NOPAT -WACC)Using the same information from the ROS and ROA examples,assume the weighted average cost of capital for your companyis determined to be 10%.Calculate EVA.EVA = NOPAT -WACC= $120,000-10% x $2,000,000= $120,000-$200,000= -$80,000Raising EVAThere's nothing fancy or complicated about how to make economic valueadded (EVA) go up. It's a fundamental measure of return on capital, and thereare just three ways to increase it:Earn more profit without using more capitalYou probably spend much of your time thinking of ways to do this; cost cutting is today's favorite method. Nothing wrong with that, but focusing on it often blindscompanies to other ways of raising EVA.Use less capitalIn practice, this is often the method that companies adopting EVA find mosteffective.Coke uses plastic containers for concentrate instead of costlier metal ones. CSX figures out how to operate with 100 locomotives instead of 150. Quakerreschedules production to require fewer warehouses.What to do with the capital saved? Companies can return it to shareholdersthrough higher dividends or stock buybacks, or can ...Invest capital in high-return projectsThis is what growth is all about. Just make sure you expect these projects to earn more than the total cost of the capital they require.From "The Real Key to Creating Wealth", Fortune, September 20, 1993Summary of Profitability Measurement Tools and Techniques Tool ROS Advantages Simplicity of use Simplicity of understanding Flexibility Reflects actual level of investment in effort Reflects time value of investment Easy method is relatively accurateMeasures value created Easy to understand Focuses decision making Disadvantages Does not evaluate relative levels of investment Does not consider length of project or effort Does not reflect time value of returnmeasurement No set formulas Difficult to compute EVA at project levelROA EVAKey MessagesProject success is often driven by the clarity ofproject definitionsPlan globally, think locallyThe individual project manager may or may not beinvolved in the project selection process for aspecific project。
Websphere MQ入门教程——使用IBM Websphere MQ提纲目录目录 (2)前言 (9)本书范围 (9)本书读者 (9)进一步参考资料 (10)第一部分Websphere MQ原理和体系结构 (11)第一章Websphere MQ原理 (11)目标 (11)1.1中间件 (11)1.1.1中间件的优点 (11)1.1.2中间件的分类 (12)1.2三种通信技术的比较 (13)1.3 WebSphere MQ的原理 (15)1.4 WebSphere MQ的重要特点 (16)1.4.1统一接口 (16)1.4.2处理不依赖时间的限制 (16)1.4.3给分布式处理提供的强健的中间件 (16)1.5本章小节 (17)1.6本章练习 (17)第二章Websphere MQ体系结构 (18)目标 (18)2.1基本概念 (18)2.1.1 WebSphere MQ对象(objects) (18)2.1.2 消息 (19)2.1.3 队列 (20)2.1.4队列管理器 (24)2.1.4通道 (25)2.1.5进程 (29)2.1.6群集 (29)2.1.7名称列表 (30)2.1.8认证信息对象 (30)2.1.9系统缺省对象 (30)2.1.10 MQI(message queue interface) (30)2.2体系结构 (30)2.2.1 WebSphere MQ和消息排队 (31)2.2.2 队列管理器的进程 (32)2.3客户机和服务器 (33)客户机-服务器环境中的WebSphere MQ 应用程序 (33)2.4触发机制 (33)2.4.1触发的概念 (33)2.4.2触发类型 (34)2.4.3触发的工作原理 (35)2.5 队列管理器群集 (36)2.5.1 群集的概念 (36)2.5.2 群集的优点 (37)2.5.3 群集的组件 (38)2.5.4 创建群集 (38)2.5.5 实现负载均衡 (39)2.5.6 群集管理 (40)2.6本章小结 (41)2.7本章练习 (41)第二部分Websphere MQ系统管理 (43)第三章WebSphere MQ系统安装 (43)目标 (43)3.1 规划安装 (43)3.1.1 硬件要求 (43)3.1.2 软件要求 (44)3.2 安装WebSphere MQ (46)3.2.1 WebSphere MQ 文档 (46)3.2.2 WebSphere MQ安装 (47)3.3 验证安装 (49)3.3.1安装验证 (49)3.3.2测试对象 (49)3.4 本章小结 (50)3.5本章练习 (50)第四章WebSphere MQ 的管理 (51)目标 (51)4.1 本地和远程管理 (51)4.2 使用命令管理WebSphere MQ (51)4.2.1控制命令 (52)4.2.2WebSphere MQ 脚本(MQSC)命令 (52)4.2.3PCF 命令 (54)4.3 WebSphere MQ 配置 (56)4.3.1在Windows 系统上更改配置信息 (56)4.3.2 在UNIX 系统上更改配置信息 (57)4.4 WebSphere MQ 安全性 (60)管理WebSphere MQ 的权限 (60)使用WebSphere MQ 对象的权限 (61)4.5 WebSphere MQ 事务性支持 (61)4.6 WebSphere MQ 死信队列处理程序 (62)4.7本章小结 (62)4.8本章练习 (63)第五章WebSphere MQ 控制命令 (64)目标 (64)5.1 如何使用控制命令 (64)WebSphere MQ 对象的名称 (64)5.2 控制命令 (65)控制命令集 (65)控制命令举例 (66)5.3 本章小结 (66)5.4本章练习 (66)第六章WebSphere MQ 互连通信 (68)目标 (68)6.1基本概念 (68)6.1.1 什么是互连通信 (68)6.1.2 分布式队列组件 (72)6.1.3 死信队列 (75)6.1.4怎样到达远程队列管理器 (75)6.2 实现应用程序通信 (77)6.2.1发送消息到远程队列管理器 (77)6.2.2触发通道 (79)6.2.3消息的安全性 (80)6.2.4 WebSphere MQ对象配置实例 (81)6.3通道的维护 (83)6.3.1通道的状态 (83)6.3.2通道维护命令 (84)6.3.3设置MaxChannels和MaxActiveChannels属性 (88)6.4配置侦听程序 (88)6.4.1 Windows 平台 (88)6.4.2 unix 平台 (88)6.5本章小结 (89)6.6本章练习 (89)第七章WebSphere MQ 恢复和重新启动 (90)目标 (90)7.1 WebSphere MQ的数据日志 (91)7.1.1日志的概念 (91)7.1.2日志控制文件 (91)7.1.3日志类型 (92)7.1.4计算日志的大小 (92)7.2 使用数据日志进行恢复 (93)7.2.1从掉电或通信故障中恢复 (94)7.2.2恢复受损对象 (94)7.3保护WebSphere MQ 日志文件 (96)7.4备份和恢复WebSphere MQ (96)7.4.1备份WebSphere MQ (96)7.4.2恢复WebSphere MQ (96)7.5恢复方案 (97)7.5.1磁盘故障 (97)7.5.2受损的队列管理器对象 (98)7.5.3受损的单个对象 (98)7.5.4自动媒体恢复故障 (98)7.6使用dmpmqlog 命令转储日志 (98)7.7本章小结 (101)7.8本章练习 (102)第八章WebSphere MQ 问题诊断 (102)目标 (102)8.1错误日志 (102)8.1.1日志文件 (103)8.1.2忽略WebSphere MQ for Windows的错误代码 (104)8.1.3操作信息 (104)8.2死信队列 (104)8.3配置文件和问题确定 (104)8.4跟踪 (104)8.4.1WebSphere MQ Windows的跟踪 (104)8.4.2WebSphere MQ AIX的跟踪 (106)8.5首次故障支持技术(FFST) (109)8.5.1FFST: WebSphere MQ Windows 版 (109)8.5.2FFST: WebSphere MQ UNIX 系统版 (110)8.6本章小结 (112)8.7本章练习 (112)第三部分Websphere MQ 应用开发 (113)第九章设计Websphere MQ应用程序 (113)目标 (113)9.1介绍应用设计 (113)9.1.1 规划设计 (113)9.1.2 WebSphere MQ 对象 (113)9.1.3 设计消息 (114)9.1.4 WebSphere MQ 技术 (114)9.1.5应用编程 (115)9.1.6 测试应用程序 (116)9.2 WebSphere MQ消息 (116)9.2.1消息描述符 (116)9.2.2消息种类 (116)9.2.3消息控制信息和消息数据的格式 (117)9.2.4消息优先级 (117)9.2.5消息组 (118)9.2.6消息持久性 (118)9.2.7检索消息 (119)9.2.8交付失败的消息 (119)9.3本章小结 (119)9.4本章练习 (119)第十章用MQI编程 (119)目标 (119)10.1概述 (119)10.2 平台和语言 (120)10.3 库和存根模块程序 (121)10.4 体系结构模型 (122)10.5 用MQI编程 (124)10.5.1 基本API概念 (125)10.5.2 连接到队列管理器 (126)10.5.3 打开WebSphere MQ对象 (127)10.5.4 关闭WebSphere MQ对象 (130)10.5.5 断开与队列管理器的连接 (130)10.5.6 将消息放入队列 (131)10.5.7 从队列获取消息 (133)10.5.8 从队列浏览消息 (135)10.5.9查询对象属性 (136)10.5.10设置对象属性 (138)10.5.11 MQI中的事务处理 (139)10.5.12 MQI中的消息分组 (140)10.6本章小结 (142)10.7本章练习 (142)第十一章用C++ API编程 (143)目标 (143)11.1 概述 (143)11.2 平台和语言 (144)11.3库 (144)11.4体系结构模型 (145)11.5用C++ API编程 (146)11.5.1连接到队列管理器 (147)11.5.2打开WebSphere MQ对象 (147)11.5.3 关闭WebSphere MQ对象 (148)11.5.4 断开与队列管理器的连接 (148)11.5.5 消息放入队列 (148)11.5.6从队列获取消息 (150)11.5.7浏览队列上的消息 (153)11.5.8查询并设置对象属性 (153)11.5.9事务处理管理 (155)11.5.10消息分组 (155)11.6本章小结 (157)11.7本章练习 (157)第十二章用Java编程 (158)目标 (158)12.1 概述 (158)12.2 平台 (158)12.2.1 获得软件包 (158)12.2.2 WebSphere MQ for Java的运行环境 (159)12.3 使用WebSphere MQ for Java (161)12.3.1客户机连接模式 (161)12.3.2绑定模式 (162)12.3.3 类库 (162)12.4用WebSphere MQ Java API开展工作 (164)12.4.1 设置连接 (164)12.4.2 打开队列 (165)12.4.3 处理WebSphere MQ消息 (166)12.5应用程序开发 (167)12.5.1简单的消息发送器应用程序 (168)12.5.2简单的消息接收应用程序 (170)12.5.3请求/回复 (172)12.5.4回复应用程序 (175)12.5.5消息分组 (177)12.5.6简单的组接收应用程序 (180)12.6本章小结 (183)12.7本章练习 (183)第十三章用ActiveX编程 (183)目标 (183)13.1 概述 (183)13.2 平台和语言 (184)13.3 库 (185)13.4 架构模型 (185)13.5 用WebSphere MQ automatin classes for ActiveX编程 (186)13.5.1 连接到队列管理器 (186)13.5.2 打开WebSphere MQ对象 (187)13.5.3 基本操作 (189)13.5.4 关闭对象 (191)13.5.5 关闭连接 (192)13.6 事务处理管理 (192)13.7 分组 (195)13.8 本章小结 (195)13.9本章练习 (195)第十四章用AMI编程 (195)目标 (195)14.1 概述 (196)14.2 平台和语言 (198)14.3 库和包 (199)14.4 体系结构模型 (201)14.5 用AMI编程 (202)14.5.1 连接到队列管理器 (202)14.5.2 打开WebSphere MQ对象 (204)14.5.3 基本操作 (208)14.5.4 删除会话并关闭连接 (212)14.6 AMI和MQI的比较 (213)14.7 事务处理管理 (213)14.8 分组 (215)14.9本章小结 (215)14.10本章练习 (215)附录一WebSphere MQ的缺省系统对象 (215)前言今天,大多数企业都希望他们的硬件和软件提供者不只受限于一家厂商,相反,大家普遍认为应当面向多家厂商能够运行多种软件的多种硬件平台,这些硬件平台既可以是大型机,也可以是笔记本计算机。
MQ连接SWIFT实施方案1.1 MQ版本信息IBM WebSphere MQ V 7.01.21.3 MQ软件环境Windows Server 20031.4 MQ服务器信息服务器地址:xxxxx用户名:mqm密码:******1.5 MQ注意事项1.不支持含有空格的主机名;2.远程队列中的远程队列名称和远程队列管理器必须与TOP端的本地队列及队列管理器一致;3.接收方通道名称必须与TOP端发送方通道名称一致,发送方通道名称必须与TOP端接收方通道名称一致。
1.6 MQ创建队列说明1.6.1 SWIFT端队列说明:1.6.2 TOP端队列说明:1.7 MQ安装步骤1.7.1 查看软件需求是否符合1.7.2 检查网络配置是否正常1.7.3 启动安装程序选择接受条款进入下一步,选择典型安装即可,点击下一步,开始安装:等待安装完成,出现如下界面,点击完成下一步,选择否,进入下一步,勾选启动资源管理器,点击完成,向导会自动打开资源管理器,出现下面的界面,安装完成。
1.8 验证安装1.8.1 创建队列管理器选中队列管理器文件夹,右键“新建”,选择“队列管理器”:弹出创建队列管理器对话框,输入队列管理器名称QM_SWIFT,进入下一步:确保启动类型为自动,勾选创建服务器连接通道,进入下一步:默认端口为1414,如果此端口已被占用,修改端口,我们使用1450,点击下一步:保持默认选项,点击完成。
队列管理器创建完毕,并自动启动:1.8.2 创建队列1.8.2.1 创建本地队列选中队列管理器下的队列文件夹,右键“新建”—“本地队列”:弹出新建本地队列窗口,输入本地队列名称SWIFT_RECEIVE_QUEUE,点击下一步:常规—缺省持久性一项选择“持久“:扩展—最大队列深度一项工具需要调整大小,其他保持默认,点击完成:创建本地队列完毕,队列列表显示如下:1.8.2.2 创建传输队列与创建本地队列一样,选中队列管理器下的队列文件夹,右键“新建”—“本地队列”,弹出对话框,输入传输队列名称TRANSFER_QUEUE,点击下一步:常规—使用情况一项改为“传输“,其他与创建本地队列一样,点击完成。