This is a simple extension to Morphia to allow classes to be re-mapped once they are reloaded by JRebel.
Of course you need to run JRebel (http://zeroturnaround.com) for this extension to be useful. On top of that, you need to tell JRebel about the Plugin. In order to do that, add the following two new Elements to the VM startup command:
If you´re using Eclipse with the JRebel Plugin this can be skipped and instead configured in the Agent Settings GUI. - Choose Window->Prefs->JRebel - Click Agent Settings - Choose Plugins Tab - Click custom plugins - add the plugin jar, OK - Choose custom, add key “rebel.morphia” with value of “true”
Register the Extension to your Morphia instance
If you use Maven to manage your project, you can reference the Extension as a dependency:
<dependency> <groupId>dev.morphia.morphia</groupId> <artifactId>jrebel-plug</artifactId> <version>1.5.0-SNAPSHOT</version> </dependency>