Skip to content

Instantly share code, notes, and snippets.

@saml
Created July 14, 2011 15:53
Show Gist options
  • Select an option

  • Save saml/1082718 to your computer and use it in GitHub Desktop.

Select an option

Save saml/1082718 to your computer and use it in GitHub Desktop.
@Override
public synchronized void run() {
LOG.debug("start...");
ResourceResolver resolver = null;
Session session = null;
try {
resolver = resolverFactory.getAdministrativeResourceResolver(null);
session = resolver.adaptTo(Session.class);
//do stuff...
} catch (final LoginException e) {
} catch (final PathNotFoundException e) {
} catch (final RepositoryException e) {
} finally {
if (resolver != null) {
resolver.close();//session.logout() is called inside.
}
}
LOG.debug("done");
}
this is registered to Quartz to run every 10 seconds... I see in the log that Quartz is creating Job object.. but the first log "start..." is not found (log level is DEBUG.. so i do see other debug logs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment