possible it helps public class ImportEmailToArchive implements Job { private final Logger logger = LoggerFactory.getLogger(ImportEmailToArchive.class);
@CommitAfter public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { PerthreadManager perthreadManager = (PerthreadManager) jobExecutionContext.getMergedJobDataMap().get("perthreadManager"); EmailArchiveImporter importer = (EmailArchiveImporter) jobExecutionContext.getMergedJobDataMap().get("importer"); if (logger.isInfoEnabled()) logger.info("starting email importer ..."); try { importer.importMessages(); } finally { perthreadManager.cleanup(); } if (logger.isInfoEnabled()) logger.info("email importer finished"); } } public EmailArchiveImporterImpl(Logger logger, SearcherService ldapSearchService, HibernateSessionManager hibernateSessionManager, Resource configResource) { this.logger = logger; this.ldapSearchService = ldapSearchService; this.hibernateSessionManager = hibernateSessionManager; try { this.configuration = new PropertiesConfiguration(configResource.toURL()); } catch (ConfigurationException e) { throw new RuntimeException(e); } } 2009/3/31 Daniel Jones <d...@murieston.com> > > Is there a more elegant solution than this? If so please share! > > Cheers, > Dan > -- > View this message in context: > http://www.nabble.com/T5---Chenillekit-Quartz---Services-tp22787045p22805264.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- with regards Sven Homburg http://www.chenillekit.org http://tapestry5-components.googlecode.com