apache/incubator-brooklyn — pull request #301 by aledsage (2014-11-05 13:43:59+00:00)
Title: Fix deadlock starting 3tier app

Builds http://brooklyn.builds.cloudsoftcorp.com/job/Brooklyn-Master-Integration/373 and http://brooklyn.builds.cloudsoftcorp.com/job/Brooklyn-Master-Integration/375 were both hit by this.

Taking description from first commit message:

- Calling getShellEnvironment() during jboss.install() was causing it
to lookup the config, including sysprops. However, that required
MySql to have a URL before it could resolve.
On localhost (e.g. integration tests), the jboss.install() held a
lock (SshMachineLocation.acquireMutex) which meant only one thing
could be installed at a time - hence prevented MySql from being
installed. Therefore deadlock.
- Fixed by guarding the call to getShellEnvironment(), to only be
done if env was not explicitly supplied.