Solved

Simulating slow communications in Java

Posted on 2013-06-19
3
168 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
push Book Today button to right 10 39
ejb on wildfly 5 30
Help in good tutorials for PHP, HTML and CSS 6 41
Domain Service Not Responding 14 30
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

828 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