On Fri, Sep 14, 2012 at 12:27 PM, Mark Thomas <ma...@apache.org> wrote: > Benson Margulies <ben...@basistech.com> wrote: > >>Apologies for the accidental use of HTML. >> >>The problem below is triggered by the facts that: >> >>a) spring-web contains a ServletContainerInitializer >>b) even with metadata-complete, tomcat does annotation scanning once >>it sees one of those > > Yes, this is a mandatory requirement of the servlet spec. Yes, it is a PITA. > Your best bet is to add the spring jar to jarsToSkip which should stop it > being scanned for the SCI in the first place. If you need features provided > by the SCI, then you can add the other jars to the skip list.
Mark, this leads me to a related question. If I'm launching tomcat embedded, I have no catalina.properties, right? So I don't even have the lengthy normal list of jarsToSkip. Would you recommend settings that Tld-scan-limiting property by just calling System.setProperty for my embedded application? > > Mark > >>c) In my embedded environment, there's a lot of real estate to >>potentially scan in the classpath. >> >>Is (b) really correct? >> >>Unfortunately, I need spring-web in order to get the log4j support, >>even though I don't want any of that other stuff in there. >> >> >> >> >>On Fri, Sep 14, 2012 at 11:56 AM, Benson Margulies >><ben...@basistech.com> wrote: >>> >>> I'm using tomcat 7.0.29, embedded. >>> >>> My web.xml web-app element looks like: >>> >>> <web-app xmlns="http://java.sun.com/xml/ns/javaee" >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >>> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" >>> version="3.0" >>> metadata-complete="true" >>> > >>> >>> Yet, in ContextConfig.webConfig, isMetadataComplete() returns false, >>and >>> annotation processing happens. And, to make my day, it runs out of >>memory. >>> >>> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>For additional commands, e-mail: users-h...@tomcat.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org