WebSphere SIB vs MQ ? what is the best option to go for asynchronous messaging from within a J2EE application running on WebSphere? - performance

Requirement :Need to Handle web service request asynchronously.
My application is a EJB 3.0 Stateless Session Bean exposed as web service developed using RAD and deployed on a load balanced WebSphere 7.0 App Server .
It receives web service request and stores the message as Object in a Queue. Request will be processed asynchronously via MDB (Message Driven Bean) .
Two options exist:
1) WebSphere SIB
2) Websphere MQ
Is WebSphere SIB as good as MQ ? Are there any specific advantages of using MQ over SIB ? Since I'm using only Java and is there any advantages of MQ ? Note : it is a enterprise application and reliability / performance /scalability requirements need to be met.

Related

IBM Liberty message consumption with fail-over

We are designing a solution that will consume messages from IBM MQ using JMS. The plan is to use WAS Liberty, so JMS is the technology of choice. We will create Message-Drive beans that will listen for messages in MQ queues.
We are considering both WAS Liberty and OpenLiberty as well.
The trick here is that we must implement it with fail-over, so that if one of our server fail, the other will keep consuming messages from MQ automatically. Like in a ative/passive mechanism.
I'm aware that the MQ adapter needs to be installed as it is not provided out-of-the-box.
I have the following questions:
Does WAS Liberty messaging implementation supports fail-over? Meaning that if the ative message consumer node fails, the stand-by node will automatically migrate and start consuming messages from MQ? What about OpenLiberty?
How can I configure the message system to work that way? Can you point out to the documentation?
Or is this feature only provided by WebSphere?
There is no such functionality in WebSphere Liberty or Open Liberty yet. You can create RFE here https://www.ibm.com/developerworks/rfe/?PROD_ID=544 .
There are ways to do it manually, check these links:
JMS Activation spec on Liberty: “WAS_EndpointInitialState” full profile equivalent property?
Controlling the state of endpoints at runtime
Solution that you could do:
create a script/application that will monitor your servers and call that API to enable/disable endpoint in specific server
or use Dynamic cluster/ auto scaling feature of Liberty and divide you app to two clusters - one with MDBs, one without. And then define policy that MDBs cluster has 1 instance always available. So once the server dies it is automatically restarted somewhere in the cluster
or use Kubernetes/ICP platform in the same way - so deploying 2 versions of app, and defining different replicasets parameters.

Generic JMS client library for Weblogic, Webshere and JBoss servers

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.

Connecting to remote JMS Provider

I am trying to connect to a foreign JMS provider from Websphere Application Server.
Can we connect to a remote JMS provider from Websphere Application Server without using Websphere MQ?
You don't need WebSphere MQ, if your provider supports JMS 1.1 you can configure it as Generic JMS Provider. See the following page as a startnig point: Choosing a messaging provider
Choose a third-party messaging provider. You can use any third-party
messaging provider that supports the JMS Version 1.1 unified
connection factory. You might want to do this, for example, because of
existing investments.
Notes:
To administer a third-party messaging provider, use the resource adaptor or client supplied by the third party. You can still use the
WebSphere Application Server administrative console to administer the
JMS connection factories and destinations that are within WebSphere
Application Server, but you cannot use the administrative console to
administer the JMS provider itself, or any of its resources that are
outside of WebSphere Application Server.
To use message-driven beans (MDBs), third-party messaging providers must include Application Server Facility (ASF), an optional feature that is part of the JMS Version 1.1 specification, or use an inbound resource adapter that conforms to the Java EE Connector Architecture (JCA) Version 1.5 or 1.6 specification.

Oracle Service Bus - Application Server & JMS Support

Is Oracle Service Bus supported by any application server in the backend - for eg: weblogic application server? Or does it have its own implementation of application server?
Tibco has something called EMS which is its implementation of JMS spec. Does OSB have its own implementation of JMS? Or does it utilize the capabilities of any application server which it is integrated with?
OSB runs on Weblogic and it is the only suppoorted application server. Some other fussion Middleware products can run on WebShpere. Details can be found in http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls
OSB don't have its own JMS implementation. It can use any standard JMS (e.g. one shipped with Weblogic). It has also adapters for IBM WebSphere MQ.

WebSphere JNDI lookup in non managed threads

I have a Java EE application (actually, it is an apache camel application) deployed on WebSphere Application Server 7.
My application consumes service requests from Web Services (threads started from the servlet container in WAS) and from JMS queues (not SI-BUS, but WebSphere MQ if that matters). For the JMS listener, Camel (or the underlying spring framework perhaps) initiates own threads (seems to be simple java threads more or less) to deal with JMS requests.
I also have a transactional Database attached to the application. So, in spring, I have something like this definied to grab a transaction manager (WebSphere built in JTA probably).
<tx:annotation-driven/>
So my problem is, that I get an error like this when a Camel/JMS is triggering an event in the application:
org.apache.openjpa.persistence.PersistenceException: TransactionManager not found in JNDI under name java:comp/websphere/ExtendedJTATransaction
Seems like threads not initiated by the container itself cannot do JNDI lookups correct. Is there a way around this issue?

Resources