Menu

HowToSetUpDevelopmentAutoReloading

Anonymous

Background

Impala has a powerful feature which allows you to automatically pick up changes in a module, and reload the module as well as its dependents. This allows for an extremely rapid build/deploy/test cycle, as application changes can be transparently applied without any user intervention.

Setup

When running a web application in Eclipse using the embedded Jetty server, setting up auto-reloading is simply a case of setting the auto.reload.modules=true flag in impala-embedded.properties. This is by far the most productive way to develop, because it involves development without any explicit build step.

(Note the use of _impala-embedded.properties - this is the default Impala configuration file for running the application in 'embedded' mode). _

If the application gets large, it may be necessary to limit the frequency of module reloads by being more selective on which resources it monitors for changes. By default, the application will monitor all files on the modules class path. You can change this using the auto.reload.extension.includes and auto.reload.extension.excludes properties.

In the example below, a module is only reloaded if a change is detected to a class (with a .class extension) or an XML file ending in _context.xml. _

auto.reload.extension.includes=context.xml,class

In the example below, a module is reloaded if a change is detected to any file in the module class path which is not a .txt file.

auto.reload.extension.excludes=.txt

The use of excludes and includes and reduce the number of 'spurious' reloads, which if too frequent, can drain system resources unnecessarily.


Related

Wiki: HowTo
Wiki: HowToSetUpProductionAutoReloading
Wiki: WikiHome

Discussion

  • Anonymous

    Anonymous - 2011-10-28

    Originally posted by: shirishi...@gmail.com

    Hi,

    I have been evaluating Imapala for sometime now. We are considering using it one of our projects. Currently we use Maven as our build tool. The Maven examples provided work good with some tweaks. The WEB-INF/modules directory is not added to the Deployment Assembly of the Eclipse WTP project & the application fails to deploy. Manually adding this works but auto reloading feature does not seem to work.

    I will post the changes to the POM files for the Maven samples in the samples section.

    Regards, Shirish

     
  • Anonymous

    Anonymous - 2011-11-02

    Originally posted by: philzoio...@googlemail.com

    Thanks for this - there isn't any explicit support for Eclipse WTP - I've raised a ticket for it, although there's no plan at the moment to add it (contributions welcome of course)

     
  • Anonymous

    Anonymous - 2012-12-01

    Originally posted by: yingmu0...@gmail.com

    Hello, How do I dynamically add or remove modules

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.