SlideShare a Scribd company logo
Apache TomEE Tomcat with a kick About  Apache TomEE David Blevins  Jonathan Gallimore dblevins@apache.org  [email_address] @dblevins  @jongallimore * Original Slides modified a little to make the document self-contained
In this presentation we will introduce and demonstrate Apache TomEE… And show how you can leverage all the additional features available in the JavaEE 6 platform, without having to move away from Tomcat. Intro Welcome to Apache TomEE  –  Tomcat with a kick.
The slides are from Jonathan Gallimore and David Belvins’ presentation @JAX London, Spring 2011. You can watch the video  here Meta
So, what is Apache TomEE? In short, its a stack that's assembled and maintained by the Apache OpenEJB project. TomEE aims to provide a fully certified Java EE 6 Web profile stack based on Tomcat, allowing you to use Java EE features in your lightweight Tomcat applications. Talk
Apache TomEE: Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Although TomEE is assembled by the OpenEJB team, its based on a number of different Apache projects shown on the previous slide.  You may be familiar with or using some of these projects already. Even if you're not using EJBs in your projects, Apache TomEE still provides a range of functionality you may find useful. Side-note
Apache TomEE: Philosophy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Obviously there are a number of different Java EE servers available today, and a number of open source offerings.  How is TomEE different from other implementations? Well, we take a different approach to building the server – many implementations will use Tomcat to provide a servlet features, and will strip it down and embed it in their own server. TomEE does the opposite – OpenEJB and all the other components are  embedded into Tomcat , and  nothing is taken away. Talk ..Contd in next slide Question
This offers a number of advantages: Firstly, TomEE is able to leverage all the functionality that Tomcat provides, such as JNDI and security. Secondly, TomEE is still lightweight – the zip is around 37MB, and does not have any additional memory requirements over Tomcat to run. Finally, the environment will be completely familiar to existing Tomcat users, meaning that your existing tooling should still work. For example, there isn't a TomEE Eclipse plugin or Netbeans plugin – the existing out-of-the-box plugins for Tomcat 7 also work with TomEE. Talk So what do we get ?
Apache TomEE: History ,[object Object],[object Object],[object Object],[object Object],[object Object]
Although we're introducing Apache TomEE as a new bundle, it has actually been around for a while, first making an appearance in 2006, and was inspired by OpenEJB's embeddable nature. Previously it has been known as the “OpenEJB-Tomcat integration”, and was (and still is) available as a drop-in .war file for any version of Tomcat back to 5.5. In addition to the  drop-in .war , TomEE is now available as a  pre-built bundle  which requires no installation or configuration. Also worth mentioning, Apache TomEE is actually the origin of the “ EJBs in war files ” that is new in the JavaEE 6 specification. David, our PMC chair, participates in the JCP that provides the EJB specification and has done since EJB 2.1. Talk
Apache TomEE: Getting started ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
-  bin  – untouched, shell scripts have the usual options -  conf  – server.xml is the same, one extra listener. Can configure ports, hosts, engines, threadpools etc in here. Extra file  openejb.xml   – this is where most TomEE configuration happens – this is where global resources are defined. Tomcat-users.xml – we use Tomcat security. -  logs  – untouched – extra file openejb.log ends up in here, useful for troubleshooting (rarely, we hope!) -  webapps  – works the same way as it does for Tomcat. Drop your directories/wars in here! Also supports EAR files too. … contd in next slide A peek Apache TomEE: Folder Structure
Set of Tomcat apps, plus two extras: Ejb-examples  – sample application from OpenEJB repository. Simple example showing a few JavaEE features – not very functional, but useful for testing. OpenEJB  – where the magic happens. Note extra lib directory, some jars can be swapped out. Provides a dashboard to test the setup and examine the JNDI tree. A peek Apache TomEE: Folder Structure
Apache TomEE: Moviefun example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Samples
One thing that might have struck you during the demo, is that we unzipped TomEE, deployed and used a database-based web application, all without doing any configuration at all – not even specifying a database to use. TomEE will use  some default resources specified in conf/openejb.xml , including HSQLDB as a default datasource, which is why we didn't need to configure a database for the moviefun example. This is great for development, but  you might want to use a different database in production , for example, MySQL. To do this we just need to add the MySQL  connector jar to the Tomcat/lib folder, and add a datasource resource for the persistence context. Side-note
The openejb.xml file is very easy to  configure . Its an XML/properties format. The xml tags match the annotations you'd use for dependency inject (for example @Resource) and type matches the simple name of the object type. Side-note
Apache TomEE: Configuration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ApacheTomEE: Security ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rather than providing its own security implementation, TomEE makes full use of the security features that are part of Tomcat. Any Catalina realm is supported or you can provide your own security module using the login.config file. Talk ApacheTomEE: Security
For example, to add some simple security to the moviefun application, all we would need to do is: 1. Add some users to the tomcat-users.xml file 2. Add the necessary @DefineRoles and @RolesAllowed annotations on MoviesImpl 3. Add some security config to do HTTP Basic authentication to web.xml Webservice security is also looked after – username/password based security (HTTP basic, or WS-Security) uses the same Tomcat security. Certificate based security is also available. Samples are available to demonstrate this. Talk ApacheTomEE: Security
Apache TomEE: JPA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
By default, persistence in TomEE is taken care of by Apache OpenJPA. TomEE will deploy any persistence.xml files automatically. As well session EJBs, persistence units can also be injected into servlets and managed beans as well. Other JPA providers can also be used in TomEE, hibernate is particularly popular. Side-note
Apache TomEE: Transactions ,[object Object],[object Object],[object Object],[object Object],[object Object]
TomEE provides transaction support. Even if you aren't using EJBs, simply inject an  UserTransaction @Resource  into your servlets or MangedBeans. What’s cool ? Apache TomEE: Transactions
Apache TomEE: JMS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Apache TomEE: Web Services ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Apache TomEE: EJB Client ,[object Object],[object Object],[object Object],[object Object],… Contd in next slide
EJBs deployed in TomEE can also be accessed remotely using an EJB client. One nice feature of this is that TomEE uses HTTP/HTTPS as the protocol, so your rich applications can connect directly to EJBs without needing other firewall ports to be opened up. As long as you include the openejb-client jar in your client application, nothing else is needed. If you need to secure your EJBs, you can pass a username and password in the InitialContext properties. Sample (client) code below: Talk Apache TomEE: EJB Client
Apache TomEE: Functional Testing ,[object Object],[object Object],[object Object],[object Object],[object Object]
Finally – if you're into functional testing, I wanted to demonstrate a technique I have used. OpenEJB's embeddable nature makes it great for testing EJBs in a junit test.  You can take this one step further and use Apache TomEE with the Maven T7MP plugin. This allows you to start a TomEE instance (well, Tomcat 7 with the OpenEJB war) for your test run.  Combined with an in-memory database and something like Selenium or HtmlUnit, you can run your application completely embedded within your Maven build, allowing you to run your tests completely in isolation of your development environment. This technique can be useful in providing a consistent environment for tests, and not having to worry about different setups between developer machines. Talk
Thanks! OpenEJB Home Apache TomEE Getting Involved: Users mailing list Dev mailing list Follow us on  Facebook  /  Twitter   Check the next slides for Web Profile Cert status
Web Profile Certification Status ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
I previously mentioned that Apache TomEE is aiming to be a certified web profile implementation. Work on the certification process is underway. Unfortunately we can't say what the status of the work is at the moment, as its subject to a non-disclosure agreement. We do have an interesting setup to run  the TCK tests against TomEE , using lots of instances on the Amazon EC2 cloud. Again, unfortunately, we can't show you the setup, which is a shame, as it allows us to run the necessary tests very quickly, giving us fast feedback. Talk
Thanks !

More Related Content

What's hot

Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Sparkbit
 
Open Close Principle
Open Close PrincipleOpen Close Principle
Open Close Principle
Thaichor Seng
 
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...
Simplilearn
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status Code
Abhishek L.R
 
Podman Overview and internals.pdf
Podman Overview and internals.pdfPodman Overview and internals.pdf
Podman Overview and internals.pdf
Saim Safder
 
Web Application Performance
Web Application PerformanceWeb Application Performance
Web Application Performance
CodeFireTech
 
Docker compose
Docker composeDocker compose
Docker compose
Felipe Ruhland
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
Mike Bild
 
Hexagonal architecture for java applications
Hexagonal architecture for java applicationsHexagonal architecture for java applications
Hexagonal architecture for java applications
Fabricio Epaminondas
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel Quarkus
Claus Ibsen
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
Docker, Inc.
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
Akihiro Suda
 
Microservices Design Patterns
Microservices Design PatternsMicroservices Design Patterns
Microservices Design Patterns
Haim Michael
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
Adrian Cole
 
React web development
React web developmentReact web development
React web development
Rully Ramanda
 
Hexagonal architecture
Hexagonal architectureHexagonal architecture
Hexagonal architecture
Nicolas Guignard
 
Test driven development
Test driven developmentTest driven development
Test driven development
Nascenia IT
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXL
Rob Gietema
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Wei-Ting Kuo
 

What's hot (20)

Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Open Close Principle
Open Close PrincipleOpen Close Principle
Open Close Principle
 
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status Code
 
Podman Overview and internals.pdf
Podman Overview and internals.pdfPodman Overview and internals.pdf
Podman Overview and internals.pdf
 
Web Application Performance
Web Application PerformanceWeb Application Performance
Web Application Performance
 
Docker compose
Docker composeDocker compose
Docker compose
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 
Hexagonal architecture for java applications
Hexagonal architecture for java applicationsHexagonal architecture for java applications
Hexagonal architecture for java applications
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel Quarkus
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
 
Microservices Design Patterns
Microservices Design PatternsMicroservices Design Patterns
Microservices Design Patterns
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
 
React web development
React web developmentReact web development
React web development
 
Hexagonal architecture
Hexagonal architectureHexagonal architecture
Hexagonal architecture
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXL
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 

Viewers also liked

Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
Tomcat Expert
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
Anirban Majumdar
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
Shashwat Shriparv
 
Automated Tomcat Management
Automated Tomcat ManagementAutomated Tomcat Management
Automated Tomcat Management
seges
 
Ansible
AnsibleAnsible
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with Tomcat
Sudha Ch
 
Tomcat
TomcatTomcat
Tomcat
abbadon1989
 
Java ee com apache tom ee e tomee+ tdc - 2014
Java ee com apache tom ee e tomee+   tdc - 2014Java ee com apache tom ee e tomee+   tdc - 2014
Java ee com apache tom ee e tomee+ tdc - 2014
Daniel Cunha
 
Apache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEApache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEJacek Laskowski
 
Instalación de Apache Tomcat 8
Instalación de Apache Tomcat 8Instalación de Apache Tomcat 8
Instalación de Apache Tomcat 8
pablozacrosuarez
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clusteringgouthamrv
 
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Apache TomEE, Java EE 6 Web Profile {and more} on TomcatApache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Tomitribe
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
Pham Quy (Jack)
 
Tomcat session clustering
Tomcat session clusteringTomcat session clustering
Tomcat session clustering
Kim SeokYoung
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
Jean-Frederic Clere
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Servermohamedmoharam
 
APACHE TOMCAT
APACHE TOMCATAPACHE TOMCAT
APACHE TOMCAT
Rachid NID SAID
 
Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)
nazeer pasha
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
Franck SIMON
 

Viewers also liked (20)

Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Automated Tomcat Management
Automated Tomcat ManagementAutomated Tomcat Management
Automated Tomcat Management
 
Ansible
AnsibleAnsible
Ansible
 
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with Tomcat
 
Tomcat
TomcatTomcat
Tomcat
 
Java ee com apache tom ee e tomee+ tdc - 2014
Java ee com apache tom ee e tomee+   tdc - 2014Java ee com apache tom ee e tomee+   tdc - 2014
Java ee com apache tom ee e tomee+ tdc - 2014
 
Apache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEApache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEE
 
Instalación de Apache Tomcat 8
Instalación de Apache Tomcat 8Instalación de Apache Tomcat 8
Instalación de Apache Tomcat 8
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clustering
 
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Apache TomEE, Java EE 6 Web Profile {and more} on TomcatApache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Tomcat session clustering
Tomcat session clusteringTomcat session clustering
Tomcat session clustering
 
Web service introduction 2
Web service introduction 2Web service introduction 2
Web service introduction 2
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
APACHE TOMCAT
APACHE TOMCATAPACHE TOMCAT
APACHE TOMCAT
 
Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 

Similar to Apache TomEE - Tomcat with a kick

Mc sl54 051_ (1)
Mc sl54 051_ (1)Mc sl54 051_ (1)
Mc sl54 051_ (1)
AnkitKumar2343
 
Integrating tomcat with apache
Integrating tomcat with apacheIntegrating tomcat with apache
Integrating tomcat with apachegovindraj8787
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
Rich Helton
 
Tomcat Maven Plugin
Tomcat Maven PluginTomcat Maven Plugin
Tomcat Maven Plugin
Olivier Lamy
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
BG Java EE Course
 
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
panagenda
 
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
Kathy Brown
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 
GTLAB Overview
GTLAB OverviewGTLAB Overview
GTLAB Overview
marpierc
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHM
HTS Hosting
 
01 web-apps
01 web-apps01 web-apps
01 web-appssnopteck
 
01 web-apps
01 web-apps01 web-apps
01 web-apps
Aravindharamanan S
 
Tc Server Glance Over
Tc Server Glance OverTc Server Glance Over
Tc Server Glance Over
Iwein Fuld
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivitywebhostingguy
 
Java7
Java7Java7
AtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionAtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An Introduction
Artefactual Systems - AtoM
 
Learning puppet chapter 3
Learning puppet chapter 3Learning puppet chapter 3
Learning puppet chapter 3
Vishal Biyani
 

Similar to Apache TomEE - Tomcat with a kick (20)

Pp w tomee
Pp w tomeePp w tomee
Pp w tomee
 
Mc sl54 051_ (1)
Mc sl54 051_ (1)Mc sl54 051_ (1)
Mc sl54 051_ (1)
 
Integrating tomcat with apache
Integrating tomcat with apacheIntegrating tomcat with apache
Integrating tomcat with apache
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
 
Tomcat Maven Plugin
Tomcat Maven PluginTomcat Maven Plugin
Tomcat Maven Plugin
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
 
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
GTLAB Overview
GTLAB OverviewGTLAB Overview
GTLAB Overview
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHM
 
01 web-apps
01 web-apps01 web-apps
01 web-apps
 
01 web-apps
01 web-apps01 web-apps
01 web-apps
 
Tc Server Glance Over
Tc Server Glance OverTc Server Glance Over
Tc Server Glance Over
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivity
 
Java7
Java7Java7
Java7
 
Hackingtomcat
HackingtomcatHackingtomcat
Hackingtomcat
 
Hacking Tomcat
Hacking TomcatHacking Tomcat
Hacking Tomcat
 
AtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionAtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An Introduction
 
Learning puppet chapter 3
Learning puppet chapter 3Learning puppet chapter 3
Learning puppet chapter 3
 

Recently uploaded

Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Apache TomEE - Tomcat with a kick

  • 1. Apache TomEE Tomcat with a kick About Apache TomEE David Blevins Jonathan Gallimore dblevins@apache.org [email_address] @dblevins @jongallimore * Original Slides modified a little to make the document self-contained
  • 2. In this presentation we will introduce and demonstrate Apache TomEE… And show how you can leverage all the additional features available in the JavaEE 6 platform, without having to move away from Tomcat. Intro Welcome to Apache TomEE – Tomcat with a kick.
  • 3. The slides are from Jonathan Gallimore and David Belvins’ presentation @JAX London, Spring 2011. You can watch the video here Meta
  • 4. So, what is Apache TomEE? In short, its a stack that's assembled and maintained by the Apache OpenEJB project. TomEE aims to provide a fully certified Java EE 6 Web profile stack based on Tomcat, allowing you to use Java EE features in your lightweight Tomcat applications. Talk
  • 5.
  • 6. Although TomEE is assembled by the OpenEJB team, its based on a number of different Apache projects shown on the previous slide. You may be familiar with or using some of these projects already. Even if you're not using EJBs in your projects, Apache TomEE still provides a range of functionality you may find useful. Side-note
  • 7.
  • 8. Obviously there are a number of different Java EE servers available today, and a number of open source offerings. How is TomEE different from other implementations? Well, we take a different approach to building the server – many implementations will use Tomcat to provide a servlet features, and will strip it down and embed it in their own server. TomEE does the opposite – OpenEJB and all the other components are embedded into Tomcat , and nothing is taken away. Talk ..Contd in next slide Question
  • 9. This offers a number of advantages: Firstly, TomEE is able to leverage all the functionality that Tomcat provides, such as JNDI and security. Secondly, TomEE is still lightweight – the zip is around 37MB, and does not have any additional memory requirements over Tomcat to run. Finally, the environment will be completely familiar to existing Tomcat users, meaning that your existing tooling should still work. For example, there isn't a TomEE Eclipse plugin or Netbeans plugin – the existing out-of-the-box plugins for Tomcat 7 also work with TomEE. Talk So what do we get ?
  • 10.
  • 11. Although we're introducing Apache TomEE as a new bundle, it has actually been around for a while, first making an appearance in 2006, and was inspired by OpenEJB's embeddable nature. Previously it has been known as the “OpenEJB-Tomcat integration”, and was (and still is) available as a drop-in .war file for any version of Tomcat back to 5.5. In addition to the drop-in .war , TomEE is now available as a pre-built bundle which requires no installation or configuration. Also worth mentioning, Apache TomEE is actually the origin of the “ EJBs in war files ” that is new in the JavaEE 6 specification. David, our PMC chair, participates in the JCP that provides the EJB specification and has done since EJB 2.1. Talk
  • 12.
  • 13. - bin – untouched, shell scripts have the usual options - conf – server.xml is the same, one extra listener. Can configure ports, hosts, engines, threadpools etc in here. Extra file openejb.xml – this is where most TomEE configuration happens – this is where global resources are defined. Tomcat-users.xml – we use Tomcat security. - logs – untouched – extra file openejb.log ends up in here, useful for troubleshooting (rarely, we hope!) - webapps – works the same way as it does for Tomcat. Drop your directories/wars in here! Also supports EAR files too. … contd in next slide A peek Apache TomEE: Folder Structure
  • 14. Set of Tomcat apps, plus two extras: Ejb-examples – sample application from OpenEJB repository. Simple example showing a few JavaEE features – not very functional, but useful for testing. OpenEJB – where the magic happens. Note extra lib directory, some jars can be swapped out. Provides a dashboard to test the setup and examine the JNDI tree. A peek Apache TomEE: Folder Structure
  • 15.
  • 16. One thing that might have struck you during the demo, is that we unzipped TomEE, deployed and used a database-based web application, all without doing any configuration at all – not even specifying a database to use. TomEE will use some default resources specified in conf/openejb.xml , including HSQLDB as a default datasource, which is why we didn't need to configure a database for the moviefun example. This is great for development, but you might want to use a different database in production , for example, MySQL. To do this we just need to add the MySQL connector jar to the Tomcat/lib folder, and add a datasource resource for the persistence context. Side-note
  • 17. The openejb.xml file is very easy to configure . Its an XML/properties format. The xml tags match the annotations you'd use for dependency inject (for example @Resource) and type matches the simple name of the object type. Side-note
  • 18.
  • 19.
  • 20. Rather than providing its own security implementation, TomEE makes full use of the security features that are part of Tomcat. Any Catalina realm is supported or you can provide your own security module using the login.config file. Talk ApacheTomEE: Security
  • 21. For example, to add some simple security to the moviefun application, all we would need to do is: 1. Add some users to the tomcat-users.xml file 2. Add the necessary @DefineRoles and @RolesAllowed annotations on MoviesImpl 3. Add some security config to do HTTP Basic authentication to web.xml Webservice security is also looked after – username/password based security (HTTP basic, or WS-Security) uses the same Tomcat security. Certificate based security is also available. Samples are available to demonstrate this. Talk ApacheTomEE: Security
  • 22.
  • 23. By default, persistence in TomEE is taken care of by Apache OpenJPA. TomEE will deploy any persistence.xml files automatically. As well session EJBs, persistence units can also be injected into servlets and managed beans as well. Other JPA providers can also be used in TomEE, hibernate is particularly popular. Side-note
  • 24.
  • 25. TomEE provides transaction support. Even if you aren't using EJBs, simply inject an UserTransaction @Resource into your servlets or MangedBeans. What’s cool ? Apache TomEE: Transactions
  • 26.
  • 27.
  • 28.
  • 29. EJBs deployed in TomEE can also be accessed remotely using an EJB client. One nice feature of this is that TomEE uses HTTP/HTTPS as the protocol, so your rich applications can connect directly to EJBs without needing other firewall ports to be opened up. As long as you include the openejb-client jar in your client application, nothing else is needed. If you need to secure your EJBs, you can pass a username and password in the InitialContext properties. Sample (client) code below: Talk Apache TomEE: EJB Client
  • 30.
  • 31. Finally – if you're into functional testing, I wanted to demonstrate a technique I have used. OpenEJB's embeddable nature makes it great for testing EJBs in a junit test. You can take this one step further and use Apache TomEE with the Maven T7MP plugin. This allows you to start a TomEE instance (well, Tomcat 7 with the OpenEJB war) for your test run. Combined with an in-memory database and something like Selenium or HtmlUnit, you can run your application completely embedded within your Maven build, allowing you to run your tests completely in isolation of your development environment. This technique can be useful in providing a consistent environment for tests, and not having to worry about different setups between developer machines. Talk
  • 32. Thanks! OpenEJB Home Apache TomEE Getting Involved: Users mailing list Dev mailing list Follow us on Facebook / Twitter Check the next slides for Web Profile Cert status
  • 33.
  • 34. I previously mentioned that Apache TomEE is aiming to be a certified web profile implementation. Work on the certification process is underway. Unfortunately we can't say what the status of the work is at the moment, as its subject to a non-disclosure agreement. We do have an interesting setup to run the TCK tests against TomEE , using lots of instances on the Amazon EC2 cloud. Again, unfortunately, we can't show you the setup, which is a shame, as it allows us to run the necessary tests very quickly, giving us fast feedback. Talk

Editor's Notes

  1. [Quick introduction] http://openejb.apache.org/3.0/apache-tomee.html Welcome to Apache TomEE – Tomcat with a kick. In this presentation we will introduce and demonstrate Apache TomEE, and show how you can leverage all the additional features available in the JavaEE 6 platform, without having to move away from Tomcat. We have got time for questions at the end, but please do feel free to ask any questions as we go along, and we'll do our best to answer them.
  2. So, what is Apache TomEE? In short, its a stack that's assembled and maintained by the Apache OpenEJB project. TomEE aims to provide a fully certified Java EE 6 Web profile stack based on Tomcat, allowing you to use Java EE features in your lightweight Tomcat applications. Although TomEE is assembled by the OpenEJB team, its based on a number of different Apache projects shown on the slide. You may be familiar with or using some of these projects already. Even if you're not using EJBs in your projects, Apache TomEE still provides a range of functionality you may find useful.
  3. Obviously there are a number of different Java EE servers available today, and a number of open source offerings. How is TomEE different from other implementations? Well, we take a different approach to building the server – many implementations will use Tomcat to provide a servlet features, and will strip it down and embed it in their own server. TomEE does the opposite – OpenEJB and all the other components are embedded into Tomcat, and nothing is taken away. This offers a number of advantages: Firstly, TomEE is able to leverage all the functionality that Tomcat provides, such as JNDI and security. Secondly, TomEE is still lightweight – the zip is around 37MB, and does not have any additional memory requirements over Tomcat to run. Finally, the environment will be completely familiar to existing Tomcat users, meaning that your existing tooling should still work. For example, there isn't a TomEE Eclipse plugin or Netbeans plugin – the existing out-of-the-box plugins for Tomcat 7 also work with TomEE.
  4. Although we're introducing Apache TomEE as a new bundle, it has actually been around for a while, first making an appearance in 2006, and was inspired by OpenEJB's embeddable nature. Previously it has been known as the “OpenEJB-Tomcat integration”, and was (and still is) available as a drop-in .war file for any version of Tomcat back to 5.5. In addition to the drop-in .war, TomEE is now available as a pre-built bundle which requires no installation or configuration. Also worth mentioning, Apache TomEE is actually the origin of the “EJBs in war files” that is new in the JavaEE 6 specification. David, our PMC chair, participates in the JCP that provides the EJB specification and has done since EJB 2.1.
  5. I'll now demonstrate how easy it is to get started with Apache TomEE, using the pre-built bundle. [Demo] - Unzip - Explain folder structure: - bin – untouched, shell scripts have the usual options - conf – server.xml is the same, one extra listener. Can configure ports, hosts, engines, threadpools etc in here. Extra file openejb.xml – this is where most TomEE configuration happens – this is where global resources are defined. Tomcat-users.xml – we use Tomcat security. - logs – untouched – extra file openejb.log ends up in here, useful for troubleshooting (rarely, we hope!) - webapps – works the same way as it does for Tomcat. Drop your directories/wars in here! Also supports EAR files too. Set of Tomcat apps, plus two extras: Ejb-examples – sample application from OpenEJB repository. Simple example showing a few JavaEE features – not very functional, but useful for testing. OpenEJB – where the magic happens. Note extra lib directory, some jars can be swapped out. Provides a dashboard to test the setup and examine the JNDI tree.
  6. Now that we have a TomEE server up and running, I'll show you one of the example applications from OpenEJB, and deploy that to TomEE. The example I'm going to show you is the Moviefun example, and this is available from the subversion repository here. The application itself is very simple – a database of movies, catalogued by title, director, genre and year, and each one having a rating out of ten. It demonstrates a number of Java EE features, such as SL EJB session bean with a no-interface view, persistence with JPA, dependency injection, webservices and JMS. [Code] - Show Movie POJO - SLSB - Annotated servlet - JSF controller [Demo] - Stop existing server - Create WTP server - Configure to use openejb war too - Deploy and start server in debug mode - Show interface, setup db, browse web app. - Show breakpoint
  7. One thing that might have struck you during the demo, is that we unzipped TomEE, deployed and used a database-based web application, all without doing any configuration at all – not even specifying a database to use. TomEE will use some default resources specified in conf/openejb.xml, including HSQLDB as a default datasource, which is why we didn't need to configure a database for the moviefun example. This is great for development, but you might want to use a different database in production, for example, MySQL. To do this we just need to add the MySQL connector jar to the Tomcat/lib folder, and add a datasource resource for the persistence context. The file is very easy to edit, its an XML/properties format. The xml tags match the annotations you'd use for dependency inject (for example @Resource) and type matches the simple name of the object type. [Example] Show database configuration in text editor
  8. Rather than providing its own security implementation, TomEE makes full use of the security features that are part of Tomcat. Any Catalina realm is supported or you can provide your own security module using the login.config file. For example, to add some simple security to the moviefun application, all we would need to do is: 1. Add some users to the tomcat-users.xml file 2. Add the necessary @DefineRoles and @RolesAllowed annotations on MoviesImpl 3. Add some security config to do HTTP Basic authentication to web.xml Webservice security is also looked after – username/password based security (HTTP basic, or WS-Security) uses the same Tomcat security. Certificate based security is also available. Samples are available to demonstrate this.
  9. By default, persistence in TomEE is taken care of by Apache OpenJPA. TomEE will deploy any persistence.xml files automatically. As well session EJBs, persistence units can also be injected into servlets and managed beans as well. Other JPA providers can also be used in TomEE, hibernate is particularly popular.
  10. TomEE provides transaction support. Even if you aren't using EJBs, simply inject an UserTransaction @Resource into your servlets or MangedBeans.
  11. JMS support is provided by Apache ActiveMQ. Topics and queues can be configured in conf/openejb.xml. These resources will be injected into EJBs / Servlets etc, if you use the @Resource annotation. [Show EJB from moviefun again] JMS topics and queues can be accessed externally by connecting to port 61616. The moviefun example includes a notification application which subscribes to a JMS topic which is notified when a movie is deleted from the database. [Run the notifier] [Delete my least favourite movie ever, Zoolander, from the application. Notice the popup].
  12. [2 minutes] Webservice support is provided using Apache CXF. Both POJO and EJB webservices are supported, and is simply a matter of adding the @WebService annotation. [Show EJB again, highlight annotation] The moviefun example includes 2 Perl scripts that connect to the application via the webservice. [Show code and demonstrate] Webservice security is supported, either by requiring HTTP authentication, or WS-Security headers. There are a number of webservice examples available in the OpenEJB svn repository.
  13. EJBs deployed in TomEE can also be accessed remotely using an EJB client. One nice feature of this is that TomEE uses HTTP/HTTPS as the protocol, so your rich applications can connect directly to EJBs without needing other firewall ports to be opened up. There's some sample code to do this on the slide. As long as you include the openejb-client jar in your client application, nothing else is needed. If you need to secure your EJBs, you can pass a username and password in the InitialContext properties.
  14. Finally – if you're into functional testing, I wanted to demonstrate a technique I have used. OpenEJB's embeddable nature makes it great for testing EJBs in a junit test. You can take this one step further and use Apache TomEE with the Maven T7MP plugin. This allows you to start a TomEE instance (well, Tomcat 7 with the OpenEJB war) for your test run. Combined with an in-memory database and something like Selenium or HtmlUnit, you can run your application completely embedded within your Maven build, allowing you to run your tests completely in isolation of your development environment. This technique can be useful in providing a consistent environment for tests, and not having to worry about different setups between developer machines. [Show POM] [Show integration test]
  15. That's the end of the presentation, thanks for joining us, and we hope you have found it useful. We'll try and answer any questions now. Please feel to join us on the mailing lists if you have questions later on, or if you want to participate!
  16. I previously mentioned that Apache TomEE is aiming to be a certified web profile implementation. Work on the certification process is underway. Unfortunately we can't say what the status of the work is at the moment, as its subject to a non-disclosure agreement. We do have an interesting setup to run the TCK tests against TomEE, using lots of instances on the Amazon EC2 cloud. Again, unfortunately, we can't show you the setup, which is a shame, as it allows us to run the necessary tests very quickly, giving us fast feedback.