Instantly share code, notes, and snippets.

What would you like to do?
Useful Alfresco JavaScript console scripts
var ctxt,hazelcastInstanceFactory, hzInstance, hzLifecycleService;
ctxt =;
hazelcastInstanceFactory = ctxt.getBean('hazelcastInstanceFactory',;
hzInstance = hazelcastInstanceFactory.getInstance();
hzLifecycleService = hzInstance.getLifecycleService();
// this should reinitialize the local cluster node Hazelcast layer without invalidating any beans
// this can be useful if cluster node may be stuck / not discovering any other members after a split
var ctxt, scheduler;
// get Spring context and Quartz scheduler
ctxt =;
scheduler = ctxt.getBean('schedulerFactory',;
// fire (unless explicitly defined in Job detail Spring bean, scheduler group is always DEFAULT)
scheduler.triggerJob('<insertJobName>', 'DEFAULT');
var ctxt, synchronizer;
ctxt =;
synchronizer = ctxt.getBean('userRegistrySynchronizer',;
// forceUpdate = false, isFullSync = false - change for full update / with deletions
synchronizer.synchronize(false, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment