This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Run background process from JSP page  RSS feed

 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • 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
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!