Apache CXF: Publishing a Web Service (SOAP over JMS) with failover feature - soap

Apache CXF: It seems that failover feature is available, but for clients. I need to create a service that is binded to a JMS queue of a particular JMS server. The JMS provider(TIBCO) has capability of failing over. Is there a way in which I can allow my service to failover to another JMS server at runtime and publish it there? If cxf is not capable of doing this, is there any other framework which allows failover feature for publishing services over JMS?

Vidish,
Server :
The TIBCO EMS administrator needs to configure the FT connection factory and provide the connection factory name and URL details to you. Configure those details in your JMS configurations - that's all needed for server.
Client :
TIBCO JMS API provides failover mechanism. Sample code is available in TIBCO EMS installation folder.
Joy

Related

Weblogic to JBoss JNDI - JMS queue Consumer and Publisher

I am working on an example where a JMS queue is hosted on a JBoss EAP 6 instance (one for Request and another for Response). I also have an application running on a Weblogic managed server.
I would like to setup a mechanism that allows applications running on Weblogic to be able to consume messages that are added on the Request queue hosted on JBoss. Also the applications should be able to publish messages to the Request queue (also hosted on JBoss)
I read about Foreign JNDI Providers in Oracle Documentation, and most of the examples I find are Weblogic to Remote Weblogic connections and Weblogic to Remote LDAP. My concern is around the difference in in the implementations on javax.naming.InitialContext for Weblogic and JBoss (whether it would be compatible).
Does anyone have any suggestions on this?
Neither the JNDI implementation nor the JMS implementation from JBoss EAP will be compatible with Weblogic. However, that shouldn't be a problem as both can be used by the same application given the right configuration.
Consider a standalone JMS application that consume a message from JMS provider X and sends a message to JMS provider Y. It would first use the JNDI implementation from JMX provider X to lookup the JMS connection factory and queue. That lookup would return the proper JMS implementation objects from provider X. The application would use those objects to consume a message from the queue. Then it would use the JNDI implementation from JMX provider Y to lookup the second JMS connection factory and queue. That lookup would return the proper JMS implementation objects from provider Y. As long as the JNDI InitialContext properties are all correct for each of the lookups and all the implementation classes are on the the application's classpath then everything will work without issue.
The situation in Weblogic is similar. You simply need to configure the foreign JNDI provider with the right properties, put the right implementation classes on the classpath, and then use all the right names in your JNDI lookups.

Do both receiving and sending end need to setup IBM MQ?

My application only reads messages from the IBM MQ. I am trying to understand, if one of the end is only reading messages from queue, do both sending and receiving ends need to setup JMS provider(IBM MQ)/Connection factories, Queue destination?What is the difference between JMS provide and Queue manager? Who needs to install JMS provider and Queue manager?
You can think of the queue manager as the server where queues and other MQ objects live. Your application is the client that connects to the server and interacts with the objects there.
IBM MQ server/queue manager IS your JMS provider. Your client application needs the IBM MQ implemented JMS libraries (IBM MQ Classes for JMS) and the JMS api which you can then use in your application to add parameters to your connection factory to connect to the queue manager.
You can see a basic tutorial for a JMS MQ client application here.
Depending on who is in charge of your queue manager and how they have set things up, you should probably not be hard coding the queue manager and queue details in your client application. You should be getting the connection details from the JNDI store if you have an administrator who has set one up for you. See more at the bottom of the JMS tutorial I linked to, for how JMS works.

Apache CXF JMX monitoring for SOAP clients

According to http://cxf.apache.org/docs/jmx-management.html, CXF provides JMX monitoring for Web Service providers. The documentation is silent about whether it works for SOAP clients or not. Metro, on the other hand, clearly says that client monitoring is supported as well. The only reason I am looking at CXF is because it provides connection pooling which Metro does not, to my knowledge.
So my question really is, does anyone know if CXF supports client side JMX monitoring for SOAP clients? If yes, can you give some pointers? If not, is there a way to achieve connection pooling with Metro?
To answer my own question, CXF does not support client side JMX monitoring. It has better support than Metro for server side monitoring, provided CounterRepository bean is configured.

JBoss 7(EAP 6) MDB integration with Websphere MQ using JNDI on LDAP

I want to write a application using MDB(message driven bean) and deploy to jboss eap 6.1 server.
My MQ is IBM Websphere MQ, and I have a LDAP server to locate the MQ JNDI namespace, and I know how to get/put message using JNDI and JMS.
But when coming to JBoss, I don't know how to configure MDB to listen to the MQ. I want to use the JNDI on LDAP, and write a message consumer on the JBoss server. And I don't want to hard code configuration in the annotation.
I did a lot of searching, but no any solutions. Can anybody show me the detailed process?
Thank you!
Unfortunately, this is not possible due to the limitations in the IBM JCA. The IBM JCA builds a managed connection factory for each MDB deployment based on the MDBs activation specification. This will typically have your MQ host, port, channel, etc. specified.
You can not specify a the JNDI name of a connection factory to use. This is a bit odd as you can specify the JNDI name of your destination.
Functionality similar to the LDAP external context can be achieved using the IBM Client Channel Definition Table (CCDT).

What protocol provider to connect to JMX on WebSphere via SOAP?

I'd like to connect to the JMX server on a WebSphere application server instance using a SOAP over HTTP connector but I don't know where to find a compatible SOAP protocol provider.
I get a MalformedURLException when using a JMXServiceURL starting service:jmx:soap:... that says Unsupported protocol: soap. What jar(s)/protocol provider string do I need to include?
Update: I am playing with a standalone Java client.
Unfortunately, IBM only provides a proprietary API to connect with SOAP over HTTP. They don't provide an implementation of the standard JMX API for that protocol. I faced the same issue and I developed such a connector (which is basically a thin JMX compliant wrapper around IBM's proprietary API), which is now available as Open Source. You can find more information here:
https://github.com/kszbcss/xm4was/wiki/JmxClientConnector
The following document describes how to set up a standard JMX tool (VisualVM) to use that connector:
https://github.com/kszbcss/xm4was/wiki/VisualVMHowTo
As you can see from these documents, after adding the relevant JARs to the class path and setting the necessary system properties, you would simply connect using wssoap as protocol.
Check that in the path Application servers > <server_name> > Administration services > JMX connectors the relative SOAPConnector exists and is Enabled.
Refer at Infocenter for more information.