ibm-mq

Putting Message in Websphere MQ via C# has different data length than manually putting the same message

房东的猫 提交于 2019-12-05 03:19:25
MQMessage queueMessage = new MQMessage(); queueMessage.WriteString(strInputMsg); queueMessage.Format = MQC.MQFMT_STRING; MQPutMessageOptions queuePutMessageOptions = new MQPutMessageOptions(); Queue.Put(queueMessage, queuePutMessageOptions); Using C#, with the above code, when I input the message into the queue, the data length of the message is 3600. When I manually input the message into the queue by right clicking the queue and selecting Put Test Message option, the data length of the message is 1799. I am really confused why this is the case. The message in both cases is an xml string with

NoClassDefFoundError (initialization failure) - Websphere and IBM MQ

喜你入骨 提交于 2019-12-05 01:38:58
Im having a problem on a Spring based webapp that is being deployed to Websphere and interacts with IBM MQ. All is fine until I try some failure tests. While the webapp is up and running, I stop IBM MQ. I then invoke the webapp to send a JMS message out. The webapp hung at the call to JmsTemplate.convertAndSend and the following exception was found in the ffdc directory. Note the JmsTemplate was initialised using the JNDIObjectFactoryBean where it had got the MQ Connection Factory settings from Websphere. Can anyone explain the reason behind the "Initializaton Failure" ?? [27/01/11 14:29:39

WCF / WebService to act as Listener for MQ Message?

最后都变了- 提交于 2019-12-05 01:25:30
Perhaps I am barking up the wrong tree - but I have a set of services (WebAPI and WCF) that use WebSphere MQ to interact with other systems. This works without issue - until I now need to find a way of listening for messages on one of the queues. Is this even possible, or do I need to go down the windows Service route? Your problem can be broken down into two distinct elements: How to integrate MQ with a WCF-supported transport How to expose a WCF endpoint over this transport To address the first issue, you should look at the MQ-MSMQ bridge which ships with Host Integration Server up to

MQJE001: Completion Code '2', Reason '2538'

喜欢而已 提交于 2019-12-05 01:23:46
问题 public class PtpReceiver { public static void main(String[] args) { // TODO Auto-generated method stub try { MQEnvironment.hostname = "192.168.120.28:1415"; MQEnvironment.channel = "SFMS.TO.CBS"; MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES); System.out.println("Q manager"); MQQueueManager qMgr = new MQQueueManager("GSCBBRQM"); System.out.println("Q manager11"); } catch (MQException ex) { System.out.println(ex.completionCode+ ex.reasonCode); } } } I got the

How do you connect to a Multi-Instance Queue Manager using MQQueueConnectionFactory

ぐ巨炮叔叔 提交于 2019-12-05 00:25:13
问题 We have an application which needs to communicate with a Multi-Instance QueueManager. Both (instances) are running on the default port and have unique addresses. serverA.internal.company.address serverB.internal.company.address We use the following code to establish the ConnectionFactory: MQQueueConnectionFactory connectionFactory = new MQQueueConnectionFactory(); connectionFactory.setTransportType(1); connectionFactory.setPort(1414); connectionFactory.setChannel("CLIENTCONNECTION");

Setting WMQ_MDCTX_SET_IDENTITY_CONTEXT impact the COD message

不羁的心 提交于 2019-12-04 20:52:12
I had asked this question before : MQDestination overriding accounting token value According to the response I was even able to set the MQ Accounting token. But the changes have resulted in an impact on the COD which we used to receive earlier. We set the reply to Q and reply to Q Manager as follows Destination codeDestination = session.createQueue("queue://" + replyToQueueMgr + "/" +replyToQueueName); logger.info(":::: codeDestination :::"+ codeDestination); msg.setJMSReplyTo(codeDestination); Using the above we used to get the COD correctly on the sent queue. But after I added the following

How do I get Websphere MQ connection status and how do I reset the connection:

会有一股神秘感。 提交于 2019-12-04 20:10:34
问题 1.) From a .net client, how do I test if the client is connected to the server (i.e. can send and receive) Yes, I could send a message inside a try block and catch the ensuing exception but I'm hoping for a more elegant solution. 2) How do I open, close, and re-open connections? In my attempts to resolve question 1 above I discovered that if I open a connection then call connection.Close() I am not able to obtain another connection from the connection factory (see code fragment below). I

To display a read error when the source file is used by other applications while transfering using MQFTE?

穿精又带淫゛_ 提交于 2019-12-04 19:33:34
I need to display a read error when the source file is being used by other applications. For example : Source filename: test.txt Content: Test file. The above content is stored in the txt file and saved. The txt file is opened and is modified as below but not saved. Test file is modified. When i invoke the transfer now i should get a read error, instead the file gets transferred with the last saved content(Test file). What can i do to display a error message? This case was tested in unix and windows. 来源: https://stackoverflow.com/questions/5870083/to-display-a-read-error-when-the-source-file

How to make a JMS Synchronous request

泄露秘密 提交于 2019-12-04 19:25:32
问题 I have an webapp that is expected to fetch and display data from an External App which is accessible only via messaging (JMS). So, if a user submits a request on a browser, the same HTTP request thread will have to interact with the Messaging system (MQ Series) such that the same request thread can display the data received from the Messaging System. Is there a pattern I can make use of here? I saw some vague references on the net that use "Correlation ID" in this way: Msg m = new TextMsg(

.replyToQueueManagerName and replyToQueueName on different MqEnvironment

空扰寡人 提交于 2019-12-04 18:46:28
How do I go about if my replyToQueueManagerName and replyToQueueName is not in the same MQEnvironment as my requestQueueuManagerName and requestQueueName? Example: //MQEnvironment for requestMessage MQEnvironment.hostname = requestMessageHost; MQEnvironment.channel = requestMessageChannel; MQEnvironment.port = requestMessagePort MQQueueManager qMgr = new MQQueueManager(requestQueueuManagerName); MQQueue inputQueue = qMgr.accessQueue(requestQueueName,MQC.MQOO_OUTPUT); MQMessage requestMessage = new MQMessage(); MQPutMessageOptions pmo = new MQPutMessageOptions(); requestMessage.writeString