Setting up JMS Queues in Jboss As 7.1.1 - jms

I am new to Jboss and JMS. How do we setup JMS Queues in JBoss AS 7.1.1[jboss-as-7.1.1.Final] ?

This is done in standalone.xml file. You need to add subsystem jboss:domain:messaging
See https://docs.jboss.org/author/display/AS7/Messaging+configuration

Related

Is it possible to create a common JMS listener for both IBM MQ and ActiveMQ Artemis?

I have created a Maven module with all configuration for ActiveMQ Artemis. I have done the same for IBM MQ.
I am building two separate jars for above modules.
Now I have added both jars to the classpath of my microservice.
I am struggling to find a way to load one of the above jar file based on some configuration such as active.broker = artemis or ibm mq.
Given that both ActiveMQ Artemis and IBM MQ provide JMS client implementations it should be relatively straight-forward to use the same JMS application with either.
Both ActiveMQ Artemis and IBM MQ JMS clients include JNDI implementations which can be used to "lookup" their respective admin objects (e.g. connection factories & destinations) in a standard way. You only need to swap the InitialContext configuration parameters when using ActiveMQ Artemis vs. IBM MQ.

Jboss EAP 6.3 integration with OracleAQ jms

I have application working on Jboss eap 6.3 and Hornetq queue for jms. I have to change queue from hornetq to OracleAQ. Is there any ready resource-adapter to connect it or I have to write new one for my own? I will be gratefull for any tips how can i achieve that. Thanks in advance.
As far as I know, Oracle AQ's administered JMS objects (e.g. connection factories and destinations) must be looked up via a database connection (or perhaps LDAP) rather than JNDI. Nothing shipped with JBoss EAP can do this.
I propose to check with Oracle for information regarding a JCA resource adapter that they might provide for integration with other Java EE application servers like JBoss EAP.

Stadlaone-full set up for wildfly

i'm tryin to run an app that runs on jboss EAP , on jboss Wildfly , but i'm having problems with the standalone-full.xml because some services like hornetq aren't available on Wildfly
is there a possible way to migrate from eap to wildfly?
any help?
This depends on your app.
Wildfly 10 ships with ActiveMq rather than HornetQ.
If your app uses standard JMS then you can configure the WF10 standalone-full to have the same JMS endpoints as your old deployment. If however your app is using the HornetQ specific client you will have to do some more work. ActiveMQ artemis integrates HornetQ protocols but it probably won't work without some trial and error in the configuration.
I would suggest starting with standalone-full.xml from Wildfly 10 and compare it with your JBoss EAP configuration. There should be an analog for each service you need. Once that is set try running your app and see what happens.

MDB deployed on JBOSS fetching messages from IBM MQ

I would like to deploy MDB on JBOSS. But the publisher will not send messages to the JBOSS AS, it is sending messages to IBM MQ.
Should I use JCA to integrate JBOSS and IBM MQ?
OR
Can the MDB on JBOSS AS subscribe to the topic on which IBM MQ is getting messages from publisher?
What are the advantages of one approach to another?
The recommended way to consume messages in JBoss from IBM MQ is via a Message Driven Bean (MDB). This is done by deploying the IBM JCA resource adapter (RA) in JBoss. You must use the IBM RA in JBoss as this rar file contains the IBM MQ client code that is needed for communicating with IBM MQ.
When using the MDB approach, the container (JBoss, in this case) works with the JCA to manage JMS connections, message delivery and transactions. This leaves you to only write the onMessage() method - quite a lot gets done for you under the hood.
Yes you can certainly have an MDB in JBoss that is subscribed to a Topic on MQ,
You should deploy the WebSphere MQ Resource Adapter (WMQRA) into JBoss and then configured the WMQ RA JCA resources in JBoss (Activation Specification, Queue/Topic). This will then let you deploy your MDB, and the JCA resources will handle the connection to the WMQ Queue Manager and Queue/Topic that your messages are on.
There are a few guides on setting up the WMQ RA in JBoss around on the internet.

How to configure ehcache.xml to use JMS + ActiveMQ + Tomcat and enable tomcat to start even if the JMS server is down?

I a using ehcache with JMS replication and ActiveMQ as a JMS server.
It is currently used to cache database results with Hibernate 3.6.7
My cacheManager is configured as above:
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.jms.JMSCacheManagerPeerProviderFactory" properties="initialContextFactoryName=br.com.sonner.iss.jms.ExampleActiveMQInitialContextFactory,
providerURL=failover:tcp://localhost:6969,userName=XXX,password=YYYY,
replicationTopicConnectionFactoryBindingName=topicConnectionFactory,
replicationTopicBindingName=ehcache,
getQueueConnectionFactoryBindingName=queueConnectionFactory,
getQueueBindingName=ehcacheGetQueue"
propertySeparator=","
/>
The replication and failover is working as it should. If the JMS goes down (the replication stops) and the starts over again when the JMS server starts again.
The only problem that I am facing is that if the JMS server is down at the moment of the startup of my app. The app does not start.
Probably because when Spring goes up it reads the hibernate configurations and when hibernate is loading the app just freezes waiting for the broker.
Does anyone has a work-arround this issue?
I am thinking if there is a way to use the spring jmsTemplate configuration to configure ehcache.xml jndi entries.

Resources