Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Simulating slow communications in Java

Posted on 2013-06-19
3
Medium Priority
?
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1000 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 1000 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

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
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.
Suggested Courses

688 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