greeterBus = bf.createBus(cfgResource);
BusFactory.setDefaultBus(greeterBus);
LOG.fine("Initialised greeter bus with configuration: " + cfgResource);
if (null == comparator) {
comparator = new PhaseComparator();
}
if (null == inPhases) {
inPhases = new ArrayList<Phase>();
inPhases.addAll(greeterBus.getExtension(PhaseManager.class).getInPhases());
Collections.sort(inPhases, comparator);