JMS Bridge between Active MQ and WebLogic - java

I am working on a migration project where we have implemented JMS server from WebLogic to Active MQ. THe problem is that the client is still on weblogic and we dont wish to change that .
The connection factory used in server is or.apache.context.InitialContextFactory whereas in weblogic its org.weblogic.WLConnectionFactory. Please help in creating a bridge between these two.
Can't we create a JNDI factory by "org.weblogic....." in active MQ and use it for look up.
Please help.
Thanks & Regards,
Tushar

I think no, because if you create org.weblogic..... in JNDI, it will look for the same class in activeMQ jar, and will fail. Better to have weblogic on both client and server.

Related

How to configure remote queueing using Active-mq (jBoss EAP 7.2) on both sides

I did search on jBoss EAP 7.x documentation but didn't find any detailed explanation on how to do the configuration I'm looking for: [jBoss EAP 7.2] <--Remote queues--> [jBoss EAP 7.2 - The actual Queues are here]
As I used to do on jBoss EAP 6.4, I was using Netty with remoting configuration with Acceptor/Connector on Client Side with a defaut remoting on the port 5445.
I'm here to find out the best used practice on how to configure and what are the Actual configurations to be done (which variable on which module etc...)
Thank you community.
You shjould be able to do the same: create a connection factory and a connector on your 'client' server to connect to the acceptor on the 'server' server.
As proposed the solution:
- Using Acceptor on "Server" server side
- Using Connecor on "Server" client side
Another hint is using the Outbound-socket-binding to choose where to the remote queues will publish/read data.
Thanks community.

How to use Webshere MQ Server via ActiveMQ server and what to bear in mind?

We have a requirment to connect to a JMS queue provided by an externally controlled IBM Websphere MQ server. Now, the easiest way to do it would be to include the Websphere MQ client into our application and just use the queue.
But IBM was so far not able to tell me about possible licensing costs of this setup. I saw forum posts and hints on IBM download pages that using the client is free of charge, but I do not know for sure. Maybe it's even the case, that the owner of the MQ server is allowed to provide us the client jar to use it for connecting to them, but again, I don't know for sure.
So I am evaluating the possibility to setup my own open source JMS server, for example an Apache ActiveMQ, and then bridge over to the Websphere MQ. For this, 2 questions rise up for me:
Technical solution: How would that be done exactly? I read a bit about bridging between JMS providers and something about the Apache Camel project, but have so far no exact idea how much work this will be and what needs exactly to be done.
Impacts: What should I bear in mind when implementing such a scenario? Do I still have to include the MQ client and such would not benefit over a direct connect? Are there any negative impacts compared to a direct connect that I must consider?
Update: Our application is a Java EE 6 application running on a JBosss 7.1. Concerning the MQ server version I have no information yet.
2nd Update: The MQ server version is 6.5.
The client to MQ is available for you to use; there's a license agreement to accept not a charge.
There are several options for how these client libraries could get to you practically.
You mention JMS is being used - within what container/environment is this? JavaSE/JavaEE/OSGi or something else.
JavaSE or the 'something else' would the JMS Client JARs.
JavaEE would need the IBM MQ Resource Adapter
OSGi would need the OSGi Bundles
In earlier versions of MQ there was the 'extended transnational client' that had a charge associated with it (pretty much the same as a full server) but that is no more.
As this is for JBOSS 7.1 - the solution would be to follow this link
http://www-01.ibm.com/support/docview.wss?uid=swg21633761
.. and download the IBM MQ Resource Adapter directly from the instructions there... 7.5.0.4 has also been released this last week. Please consider this as downloading the MQCxxx support pac will give you too much. This download does have the license agreement to accept but it's the same as the one has been highlighted elsewhere. It does mention Liberty but it's the same RA that is supported for within JBOSS.
For information on configuring the RA inside JBOSS please look at
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q031820_.htm
The version of the RA or JMS client code is not tightly coupled with the server version. Client or bindings.
You won't have any support apart from via the web; unless you get the company running the externally controlled server to raise it.
Edit: have added download links
Pasting from this page
Category 3 WebSphere MQ SupportPacs are supplied under the standard terms and conditions provided by the International Program License Agreement (IPLA) and thus, carry program defect service for WebSphere MQ customers. Please read the IPLA and LI files that accompany the SupportPac, to ensure you understand the conditions under which the SupportPac is provided.
If you encounter what you believe to be a defect with the SupportPac, and you have a current license for a WebSphere MQ server product, you may request Program Services by reporting the problem via the same defect reporting channel you employ for the WebSphere MQ server product(s) on which you are using the SupportPac. No proof of entitlement is required to use this SupportPac.
Service is available for the v7.5 version of this SupportPac for as long as the WebSphere MQ V7.5 server product is supported by service. Refer to the WebSphere product lifecycle pages for the relevant service information. It is only supported with MQ platforms which are themselves supported.
I am thinking text in bold indicates MQ Client is free.
WebSphere MQ Client has no licensing fees. The only fees (and I think they did away with this one) would have been for the XA client. The client download should come with Client for JMS, which is not the same as Client for Java (native IBM API in java). When you install the client, just check to ensure you have /java/ which will contain all of the dependent jars for connecting to IBM MQ.
I would highly suggest using Apache Camel as your bridge vs creatng your own. You can then choose to run the camel route inside of the ActiveMQ JVM or other supported container. Most of the work will be learning how to do it the first time. Once you have it set up you will realize the time savings and power of Apache Camel.
No matter what you need MQ Client. MQ Server includes MQ Client, so if all this is on the same host you have nothing else to install. If by direct connect you mean bindings mode vs client mode, then yes, bindings mode is always the most efficient. And on the flip side, if you run your route in your broker you can take advantage of the VM transport.
The main considerations you need to think about for messages bridging between ActiveMQ and WebSphere MQ are really typical messaging questions. For example, Do you need the message to survive an outtage? If so, then consider using local transactions with your routes.
Bridging an ActiveMQ broker with a WebSphere MQ queue manager requires the same client libraries as a direct connection.
You are correct that you can pretty easy setup such a bridge using Apache Camel, that comes bundled with ActiveMQ.
One possible benefit from having a local broker as a buffer might be that your application can rely on a broker that is up and controlled by you. The remote/external controlled WebSphere MQ might be taken down for maint. by external parties or the network might be shaky. Of course, your application can handle such things using logic and rescheduled transmissions but it's far easier to set up a Camel route in ActiveMQ to do that and focus your logic in the application to do business logic.

JMS non-MDB client

I want to subscribe to the JMS queue with no usage of EJB MDB. The reason is that I want to receive messages only when I want, but not automatically.
Is there some ways to implement it using plain Java (no Spring or smth else)?
I use WebLogic and its internal JMS provider, if it is important.
Thanks.
Yes, you should be able to connect to your JMS Queue of your Application server. JMS is a quite good standard, so after getting your Connection/Queue, the implementation is Vendor agnostic.
Here is a short overview what you have to write to create a consumer/producer with JMS: JMS Sample
This shows each step in detail with WebLogic JMS: Developing a WebLogic JMS Application
I didn't used WebLogic or it's JMS implementation, maybe you have to configure Weblogics JMS: Configuring and Managing WebLogic JMS
For a comprehensive overview of the programming capabilities of your WebLogic JMS Provider, look here: Programming WebLogic JMS

Securing JNDI for remote clients on JBoss

Does anybody know how to secure the JNDI access for remote clients on JBoss?
I know how to secure remote JMX invokers but even with that in effect it is still possile to lookup, bind and unbind things in JNDI even if the client is not authenticated.
I would like that that the server refuses to give you access to the InitialContext if you are not authenticated and to make it read only for some clients. Is this possible?
I am using JBoss 5.1.0 GA with jdk6
The instructions on how to do this are in the JBoss Wiki. It is not perfect, but it works.
Even if the article only mentions versions 3 and 4 of JBoss it still works with 5.1.0 GA.

Using ActiveMQ and GlassFish together

Latest version of both, can not see how to enable ActiveMQ as an endpoint in Glassfish. Would like to use ActiveMq as the JMS provider in Glassfish, the stuff I found on google does not make sense. Any advise welcome.
Is it possible to just use the JMS connector and poitn at ActiveMQ - believe not but have I just configured wrong ?
Thanks
Please look at this tutorial: http://javadude.wordpress.com/2011/07/21/glassfish-v3-1-running-embedded-activemq-for-jms-part-1/
I've written an article (based on Sven's) that describes how to connect an external activemq broker to glassfish and deploy a Message Driven Bean that consumes messages from ActiveMQ.
You can find it here: http://geertschuring.wordpress.com/2012/04/20/how-to-connect-glassfish-3-to-activemq-5/
Deploy activemq-rar-[version].rar as Connector Application to Glassfish
You will need some *.jars (http://weblogs.java.net/blog/rampsarathy/archive/2007/03/glassfish_v2_an_1.html) in \domains[domainName]\lib\ext
Create Connector Connection Pool with ActiveMQ
Create Connector Resource (Factory) with Connector Connection Pool from 2.
Create Queues.

Categories