Tutorial : Building EJB3 Stateless Session Bean and JAX-WS web service In One Class Using RAD 7.5 - Developing JAX-WS Client

This series is about building an empty shell application that contains an EJB3 stateless session bean, a JAX-WS web service, and a web application that acts as the EJB and web service clients. I personally built it for performance testing purpose; so I can plug-in "in-doubt" java code to oberve how they handle concurrency in a server environment. But this will serve as a tutorial for those who are interested.

Part 1 : Project Setup
Part 2 : EJB3 and JAX-WS Implementation
Part 3 : Develop EJB3 client
Part 4 : Develop JAX-WS client

Tutorial : Building EJB3 Stateless Session Bean and JAX-WS web service In One Class Using RAD 7.5 - Developing EJB3 Client

This series is about building an empty shell application that contains an EJB3 stateless session bean, a JAX-WS web service, and a web application that acts as the EJB and web service clients. I personally built it for performance testing purpose; so I can plug-in "in-doubt" java code to oberve how they handle concurrency in a server environment. But this will serve as a tutorial for those who are interested.

Part 1 : Project Setup
Part 2 : EJB3 and JAX-WS Implementation
Part 3 : Develop EJB3 client
Part 4 : Develop JAX-WS client


Client Web Project Setup

I will create a web project to host servlets that will call the EJB3 Stateless Session Bean and the JAX-WS web service.

From Java EE perspective, Click New -> Dynamic Web Project.

Tutorial : Building EJB3 Stateless Session Bean and JAX-WS web service In One Class Using RAD 7.5 - Implementation

This series is about building an empty shell application that contains an EJB3 stateless session bean, a JAX-WS web service, and a web application that acts as the EJB and web service clients. I personally built it for performance testing purpose; so I can plug-in "in-doubt" java code to oberve how they handle concurrency in a server environment. But this will serve as a tutorial for those who are interested.

Part 1 : Project Setup
Part 2 : EJB3 and JAX-WS Implementation
Part 3 : Develop EJB3 client
Part 4 : Develop JAX-WS client


Implement the Interface. 

Before we make changes to it, here is the generated class.

package
com.appinf;

import javax.ejb.Remote;
@Remote
public
        interface TestHarnessRemote {
}

Tutorial : Building EJB3 Stateless Session Bean and JAX-WS web service In One Class Using RAD 7.5 - Project Setup

This series is about building an empty shell application that contains an EJB3 stateless session bean, a JAX-WS web service, and a web application that acts as the EJB and web service clients. I personally built it for performance testing purpose; so I can plug-in "in-doubt" java code to oberve how they handle concurrency in a server environment. But this will serve as a tutorial for those who are interested.

Part 1 : Project Setup
Part 2 : EJB3 and JAX-WS Implementation
Part 3 : Develop EJB3 client
Part 4 : Develop JAX-WS client



Keep Connections Alive : Browser - Load Balancer - Web Server - mod jk - Tomcat : Part 4

This series is about how connections are kept alive between different components along the route.
 Browser - Load Balancer - Web Server - mod jk - Tomcat 

Part 1 : Browser - Load Balancer.
Part 2 : Load Balancer - Apache HTTP Server
Part 3 : Apache HTTP Server - Mod jk
Part 4 : Mod jk - Tomcat

Keep Connections Alive : Browser - Load Balancer - Web Server - mod jk - Tomcat : Part 3


This series is about how connections are kept alive between different components along the route.
 Browser - Load Balancer - Web Server - mod jk - Tomcat

Part 1 : Browser - Load Balancer.
Part 2 : Load Balancer - Apache HTTP Server
Part 3 : Apache HTTP Server - Mod jk
Part 4 : Mod jk - Tomcat

Apache Web Server - Mod jk


Does mod_jk changes how Apache web server handles its connection with the clients?

Mod jk is a module that runs within the Apache web server. Apache web server will manage the connections between itself and the clients, usually web browsers or a load balancer, and pass the request to a chain of modules.

Using the example described in an Apache module tutorial, a module will register a hook with the web server and the web server will pass a request_rec to the module.

Keep Connections Alive : Browser - Load Balancer - Web Server - mod jk - Tomcat : Part 2

 

This series is about how connections are kept alive between different components along the route.
 Browser - Load Balancer - Web Server - mod jk - Tomcat 

Part 1 : Browser - Load Balancer.
Part 2 : Load Balancer - Apache HTTP Server
Part 3 : Apache HTTP Server - Mod jk
Part 4 : Mod jk - Tomcat

Load Balancer -> Apache Web Server


How is the connection between web server and load balancer maintained? 

There is usually a seperate load balancer TCP profile for the connection between load balancer and the web servers. As described here, the default "Idle Timeout" is 5 minutes and default "Keep Alive Interval" is 30 minutes.

When a request comes in for a page that takes a long time to render, a connection is established between the load balancer and the web server and can be observed by the netstat command. 

> netstat -an | grep :81 |grep EST
tcp  0  0 ::ffff:111.111.111.11:81    ::ffff:111.111.111.12:55789  ESTABLISHED

After 5 minutes, netstat will show that the connection is gone, dropped by the load balancer even if the request is still being processed by downstream servers. So doesn't Apache web server send keep alive signals to the load balancer to maintain the connection, just as Google Chrome does? The answer is no.

Keep Connections Alive : Browser - Load Balancer - Web Server - mod jk - Tomcat : Part 1

This series is about how connections are kept alive between different components along the route.
 Browser - Load Balancer - Web Server - mod jk - Tomcat

Part 1 : Browser - Load Balancer.
Part 2 : Load Balancer - Apache HTTP Server
Part 3 : Apache HTTP Server - Mod jk
Part 4 : Mod jk - Tomcat