}
public void run() throws Exception {
ManagedReference<?> lr =
dataService.createReferenceForId(listenerID);
SnapshotCreationListener l =
(SnapshotCreationListener) lr.get();
try {
if (ex == null) {
l.snapshotCreated(root);
} else {
l.snapshotFailed(ex.getMessage(), ex);
}
} finally {
// clean up
if (l instanceof ManagedSnapshotCreationWrapper) {
dataService.removeObject(l);