Configuration of WebMethods Client to connect to WebSphere JMS (not WebSphere MQ) - jms

Currently I have setup two queues on WebSphere 7. One for sending and one for recieving messages.
I have configured a activation spec on the receiving queue and the messages are consumed fine by a Message Bean.
Also I have written a client that can run on a separate jvm which can send messages fine to the queue.
I am sure that the queues work.
Now I want to know how can I connect them with WebMetods. I know that WebMethods supports JBoss and WebLogic but no support for WebSphere.
I should be able to get this working just by providing:
a provider url - "iiop://172.17.13.65:2809"
a connection factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue"
and an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"
(at least this is what my client is using)
Is there anybody that has resolved this issue? And what are the steps they took?
Thank you in advance for your help.

We were able to get this implementation happen.
To solve this Web Methods had to import some jar files for Client JMS:
com.ibm.ws.ejb.thinclient_7.0.0 + com.ibm.ws.orb_7.0.0 + com.ibm.ws.sib.client.thin.jms_7.0.0
And use a bootstrap of this type PROVIDER_URL: "iiop://natasha:2810"
Alaso these details as previously mentioned:
a factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue" and
an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"

Related

PCF app connecting to Spring AMQP - different messaging service after binding app to RabbitMQ service

I am new to PCF and need some help understanding the root cause of an issue I am facing.
We have one PCF application that is connecting to Rabbit MQ (no binding done on the Rabbit MQ service yet). the messages get passed through the application to queues created on this Rabbit MQ instance. so far so good.
But when we bind again the application to the same Rabbit MQ instance and restage the application, it starts getting connected to a different messaging instance and the message is being relayed to that messaging service and no message transfer happened on expected Rabbit MQ instance although I can't see the actual movement of messages because I might not be having access to the mystery messaging service (I say that because two spring boot services are communicating as expected and the process gets completed).
I am clueless as to what is changing in the application by binding it to Rabbit MQ. is it a default spring implementation of spring AMQP which is interfering here? what can I do to stop this behavior? I haven't provided any parameters while binding the app to Rabbit MQ.
I tried to put the loggers to find out the name of the exchange it's getting connected to but it's still the same exchange, but I can't see the messages flowing and can't explain the phenomenon to the client.
Try to look at the service key of the your rabbit instance and that will give you hostname etc. i.e. rabbitmq details where you are connecting to after binding.
cf service-key SERVICE_INSTANCE SERVICE_KEY
Not sure if there is any default setting in the app that's being used for setting up the connection to a different rabbit instance in absence of binding.

Stale connection in IBM MQ when connecting with WAS and Spring-JMS

We are using Websphere Applicaion Server with Spring JMS, Around 25 applications connect to a IBM MQ. Off-late we are seeing lots of stale connection on the MQ channel to which all these applications connect.
By stale connections I mean the connection are not being used for many days and the application keeps creating new connections. We are not able to identify which application creates these connections that are not being used but they all use the same framework code
WAS version = 8.5.5
Spring = 4.1.2
The Spring jms:listener-container has the following configuration
connection-factory = org.springframework.jms.connection.DelegatingConnectionFactory
acknowledge=auto
concurrency=2-10
Any pointers on any configurations that can be done on QueueConnectionFactory (JMS Resource) on WAS or on the spring side would be helpful.
I know I have not given much information, but the problem is that there are no errors / exceptions, the application creates these connections to the MQ channel and all connections gets cleared when the server is restarted
Adding one more question
We use org.springframework.jms.connection.DelegatingConnectionFactory , for replying back, Does it make sense for us to close the session once we have send back the message?
Thanks in Advance
Charlie

Not able to create jms queues in websphere programatically using standalone java client

I wrote a java client to connect to jms in websphere.
I was able to connect and produce and consume message.
Problem I am facing is when I do Session.createQueue(), websphere jms is not creating a new queue.
Please could some one throw some light on this issue...
Thanks in advance...
If you are working with WebSphere MQ as the messaging provider within WebSphere Application Server the queue will need to be created on the WebSphere MQ QueueManager first. This can be done either via the graphical WMQ Explorer or via the command line using the 'runmqsc' tool.
Information can be found for these via the WMQ InfoCentre - suggest doing a websearch for "WMQ Library" to get the latest link, currently though it is http://www-01.ibm.com/software/integration/wmq/library/index.html
Topics though don't need to be pre-created - though they can be if required. Various properties can be set different to the default.
If the Queue doesn't need to be permanent, for example as a temporary reply to then look into creating a temporary queue from the JMS Connection.
createQueue doesn't create a new queue. It simply creates a javax.jms.Queue object from a vendor specific identifier. javax.jms.Queue objects are just references to existing queues. Typically, you retrieve javax.jms.Queue objects from JNDI; createQueue is only useful in scenarios where using JNDI is not possible or not desirable.
Note: there is one exception to this, namely JMS providers that support autocreation of queues (I think ActiveMQ has such a feature).

WebSphere MQ integration with WebLogic - issue sending messages to foreign queue

I'm testing a WebLogic MDB (running on my local Windows dev environment - Eclipse/WebLogic 10.3.2) with WebSphere MQ 6.0.1.0 (running on a Linux server). The WebSphere MQ components have been previously configured and I have the correct .bindings file.
I have followed the instructions described here.
I have no problem consuming messages that are placed on the MQ queue. However, when I attempt to configure the MDB to put messages back to the MQ queue I get the following warning upon server start-up:
<Warning> <JMSPool> <BEA-169808> <There was an error while making the initial
connection to the JMS resource named jms/WLSenderQCF from the EJB "TestMDB"
inside application "EJB Test 2EAR". The server will attempt the connection
again later. The error was javax.jms.JMSException: MQJMS1068: failed to obtain
XAResource>
If I place a message on the queue, my MDB consumes the messages, but these exceptions are thrown when the MDB attempts to put the message to the MQ Queue:
javax.jms.JMSException: MQJMS1068: failed to obtain XAResource...
javax.transaction.xa.XAException: client connection not XA enabled...
java.lang.NullPointerException
Anyone run into this and knows what the problem is?
Thanks for any help.
One issue seems to be the version of MQ you're using. It is ancient. IBM took MQ 6 out of support quite a while ago (Sept '12! http://www-01.ibm.com/support/docview.wss?uid=swg21584325).
Things got a lot easier when IBM decided to include the extended transactional client in the product for free: http://www-01.ibm.com/support/docview.wss?uid=swg21584325
So one option might be to upgrade to a version which includes this out of the box:
7.0.1.12+
7.1.0.5+
7.5
8.0
Otherwise... look into the v6 documentation on how to enable the 'extended transactional client' for JMS assuming you paid for it.

Weblogic JMS server configuration: JMS module to talk to JMS Server

I am fairly to new to JMS configuration in JMS.
Here is what i am trying to do.
We have multile JVMs of our applications in a single weblogic domain. We want to have JMS server installed on say one JVM and rest of the JVMs refer to the first JMS Server.
So, the configuration is:
JVM1: JMS Server is installed
JVM2: JMS Module installed
Now I need to configure JVM2 to talk to JMS server on JVM1. How do i do that?
This is on weblogic 11g
I suggest going through the basics of WebLogic 11 JMS configuration and then taking a look into this good guide from Oracle documentation. I know there is a lot of info over there, but in the long run it is better to know what you are doing rather than just copying someone else's configurations.

Resources