Weblogic to JBoss JNDI - JMS queue Consumer and Publisher - jboss

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.

Related

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.

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).

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

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

How to access JBoss 5.1 GA 's MBeans?

I would like to access JBoss server's mbeans with my POJO class. I learned about mbeans in these site.But I'm not satisfied.Is there any ways to access JBoss server's mbeans with java class and how to apply these mbeans?
To get reference to local JBoss MBean server, the easiest way is to use MBeanServerLocator. Check this link: https://community.jboss.org/wiki/HowCanIGetAReferenceToTheMBeanServer
If you want access to remote JBoss MBean server, then you can either use:
JMXConnectionFactory http://docs.oracle.com/javase/1.5.0/docs/api/javax/management/remote/JMXConnectorFactory.html or
RMI adaptor http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/Connecting_to_the_JMX_Server-Connecting_to_JMX_Using_RMI.html
You can find plenty of examples for each approach if you Google it.

Remote JMS #Resource injection into EJBs

Does anyone know if it is possible to inject a JMS Queue as a #Resource when the jms queue is provided by a remote server.
I'm using Jboss 5.1 with JBoss Messaging. We have a client program on a different JBoss server that needs to post messages to this remote queue.
Thanks in advance.
#Resource annotation has a name attribute in which you can specify the JNDI name of the component you want to inject. The container will however prefix it with java:comp/env, so that means that it will look up resources in your local JNDI namespace.
You will have to perform a programmatic JNDI lookup for this as far as I know.