Skip to main content

Posts

Showing posts with the label scheduling java

Improve your REST Webservice response time using java.util.TimerTask

A while ago, I built an MAF application, which was consuming a few REST webservices from Oracle Java Cloud. But for each request from the app, the response JSON was getting created, and which made the app response very slow.  So, I created the contents of the REST response as a scheduled job. My data wasn't getting changed that often, so I choose to build my REST responses every morning at 10am using java.util.TimerTask. Used Software: JDeveloper 12.1.3 #1. REST response POJOs : public class Feed {         public String url;     public String source;         public Feed() {         super();     }         public Feed(String source, String url) {         setSource(source);         setUrl(url);     }         publ...