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.
Related
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.
We have a requirement for one standalone Java application that can push JMS message to a JMS queue configured on Weblogic, Websphere and JBoss application server.
Is there any generic JMS client library available, that we can use in our application for pushing the messages to any or all of these servers?
As we understand, there is a specific JMS client for each server (for e.g. wljmsclient.jar required for Weblogic target server, as we would need weblogic.jndi.WLInitialContextFactory to be available as Initial Context factory class, similarly for Websphere and JBoss). And we would like to avoid having 3 different JMS client libraries (1 each for server) in the same application.
However, the catch here is, destination server is not known during compilation time. Only during runtime, it will be known whether the given message is to be pushed to Weblogic, Websphere or JBoss server or all of them. Hence, there is a need for a deployed application to support all 3 servers during runtime.
Is there any alternative generic JMS client library?
You can develop your own client that supports the 3 servers.
Basically you need to have for your standalone application :
The different JMS provider jar on the classpath
For example a jms_config.properties file which stores the configuration for each server (initial context factory, etc.)
Then from a generic code you can build the InitialContext, JMS Queues, etc. depending on the target server.
I am new to MDB, so my questions may sound simple.
I implemented an MDB( serving as a Consumer ) using JDeveloper 11.1.7 and built a JAR file using deployment functionality. Now I need to deploy it to WebLogic 10.3 app server. I have several questions:
1) Should I deploy it as a library or as an application?
2) After I successfully deploy and it's in the "RUNNING" mode I assume it should be listening to the particular Queue I specified as a Resource in my MDB implementation. Is that correct?
3) When implementing an MDB all the examples only specify the "destination" but not the "ConnectionFactory". How does it know where to connect to?
Should I deploy it as a library or as an application?
Deploy as an application since the MDB will likely contain business logic specific to the app.
After I successfully deploy and it's in the "RUNNING" mode I assume it
should be listening to the particular Queue I specified as a Resource
in my MDB implementation. Is that correct?
Yes, if your JMS provider is local, specify the name bound in the local JNDI tree for the destination using destination-jndi-name.
When implementing an MDB all the examples only specify the
"destination" but not the "ConnectionFactory". How does it know where
to connect to?
If the MDB is consuming messages from the local WebLogic JMS provider, the container manages configuration for the connections and sessions automatically, so don't set provider-url, initial-context-factory, or connection-factory-jndi-name, unless you have a custom factory to use.
Refer to WebLogic 10.3 documentation for details:
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 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.