Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:18:27+00:00 2026-06-06T08:18:27+00:00

I am designing/developing a web application that will ultimately deploy as a WAR to

  • 0

I am designing/developing a web application that will ultimately deploy as a WAR to Tomcat. One of the features of this application will be the ability for users to upload images to our server and edit them (generate thumbnails, etc.). Under the hood we will be using ImageMagick and its Java adaptor library IM4Java.

Initial prototypes have shown that ImageMagick takes some time to “warm up” on our servers every time we re-deploy the application. This has prompted us to consider one of two possibilities, either:

  • Create an ImageService.war web service that deploys alongside the primary app and basically handles all calls to IM4Java under the hood (exposes, say, a RESTful service and just runs ImageMagick when it receives a request; the primary web app cann then find the edited file(s) on the same local file system); or
  • Just create a Thread subclass (i.e. ImageServiceThread), kick it off and run it at deploy-time, and make sure it gets shut down when Tomcat undeploys the app

These two prospects got me thinking about this problem in a more abstract sense: when should one simply delegate work out to a separate thread, and when is it appropriate to make a full-blown, separate app (in our case a WAR)?

Our primary app will be the only user of this “Image Service“, which has me thinking a separate WAR is overkill and unnecessary. But I’ve never dealt with threading inside of Tomcat before and am not sure if it is possible to spawn and kill a thread so that its lifecycle coincides with that of the primary/main app thread.

What sort of factors should be considered as part of such a decision? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:18:29+00:00Added an answer on June 6, 2026 at 8:18 am

    Definitely keep the pre-loading of ImageMagick in the web application that requires it to run properly. That way, you won’t ever forget that the two webapps should be deployed together.

    It’s a good idea to keep everything a particular webapp requires together in one place: that’s why the WAR format was created and things such as ServletContextListeners exist.

    Honestly, I’m not sure I would bother to “thread” the pre-loading of IM at all — just run some sample command from a ServletContextListener and have it load synchronously.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm designing (and developing) web software that will allow the general public to sign
Following this tutorial i'm developing a web application using symfony authentication/authorization architecture. After designing
I'm developing an web application that will be available in two languages and more
I'm having this weird thing happen. My Zend Framework (PHP) web application that I
I'm developing a web application that has a certain layout. I'm mainly using CSS
I am developing one application, right now i am on designing phase. i design
I am developing an intranet web application which should provide its users with a
I am currently developing a rather complex jQuery plugin. One that I am designing
I am developing an interpreter for a graphical language that I am designing, and
I'm developing a ASP.NET MVC 2 web application. So far, I managed to define

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.