public void boot(Profile myProfile) throws ServiceException {
// getting the delivery channel
try {
MessageManager.Channel ch = (MessageManager.Channel)myServiceFinder.findService(MessagingSlice.NAME);
if (ch == null)
throw new ServiceException("Can't locate delivery channel");
myManager = PersistentDeliveryManager.instance(myProfile, ch);
myManager.start();
}
catch(IMTPException imtpe) {
imtpe.printStackTrace();
throw new ServiceException("Cannot retrieve the delivery channel",imtpe);
}
try {
// Load the supplied class to filter messages if any
String className = myProfile.getParameter(PERSISTENT_DELIVERY_FILTER, null);
if(className != null) {
Class c = Class.forName(className);
messageFilter = (PersistentDeliveryFilter)c.newInstance();
myLogger.log(Logger.INFO,"Using message filter of type "+messageFilter.getClass().getName());
}
}
catch(Exception e) {
throw new ServiceException("Exception in message filter initialization", e);
}
}