This is how I set up dynamic reloading (hot deployment) on Glassfish Application Server v2.1. This is a basic outline of how dynamic reloading works, and some steps may be automated with plugins and scripts.
1. Ensure that dynamic reloading is enabled in the Glassfish Admin Console.
a. Navigate to Application Server configurations
b. Check the Enable Reload box
c. Apply Settings
2. Set up the FileSync plugin.
b. Set project properties in Eclipse to map target directory (where built classes are stored) and map it to the appropriate exploded directory in your domain within the Glassfish home directory
Skip step 3 if the files were built internally within Eclipse.
3. Refresh Eclipse files.
The modified files should now be synchronized with the dynamic deployment directory.
4. Modify or "touch" .reload file.
An update in the last modified time for the .reload file signals glassfish to dynamically reload the application.
The server log will show the progress of the application unloading and loading.
5. Test the modified file.
I tested this by adding log outputs to existing Java files.