Posts

Showing posts from 2017

ActiveMQ message producer and consumer with durable subscriber example

Image
When I heard about JMS, it's something like having a message producer, a message broker (you can compare it with message media ) and a message consumer. It is very simple to understand the basic specification of jms. The figure will be explained well. JMS is nothing but a specification. But we have many providers like weblogic jms, ActiveMQ , hornetQ, RabbitMQ and much more. Here I used Apache ActiveMQ . It has many features and you can see it on their official website . Here I want to implement a message producer who produces message topic. And a durable subscriber consumes those messages. Using durable subscriber ensures that each and every message delivered to the consumers. Though a subscriber goes offline, a message stored in activemq context and when it will become online message delivered to the client. Internally it uses KahaDB (a file based persistence database) for message persistence. Now dive into the code. I used maven so here is the maven dependency <

Creating Simple Spring Boot Web Application Using Maven

What is spring-boot ? To answer this, I directly quoted from the official website : Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". "Just run" refers that it has embedded Tomcat [servlet container] so that we can run the application anywhere  [where installed java] . No need to configure any server.  Before Starting this tutorial we need to ensure that Maven installed properly. [ if not installed then you can follow the tutorial how to install  ] Installed Java properly. You can create a spring-boot project from your favorite IDE (In my case Netbeans 8.0.2) or from the direct web ( http://start.spring.io/ ). Let me describe both. How to Create maven project in Netbeans: Click on File ->new project ->maven (category) -> web application and click next. Give your project a name and click next to select server (tomcat) and then click finish. Open POM xml and <packa

Create Maven Local Repository, Upload your own artifact & download jar from local mirror with Artifactory and Nexus OSS

Image
Maven is nothing but a software project management tool as well as build tool unlike Ant  (Wheres ant is only a build tool). From maven official website Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting, and documentation from a central piece of information. Well, Now we go to direct how to configure a local repo for maven. Here I used   JFrog Artifactory   for repo manager but you can do it with other software like Nexus OSS  and so on. I'll tell you both how to install. Download zip format  [JFrog Artifactory] from here . After download extracts the zip file and it contains everything that you need. It also includes the tomcat. It looks more or less something like that, Now we are going to deploy webapps   artifactory.war and access.war which is in webapps folder. Remember that we need to install java-8(at least ) in our system too. So goto