@Override
public void configure(WebAppContext context) throws Exception
{
context.addDecorator(new AnnotationDecorator(context));
AnnotationParser parser = new AnnotationParser();
SipAppContext sac = (SipAppContext) context;
if (sac.getSpecVersion() == SipAppContext.VERSION_10)
return;
if (Log.isDebugEnabled())
Log.debug("parsing annotations");
SipApplicationAnnotationHandler sipApplicationAnnotationHandler = new SipApplicationAnnotationHandler(sac);
parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipApplication", sipApplicationAnnotationHandler);
parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipApplicationKey", new SipApplicationKeyAnnotationHandler(sac));
parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipListener", new SipListenerAnnotationHandler(sac));
parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipServlet", new SipServletAnnotationHandler(sac));
clearAnnotationList(parser.getAnnotationHandlers());
parseContainerPath(context, parser);
parseWebInfLib (context, parser);
parseWebInfClasses(context, parser);
//gather together all annotations discovered
List<DiscoveredAnnotation> annotations = new ArrayList<DiscoveredAnnotation>();
gatherAnnotations(annotations, parser.getAnnotationHandlers());
((SipAppContext) context).getSipMetaData().addDiscoveredAnnotations (annotations);
}