KEMBAR78
Java EE 7 - New Features and the WebSocket API | PPTX
JAVA EE 7 The new features of 
the Enterprise Edition
OUR AGENDA 
• Overview of the new features 
• JSF 2.2 
• CDI 1.1, EJB 3.2, JPA 2.1 
• Bean Validation 1.1 
• JMS 2.0 
• JSON-P, JAX-RS 2.0, Batch 
• Example application using 
WebSockets
JSF 2.2 
renders HTML5 
<h:inputText value="#{bean.value}" > 
<f:passThroughAttribute name="placeholder" 
value="Enter text" /> 
</h:inputText> 
CDI ViewScope / Managed Beans deprecated 
Faces Flow
CDI 1.1, EJB 3.2 & JPA 2.1 
@Transactional-Annotation 
But: Still no annotations for EJB Security 
CDI: Priority ordering of Interceptors and Decorators 
JPA: Stored Procedures and DB-Functions in JPQL
METHOD LEVEL VALIDATION 
Part of Bean Validation 1.1 
@NotNull 
public MyObject createMyObject( 
@Size(min=5, max=40) String name, 
@DecimalMin(value="1.00") Double value, 
@Pattern(regexp="d{8}") String code) {... 
RuntimeException if validation fails
JMS 2.0 
@Inject 
@JMSConnectionFactory("jms/connection 
Factory") 
private JMSContext context; 
@Resource(mappedName = 
"jms/inboundQueue") 
private Queue inboundQueue; 
public void sendMessage(String payload) 
{ 
context.send(inboundQueue, 
payload);
MORE STUFF 
Java API for JSON Processing (JSR 353) 
 Standard for parsing / transforming JSON 
 similar to Jackson, GSON 
Batch Applications (JSR 352) 
 Standard for batch processing 
JAX-RS 2.0 
 finally a REST-Client
JAVA API FOR WEBSOCKETS 
 Standard for fast low-level communication 
 Specified in JSR 356 
 Bidirectional communication between two endpoints (no 
client/server) 
 Sessions with unique IDs 
 Directly over TCP (could use SSL/TLS), No HTTP, no Overhead 
 Initial Handshake via HTTP Upgrade 
 Asynchronous (returns Future) and synchronous API 
 Transfers text or binary, Java objects must be de/encoded
LET‘S SEE...
WE ARE HIRING 
We are looking for Frontend and Backend Developers for 
our office in Taipei. 
Salary is above average. 
ExtJS or Java/Spring sounds fun? 
Working for the banking industry sounds interesting?
QUESTIONS? 
Please ask and don‘t hesitate to contact me 
Name: Marcus Schiesser 
Blog: www.marcusschiesser.de 
Email: marcus.schiesser@kosmossystems.com 
Code: github.com/marcusschiesser/javaee7-websocket 
More about the company: www.kosmos-banking.com/en

Java EE 7 - New Features and the WebSocket API

  • 1.
    JAVA EE 7The new features of the Enterprise Edition
  • 2.
    OUR AGENDA •Overview of the new features • JSF 2.2 • CDI 1.1, EJB 3.2, JPA 2.1 • Bean Validation 1.1 • JMS 2.0 • JSON-P, JAX-RS 2.0, Batch • Example application using WebSockets
  • 3.
    JSF 2.2 rendersHTML5 <h:inputText value="#{bean.value}" > <f:passThroughAttribute name="placeholder" value="Enter text" /> </h:inputText> CDI ViewScope / Managed Beans deprecated Faces Flow
  • 4.
    CDI 1.1, EJB3.2 & JPA 2.1 @Transactional-Annotation But: Still no annotations for EJB Security CDI: Priority ordering of Interceptors and Decorators JPA: Stored Procedures and DB-Functions in JPQL
  • 5.
    METHOD LEVEL VALIDATION Part of Bean Validation 1.1 @NotNull public MyObject createMyObject( @Size(min=5, max=40) String name, @DecimalMin(value="1.00") Double value, @Pattern(regexp="d{8}") String code) {... RuntimeException if validation fails
  • 6.
    JMS 2.0 @Inject @JMSConnectionFactory("jms/connection Factory") private JMSContext context; @Resource(mappedName = "jms/inboundQueue") private Queue inboundQueue; public void sendMessage(String payload) { context.send(inboundQueue, payload);
  • 7.
    MORE STUFF JavaAPI for JSON Processing (JSR 353)  Standard for parsing / transforming JSON  similar to Jackson, GSON Batch Applications (JSR 352)  Standard for batch processing JAX-RS 2.0  finally a REST-Client
  • 8.
    JAVA API FORWEBSOCKETS  Standard for fast low-level communication  Specified in JSR 356  Bidirectional communication between two endpoints (no client/server)  Sessions with unique IDs  Directly over TCP (could use SSL/TLS), No HTTP, no Overhead  Initial Handshake via HTTP Upgrade  Asynchronous (returns Future) and synchronous API  Transfers text or binary, Java objects must be de/encoded
  • 9.
  • 10.
    WE ARE HIRING We are looking for Frontend and Backend Developers for our office in Taipei. Salary is above average. ExtJS or Java/Spring sounds fun? Working for the banking industry sounds interesting?
  • 11.
    QUESTIONS? Please askand don‘t hesitate to contact me Name: Marcus Schiesser Blog: www.marcusschiesser.de Email: marcus.schiesser@kosmossystems.com Code: github.com/marcusschiesser/javaee7-websocket More about the company: www.kosmos-banking.com/en