SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
<Insert Picture Here>

Java EE 6 application development, OSGi and Eclipse users
Roberto Chinnici
Java EE 6 Specification Lead
Ludovic Champenois, GlassFish Tools Architect
JAVA EE 6
FINAL RELEASE
DECEMBER 10, 2009
What's New?

•
•
•
•
•

Several new APIs
Web Profile
Pluggability/extensibility
Dependency injection
Lots of improvements to existing APIs
New and updated components

•
•
•
•
•
•
•
•
•

EJB 3.1
JPA 2.0
Servlet 3.0
JSF 2.0
JAX-RS 1.1
Connectors 1.6
Bean Validation 1.0
DI 1.0
CDI 1.0

•
•
•
•
•
•
•
•
•

Managed Beans 1.0
Interceptors 1.1
JAX-WS 2.2
JSR-109 1.3
JSP 2.2
EL 2.2
JSR-250 1.1
JASPIC 1.1
JACC 1.5
Web Profile

• First Java EE profile to be defined
• A fully-functional, mid-size stack for modern web
application development
• Complete, but not the kitchen sink
Java EE 6 Web Profile Contents

JSF 2.0
JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0
Servlet 3.0
EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0
Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1
JPA 2.0 · JTA 1.1
Pluggability/Extensibility

• Focus on the web tier in this release
• Create a level playing field for third-party frameworks
• Simplify packaging of web applications
Modular Web Applications

•
•
•
•
•
•

Libraries can contain /META-INF/web-fragment.xml
web.xml is optional
@WebServlet, @WebFilter annotations
ServletContainerInitializer interface
Programmatic registration of components
Resource jars containing /META-INF/resources
Sample Web Fragment Descriptor
<web-fragment
version=”3.0”
xmlns="http://java.sun.com/xml/ns/javaee">
<servlet>
<servlet-name>welcome</servlet-name>
<servlet-class>WelcomeServlet</servlet-class>
</servlet>
<listener>
<listener-class>RequestListener</listener-class>
</listener>
</web-fragment>
JAX-RS 1.1

•
•
•
•
•

RESTful web services API
Already widely adopted
Really a general, high-level HTTP API
Annotation-based programming model
Programmatic API when needed
JAX-RS Sample
@Path(“widgets/{id}”)
@Produces(“application/widgets+xml”)
public class WidgetResource {
public WidgetResource(@PathParam(“id”)
String id) {…}
@GET
public Widget getWidget() {…}
@PUT
public void putWidget(Widget widget){…}
}
Bean Validation 1.0

• Integrated with JSF, JPA
• Declarative constraints using annotations
@NotNull
@Size(max=40) String address;
• Fully extensible: define your own constraints
@Email String recipient;
• Validator API for programmatic validation
validator.validate(obj) → Set<ConstraintViolation>
EJB 3.1

• @Singleton beans
• @Startup beans
• @Asynchronous invocations
@Asynchronous public Future<Integer> compute();
• Define EJBs directly inside a web application
• EJBContainer API works on Java SE
Adding an EJB to a Web Application
Before
BuyBooks.war

ShoppingCart
EJB Class

Now
ShoppingCart
EJB Class

ShoppingCart.jar

BuyBooks.ear

BuyBooks.war
Dependency Injection

• DI + CDI (JSR-330 + JSR-299)
• @Resource still around
@Resource DataSource myDB;
• Added @Inject annotation for typesafe injection
@Inject @LoggedIn User user;
• Automatic scope management (request, session, etc.)
• No configuration: beans discovered at startup
• Extensible via the BeanManager API
Dependency Injection Sample
@ApplicationScoped
public class CheckoutHandler {
@Inject
public CheckoutHandler(
@LoggedIn User user,
@Reliable @PayBy(CREDIT_CARD)
PaymentProcessor processor,
@Default ShoppingCart cart) {…}
}

Injection points identified by Qualifier + Type
@Default can be omitted
JSF 2.0

•
•
•
•
•
•

Facelet as a standard view declaration language
Composite components
Automatic discovery of component libraries
Programmatic and declarative Ajax support
System events
Validation out-of-the-box
Java EE 6 Platform

•
•
•
•

More powerful
More flexible
More extensible
Easier to use

http://java.sun.com/javaee
What is GlassFish
• A Community
– Users, Partners, Testers, Developers
– Started in 2005 on http://java.net

• Application Server
– Enterprise Quality and Open Source (CDDL & GPL v2)
– Java EE 5 / 6 Reference Implementation

• Full Commercial Support from Oracle
– Not only a Reference Implementation
– Roadmap announced tomorrow regarding HA, Clustering...
GlassFish v3...
• The Java EE 6 spec, of course, and...
• Beyond the spec
– Fast, very fast, small, very small
– restart, btrace/dtrace, embedded, modularity, OSGi, RESTful
Admin,...
– Scripting: jRoR, Grails, and now Django

• Update Center: repository of new/updated bundles
• Tooling: Netbeans 6.8, IntelliJ,vi, and
– Eclipse 3.5, 3.6Mx
Modular and Dynamic
• Modular : OSGi: Equinox and Apache Felix
• But also Equinox or Static mode, thanks to HK2
– Yet very Fast !

• Painless Java EE 6 development
–
–
–
–

Via the new/easier APIs
Via better tools integration
Ultra fast Auto-deploy of all Java EE and static artifacts
Application runner
• java -jar glassfish.jar foo.war
Web Session Retention
• Deployment option to maintain stateful sessions across redeployments
– $ asadmin redeploy --properties keepSessions=true myapp.war
– Enabled by Default in Eclipse IDE

• For All sessions:
– Servlets, CDIs, Stateful EJBs,...

• Greatly simplifies the development paradigm
GlassFish and OSGi
• GlassFish runs on top of OSGi (Felix and Equinox)
– GlassFish ships with 200+ bundles

• Can use OSGi management tools (CLI or Web)
• Any OSGi bundle will run in GlassFish v3
– Drop it in domain1/autodeploy/bundles
– Can also asadmin deploy it using --type osgi

• Consume OSGi services via @Resource
@Resource (mappedName="MYPUREOSGISERVICE")

HelloService

myOSGiService;

• Web Application Bundle (WAB Support)
Demo
• GlassFish Java EE dev in Eclipse
Integration with maven 2
• Java EE 6 APIs in Maven repository
– http://download.java.net/maven/2/javax/javaee-api/
– Stripped jars: very small <1Mb
– Not to be used for Testing

• GlassFish Embbeded can run via Maven
– mvn gf:run
Update Center: Add/Remove/Update Bundles
Thanks for your attention!
• http://java.sun.com/javaee
• http://glassfish.org

Contenu connexe

Tendances

Turn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmTurn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmDimitris Andreadis
 
SHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applicationsSHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applicationsnick_garrod
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula Sorin Chiprian
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The BasicsPhilip Langer
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersTeng Shiu Huang
 
WildFly AppServer - State of the Union
WildFly AppServer - State of the UnionWildFly AppServer - State of the Union
WildFly AppServer - State of the UnionDimitris Andreadis
 
Java EE and Google App Engine
Java EE and Google App EngineJava EE and Google App Engine
Java EE and Google App EngineArun Gupta
 
Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Agora Group
 
Scaling and Managing Selenium Grid
Scaling and Managing Selenium GridScaling and Managing Selenium Grid
Scaling and Managing Selenium Griddimakovalenko
 
High Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDIHigh Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDIPayara
 
Grid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium gridGrid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium gridMikhail Levin
 
Scala play-framework
Scala play-frameworkScala play-framework
Scala play-frameworkAbdhesh Kumar
 
미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기jbugkorea
 
Deploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with DockerDeploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with DockerPayara
 

Tendances (19)

Turn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmTurn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly Swarm
 
SHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applicationsSHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applications
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
 
WildFly AppServer - State of the Union
WildFly AppServer - State of the UnionWildFly AppServer - State of the Union
WildFly AppServer - State of the Union
 
Java EE and Google App Engine
Java EE and Google App EngineJava EE and Google App Engine
Java EE and Google App Engine
 
Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011
 
Scaling and Managing Selenium Grid
Scaling and Managing Selenium GridScaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
 
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
 
Selenium-Grid-Extras
Selenium-Grid-ExtrasSelenium-Grid-Extras
Selenium-Grid-Extras
 
Meet the Selenium Grid
Meet the Selenium GridMeet the Selenium Grid
Meet the Selenium Grid
 
High Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDIHigh Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDI
 
Grid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium gridGrid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium grid
 
Introducing CQ 5.1
Introducing CQ 5.1Introducing CQ 5.1
Introducing CQ 5.1
 
Scala play-framework
Scala play-frameworkScala play-framework
Scala play-framework
 
미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기
 
Deploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with DockerDeploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with Docker
 
IIS7 For Non IIS PFEs
IIS7 For Non IIS PFEsIIS7 For Non IIS PFEs
IIS7 For Non IIS PFEs
 

En vedette

How To Make A Great Pbj
How To Make A Great PbjHow To Make A Great Pbj
How To Make A Great Pbjguest861d7
 
GlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox FelixGlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox FelixLudovic Champenois
 
Ad Tech 2011 - In Store Digital Leadership
Ad Tech 2011 - In Store Digital LeadershipAd Tech 2011 - In Store Digital Leadership
Ad Tech 2011 - In Store Digital LeadershipBrad Locke
 
GlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseGlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseLudovic Champenois
 
Abusive Training Certificate 3 18 2014
Abusive Training Certificate 3 18 2014Abusive Training Certificate 3 18 2014
Abusive Training Certificate 3 18 2014colleenmcg
 
JAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesJAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesLudovic Champenois
 

En vedette (8)

How To Make A Great Pbj
How To Make A Great PbjHow To Make A Great Pbj
How To Make A Great Pbj
 
GlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox FelixGlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox Felix
 
Ad Tech 2011 - In Store Digital Leadership
Ad Tech 2011 - In Store Digital LeadershipAd Tech 2011 - In Store Digital Leadership
Ad Tech 2011 - In Store Digital Leadership
 
GlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseGlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for Eclipse
 
S313431 JPA 2.0 Overview
S313431 JPA 2.0 OverviewS313431 JPA 2.0 Overview
S313431 JPA 2.0 Overview
 
Abusive Training Certificate 3 18 2014
Abusive Training Certificate 3 18 2014Abusive Training Certificate 3 18 2014
Abusive Training Certificate 3 18 2014
 
JavaEE 6 tools coverage
JavaEE 6 tools coverageJavaEE 6 tools coverage
JavaEE 6 tools coverage
 
JAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesJAX-RS Creating RESTFul services
JAX-RS Creating RESTFul services
 

Similaire à Java EE 6, Eclipse, GlassFish @EclipseCon 2010

Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGMarakana Inc.
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Arun Gupta
 
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Arun Gupta
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Agora Group
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6glassfish
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010JUG Lausanne
 
Java ee 8 + security overview
Java ee 8 + security overviewJava ee 8 + security overview
Java ee 8 + security overviewRudy De Busscher
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Kile Niklawski
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFishglassfish
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 UpdateRyan Cuprak
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011Arun Gupta
 
GlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsGlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsArun Gupta
 
Developing Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyDeveloping Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyYK Chang
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.Dimitris Andreadis
 
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011Arun Gupta
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)Kevin Sutter
 
Play 2 Java Framework with TDD
Play 2 Java Framework with TDDPlay 2 Java Framework with TDD
Play 2 Java Framework with TDDBasav Nagur
 
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeOpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeJesse Gallagher
 

Similaire à Java EE 6, Eclipse, GlassFish @EclipseCon 2010 (20)

Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
 
Java ee 8 + security overview
Java ee 8 + security overviewJava ee 8 + security overview
Java ee 8 + security overview
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFish
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011
 
GlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsGlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 Applications
 
Developing Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyDeveloping Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open Liberty
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
 
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
 
Play 2 Java Framework with TDD
Play 2 Java Framework with TDDPlay 2 Java Framework with TDD
Play 2 Java Framework with TDD
 
Play2 Java
Play2 JavaPlay2 Java
Play2 Java
 
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeOpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
 

Dernier

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"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
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Dernier (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"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
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Java EE 6, Eclipse, GlassFish @EclipseCon 2010

  • 1. <Insert Picture Here> Java EE 6 application development, OSGi and Eclipse users Roberto Chinnici Java EE 6 Specification Lead Ludovic Champenois, GlassFish Tools Architect
  • 2. JAVA EE 6 FINAL RELEASE DECEMBER 10, 2009
  • 3. What's New? • • • • • Several new APIs Web Profile Pluggability/extensibility Dependency injection Lots of improvements to existing APIs
  • 4. New and updated components • • • • • • • • • EJB 3.1 JPA 2.0 Servlet 3.0 JSF 2.0 JAX-RS 1.1 Connectors 1.6 Bean Validation 1.0 DI 1.0 CDI 1.0 • • • • • • • • • Managed Beans 1.0 Interceptors 1.1 JAX-WS 2.2 JSR-109 1.3 JSP 2.2 EL 2.2 JSR-250 1.1 JASPIC 1.1 JACC 1.5
  • 5. Web Profile • First Java EE profile to be defined • A fully-functional, mid-size stack for modern web application development • Complete, but not the kitchen sink
  • 6. Java EE 6 Web Profile Contents JSF 2.0 JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0 Servlet 3.0 EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0 Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1 JPA 2.0 · JTA 1.1
  • 7. Pluggability/Extensibility • Focus on the web tier in this release • Create a level playing field for third-party frameworks • Simplify packaging of web applications
  • 8. Modular Web Applications • • • • • • Libraries can contain /META-INF/web-fragment.xml web.xml is optional @WebServlet, @WebFilter annotations ServletContainerInitializer interface Programmatic registration of components Resource jars containing /META-INF/resources
  • 9. Sample Web Fragment Descriptor <web-fragment version=”3.0” xmlns="http://java.sun.com/xml/ns/javaee"> <servlet> <servlet-name>welcome</servlet-name> <servlet-class>WelcomeServlet</servlet-class> </servlet> <listener> <listener-class>RequestListener</listener-class> </listener> </web-fragment>
  • 10. JAX-RS 1.1 • • • • • RESTful web services API Already widely adopted Really a general, high-level HTTP API Annotation-based programming model Programmatic API when needed
  • 11. JAX-RS Sample @Path(“widgets/{id}”) @Produces(“application/widgets+xml”) public class WidgetResource { public WidgetResource(@PathParam(“id”) String id) {…} @GET public Widget getWidget() {…} @PUT public void putWidget(Widget widget){…} }
  • 12. Bean Validation 1.0 • Integrated with JSF, JPA • Declarative constraints using annotations @NotNull @Size(max=40) String address; • Fully extensible: define your own constraints @Email String recipient; • Validator API for programmatic validation validator.validate(obj) → Set<ConstraintViolation>
  • 13. EJB 3.1 • @Singleton beans • @Startup beans • @Asynchronous invocations @Asynchronous public Future<Integer> compute(); • Define EJBs directly inside a web application • EJBContainer API works on Java SE
  • 14. Adding an EJB to a Web Application Before BuyBooks.war ShoppingCart EJB Class Now ShoppingCart EJB Class ShoppingCart.jar BuyBooks.ear BuyBooks.war
  • 15. Dependency Injection • DI + CDI (JSR-330 + JSR-299) • @Resource still around @Resource DataSource myDB; • Added @Inject annotation for typesafe injection @Inject @LoggedIn User user; • Automatic scope management (request, session, etc.) • No configuration: beans discovered at startup • Extensible via the BeanManager API
  • 16. Dependency Injection Sample @ApplicationScoped public class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD) PaymentProcessor processor, @Default ShoppingCart cart) {…} } Injection points identified by Qualifier + Type @Default can be omitted
  • 17. JSF 2.0 • • • • • • Facelet as a standard view declaration language Composite components Automatic discovery of component libraries Programmatic and declarative Ajax support System events Validation out-of-the-box
  • 18. Java EE 6 Platform • • • • More powerful More flexible More extensible Easier to use http://java.sun.com/javaee
  • 19.
  • 20. What is GlassFish • A Community – Users, Partners, Testers, Developers – Started in 2005 on http://java.net • Application Server – Enterprise Quality and Open Source (CDDL & GPL v2) – Java EE 5 / 6 Reference Implementation • Full Commercial Support from Oracle – Not only a Reference Implementation – Roadmap announced tomorrow regarding HA, Clustering...
  • 21. GlassFish v3... • The Java EE 6 spec, of course, and... • Beyond the spec – Fast, very fast, small, very small – restart, btrace/dtrace, embedded, modularity, OSGi, RESTful Admin,... – Scripting: jRoR, Grails, and now Django • Update Center: repository of new/updated bundles • Tooling: Netbeans 6.8, IntelliJ,vi, and – Eclipse 3.5, 3.6Mx
  • 22. Modular and Dynamic • Modular : OSGi: Equinox and Apache Felix • But also Equinox or Static mode, thanks to HK2 – Yet very Fast ! • Painless Java EE 6 development – – – – Via the new/easier APIs Via better tools integration Ultra fast Auto-deploy of all Java EE and static artifacts Application runner • java -jar glassfish.jar foo.war
  • 23. Web Session Retention • Deployment option to maintain stateful sessions across redeployments – $ asadmin redeploy --properties keepSessions=true myapp.war – Enabled by Default in Eclipse IDE • For All sessions: – Servlets, CDIs, Stateful EJBs,... • Greatly simplifies the development paradigm
  • 24. GlassFish and OSGi • GlassFish runs on top of OSGi (Felix and Equinox) – GlassFish ships with 200+ bundles • Can use OSGi management tools (CLI or Web) • Any OSGi bundle will run in GlassFish v3 – Drop it in domain1/autodeploy/bundles – Can also asadmin deploy it using --type osgi • Consume OSGi services via @Resource @Resource (mappedName="MYPUREOSGISERVICE") HelloService myOSGiService; • Web Application Bundle (WAB Support)
  • 25. Demo • GlassFish Java EE dev in Eclipse
  • 26. Integration with maven 2 • Java EE 6 APIs in Maven repository – http://download.java.net/maven/2/javax/javaee-api/ – Stripped jars: very small <1Mb – Not to be used for Testing • GlassFish Embbeded can run via Maven – mvn gf:run
  • 28. Thanks for your attention! • http://java.sun.com/javaee • http://glassfish.org