Initialize the mailet, loading configuration information.
repositoryPath = getInitParameter("repositoryPath");
try {
passThrough = new Boolean(getInitParameter("passThrough")).booleanValue();
} catch (Exception e) {
// Ignore exception, default to false
}
ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
try {
Store mailstore = (Store) compMgr.lookup(Store.ROLE);
DefaultConfiguration mailConf
= new DefaultConfiguration("repository", "generated:ToRepository");
mailConf.setAttribute("destinationURL", repositoryPath);
mailConf.setAttribute("type", "MAIL");
mailConf.setAttribute("CACHEKEYS", getInitParameter("CACHEKEYS","TRUE"));
repository = (MailRepository) mailstore.select(mailConf);
} catch (ServiceException cnfe) {
log("Failed to retrieve Store component:" + cnfe.getMessage());
} catch (Exception e) {
log("Failed to retrieve Store component:" + e.getMessage());
}