WSO2 ESB JMS listener configuration at runtime - jms

I am trying to add new parameter from WSO2 admin console Transport Management -> JMS Listener screen (don't want to use axis2.xml as I want updates to be used by proxy services without re-starting servers - hope this is possible ?). While adding new parameter I am getting following error -
Error while initializing JMS listener
java.lang.String cannot be cast to org.apache.axiom.om.OMElement
Can you please advise what should be the format of parameter value. I am trying to add similar value as available under "default" or "myQueueConnectionFactory".

I tested your scenario and this seems to be a bug with ESB. Go to JMS Listener Configuration and click on Update without any change to the default parameter values. Even then the same error is thrown. So I have reported this issue at https://wso2.org/jira/browse/ESBJAVA-2412.
Unfortunately for now you will have to configure the parameters through axis2.xml until this issue is fixed. You can enable/disable the listeners through management console without any issue.

Related

Is it possible to stop an MDB from receiving messages in Liberty Profile?

In a full WAS it is possible to stop and restart a JMS activation specification, either by using the administrative console or by using the J2CMessageEndpoint MBean. My question is if the J2CMessageEndpoint MBean will be available in Liberty Profile, making it possible to pause an activation specification?
If not, is there any other way that I can activate/deactivate the message endpoint in Liberty Profile?
There isn't a direct equivalent, but you can change the server xml so the activation specification binding no longer matches. When the server picks up the new configuration, which is dynamic by default, the binding won't match and the mdb will stop.

Getting 'MQCC_FAILED' reason '2072' 'MQRC_SYNCPOINT_NOT_AVAILABLE' while attempting to send a message

I have an MDB (mdbA) in JBoss 5.1 GA which listens to an MQ 7.0 queue. After reception, the message is persisted to a MySQL database and I would like to send the message to another queue (queueB) and then continue processing the message in mdbA which does some more inserts and sends a message to a HornetQ. All works fine for the first message and I see the message in Database as well as queueB and hornetQ. For all subsequent messages, the "send to queueB" results in 'MQRC_SYNCPOINT_NOT_AVAILABLE'error 2072.
My mdbA has the following annotations.
#TransactionAttribute (TransactionAttributeType.REQUIRED)
#Service
Please let me know if I need to provide more information.
Could someone please assist?
Solved a similar issue in WebLogic where the MDB itself was annotated #TransactionManagement(TransactionManagementType.BEAN) and choosing instead #TransactionManagement(TransactionManagementType.CONTAINER) solved the issue, with no Transaction attribute on methods, hence default REQUIRED.
In fact, sound MDB's would likely delegate transactions to the container and not attempt to control them explicitly in code. If you use BEAN management type and do not open explicitly a transaction context, no sync point would be available...

How to send JMSType in jmeter

I am trying to send jms message with JMeter (Publisher or Point-to-point), but I am not able to send JMSType.
If I put it to JMS properties with name JMSType it finishes with error:
Response message: The property name 'JMSType' is illegal since it starts with JMS
By default Jmeter does not include any JMS implementation jars in its distribution. This must be downloaded from the JMS provider and put in the lib directory of Jmeter.
I have tested this in Jmeter 2.9 and 2.13. You can set JMS header properties including JMSType in the JMS properties tab and publish a message successfully without any errors.
So the answer is no it is not possible. I've changed it in jMeter sources for me. It is probably specific for queue vendors. Any of them allow setting properties as text property the others requires to set it directly to message as there is the JMSType parameter and when you try to set the string 'JMS*' parameter tou got exception.

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"

JMS Point-to-Point in jmeter

Reg: JMeter Point-to-Point
Could you please tell how to get the QueueConnnectionFaction
And ContextConnectionFactory
Can anyone help me in configuring JNDI properties in JMS POINT-TO-POINT of JMETER
ERROR - jmeter.protocol.jms.sampler.JMSSampler: progress/message/jclient/TopicConnectionFactory java.lang.NoClassDefFoundError: progress/message/jclient/TopicConnectionFactory
Please provide some solution.
It seems you didn't put a dependency jar from your jms provider, see:
java.lang.NoClassDefFoundError: progress/message/jclient/TopicConnectionFactory
The QueueConnnectionFactory is the container of the queues that is created before the queues. I used to use the Hermes JMS application to get this information but you could get it from WebLogic too.
For example, the next image shows my configuration, using the information of binding for the QueueConnectionFactory field, and using the information of initialContextFactory for the InitialContextFactory field, and do not forget to use the providerURL in the ProviderURL field.
In this example I am not getting the response. For this reason, I am only putting the name of my requester queue.
Ensure that the information is correct. In the JMS Properties you could use Headers for the request.

Resources