• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Run background process from JSP page

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a website that uses JSP, MySQL and runs on Apache,Tomcat.
i have a few pages that need to access the MySQL database, especially for logging certain events. i find that whenever i enable this logging feature, the jsp page loading time becomes longer.
i want to instead make sure that logging happens in the background and does not affect the page loading time.
The logging does not need to be in real time. So it can be done in a delayed way after the page loads and in the background possibly using AJAX. The objective is that the user does not see any delay in the page loading.
can someone suggest some solutions for this issue ?

thanks.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could just spawn a thread for this.

But I would rather profile your logging framework to see why it's slow and fix it accordingly.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bauke Scholtz wrote:You could just spawn a thread for this.

But I would rather profile your logging framework to see why it's slow and fix it accordingly.


Thanks, Can you describe me a good tool for profiling j2ee/java web applications ? what are the best open source Java profilers out there ?
thanks.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I myself use Eclipse TPTP. I don't dare to call it the "best". It's just all about what you need and what it provides.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic