Solved

Simulating slow communications in Java

Posted on 2013-06-19
3
167 Views
Last Modified: 2013-07-04
I am integrating two java web applications that are implemented in slightly different ways - one uses servlets, the other uses Jersey Restful APIs. The first application is the front end and that communicates with the Restful service for data. I want to simulate communication delays between the web front end and the servlets and between the servlets and the Restful apis.

I have access to the code for both apps but I am hoping I can put the delay on communications in and out of the servlet.

Is there some way to get in front of the communications and delay it being passed to the rest of the app (and the other way round..)
0
Comment
Question by:MWilliamsBolton
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 39259591
A simplistic implementation could be to use a ServletFilter and use Thread.sleep
0
 
LVL 16

Assisted Solution

by:Valeri
Valeri earned 250 total points
ID: 39263022
You can use this. there is no need to change code.
http://www.dallaway.com/sloppy/

this is also an option:
http://www.loband.org/loband/simulator.jsp
0
 

Author Closing Comment

by:MWilliamsBolton
ID: 39299649
Thanks to both for the guidance
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about why website design really matters in today's demanding market.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question