e.printStackTrace();
}
}
public void loaderCallback(final LoaderRunnable runner) {
NSFComponentModule referenceMod = runner.getModule();
Set<Class<?>> classes = runner.getClasses();
for (Class<?> clazz : classes) {
Persistent persistent = clazz.getAnnotation(Persistent.class);
Persistent.Context ctx = persistent.appContext();
Persistent.Scope scope = persistent.scope();
// TODO de-dupe based on replica ID to handle faux text ".nsf" redirection files
if (scope == Persistent.Scope.APPLICATION) {
if (ctx == Persistent.Context.XSPFORCED) {
try {
NSFComponentModule forcedMod = getNsfService().loadModule(referenceMod.getDatabasePath());
synchronized (classMap_) {
classMap_.put(forcedMod, classes);
}
} catch (Throwable t) {
t.printStackTrace();
}
} else if (ctx == Persistent.Context.XSPSCOPED) {
}
} else if (scope == Persistent.Scope.SERVER) {
NSFComponentModule mod = runner.getModule();
synchronized (classMap_) {
classMap_.put(mod, classes); // TODO need to put actual objects rather than classes into the map
}
} else {
NSFComponentModule mod = runner.getModule();
synchronized (classMap_) {
classMap_.put(mod, classes);
}
}
}