How to configure mod_jk with Apache http and Tomcat servers

Introduction We will see here how to configure mod_jk with Apache http and Tomcat servers. The Apache Tomcat connector allows to use the Apache httpd server as a front-end for Apache Tomcat applications. To run Tomcat and Apache together, Apache needs to load a “adapter” module, which uses a certain protocol, such as Apache JServ Protocol (AJP), to communicate with the Tomcat, via another TCP port (port 8009 is the default configuration in server.xml file under Tomcat server). When Apache server receives an HTTP request, it checks if the request…

Continue

How to create HTTP server in Java to serve static resources

Introduction Here I will show you how to create HTTP server in Java to serve static resources using sun’s HttpServer. An HTTP Server is bound to an IP address and port number and listens for incoming requests and returns responses to clients. Simple http server is flexible to be added into complex projects for rendering HTML elements or serving as a backend server. An HTTP server in Java can be created in four steps: Create HttpServer object Attach one or more HttpHandler objects to HttpServer object Create class to implement HttpHandler…

Continue

Tomcat load balancing with Apache using mod proxy

This tutorial will show you how to configure Tomcat Load Balancing with Apache webserver (http server) using Mod Proxy. I have listed here the following steps on how to configure Apache with Tomcat to configure Load Balancer using Mod Proxy. Having load-balanced is always recommended in production environment for better availability. Load balancing improves responsiveness and increases availability of applications. A load balancer sits between the client and the server farm accepting incoming network and application traffic and distributing the traffic across multiple backend servers using various methods.

Continue

JMS Client using JBoss 7 – Publish/Subscribe Messaging

This example will take you through step by step on practical implementation how you can configure a JMS Client using JBoss Application Server 7.1.1. I won’t discuss theoretical part here but if you need to know JMS related various keywords then you can go through the tutorial at https://www.roytuts.com/configure-jms-client-using-glassfish-3/ Publish/Subscribe Messaging System In a publish/subscribe (pub/sub) messaging system, clients address messages to a topic. Each message may have multiple consumers. Publishers and subscribers have a timing dependency. A client that subscribes to a topic can consume only messages published after…

Continue

Configure JMS Client using GlassFish 3

I have taken Theoretical concepts from http://docs.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/overview.html#1027335 with a little modifications. What Is Messaging ? Messaging is a method of communication between software components or applications. A messaging system is a peer-to-peer facility: A messaging client can send messages to, and receive messages from, any other client. Each client connects to a messaging agent that provides facilities for creating, sending, receiving, and reading messages. What Is the JMS API? The Java Message Service is a Java API that allows applications to create, send, receive, and read messages. The JMS API…

Continue