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.
Related
We have noticed our web application is not being deployed on Payara 4.1 when Message Driven Beans fail to connect to the server properly or the queues are missing. We'd rather have the application up and running, then fail a deployment due to JMS connection issues. Is there a way on Payara to prevent deployment crashes due to JMS failing?
EDIT: We use IBM MQ with the wmq.jmsra resource adapter.
You didn't state which exact version of Payara (e.g. 4.1.174) and I forgot when this was added, but could you please try to set the system property
-Ddeployment.resource.validation=false
and check if this behaves as you desire.
You can do
asadmin create-jvm-options -Ddeployment.resource.validation=false
or simply put it in your domain.xml.
We are migrating applications from WebSphere Application Server Full profile (WAS) to Open liberty (OL)
One of the pattern we have is to consume a Queue in "strict FIFO order" for some JMS Queue. Many occurrences of the application are running concurrently ("cluster members" in WAS, "pods" in kubernetes/statefulset/docker for OL).
To implement FIFO, one and only one "JMS Activation" process/MDB can consume the Queue and if an exception occurs, stop the listener (JMS Activation)
In WAS, we can do this by
setting"WAS_EndpointInitialState"to"ACTIVE"on the JMS Activation for one server and"INACTIVE"for the others
set"Maximum server sessions"to 1 on the JMS Activation
check"Stop endpoint if message delivery fails"
monitor the logs to see if the activations stopped
In OL we can in"server.xml":
set"autoStart="true"on the"jmsActivationSpec" stanza for one of the process and "false"for the others
set"maxEndpoints="1"on the"jmsActivationSpec"
But how to make the activation stop in case of the application throw an exception in the"onMessage"method in the MDB?
[EDIT 1 After #JoshMc comment]
Currently, the message is moved to the DLQ and the activation never seem to stop, so FIFO is broken as the next message in the Queue is consumed...
Currently, when the "onMessage()"method throws an exception, the message is put back on the Queue, and immediately reprocessed, endlessly
The setting in"server.xml" to connect to IBM MQ from OL is done as decribed here
[EDIT 2]
This feature (stop the activation in case of failure) is implemented in IBM MQ rar v9.1.1 and WebSphere Liberty 18.0.0.4 by setting the "maxSequentialDeliveryFailures" property on the activation spec in this RFE. It does not work on Open Liberty v19.0.0.2 and IBM MQ rar v9.1.1. The rar specifically targets WebSphere Liberty to apply the property as cofirmed after activating traces on the connector:
March 7, 2019 1:17:38 EST PM[Default Executor-thread-7] ResourceAdapterImpl
WMQ messaging : '9.1.1.0-p911-L181120.1'.
MQJCA5003: 'maxSequentialFailureCount' cannot be set outside Websphere Liberty Profile
So the question is still there: How to make the activation stop in case of the"onMessage"method in the MDB fails to consume the message? Open a RFE to IBM MQ asking to port the feature to Open Liberty?
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.
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"
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.