public void compose(ComponentManager manager) throws ComponentException {
setSelector((ComponentSelector)manager.lookup(Matcher.ROLE + "Selector"));
// Prepare the pattern, and keep matcher if ThreadSafe
PreparableMatcher matcher = (PreparableMatcher)selector.select(componentName);
if (matcher instanceof ThreadSafe) {
this.threadSafeMatcher = matcher;
}
try {
this.preparedPattern = matcher.preparePattern(MapStackResolver.unescape(this.pattern));
} catch(PatternException pe) {
String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + this.getLocation();
getLogger().error(msg, pe);
throw new ComponentException(msg, pe);