How to connect Glassfish 3 to an external ActiveMQ 5 broker - jms

I need to be able to consume and produce messages to and from our activemq cluster from applications deployed on glassfish 3.
How should I configure glassfish in order to achieve this?

I've found some info on how to run an embedded activemq broker in glassfish, and although this is not what I was looking for, I was able to figure out how to change the config to connect to an external broker.
I've written an article about how to do this: http://geertschuring.wordpress.com/2012/04/20/how-to-connect-glassfish-3-to-activemq-5

Related

Spring integration : control ActiveMQ connection

I am looking for controlling ActiveMQ connections after starting of application in cluster environment if I want to disconnect some slave machine through code.
Any help around this will be really appreciable.
I don't believe Spring has any direct integration with ActiveMQ. Spring offers JMS integration which, of course, uses the generic JMS API which every JMS provider implements.
To manage ActiveMQ from a remote application will you need to use something like JMX.

How to bridge between IBM MQSeries and ActiveMQ Artemis 7.x?

Has anyone succeeded in creating a bridge between IBM MQSeries (MQS) and ActiveMQ Artemis 7.x (AMQ 7) so that the later can send messages to and receive from the first? Currently I have no problem bridging between MQS 7.5 and AMQ 6.3 by deploying a camel route and MQS libraries on the broker itself. However, the same way doesn't work anymore as each route deployment requires a broker reconfiguration and restart.
Thanks in advance for any feedback.
A few examples ship with ActiveMQ Artemis which might be helpful:
The "inter-broker-bridge" example in the examples/features/sub-modules/ directory. This example demonstrates how to deploy an instance of org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl to the broker using Spring in a web application.
The "camel" example in the examples/features/standard/ directory. This example demonstrates how to deploy a Camel route to the broker using Spring in a web application.
I can't speak to whether or not either of these can be updated at runtime as I've not actually attempted that. Both of these options should be able to move messages in either direction (i.e. from Artemis to MQS or from MQS to Artemis).
Another option would simply be to run Camel standalone and deploy your routes there. This would give you more flexibility as it would allow you to specifically choose the hardware where the routes run as well as how many resources the Camel JVM consumes. Running Camel routes directly on the broker, while convenient, isn't a great fit because the broker is a broker and not an application server.
To be clear, ActiveMQ Artemis and IBM MQSeries are not directly compatible with each other and are not expected to be. This true for most (if not all) JMS broker implementations. The role of components like the ActiveMQ Artemis JMS bridge and integration platforms like Camel are to solve the compatibility problem by using a common API to speak to both brokers - JMS in this case. Any broker which implements JMS can be integrated using these methods.

Mule application configured with ActiveMQ to be deployed in cloudhub

I have integrated JMS using ActiveMQ in one of my Mule application. I want to deploy it in cloudhub.
Could you please help me for the following queries:
For deploying the application with ActiveMQ configured JMS does it required anything groundwork to be done before deployment? (such as ActiveMQ is to be installed and configured for my CH account?)
For time being I have configured the ActiveMQ which is already installed in OnPremise server and is being used from cloudHub deployed application. Is it a proper or standard way to use externally installed ActiveMQ?
Appreciate the quick and best answer for the above queries.
Thank you,
Best Regards,
Krishna.
you have already installed MQ service on your server side, you can use those credentials to configure your mule MQ adapter through mule properties file same as like you are using with local runtime
e.g.
mq.host=
mq.port=
mq.vhost=
mq.username=
mq.password=
CloudHub will connect to your on premise MQ service. Your approach is correct and no any MQ specific groundwork required.

Sending a JMS message to a remote queue on JBoss AS 5 and AS 7

I have two servers
JBoss as 5.1 with an application sending JMS messages
JBoss AS 7 server with the queue implemented and an MDB consuming messages
I would like to send a message from server one to server two. I would like the message to be consumed on server two.
I think JBoss AS 7 uses HornetQ.
Any hints on how to send a message to a remote queue? I'm more interested on how to send messages because it is on the remote server, and I think the consuming part should be straight forward.
You are correct that JBoss AS 7 uses HornetQ for messaging as the JMS provider. A great resource is the JBoss community documentation for HornetQ. There is also an excellent post on the JBoss community forums about setting up HornetQ across two instances of AS 7.
You will need to define your connectors and acceptors that make up the transports, which in your case will include netty as your client and server are running in different JVMs (otherwise you could use invm). Creating your connection factories will differ on each JBoss AS instance (for example, there is no Management CLI on JBoss AS 5), but the above link will give you a good reference, and you can ask targeted questions in there.

Weblogic JMS server configuration: JMS module to talk to JMS Server

I am fairly to new to JMS configuration in JMS.
Here is what i am trying to do.
We have multile JVMs of our applications in a single weblogic domain. We want to have JMS server installed on say one JVM and rest of the JVMs refer to the first JMS Server.
So, the configuration is:
JVM1: JMS Server is installed
JVM2: JMS Module installed
Now I need to configure JVM2 to talk to JMS server on JVM1. How do i do that?
This is on weblogic 11g
I suggest going through the basics of WebLogic 11 JMS configuration and then taking a look into this good guide from Oracle documentation. I know there is a lot of info over there, but in the long run it is better to know what you are doing rather than just copying someone else's configurations.

Resources