How to use Worklight JMS adapter to connect to WebSphere MQ - jms

I have followed the steps given in this link to get the JMS adapter working, but couldn't get it working
http://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/devref/t_connecting_jms_adapters_to_websphere_mq.html
I am using Worklight Devlopment Server v6.2, and I am trying to connect to WebSphere MQ (both worklight & mq are on the same machine), would jms adapter work with this setup ? Are there any other configurations that needs to be done for this to work
below are the adapter entry combinations that I have tried
Combination 1:
<namingConnection url="file:/C:/K5/JNDI_DIR/"
initialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"/>
<jmsConnection connectionFactory="TESTJMSCONNFAC" />
Error message: [ERROR ] FWLSE0005W: JMS connection exception received: null. Closing the connection.
Combination 2:
<namingConnection url="tcp://localhost:1414"
initialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"/>
<jmsConnection connectionFactory="MQConnectionFactory" />
Error message: [ERROR ] FWLSE0005W: JMS connection exception received: tcp://localhost:1414. Closing the connection.
Configuration Info below:

Related

Camel JMS : connection refresh not working (IBM MQ)

I'm using the following endpoint :
jms:queue:MY_JMS_QUEUE?transacted=true&recoveryInterval=10000&testConnectionOnStartup=true
Everything works well but whenever the MQ connection is lost (due to IBM MQ server restart), the connection refresh does not work.
In my logs i have that :
ERROR [c.c.j.DefaultJmsMessageListenerContainer] []] Could not refresh JMS Connection for destination 'MY_JMS_QUEUE' - retrying using FixedBackOff{interval=10000, currentAttempts=0, maxAttempts=unlimited}. Cause: JMSWMQ0018: Failed to connect to queue manager 'xxx' with connection mode 'Client' ......('MQRC_Q_MGR_NOT_AVAILABLE')
And nothing else, i was expecting to have the same error messages multiples times with currentAttempts=1 then 2... until the MQ is back.
I checked the documentation but i don't see anything else. My configuration:
Camel version : 3.11.3
Java: 11.0.8
Spring boot : 2.5.2
As your connection mode is "Client" you can give the MQ automatic JMS client reconnection feature a try. You would need to configure the "ClientReconnectOptions" in the connection factory definition.

IBM MQ JMS connection not established from eclipse spring boot

I have been getting the issue of JMS connection refreshed from a few days.
Previously I was able to connect to the MQ and the same spring boot java code was working fine.
Now, the war file I build and deploy in the IBM Websphere also works. But it doesnt connect from Eclipse IDE. New to IBM MQ. Please help.
Setup of JMS message listener invoker failed for destination 'testq_OUT' - trying to recover. Cause: JMSCC0008: This connection is closed.
2022-03-10 14:44:28,659 INFO org.springframework.jms.connection.SingleConnectionFactory [DefaultMessageListenerContainer-1] Established shared JMS Connection: com.ibm.mq.jms.MQQueueConnection#3d803c95
2022-03-10 14:44:28,659 INFO org.springframework.jms.listener.DefaultMessageListenerContainer [DefaultMessageListenerContainer-1] Successfully refreshed JMS Connection
2022-03-10 14:44:34,767 WARN org.springframework.jms.listener.DefaultMessageListenerContainer [DefaultMessageListenerContainer-2] Setup of JMS message listener invoker failed for destination 'testq_OUT' - trying to recover. Cause: com.ibm.mq.MQException.<init>(Ljava/lang/String;Ljava/lang/String;II)V
2022-03-10 14:44:34,768 INFO org.springframework.jms.listener.DefaultMessageListenerContainer [DefaultMessageListenerContainer-2] Successfully refreshed JMS Connection
2022-03-10 14:44:40,788 WARN org.springframework.jms.listener.DefaultMessageListenerContainer [DefaultMessageListenerContainer-3] Setup of JMS message listener invoker failed for destination 'testq_OUT' - trying to recover. Cause: com.ibm.mq.MQException.<init>(Ljava/lang/String;Ljava/lang/String;II)V
2022-03-10 14:44:40,788 INFO org.springframework.jms.listener.DefaultMessageListenerContainer [DefaultMessageListenerContainer-3] Successfully refreshed JMS Connection
Please check the stack trace here
I found that some jms jars are not picked up from maven repo by the ide. so tried adding them on the build path and this works!

Can't turn of auto create function in embedded ActiveMQ

I would like to use ActiveMQ in my Spring Boot application. During debugging I have found out following error:
org.apache.activemq.broker.BrokerService : Failed to start Apache ActiveMQ (localhost, null)javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=localhost`
Seems like broker is created upon creation of the first connection, according to ActiveMQ's documentation. Is is possible to turn off auto-creation by setting the create property on the VM Transport to false, e.g.:
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?create=false");
When I tried this solution I got following error:
DefaultJmsMessageListenerContainer : Could not refresh JMS Connection for destination 'test' - retrying using FixedBackOff{interval=5000, currentAttempts=364, maxAttempts=unlimited}. Cause: Could not create Transport. Reason: java.io.IOException: Broker named 'localhost' does not exist.
Now I think the broker is not creating at all or this process is pending. Did anyone have a similar issue? If so how did you resolve it?
ActiveMQ's vm transport optionally creates a broker, or connects to a running broker.
Sounds like you are missing a step in your application boot-up plan. Either you need:
A component to startup the broker
Designate one of the connection factories to start the broker using the vm transport:
Designated broker startup connection factory:
vm://localhost?create=true
All other connection factories:
vm://localhost?create=false

MQ 7.5 + Glassfish 4 Integration

I am trying to setup IBM MQ 7.5.0.2 + Glassfish 4(Payara) JDK 8 and using Camel Integration as a Client
I have followed deploying RAR approach however I am unable to make a connection from Glassfish to MQ
The Connection Pool ping fails stating "Ping Connection Pool failed for MyPool. MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 Please check the server.log for more details."
In server logs, I see the below:
[#|2017-03-24T08:40:31.494+1100|WARNING|Payara 4.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator|_ThreadID=111;_ThreadName=org.springframework.jms.listener.DefaultMessageListenerContainer#0-1;_TimeMillis=1490305231494;_LevelValue=900;|RAR5038:Unexpected exception while creating resource for pool MyPool. Exception : com.ibm.mq.connector.DetailedResourceException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.|#]
RAR5117 : Failed to obtain/create connection from connection pool [ MyPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011|#]
I am following the below:
https://genericjmsra.java.net/docs/websphere-mq-integration-guide/webspheremq_integration_guide.html
I faced a similar problem, the issue in my case was that the channel was blocked by the CHLAUTH rule. I fixed the issue by disabling authorisation on the channel using the below commands on the IBM Integration Console:
alter QMGR CHLAUTH(DISABLED) alter AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(none) REFRESH SECURITY TYPE(CONNAUTH)

Integrating websphere MQ with boomi

We are working on Integrating websphere MQ with boomi,
The Configuration in Boomi for JMS connector is as follows:
For JMS Connection :
Authentication Present:
User : adminstrator
password : xxxxx
JMS Server : Websphere MQ
Connection type : Single QM connection
Queue Manager : BoomiQMGR
Channel Name : BoomiSC
For JMS operation:
Destination : queue:BoomiQ(where BoomiQ is the Queue Name, "queue:" as mentioned in the boomi Documentation)
But the Problem is,
with these configuration we encounter the below error in boomi:
*"Test execution of TestProcess completed with errors. Embedded message: Unable to retrieve JMS message; Caused by: JMSCC0005: The specified value 'queue:BoomiQ' is not allowed for 'XMSC_DESTINATION_NAME'."
From what we can tell in reading around this occurs due to WebSphere MQ destination naming restrictions, we are using WEBSPHERE version : WS_MQ_V8.0_TRIAL_FOR_WINDOWS_ML(downloaded from IBM Site)
Can someone help us out on this?
Please suggest if we are missing anything.
Thanks in Advance.
The problem looks to be the format of the Queue Name: queue:BoomiQ isn't valid for the WMQ JMS client.
If the Queue on the QueueManager was say MyQueue, then either ensure that MyQueue is passed to JMS or queue:///MyQueue.

Resources