brooklyncentral/brooklyn — pull request #1194 by aledsage (2014-02-06 12:16:15+00:00)
Title: Fix rebind

@ahgittin and @Nakomis - I've address almost all of the comments comments in https://github.com/brooklyncentral/brooklyn/pull/1185, except the biggies. Still to do are:

1. where should we default the persistence-dir (e.g. PWD or ~/.brooklyn/)
2. support for running multiple separate concurrent brooklyn instances
3. we should have better handling of problems, including opportunity to fix / ignore / abort
4. we should add a message on failed rebind that the files for the entity will be ignored and left in place, that the problem can be fixed by adding missing jars to the classpath or editing the xml (and that gui/api support for selectively repairing may be available in future -- perhaps point to issue for that?). that just gives a user comfort...
5. make it easier to see when there are problems persisting entity's change-delta.
6. In the brooklyn.demo.WebClusterDatabaseExampleApp, the policy on the web cluster is not re-created, however the policy on the nginx controller is re-created
7. Error when rebinding to jClouds SshMachineLocation (as discussed on Skype). I experienced this issue with both the AgriWise project and the global web fabric example

And unrelated unaddressed comments:
1. CLI improvements
2. Couldn't run the whirr-hadoop example due to jclouds version conflict (lookout for a separate PR from me on this one)

@ahgittin for the problems you hit with entities-only-on-the-catalog-classpath, ControlledDynamicWebAppCluster failed to serialize because of classpath issues. When persisting the EntityMemento it tried to look up the Class.forName to find which config keys were statically defined (because it wouldn't persist those). I've fixed that by injecting the `transient Class` into the Memento to avoid the lookup.