SlideShare a Scribd company logo
1 of 58
Upgrading to Apache Tomcat 7
Filip Hanik, Systems Engineer




                                © 2009 VMware Inc. All rights reserved
Agenda
   Introduction
   Specification changes (Servlet 3.0)
   New features (Incl. WebSocket Deep Dive)
   Current status
   Future plans
   Useful resources
   Questions




                                               2
Introduction

 Apache Tomcat
 committer &
 PMC member


 Vmware Employee and
 Sales Engineer


 Weekend Warrior with
 US Army Reserve




                         3
What about you?

 Who’s running Apache Tomcat 6?

 Who’s running Apache Tomcat 5 or older?




                                            4
What do the version numbers mean?

 7.0.22
 • 7 major version
 • 0 minor version
 • 22 build number


 Major
 • New JSRs / Specifications for Servlets/JSPs
   • Side effect – New Java Version




                                                 5
What do the version numbers mean?

 7.0.22
 • 7 major version
 • 0 minor version
 • 22 build number


 Minor
 • 4.0 vs 4.1
 • 5.0 vs 5.5


 • Refactor of code base
   • Possible changes to config files
   • Possible changes to internal APIs




                                         6
What do the version numbers mean?

 7.0.22
 • 7 major version
 • 0 minor version
 • 22 build number


 Build Number
 • Incremented with each build/SVN tag
 • Not all builds become release


 • Historically .18 has been the magic number
   • Stability
   • Bug fixes
   • Ready for enterprises



                                                7
When to upgrade?

 Starts with application developers

 Need new features in Java

 Need new features in Servlet specification

 Need new features in a framework built for later versions




                                                              8
So what changed?




                   9
Specification Changes




                        10
New version of Java

 Less invasive as technology matures

 1.5 to 1.6 should be seamless

 Moving to 1.6 is beneficial from performance perspective




                                                             11
Asynchronous Servlets

 No more thread per request model

 Servlet API still uses blocking programming model
 • Async is more complex, non blocking would have made it too complex


 Well suited for ‘Web 2.0’ applications

 API for developers, does not affect operations teams




                                                                        12
Annotations

 Alternative to XML configuration

 Requires scanning of libraries

 Will slow down startup time
 • Performance can be improved by documenting JAR files not to be scanned
 • tomcat.util.scan.DefaultJarScanner.jarsToSkip system property
 • Defined in conf/catalina.properties




                                                                            13
Web Fragments

 Libraries can ship with its partial web.xml configuration
 • Eases including frameworks


 Requires scanning of libraries

 Will slow down startup time
 • Performance can be improved by documenting JAR files not to be scanned
 • tomcat.util.scan.DefaultJarScanner.jarsToSkip system property
 • Defined in conf/catalina.properties




                                                                            14
Session Management

 Session tracking
 • Cookie, URL or SSL ID


 Session cookie can be configured
 • name
 • domain
 • path
 • comment
 • secure
 • httpOnly




                                     15
Programmatic Login

 Easier integration with alternative authentication solutions

 Calling login/logout
 • Directly within an application
 • Allows to retrieve credentials from alternative location




                                                                 16
Other changes

 JSP 2.2
 • JSP property group additions
 • New omit attribute for <jsp:attribute .../>
 Expression Language 2.2
 • Method invocations




                                                 17
New features
Tomcat evolves too




                     18
Management

 JMX remote lifecycle listener
  Allows JMX communication through firewall




 jconsole (or JMX client) url




                                               19
Management

Manager application can differentiate between primary, backup and
proxy sessions




                                                                    20
Performance

 Limit loaded JSPs with LRU cache

 GZIP compressed output streams can now be flushed

 Remove bottleneck in session ID generation

 Crawler session manager valve

 AJP NIO connector (will be in 7.0.15 onwards)




                                                      21
Performance

 Tomcat jdbc-pool

 Alternative to commons-dbcp

 Well fitted for multi core machines

 Documented at tomcat.apache.org




                                        22
Resources

 New singleton attribute
  Create new object on JNDI lookup

 New closeMethod attribute
  Close resources upon shutdown/undeploy




                                            23
Deployment

 Support parallel deployment

 Existing sessions go to the original applications

 New users go to the new application

 Defer undeployment

 DEMO




                                                      24
Deployment

 Copying of
  /META-INF/context.xml to
  $CATALINA_BASE/<engine>/<host>/contextname.xml
 now optional and disabled by default

 One of the most confusing features in old version

 Often resulted in administrators unaware of accidental deployment

 Natural behaviour is that no files get created outside of application




                                                                          25
Deployment

 Improved memory leak detection and prevention




 Prevents common memory leaks during undeployment
 Warns on unpreventable memory leaks




                                                     26
Security

 Cross-site request forgery (CSRF) protection filter
 CSRF protection added to manager application
    • role names & some URLs changed
   LockOutRealm used by default
   Access log enabled by default
   exec is disabled by default for SSI
   DefaultServlet serves content from root of context by default




                                                                    27
Security

 Graceful handling of users book-marking the login page

 Session IDs generated using SecureRandom by default

 SSL renegotiation & RFC 5746

 HTTP NIO connector now supports SSL renegotiation
  Not having this made Apache Tomcat not be vulnerable to the man in the middle
   attack recently discovered


 Cookie paths end in /



                                                                               28
Embedding and Extending

 New o.a.catalina.startup.Tomcat class for embedding




 Binary and source JARs provided for Apache Maven

 Customisable JAR scanning




                                                        29
Embedding and Extending

 New o.a.catalina.startup.Tomcat class for embedding




 Adding a servlet




                                                        30
Code clean-up

   Generics
   Better definition of Lifecycle interface
   Comet classes have moved to o.a.catalina.comet
   Expanded the unit tests
   Added Checkstyle and FindBugs to the build process
   Removed unused / deprecated / duplicated code
   Custom components using Tomcat internals are likely to require
    changes




                                                                     31
Windows

 Windows installer detects 32-bit or 64-bit JVM and installs correct
 native binaries
 Windows native authentication (SPNEGO)
  Integration with
   MS Active Directory
   and
   Domain Controller

  Single Sign On based on
   Kerberos/SPNEGO




                                                                        32
Current status

 Apache Tomcat 7 is stable as of 7.0.6
  Current release is 7.0.27


 Continuing to provide a release a month

 All releases have passed the Servlet 3.0, JSP 2.2 and EL 2.2 TCKs

 Servlet TCK is tested with the following combinations
 • HTTP BIO, NIO & APR/native
 • mod_jk + AJP BIO, NIO & APR/native
 • mod_proxy_http + HTTP BIO, NIO & APR/native
 • mod_proxy_ajp + AJP BIO, NIO & APR/native



                                                                      33
What to expect from an upgrade

 Tomcat 4 to Tomcat 7

 Tomcat 5 to Tomcat 7

 Tomcat 6 to Tomcat 7




                                 34
Web Sockets
New in Tomcat 7.027
  Part of HTML 5




                      35
WebSockets – Bi-drectional protocol (binary/text)




                                                    36
Event Based on both Server and Client




                                        37
Client - Initiating a WebSocket




                                  38
Client - Initiating a WebScoket




                                  39
Network – Opening WebSocket Request




                                      40
In Tomcat 7 – Extend WebSocketServlet




                                        41
In Tomcat 7 – Create a StreamInbound object




                                              42
43
Network – Opening WebSocket - Response




                                         44
Socket Opened – First Event




                              45
46
Client - Send a Message




                          47
In Tomcat 7 – Receive the message




                                    48
49
50
Client – Receive the Message




                               51
Future Plans

   Servlet 3.1 addition
   Commons DBCP v2
   Socket IO
   Keep on top of open bugs
   Continue reviewing enhancement requests




                                              52
Useful Resources




                   53
Useful resources

 http://www.tomcatexpert.com
 http://tomcat.apache.org
  • http://blogs.apache.org/tomcat
 Mailing lists
  • users
  • dev
  • announce
 http://tomcat.markmail.org
 http://svn.apache.org/repos/asf/tomcat/trunk/webapps/
            docs/changelog.xml
 http://ci.apache.org/projects/tomcat/tomcat7/docs/
 http://s.apache.org/tomcat-7-open-issues


                                                          54
References




             55
References

 TomcatExpert.com
 http://www.tomcatexpert.com/blog/2012/04/24/websockets-tomcat-7
 http://www.tomcatexpert.com/blog/2012/05/01/how-apache-tomcat-imple
 websocket




 Net.tutsplus.com
 http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-webso
 /




                                                                     56
Vmware Supported Platform




                            57
Questions




            58

More Related Content

What's hot

25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance TipsMonitis_Inc
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuninglovingprince58
 
Apache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEApache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEJacek Laskowski
 
Introduction of Tomcat
Introduction of TomcatIntroduction of Tomcat
Introduction of TomcatDebashis Nath
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache TomcatAuwal Amshi
 
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatEgnyte
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutSander Temme
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)Roman Kharkovski
 
MySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana YeruvaMySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana YeruvaMysql User Camp
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowBruno Borges
 
Advanced WebLogic Monitoring: JMX and WLSDM Automation
Advanced WebLogic Monitoring: JMX and WLSDM AutomationAdvanced WebLogic Monitoring: JMX and WLSDM Automation
Advanced WebLogic Monitoring: JMX and WLSDM AutomationM. Fevzi Korkutata
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Minchul Jung
 
Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)Mathew Beane
 

What's hot (20)

Apache TomEE - Tomcat with a kick
Apache TomEE  - Tomcat with a kickApache TomEE  - Tomcat with a kick
Apache TomEE - Tomcat with a kick
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance Tips
 
Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
 
Apache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEApache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEE
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Introduction of Tomcat
Introduction of TomcatIntroduction of Tomcat
Introduction of Tomcat
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache Tomcat
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Jetty Vs Tomcat
Jetty Vs TomcatJetty Vs Tomcat
Jetty Vs Tomcat
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
 
Servlet 3.1
Servlet 3.1Servlet 3.1
Servlet 3.1
 
MySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana YeruvaMySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana Yeruva
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
Advanced WebLogic Monitoring: JMX and WLSDM Automation
Advanced WebLogic Monitoring: JMX and WLSDM AutomationAdvanced WebLogic Monitoring: JMX and WLSDM Automation
Advanced WebLogic Monitoring: JMX and WLSDM Automation
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법
 
Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)
 

Viewers also liked

Thousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OThousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OGeorge Cao
 
Having fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsHaving fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsJean-Frederic Clere
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 

Viewers also liked (7)

Thousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OThousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/O
 
Having fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsHaving fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projects
 
Tomcat openssl
Tomcat opensslTomcat openssl
Tomcat openssl
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 

Similar to Apache Tomcat 7 by Filip Hanik

Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgpmichaelisvy
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
 
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEA Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEQAware GmbH
 
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEA Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEMario-Leander Reimer
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...Edward Burns
 
Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Miguel Zuniga
 
USAA Mono-to-Serverless.pdf
USAA Mono-to-Serverless.pdfUSAA Mono-to-Serverless.pdf
USAA Mono-to-Serverless.pdfRichHagarty
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Codemotion
 
Session 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionPawanMM
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyRodney Barlow
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction Hitesh-Java
 
SpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondSpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondVMware Tanzu
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Kevin Sutter
 
IBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertyIBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertynick_garrod
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...Juarez Junior
 
DockerCon EU 2015 - The Latest on Docker Engine
DockerCon EU 2015 - The Latest on Docker EngineDockerCon EU 2015 - The Latest on Docker Engine
DockerCon EU 2015 - The Latest on Docker EngineArnaud Porterie
 
DockerCon EU 2015: The Latest in Docker Engine
DockerCon EU 2015: The Latest in Docker EngineDockerCon EU 2015: The Latest in Docker Engine
DockerCon EU 2015: The Latest in Docker EngineDocker, Inc.
 
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo RamassoServer Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo RamassoJUG Genova
 

Similar to Apache Tomcat 7 by Filip Hanik (20)

Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgp
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEA Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EE
 
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EEA Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EE
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
 
Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014
 
USAA Mono-to-Serverless.pdf
USAA Mono-to-Serverless.pdfUSAA Mono-to-Serverless.pdf
USAA Mono-to-Serverless.pdf
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...
 
Session 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 Introduction
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction
 
SpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondSpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and Beyond
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
 
IBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertyIBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of liberty
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
 
DockerCon EU 2015 - The Latest on Docker Engine
DockerCon EU 2015 - The Latest on Docker EngineDockerCon EU 2015 - The Latest on Docker Engine
DockerCon EU 2015 - The Latest on Docker Engine
 
Liberty Deep Dive
Liberty Deep DiveLiberty Deep Dive
Liberty Deep Dive
 
DockerCon EU 2015: The Latest in Docker Engine
DockerCon EU 2015: The Latest in Docker EngineDockerCon EU 2015: The Latest in Docker Engine
DockerCon EU 2015: The Latest in Docker Engine
 
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo RamassoServer Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Apache Tomcat 7 by Filip Hanik

  • 1. Upgrading to Apache Tomcat 7 Filip Hanik, Systems Engineer © 2009 VMware Inc. All rights reserved
  • 2. Agenda  Introduction  Specification changes (Servlet 3.0)  New features (Incl. WebSocket Deep Dive)  Current status  Future plans  Useful resources  Questions 2
  • 3. Introduction  Apache Tomcat committer & PMC member  Vmware Employee and Sales Engineer  Weekend Warrior with US Army Reserve 3
  • 4. What about you?  Who’s running Apache Tomcat 6?  Who’s running Apache Tomcat 5 or older? 4
  • 5. What do the version numbers mean?  7.0.22 • 7 major version • 0 minor version • 22 build number  Major • New JSRs / Specifications for Servlets/JSPs • Side effect – New Java Version 5
  • 6. What do the version numbers mean?  7.0.22 • 7 major version • 0 minor version • 22 build number  Minor • 4.0 vs 4.1 • 5.0 vs 5.5 • Refactor of code base • Possible changes to config files • Possible changes to internal APIs 6
  • 7. What do the version numbers mean?  7.0.22 • 7 major version • 0 minor version • 22 build number  Build Number • Incremented with each build/SVN tag • Not all builds become release • Historically .18 has been the magic number • Stability • Bug fixes • Ready for enterprises 7
  • 8. When to upgrade?  Starts with application developers  Need new features in Java  Need new features in Servlet specification  Need new features in a framework built for later versions 8
  • 11. New version of Java  Less invasive as technology matures  1.5 to 1.6 should be seamless  Moving to 1.6 is beneficial from performance perspective 11
  • 12. Asynchronous Servlets  No more thread per request model  Servlet API still uses blocking programming model • Async is more complex, non blocking would have made it too complex  Well suited for ‘Web 2.0’ applications  API for developers, does not affect operations teams 12
  • 13. Annotations  Alternative to XML configuration  Requires scanning of libraries  Will slow down startup time • Performance can be improved by documenting JAR files not to be scanned • tomcat.util.scan.DefaultJarScanner.jarsToSkip system property • Defined in conf/catalina.properties 13
  • 14. Web Fragments  Libraries can ship with its partial web.xml configuration • Eases including frameworks  Requires scanning of libraries  Will slow down startup time • Performance can be improved by documenting JAR files not to be scanned • tomcat.util.scan.DefaultJarScanner.jarsToSkip system property • Defined in conf/catalina.properties 14
  • 15. Session Management  Session tracking • Cookie, URL or SSL ID  Session cookie can be configured • name • domain • path • comment • secure • httpOnly 15
  • 16. Programmatic Login  Easier integration with alternative authentication solutions  Calling login/logout • Directly within an application • Allows to retrieve credentials from alternative location 16
  • 17. Other changes  JSP 2.2 • JSP property group additions • New omit attribute for <jsp:attribute .../>  Expression Language 2.2 • Method invocations 17
  • 19. Management  JMX remote lifecycle listener  Allows JMX communication through firewall  jconsole (or JMX client) url 19
  • 20. Management Manager application can differentiate between primary, backup and proxy sessions 20
  • 21. Performance  Limit loaded JSPs with LRU cache  GZIP compressed output streams can now be flushed  Remove bottleneck in session ID generation  Crawler session manager valve  AJP NIO connector (will be in 7.0.15 onwards) 21
  • 22. Performance  Tomcat jdbc-pool  Alternative to commons-dbcp  Well fitted for multi core machines  Documented at tomcat.apache.org 22
  • 23. Resources  New singleton attribute  Create new object on JNDI lookup  New closeMethod attribute  Close resources upon shutdown/undeploy 23
  • 24. Deployment  Support parallel deployment  Existing sessions go to the original applications  New users go to the new application  Defer undeployment  DEMO 24
  • 25. Deployment  Copying of  /META-INF/context.xml to  $CATALINA_BASE/<engine>/<host>/contextname.xml  now optional and disabled by default  One of the most confusing features in old version  Often resulted in administrators unaware of accidental deployment  Natural behaviour is that no files get created outside of application 25
  • 26. Deployment  Improved memory leak detection and prevention  Prevents common memory leaks during undeployment  Warns on unpreventable memory leaks 26
  • 27. Security  Cross-site request forgery (CSRF) protection filter  CSRF protection added to manager application • role names & some URLs changed  LockOutRealm used by default  Access log enabled by default  exec is disabled by default for SSI  DefaultServlet serves content from root of context by default 27
  • 28. Security  Graceful handling of users book-marking the login page  Session IDs generated using SecureRandom by default  SSL renegotiation & RFC 5746  HTTP NIO connector now supports SSL renegotiation  Not having this made Apache Tomcat not be vulnerable to the man in the middle attack recently discovered  Cookie paths end in / 28
  • 29. Embedding and Extending  New o.a.catalina.startup.Tomcat class for embedding  Binary and source JARs provided for Apache Maven  Customisable JAR scanning 29
  • 30. Embedding and Extending  New o.a.catalina.startup.Tomcat class for embedding  Adding a servlet 30
  • 31. Code clean-up  Generics  Better definition of Lifecycle interface  Comet classes have moved to o.a.catalina.comet  Expanded the unit tests  Added Checkstyle and FindBugs to the build process  Removed unused / deprecated / duplicated code  Custom components using Tomcat internals are likely to require changes 31
  • 32. Windows  Windows installer detects 32-bit or 64-bit JVM and installs correct native binaries  Windows native authentication (SPNEGO)  Integration with MS Active Directory and Domain Controller  Single Sign On based on Kerberos/SPNEGO 32
  • 33. Current status  Apache Tomcat 7 is stable as of 7.0.6  Current release is 7.0.27  Continuing to provide a release a month  All releases have passed the Servlet 3.0, JSP 2.2 and EL 2.2 TCKs  Servlet TCK is tested with the following combinations • HTTP BIO, NIO & APR/native • mod_jk + AJP BIO, NIO & APR/native • mod_proxy_http + HTTP BIO, NIO & APR/native • mod_proxy_ajp + AJP BIO, NIO & APR/native 33
  • 34. What to expect from an upgrade  Tomcat 4 to Tomcat 7  Tomcat 5 to Tomcat 7  Tomcat 6 to Tomcat 7 34
  • 35. Web Sockets New in Tomcat 7.027 Part of HTML 5 35
  • 36. WebSockets – Bi-drectional protocol (binary/text) 36
  • 37. Event Based on both Server and Client 37
  • 38. Client - Initiating a WebSocket 38
  • 39. Client - Initiating a WebScoket 39
  • 40. Network – Opening WebSocket Request 40
  • 41. In Tomcat 7 – Extend WebSocketServlet 41
  • 42. In Tomcat 7 – Create a StreamInbound object 42
  • 43. 43
  • 44. Network – Opening WebSocket - Response 44
  • 45. Socket Opened – First Event 45
  • 46. 46
  • 47. Client - Send a Message 47
  • 48. In Tomcat 7 – Receive the message 48
  • 49. 49
  • 50. 50
  • 51. Client – Receive the Message 51
  • 52. Future Plans  Servlet 3.1 addition  Commons DBCP v2  Socket IO  Keep on top of open bugs  Continue reviewing enhancement requests 52
  • 54. Useful resources  http://www.tomcatexpert.com  http://tomcat.apache.org • http://blogs.apache.org/tomcat  Mailing lists • users • dev • announce  http://tomcat.markmail.org  http://svn.apache.org/repos/asf/tomcat/trunk/webapps/ docs/changelog.xml  http://ci.apache.org/projects/tomcat/tomcat7/docs/  http://s.apache.org/tomcat-7-open-issues 54
  • 56. References  TomcatExpert.com http://www.tomcatexpert.com/blog/2012/04/24/websockets-tomcat-7 http://www.tomcatexpert.com/blog/2012/05/01/how-apache-tomcat-imple websocket  Net.tutsplus.com http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-webso / 56
  • 58. Questions 58