WebApplicationContextOct 2, 2012 8:50:54 PM org.apache.catalina.core.ApplicationContext logINFO: SessionListener: contextDestroyed()Oct 2, 2012 8:50:54 PM org.apache.catalina.core.ApplicationContext logINFO: ContextListener: contextDestroyed()Oct 2, 2012 8:52:25 PM org.apache.catalina.core.ApplicationContext logINFO: No Spring WebApplicationInitializer types detected on classpathOct 2, 2012 8:52:25 PM org.apache.catalina.core.ApplicationContext logINFO: Initializing Spring root WebApplicationContextOct 2, 2012 8:52:36 PM org.apache.catalina.core.ApplicationContext logINFO: ContextListener: contextInitialized()Oct 2, 2012 8:52:36 PM org.apache.catalina.core.ApplicationContext logINFO: SessionListener: contextInitialized()Oct 2, 2012 8:52:36 PM org.apache.catalina.core.ApplicationContext logINFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@6a74f160')Oct 2, 2012 8:52:53 PM org.apache.catalina.core.ApplicationContext logINFO: Closing Spring root WebApplicationContextOct 2, 2012 8:53:10 PM org.apache.catalina.core.ApplicationContext logINFO: No Spring WebApplicationInitializer types detected on classpathOct 2, 2012 8:53:10 PM org.apache.catalina.core.ApplicationContext logINFO: Initializing Spring root WebApplicationContextOct 2, 2012 8:54:20 PM org.apache.catalina.core.ApplicationContext logINFO: Closing Spring root WebApplicationContextOct 2, 2012 8:54:25 PM org.apache.catalina.core.ApplicationContext logINFO: No Spring WebApplicationInitializer types detected on classpathOct 2, 2012 8:54:25 PM org.apache.catalina.core.ApplicationContext logINFO: Initializing Spring root WebApplicationContextOct 2, 2012 8:56:40 PM org.apache.catalina.core.ApplicationContext logINFO: Closing Spring root WebApplicationContextOct 2, 2012 8:56:44 PM org.apache.catalina.core.ApplicationContext logINFO: No Spring WebApplicationInitializer types detected on classpathOct 2, 2012 8:56:44 PM org.apache.catalina.core.ApplicationContext logINFO: Initializing Spring root WebApplicationContextOct 2, 2012 9:02:24 PM org.apache.catalina.core.ApplicationContext logINFO: No Spring WebApplicationInitializer types detected on classpathOct 2, 2012 9:02:24 PM org.apache.catalina.core.ApplicationContext logINFO: Initializing Spring root WebApplicationContextOct 2, 2012 9:02:37 PM org.apache.catalina.core.ApplicationContext logINFO: ContextListener: contextInitialized()Oct 2, 2012 9:02:37 PM org.apache.catalina.core.ApplicationContext logINFO: SessionListener: contextInitialized()Oct 2, 2012 9:02:37 PM org.apache.catalina.core.ApplicationContext logINFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@fae7b85')Experimente adicionar, atualizar e excluir registros:Download do projeto NB:SpringLesson09-v1.zipCerto. Ja que as licoes sao sobre o Spring. Vamos fazer o Spring gerenciar tudo issovou comecar outra numeracao:Para que o Spring possa gerenciar os beans, precisaremos fazer algumas modificacoes no projeto.Como implementar um BO(Business Objects) em vez de um servico, essa adaptacao fiz do mkYounge por isso no App vc vera uma estrutura para uma tabela customer, que tem a mesma implementacao com menos metodos.0) AprSe tiver problemas de memoria com o TomCat, mesmo definindo no arquivo catalina.sh JAVA_OPTS="-Xms128M -Xmx256" ou mais, e instalando o Apr ou use o GlassFish ;)I) baixe os fontes da libapr : Figura 35-Instalacao do APRII) compie e instale307 cd /Users/surfer/Downloads/JavaDocs/apr-1.4.6 308 ./configure 309 make310 sudo make installApos compilar e instalar , crie os links p/ dentro de uma pasta que ja esta no CLASSPATH do tomcatno caso do MAC OSX 311 cd /Library/Java/Extensions 322 ln -s /usr/local/apr/lib/* .Figura 36-linkando as novas libsApos compilar e instalar , instale o native que vem com tomcat que tem como parametro o local estao os binarios do libapr 348 cd /Users/surfer/_java/Servers/apache-tomcat-7.0.30/bin/tomcat-native-1.1.24-src/jni/native 349 ./configure --help 350 ./configure --with-apr=/usr/local/apr/ --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/Current/ 351 make 352 sudo make installFigura 37-Instalacao do APR no tomcat NativeFigura 38-Instalacao do APR no tomcat Nativena proxima vez que vc iniciar o tomcat no log deve aparecer algo como :Log :Oct 2, 2012 10:45:09 PM org.apache.catalina.core.AprLifecycleListener initINFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.Oct 2, 2012 10:45:10 PM org.apache.catalina.core.AprLifecycleListener initINFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].Oct 2, 2012 10:45:10 PM org.apache.catalina.core.AprLifecycleListener initializeSSLINFO: OpenSSL successfully initialized (OpenSSL 0.9.8l 5 Nov 2009)Oct 2, 2012 10:45:12 PM org.apache.coyote.AbstractProtocol initINFO: Initializing ProtocolHandler ["http-apr-8080"]Oct 2, 2012 10:45:12 PM org.apache.coyote.AbstractProtocol initINFO: Initializing ProtocolHandler ["ajp-apr-8009"]Oct 2, 2012 10:45:12 PM org.apache.catalina.startup.Catalina loadINFO: Initialization processed in 4661 msOct 2,