SlideShare a Scribd company logo
Çağatay ÇİVİCİ
Mert ÇALIŞKAN
July ’13
DEMYSTIFIED
Released on June 12, 2013.
Focuses on HTML 5, higher productivity, more to meet industrial
standards.
Glassfish 4.0 is EE 7 ready.
Java EE 7
Enterprise JAVA
• Java EE = Java Enterprise Edition
• Extends Java SE
javax.faces.* UI + JSF Related Stuff
javax.servlet.* Handling HTTP invocations
javax.enterprise.inject.* CDI, Like Spring depedency Inj.
javax.ejb.* EJB Stuff
javax.validation.* BeanValidation
javax.persistence.* Persistency
javax.transaction.* Stuff for transactions
javax.jms.* Messaging Stuff
CHRONOLOGY OF JAVA EE
Java EE 5
May 11, 2006
Java EE 6
December 10, 2009
J2EE 1.2
December 12, 1999
J2EE 1.3
Sept. 12, 2001
J2EE 1.4
Nov. 11, 2003
Servlet 2.2 Servlet 2.3 Servlet 2.4
JSP
EJB
JMS
JTA
JAAS
JSF
EL
JAX-WS
JAX-RS
JAX-B
JPA
JSTL
any many
more...
Servlet 2.5
Servlet 3.0
Java EE 7 Agenda
Java API for RESTful Web Services 2.0
Java Message Service 2.0
Java API for JSON Processing 1.0
Java API for WebSocket 1.0
CDI 1.1
Batch Applications for the Java Platform 1.0
Java Persistence API 2.1
Servlet 3.1
JavaServer Faces 2.2
Java EE 7
Project Creation
NetBeans, current version 7.3.1, supports Java EE 7.
Can be downloaded with Glassfish 4.0, which also supports
EE 7.
Maven archetypes are @ https:/
/nexus.codehaus.org/
content/repositories/releases/org/codehaus/mojo/archetypes
Archetypes can easily be integrated into NetBeans.
Java EE7 Demystified
Servlets
3.0 recap
Managing state on stateless HTTP protocol by processing
HTML pages back and forth between client and server.
highlights with 3.0:
- ease of development: the annotations like,
@Servlet @ServletFilter and etc.
- partial web.xml with metadata-complete attribute and
web-fragment.xml files under .jar/META-INF
- static resources & jsps inside a jar file to be reused.
Servlets
3.1 highlights
Async Non-Blocking IO
New interface javax.servlet.ReadListener
void onDataAvailable() throws IOException
void onAllDataRead() throws IOException
void onError(Throwable t)
New interface javax.servlet.WriteListener
void onWritePossible() throws IOException
void onError(Throwable t)
Upgrade Mode, Transition to some other, incompatible protocol
like websockets.
API to track down session fixation attacks
HttpServletRequest.changeSessionId
HttpSessionIdListener
Java EE7 Demystified
JSF
2.0 recap
JSF : Java Server Faces. Provided standardization on building
server-side user interfaces.
- Data Conversion & Validation
- Event handling
- Managing state of UI Components
- Page Navigation
- i18n and accessibility and many others...
2.0 provided:
- composite components, single file w/ no JAVA code
- standardized AJAX Lifecycle, <f:ajax>, PartialViewContext...
- implicit navigation based on view-id.
- conditional and preemptive navigation (GET based nav.)
- @ViewScoped, flash scope and custom scopes.
- annotations: @ManagedBean, Component Annotations
@FacesComponent, @FacesRenderer, @FacesConverter
JSF
2.2 highlights - 1
File Upload Component
<h:inputFile> since its JSF component, supports converters &
validators
Faces Flow
@FlowScoped in action.
n-number of flows.
programmatic or xml configuration of flows.
JSF
2.2 highlights - 2
HTML5 Friendly Markup
<!DOCTYPE html>
<html xmlns="http:/
/www.w3.org/1999/xhtml"
xmlns:jsf="http:/
/java.sun.com/jsf"
xmlns:p="http:/
/primefaces.org/ui"
xmlns:f="http:/
/java.sun.com/jsf/core">
<head jsf:id="head">
<title>Putting it all together</title>
<script jsf:target="body" jsf:name="js.js"/>
<link jsf:name="css.css" rel="stylesheet" type="text/css" />
</head>
...
</html>
JSF
2.2 highlights - 3
HTML5 Friendly Markup
<body jsf:id="body">
<form jsf:id="form" jsf:prependId="false">
<p:panelGrid id="panel" columns="2">
<label jsf:for="name">Name</label>
<input jsf:id="name" type="text" jsf:value="#{friendlyMarkupBean.name}" />
<label jsf:for="tel">Phone</label>
<input jsf:id="tel" type="tel" jsf:value="#{friendlyMarkupBean.phone}" />
<label jsf:for="email">Email</label>
<input jsf:id="email" type="email" jsf:value="#{friendlyMarkupBean.email}" />
<label for="progress">Progress</label>
<progress jsf:id="progress" max="3">#{friendlyMarkupBean.progress} of 3</progress>
</p:panelGrid>
</form>
</body>
JSF
2.2 highlights - 4
Resource Library Contracts
better templating than facelets
/contracts in the web application root & META-INF/contracts on
the classpath.
Passthrough attributes
<p:inputText value=”#{bean.value}” pt:placeholder=”Watermark
here” />
Java EE7 Demystified
JMS
Message Oriented Middleware (MOM)
P2P or PubSub Models
Versions
JMS 1.1 (March 2002)
JMS 2.0 (May 2013)
JMS
JMS 1.x
@Resource(lookup = "java:global/jms/ankarajugconnectionfactory")
ConnectionFactory connectionFactory;
@Resource(lookup = "java:global/jms/ankarajugdemoqueue")
Queue demoQueue;
public void sendMessage(String payload) {
try {
Connection connection = connectionFactory.createConnection();
try {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer(demoQueue);
TextMessage textMessage = session.createTextMessage(payload);
messageProducer.send(textMessage);
} finally {
connection.close();
}
} catch (JMSException ex) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
}
}
JMS 2
Cleaner APIs
Dependency Injection
Async Send
Delivery delay
JMS Resource
JMS 2.0
@Inject
private JMSContext context;
@Resource(mappedName = "jms/ankarajugqueue")
private Queue inboundQueue;
public void sendMessage (String payload) {
context.createProducer().send(inboundQueue, payload);
}
CDI 1.0
recap
Cool stuff like: Bean Definition and Dependency Injection
CDI brings transactional support to the web tier.
(EJB-JPA <> JSF)
Type Safe,
POJO based,
Interceptors,
Decorators,
Events,
Unified EL Integration
CDI 1.1 highlights
auto CDI activation w/out beans.xml, just annotate the bean with
@*Scoped and it will be picked up.
bean exclusing in beans.xml with
<scan>
<exclude name=”com.primetek.badbeans.* />
</scan>
@Vetoed: Ignored by CDI
Global Enablement of @Interceptor, @Decorator, @Alternative
with prioritization like @Priority(APPLICATION+100)
APPLICATION range: 2000-3000, LIBRARY and SYSTEM ranges
@Initialized qualifier to observe objects like
@Initialized(SessionScoped.class)
http:/
/in.relation.to/Bloggers/CDI11Available
more @
WebSocket
Full-Duplex
TCP Based
Handshake and Transfer
Non-Standard in pre JavaEE7
Java WebSocket API
Endpoints
Programmatic
Annotated
Send/Receive Messages
Path Parameters
Encoder/Decoder
Java WebSocket API
@ServerEndpoint("/echo")
public class EchoEndpoint {
@OnMessage
public void onMessage(Session session, String msg) {
try {
session.getBasicRemote().sendText(msg);
} catch (IOException e) { ... }
}
}
Java API for JSON
JSON Processing
Generate, Parse, Transform, Query
Object Model and Streaming APIs
JSON
{
"firstName": "John",
"lastName": "Smith",
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": 10021
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
}
Java API for JSON
JsonBuilderFactory factory = Json.createBuilderFactory(null);
JsonArray jsonArray = factory.createArrayBuilder()
.add(factory.createObjectBuilder().
add("type", "home").
add("number", "(800) 111-1111"))
.add(factory.createObjectBuilder().
add("type", "cell").
add("number", "(800) 222-2222")).build();
[
{
"type": "home”,
"number": "(800) 111-1111"
},{
"type": "fax”,
"number": "646 555-4567"
}
]
Java EE7 Demystified
JavaPersistence API
Map Objects to Relational Database
Versions
JPA 1.0 - May 2006
JPA 2.0 - Dec 2009
JPA 2.1 - April 2013
JPA 2.1
Standard Schema Generation
Stored Procedures
Unsynchronized Persistence Contexts
Converters
Criteria Update-Delete
JPA 2.1
@Entity
@NamedStoredProcedureQuery(name="topGiftsStoredProcedure”,
procedureName="Top10Gifts")
public class Product {
StoredProcedreQuery query = EntityManager.createNamedStoredProcedureQuery(
"topGiftsStoredProcedure");
query.registerStoredProcedureParameter(1, String.class, ParameterMode.INOUT);
query.setParameter(1, "top10");
query.registerStoredProcedureParameter(2, Integer.class, ParameterMode.IN);
query.setParameter(2, 100);
. . .
query.execute();
String response = query.getOutputParameterValue(1);
JAX-RS
1.1 recap
JAVA API to provide Web Services on REST Architecture.
v1.1 provided:
- part of EE 6, zero config for usage.
- annotations: @GET, @POST, @Produces, @Consumes and
others.
- Utility Classes:
MediaType,
UriBuilder,
Response.ResponseBuilder
JAX-RS
2.0 highlights
Client Framework, request builder
Async Client API, w/ java.util.concurrent.Future
Server Side Async API
Filters and Entity Interceptors,
filters to modify request/response headers.
interceptors to wrap MessageBodyReader & MessageBodyWriter
Java EE7 Demystified
Batch Apps for Java
Batch Apps for Java
<job id="myJob" xmlns="http:/
/batch.jsr352/jsl">
<step id="myStep" >
<chunk reader="MyItemReader"
writer="MyItemWriter"
processor="MyItemProcessor"
buffer-size="5"
checkpoint-policy="item"
commit-interval="10" />
</step>
</job>
Step Example
<step id=”sendStatements”>
<chunk reader=”accountReader”
processor=”accountProcessor”
writer=”emailWriter”
item-count=”10” />
</step>
@Named(“accountReader")
...implements ItemReader... {
public Account readItem() {
/
/ read account using JPA
@Named(“emailWriter")
...implements ItemWriter... {
public void
writeItems(List<Statements>
statements) {
/
/ use JavaMail to send email
@Named(“accountProcessor")
...implements ItemProcessor... {
Public Statement
processItems(Account account)
{ /
/ read Account, return
Statement
Concurrency Utilities
ManagedExecutorService
Options (pool, threads, timeout)
ManagedScheduledExecutorService
ManagedThreadFactory
Concurrency Utilities
<resource-env-ref>
<resource-env-ref-name>
concurrent/BatchExecutor
</resource-env-ref-name>
<resource-env-ref-type>
javax.enterprise.concurrent.ManagedExecutorService
</resource-env-ref-type>
<resource-env-ref>
@Resource(name="concurrent/BatchExecutor")
ManagedExecutorService executor;
Future<String> future = executor.submit(new
MyRunnableTask(), String.class);
Config
Inject
Execute
JAVA EE 8
Stuff to Read on EE 7
@ankarajug
#javaEE7
Ad

More Related Content

What's hot (20)

JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
Emanuela Giannetta
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
sbobde
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
ejlp12
 
JSF 2.2
JSF 2.2JSF 2.2
JSF 2.2
Edward Burns
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
Shreedhar Ganapathy
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
Arun Gupta
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
Bert Ertman
 
J2ee seminar
J2ee seminarJ2ee seminar
J2ee seminar
Sahil Kukreja
 
Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)
Hamed Hatami
 
Move from J2EE to Java EE
Move from J2EE to Java EEMove from J2EE to Java EE
Move from J2EE to Java EE
Hirofumi Iwasaki
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
Arun Gupta
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan
 
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
Marakana Inc.
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
Codecamp Romania
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
Arun Gupta
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
Arun Gupta
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
Hirofumi Iwasaki
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
Arun Gupta
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
odedns
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
Arun Gupta
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
sbobde
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
ejlp12
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
Shreedhar Ganapathy
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
Arun Gupta
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
Bert Ertman
 
Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)
Hamed Hatami
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
Arun Gupta
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan
 
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
Marakana Inc.
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
Codecamp Romania
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
Arun Gupta
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
Arun Gupta
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
Hirofumi Iwasaki
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
Arun Gupta
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
odedns
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
Arun Gupta
 

Similar to Java EE7 Demystified (20)

Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Arun Gupta
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
Arun Gupta
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
IndicThreads
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Arun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
Arun Gupta
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
Arun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Arun Gupta
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
Skills Matter
 
JBoss AS7 OSDC 2011
JBoss AS7 OSDC 2011JBoss AS7 OSDC 2011
JBoss AS7 OSDC 2011
Jason Shepherd
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
Arun Gupta
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Arun Gupta
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Arun Gupta
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Skills Matter
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Arun Gupta
 
Java EE 7 - Overview and Status
Java EE 7  - Overview and StatusJava EE 7  - Overview and Status
Java EE 7 - Overview and Status
Java Usergroup Berlin-Brandenburg
 
Javaee6 Overview
Javaee6 OverviewJavaee6 Overview
Javaee6 Overview
Carol McDonald
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
Alexis Moussine-Pouchkine
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
Josué Neis
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Arun Gupta
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
Arun Gupta
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
IndicThreads
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Arun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
Arun Gupta
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
Arun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Arun Gupta
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
Skills Matter
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
Arun Gupta
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Arun Gupta
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Arun Gupta
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Skills Matter
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Arun Gupta
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
Josué Neis
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
Ad

More from Ankara JUG (10)

Home Automation Using RPI
Home Automation Using  RPIHome Automation Using  RPI
Home Automation Using RPI
Ankara JUG
 
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG
 
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG
 
AnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big DataAnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big Data
Ankara JUG
 
Ankara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumu
Ankara JUG
 
AnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance APIAnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance API
Ankara JUG
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?
Ankara JUG
 
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve DönüşümAnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
Ankara JUG
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
Ankara JUG
 
Ankara jug 201211
Ankara jug 201211Ankara jug 201211
Ankara jug 201211
Ankara JUG
 
Home Automation Using RPI
Home Automation Using  RPIHome Automation Using  RPI
Home Automation Using RPI
Ankara JUG
 
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG
 
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG
 
AnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big DataAnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big Data
Ankara JUG
 
Ankara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumu
Ankara JUG
 
AnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance APIAnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance API
Ankara JUG
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?
Ankara JUG
 
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve DönüşümAnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
Ankara JUG
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
Ankara JUG
 
Ankara jug 201211
Ankara jug 201211Ankara jug 201211
Ankara jug 201211
Ankara JUG
 
Ad

Recently uploaded (20)

Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Artificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptxArtificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptx
03ANMOLCHAURASIYA
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Artificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptxArtificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptx
03ANMOLCHAURASIYA
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 

Java EE7 Demystified

  • 2. Released on June 12, 2013. Focuses on HTML 5, higher productivity, more to meet industrial standards. Glassfish 4.0 is EE 7 ready. Java EE 7
  • 3. Enterprise JAVA • Java EE = Java Enterprise Edition • Extends Java SE javax.faces.* UI + JSF Related Stuff javax.servlet.* Handling HTTP invocations javax.enterprise.inject.* CDI, Like Spring depedency Inj. javax.ejb.* EJB Stuff javax.validation.* BeanValidation javax.persistence.* Persistency javax.transaction.* Stuff for transactions javax.jms.* Messaging Stuff
  • 4. CHRONOLOGY OF JAVA EE Java EE 5 May 11, 2006 Java EE 6 December 10, 2009 J2EE 1.2 December 12, 1999 J2EE 1.3 Sept. 12, 2001 J2EE 1.4 Nov. 11, 2003 Servlet 2.2 Servlet 2.3 Servlet 2.4 JSP EJB JMS JTA JAAS JSF EL JAX-WS JAX-RS JAX-B JPA JSTL any many more... Servlet 2.5 Servlet 3.0
  • 5. Java EE 7 Agenda Java API for RESTful Web Services 2.0 Java Message Service 2.0 Java API for JSON Processing 1.0 Java API for WebSocket 1.0 CDI 1.1 Batch Applications for the Java Platform 1.0 Java Persistence API 2.1 Servlet 3.1 JavaServer Faces 2.2
  • 6. Java EE 7 Project Creation NetBeans, current version 7.3.1, supports Java EE 7. Can be downloaded with Glassfish 4.0, which also supports EE 7. Maven archetypes are @ https:/ /nexus.codehaus.org/ content/repositories/releases/org/codehaus/mojo/archetypes Archetypes can easily be integrated into NetBeans.
  • 8. Servlets 3.0 recap Managing state on stateless HTTP protocol by processing HTML pages back and forth between client and server. highlights with 3.0: - ease of development: the annotations like, @Servlet @ServletFilter and etc. - partial web.xml with metadata-complete attribute and web-fragment.xml files under .jar/META-INF - static resources & jsps inside a jar file to be reused.
  • 9. Servlets 3.1 highlights Async Non-Blocking IO New interface javax.servlet.ReadListener void onDataAvailable() throws IOException void onAllDataRead() throws IOException void onError(Throwable t) New interface javax.servlet.WriteListener void onWritePossible() throws IOException void onError(Throwable t) Upgrade Mode, Transition to some other, incompatible protocol like websockets. API to track down session fixation attacks HttpServletRequest.changeSessionId HttpSessionIdListener
  • 11. JSF 2.0 recap JSF : Java Server Faces. Provided standardization on building server-side user interfaces. - Data Conversion & Validation - Event handling - Managing state of UI Components - Page Navigation - i18n and accessibility and many others... 2.0 provided: - composite components, single file w/ no JAVA code - standardized AJAX Lifecycle, <f:ajax>, PartialViewContext... - implicit navigation based on view-id. - conditional and preemptive navigation (GET based nav.) - @ViewScoped, flash scope and custom scopes. - annotations: @ManagedBean, Component Annotations @FacesComponent, @FacesRenderer, @FacesConverter
  • 12. JSF 2.2 highlights - 1 File Upload Component <h:inputFile> since its JSF component, supports converters & validators Faces Flow @FlowScoped in action. n-number of flows. programmatic or xml configuration of flows.
  • 13. JSF 2.2 highlights - 2 HTML5 Friendly Markup <!DOCTYPE html> <html xmlns="http:/ /www.w3.org/1999/xhtml" xmlns:jsf="http:/ /java.sun.com/jsf" xmlns:p="http:/ /primefaces.org/ui" xmlns:f="http:/ /java.sun.com/jsf/core"> <head jsf:id="head"> <title>Putting it all together</title> <script jsf:target="body" jsf:name="js.js"/> <link jsf:name="css.css" rel="stylesheet" type="text/css" /> </head> ... </html>
  • 14. JSF 2.2 highlights - 3 HTML5 Friendly Markup <body jsf:id="body"> <form jsf:id="form" jsf:prependId="false"> <p:panelGrid id="panel" columns="2"> <label jsf:for="name">Name</label> <input jsf:id="name" type="text" jsf:value="#{friendlyMarkupBean.name}" /> <label jsf:for="tel">Phone</label> <input jsf:id="tel" type="tel" jsf:value="#{friendlyMarkupBean.phone}" /> <label jsf:for="email">Email</label> <input jsf:id="email" type="email" jsf:value="#{friendlyMarkupBean.email}" /> <label for="progress">Progress</label> <progress jsf:id="progress" max="3">#{friendlyMarkupBean.progress} of 3</progress> </p:panelGrid> </form> </body>
  • 15. JSF 2.2 highlights - 4 Resource Library Contracts better templating than facelets /contracts in the web application root & META-INF/contracts on the classpath. Passthrough attributes <p:inputText value=”#{bean.value}” pt:placeholder=”Watermark here” />
  • 17. JMS Message Oriented Middleware (MOM) P2P or PubSub Models Versions JMS 1.1 (March 2002) JMS 2.0 (May 2013)
  • 18. JMS
  • 19. JMS 1.x @Resource(lookup = "java:global/jms/ankarajugconnectionfactory") ConnectionFactory connectionFactory; @Resource(lookup = "java:global/jms/ankarajugdemoqueue") Queue demoQueue; public void sendMessage(String payload) { try { Connection connection = connectionFactory.createConnection(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer messageProducer = session.createProducer(demoQueue); TextMessage textMessage = session.createTextMessage(payload); messageProducer.send(textMessage); } finally { connection.close(); } } catch (JMSException ex) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex); } }
  • 20. JMS 2 Cleaner APIs Dependency Injection Async Send Delivery delay JMS Resource
  • 21. JMS 2.0 @Inject private JMSContext context; @Resource(mappedName = "jms/ankarajugqueue") private Queue inboundQueue; public void sendMessage (String payload) { context.createProducer().send(inboundQueue, payload); }
  • 22. CDI 1.0 recap Cool stuff like: Bean Definition and Dependency Injection CDI brings transactional support to the web tier. (EJB-JPA <> JSF) Type Safe, POJO based, Interceptors, Decorators, Events, Unified EL Integration
  • 23. CDI 1.1 highlights auto CDI activation w/out beans.xml, just annotate the bean with @*Scoped and it will be picked up. bean exclusing in beans.xml with <scan> <exclude name=”com.primetek.badbeans.* /> </scan> @Vetoed: Ignored by CDI Global Enablement of @Interceptor, @Decorator, @Alternative with prioritization like @Priority(APPLICATION+100) APPLICATION range: 2000-3000, LIBRARY and SYSTEM ranges @Initialized qualifier to observe objects like @Initialized(SessionScoped.class) http:/ /in.relation.to/Bloggers/CDI11Available more @
  • 24. WebSocket Full-Duplex TCP Based Handshake and Transfer Non-Standard in pre JavaEE7
  • 25. Java WebSocket API Endpoints Programmatic Annotated Send/Receive Messages Path Parameters Encoder/Decoder
  • 26. Java WebSocket API @ServerEndpoint("/echo") public class EchoEndpoint { @OnMessage public void onMessage(Session session, String msg) { try { session.getBasicRemote().sendText(msg); } catch (IOException e) { ... } } }
  • 27. Java API for JSON JSON Processing Generate, Parse, Transform, Query Object Model and Streaming APIs
  • 28. JSON { "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": 10021 }, "phoneNumbers": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] }
  • 29. Java API for JSON JsonBuilderFactory factory = Json.createBuilderFactory(null); JsonArray jsonArray = factory.createArrayBuilder() .add(factory.createObjectBuilder(). add("type", "home"). add("number", "(800) 111-1111")) .add(factory.createObjectBuilder(). add("type", "cell"). add("number", "(800) 222-2222")).build(); [ { "type": "home”, "number": "(800) 111-1111" },{ "type": "fax”, "number": "646 555-4567" } ]
  • 31. JavaPersistence API Map Objects to Relational Database Versions JPA 1.0 - May 2006 JPA 2.0 - Dec 2009 JPA 2.1 - April 2013
  • 32. JPA 2.1 Standard Schema Generation Stored Procedures Unsynchronized Persistence Contexts Converters Criteria Update-Delete
  • 33. JPA 2.1 @Entity @NamedStoredProcedureQuery(name="topGiftsStoredProcedure”, procedureName="Top10Gifts") public class Product { StoredProcedreQuery query = EntityManager.createNamedStoredProcedureQuery( "topGiftsStoredProcedure"); query.registerStoredProcedureParameter(1, String.class, ParameterMode.INOUT); query.setParameter(1, "top10"); query.registerStoredProcedureParameter(2, Integer.class, ParameterMode.IN); query.setParameter(2, 100); . . . query.execute(); String response = query.getOutputParameterValue(1);
  • 34. JAX-RS 1.1 recap JAVA API to provide Web Services on REST Architecture. v1.1 provided: - part of EE 6, zero config for usage. - annotations: @GET, @POST, @Produces, @Consumes and others. - Utility Classes: MediaType, UriBuilder, Response.ResponseBuilder
  • 35. JAX-RS 2.0 highlights Client Framework, request builder Async Client API, w/ java.util.concurrent.Future Server Side Async API Filters and Entity Interceptors, filters to modify request/response headers. interceptors to wrap MessageBodyReader & MessageBodyWriter
  • 38. Batch Apps for Java <job id="myJob" xmlns="http:/ /batch.jsr352/jsl"> <step id="myStep" > <chunk reader="MyItemReader" writer="MyItemWriter" processor="MyItemProcessor" buffer-size="5" checkpoint-policy="item" commit-interval="10" /> </step> </job>
  • 39. Step Example <step id=”sendStatements”> <chunk reader=”accountReader” processor=”accountProcessor” writer=”emailWriter” item-count=”10” /> </step> @Named(“accountReader") ...implements ItemReader... { public Account readItem() { / / read account using JPA @Named(“emailWriter") ...implements ItemWriter... { public void writeItems(List<Statements> statements) { / / use JavaMail to send email @Named(“accountProcessor") ...implements ItemProcessor... { Public Statement processItems(Account account) { / / read Account, return Statement
  • 40. Concurrency Utilities ManagedExecutorService Options (pool, threads, timeout) ManagedScheduledExecutorService ManagedThreadFactory
  • 43. Stuff to Read on EE 7
  翻译: