This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
If your download servlet leaves any system resources in the wrong state you may accumulate problems that will eventually crash the server. I am thinking of stuff like:

Database connections left open
Graphics contexts not cleaned up
Files left open
Memory allocations no longer needed but still held somewhere

Good design of your download code would prevent these problems.

William Stafford
Ranch Hand
Posts: 109
posted 10 years ago
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill. That was the sort of thing I was worried about. I guess I did not make it clear that I was worried about the after effects of an aborted download.

Thanks again,
Bear Bibeault
Author and ninkuma
Posts: 66424
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, you probably still don't want to catch the exception, but rather be sure to have clean up code in a finally so that there are no resource leakages no matter what happens.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!