trouble : WAS - Worklight with JMS adapter - jms

I have developped a Worklight (v6) Application. The Worklight server runs on a Websphere Application Server 8.5.5 (JMS provider).
When I invoke my adapter, I get this exception in the WAS log :
[12/13/13 13:20:02:860 CET] 00000093 JMSConnection E com.worklight.adapters.jms.JMSConnectionManager onException FWLSE0005W: JMS connection exception received: com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl incompatible with javax.jms.ConnectionFactory. Closing the connection. [project testJMS]
I have followed 2 ways to make my JMS queue, connection factory, etc.
http://pic.dhe.ibm.com/infocenter/iisinfsv/v8r7/index.jsp?topic=%2Fcom.ibm.swg.im.iis.infoservdir.user.doc%2Ftopics%2Ft_isd_user_creating_jms_que_cx_fact.html (from topic 1 to 5)
and this one :
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Worklight%20and%20Application%20Center%20advanced%20tutorials/page/Worklight%20JMS%20adapter%20-%20Using%20the%20Liberty%20Profile%20integration%20with%20the%20WAS%20full%20profile%20SIBus
two tutorials are similars (using WAS full profile). In my case, the queue is local (Woklight ans the queue are in the WAS). So, I let under commentary "namingConnection" tag in my JMS adapter.
But I do not understand why I get this exception. It seems that is classcast Exception. But how to solve this problem ?
Thanks in adavance

This defect is still present in the 6.0.0.20130614-0631 version of worklight. You will need to upgrade to the 6.0.0.1 (20130909-1459) Fix Pack to get the fix.
If upgrading isn't an option, there is a bit of a hacky workaround that does work with no adverse side effects.
Edit:
Use 6.0.020130926 instead of the above version as mentioned by Idan.

Related

IBM WAS 9, MDB deployment fail the entire application

We have an IBM WebSphere AS 9.0.0.7 and when we want to deploy an application containing an MDB - which listens to a remote WebShpere MQ server - while the MQ server is down, then WAS reports an error
Caused by: com.ibm.mq.connector.DetailedResourceAdapterInternalException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internalerror caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.
and stops the deployment, i.e. application does not start. Which is a big problem as it is a critical hub for other operations. We want to force WAS to start the application and retry the JMS connection later. Is it possible?
You can try setting custom property WAS_EndpointInitialState property to INACTIVE, see here and here, and also may want to look through here.
We've found a solution here: Configuring properties for the IBM MQ resource adapter
Trick was to set startupRetryCount and startupRetryInterval. When the MQ server is not available, the app starts, however it is reported as "Partial start". All other parts of the application seems to be running just fine.

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

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

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"

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.

Message Driven Bean (MDB) running on Websphere Application Server, leaves channel connections open

Hi
I have two Message Driven Beans (MDBs) running on Websphere Application Server v7.
It is connecting to, and receiving messages from Websphere MQ v6.
On the Queue Manager, we notice that the number of open channel connections keeps on growing, and appears as though the MDBs are not releasing these connections.
I am not aware of any errors happening in the onMessage method of the MDBs which could cause it to not exit cleanly.
Any advise on what could be causing this would be greatly appreciated
Thanks
Gavin
There is a known issue with WAS v7 connecting to WMQ V6 where MDBs do not reconnect. The APAR mentions failures after a WMQ outage but other types of failure can result in similar behavior.
In general, the advice is to move to WMQ v7 since WMQ V6 is out of service as of September 2011. The fix was released in v7.0.1.1 and later. No v6 fix pack is listed for delivery of this APAR, although it doesn't mention why. So if you cannot upgrade to v7.0.1.1 or later, then obtain via a PMR and apply IC64098 and see if that solves the problem.
References:
PSP #1316899: Information about using the WebSphere MQ messaging provider for WebSphere Application Server Version 7.0
IBM IC64098: APPLICATION DOES NOT AUTOMATICALLY RECONNECT TO THE QUEUE MANAGER IF CONNECTION IS LOST WHEN USING THE MQ RESOURCE ADAPTER
You need to upgrade WMQ v7.0.1.1 or later version since this is a known issue with WAS v7 connecting to WMQ V6.

Resources