Home » Tag Archives: JMS

Tag Archives: JMS

Automated provisioning of JMS resources in Java EE 7

java-interview-questions-answers

JMS 2.0 (part of the Java EE 7 Platform) introduced lots of nice features. One of these was the ability to declare JMS resources for automatic deployment. Pre Java EE 7 Inject Connection Factory using @Resource Lookup Destination (Queue/Topic) using @Resource Pull out the Session object and use it to create the Message, Message Producer and send the message Most ...

Read More »

JMS Sender application with ActiveMQ and Maven

apache-activemq-logo

We have already seen how to create a JMS Receiver application with ActiveMQ and Maven. Let’s check out how we can similarly create the JMS Sender application. web.xml remains the same as we had used for creating the receiver application: <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/jmsContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app> jmsContext.xml would change a bit to something like: ...

Read More »

New in JMS 2.0

java-interview-questions-answers

This post lists ALL of the new APIs (interfaces/classes/annotations etc.) introduced in JMS 2.0 (part of the Java EE 7 platform). These have been categorized as follows API simplification Ease of use Exception Handling Miscellaneous Here is a quick summary along with some code snippets API simplification JMSContext Simpler abstraction on top of Connection and Session objects which eliminates the ...

Read More »

ActiveMQ as a Message Broker for Logstash

apache-activemq-logo

When scaling Logstash it is common to add a message broker that is used to temporarily buffer incoming messages before they are being processed by one or more Logstash nodes. Data is pushed to the brokers either through a shipper like Beaver that reads logfiles and sends each event to the broker. Alternatively the application can send the log events ...

Read More »

Sending JMS Messages From WildFly 8 To WebLogic 12 with Camel

apache-camel-logo

System integration is a nice challenge. Especially, when you’re looking for communication standards and reliable solutions. In today’s microservices world, everybody talks about REST services and http-based protocols. As a matter of fact, this will never be enough for most enterprise projects which typically tend to have a much more complex set of requirements. A reasonable solution is a Java ...

Read More »

Types of JMSContext in JMS 2.0

java-interview-questions-answers

If you follow Java EE, the simplified API components in JMS 2.0 (Java EE 7) will not be unknown to you. One of the important interfaces which forms a part of the simplified API is the javax.jms.JMSContext interface. JMSContext can be categorized in to two types depending on how it’s instance is obtained and managed (life cycle) – Container managed ...

Read More »

More advanced stuff with JMS and AWS SQS

java-interview-questions-answers

As you might know SQS in AWS SQS stands for ‘Simple Queue Service’. While playing around with it I recently found one of the reasons why it may be called ‘simple’. In two previous posts (here and here) I showed to use SQS as a JMS queue provider in combination with the Spring Framework. With this basic setup I decided ...

Read More »

Using AWS SQS as JMS provider with Spring

spring-interview-questions-answers

Recently AWS published a new client library that implements the JMS 1.1 specification and uses their Simple Queue Service (SQS) as the JMS provider (see Jeff Barr’s post here). In my post I will show you how to set up your Maven project to use the Spring Framework to use this library. We will perform the following steps:     ...

Read More »

Speeding up ActiveMQ persistent messaging performance by 25x

apache-activemq-logo

Apache ActiveMQ, JBoss A-MQ, and Red Hat Apache ActiveMQ is a very popular open-source messaging broker brought to you by the same people who created (and work on) Apache Karaf, Apache Camel, Apache ServiceMix, and many others. It has a vibrant community, is very flexible, and can be deployed in highly performant and highly available scenarios. At Red Hat (where ...

Read More »

MDB != JMS and vice-versa

java-interview-questions-answers

Basics A Message Driven Bean (further referred to as MDB) is just another EJB like Stateless, Stateful or a Singleton. It’s specified using the @MessageDriven annotation. MDBs are used for asynchronous message processing They are similar to Stateless EJBs since both of them are pooled by the EJB container However they differ from Stateless EJBs since MDBs cannot be directly ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials