SlideShare a Scribd company logo
1 of 45
Download to read offline
www.arshal.org

A new wave of

JEE & JSF

Arshal (@aforarsh)
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

www.arshal.org
Before we start !

❖

www.arshal.org

Download code

http://bit.ly/18FJHh7

http://www.arshal.org/2013/12/talk-at-oracle.html
Before we start !

www.arshal.org
Coming back..
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
JSF 2.2
❖

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

❖

Components!

❖

CSRF

www.arshal.org
JSF 2.2
❖

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

❖

Components!

❖

CSRF

www.arshal.org

<h:inputText value="#{passthroughBean.age}"
p:type="number"/>
JSF 2.2
❖

www.arshal.org

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

❖

Components !

❖

CSRF

@FlowScoped(“flow1")!
@FlowDefinition!
flow.xml
JSF 2.2
❖

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

❖

Components!

❖

CSRF

www.arshal.org

<f:view contracts="#{contractsBean.contract}">
JSF 2.2
❖

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

❖

Components!

❖

CSRF

www.arshal.org

<h:inputFile value="#{fileUploadBean.file}"/>
JSF 2.2
❖

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

!❖
❖

Components!
CSRF

www.arshal.org
JSF 2.2
❖

Pass through attributes!

❖

Flow scoped!

❖

Resource library contracts!

❖

File upload!

❖

www.arshal.org

Components!

!❖

CSRF

<protected-views>!
<url-pattern>/jsf/file/index.xhtml</url-pattern>!
</protected-views>
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
CDI 1.1

❖

Bean discovery mode!

❖

Vetoed beans

www.arshal.org
CDI 1.1

❖

Bean discovery mode!

❖

Vetoed beans

www.arshal.org

bean-discovery-mode=“all"!
bean-discovery-mode=“annotated”!
bean-discovery-mode="none"
CDI 1.1

❖

Bean discovery mode!

❖

Vetoed beans

@Vetoed

www.arshal.org
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Bean Validation 1.1

❖

Custom constraints!
@NotNull(message = "{org.sample.zipcode.cannot_be_null}")!
!
public @interface ZipCode {

❖

Method validation
public String saveZip(@ZipCode String zip)

www.arshal.org
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Interceptors

www.arshal.org

❖

InterceptorBinding!

❖

@AroundConstruct!

❖

Prioritisation standard!

❖

@Priority(Interceptor.Priority.APPLICATION+10),
@Interceptors
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
`
❖

Transactional scoped beans!
❖

❖

www.arshal.org

@TransactionScoped!

Transactional methods!
❖

@Transactional(value=Transactional.txType.Required,
rollbackOn={SQLException.class,
JMSException.class},
 dontRollbackOn=SQLWarning.class)
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
EJB 3.2
❖

Asynchronous bean!
❖

❖

@Asynchronous!

Non persistent timer service!
❖

❖

www.arshal.org

@Schedule(hour="*", minute="*", second="*/5", info =
"Every 5 second timer", persistent = false) !

Passivation capable!
❖

@PrePassivate
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

•

❖

JSONP!

•

❖

Batch Processing

www.arshal.org

•

Non blocking I/O: Check for resource
availability before trying for it.

while (input.isReady()

&& (len = input.read(b)) != -1) {
String data = new String(b, 0, len);
System.out.println("--> " + data)

}!
Improved security!
Async supported

@WebServlet(urlPatterns="/async", asyncSupported=true)!
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

JSONP!

❖

Batch Processing

	

<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/	

XMLSchema-instance" xsi:schemaLocation=“http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/	

persistence/persistence_2_1.xsd"> 

	

<persistence-unit name="myPU" transaction-type="JTA">

	

<properties>

	

 	

<property name=“javax.persistence.schema-generation.database.action" value="drop-and-create"/>

	

 	

<property name=“javax.persistence.schema-generation.create-source" value="script"/>

	

 	

<property name=“javax.persistence.schema-generation.drop-source" value="script"/>

	

 	

<property name=“javax.persistence.schema-generation.create-script-source" value="META-INF/create.sql"/>

	

 	

<property name=“javax.persistence.schema-generation.drop-script-source" value="META-INF/drop.sql"/>

	

 	

<property name=“javax.persistence.sql-load-script-source" value="META-INF/load.sql"/> 

	

</properties>

	

</persistence-unit>

	

</persistence>	


JAX - RS 2.0!

❖

Schema generation!

•

Expression Language 3.0!

❖

www.arshal.org

Bulk update/delete using criteria API


•
	

	

	

	

	


!
•

CriteriaBuilder builder = em.getCriteriaBuilder();!
CriteriaDelete deleteCriteria = builder.createCriteriaDelete(Student.class);	

Root<Student> updateRoot = deleteCriteria.from(Student.class);	

deleteCriteria.where(builder.equal(updateRoot.get(Student_.id), "1234"));	

Query q = em.createQuery(deleteCriteria);	

q.executeUpdate();	


Unsynchronized persistence contexts

@PersistenceContext(synchronization=SynchronizationType.UNSYNCHRONIZED)!
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Expression Language 3.0!

❖

Web socket 1.1!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org

•
•
•

Simplified!
Easier resource configuration!
JMS resource definition annotations.
Agenda
❖

JSF 2.2!

❖

CDI 1.1!

❖

Bean validation 1.1!

❖

Interceptors!

❖

JTA 1.2!

❖

EJB 3.2!

❖

Servlet 3.1!

❖

JPA!

❖

JMS 2.0!

❖

Web socket 1.1!

❖

Expression Language 3.0!

❖

JAX - RS 2.0!

❖

JSONP!

❖

Batch Processing

www.arshal.org

•

Lambda expression support
Q&A

❖

Contact Info!
❖

e-mail: aforarsham@gmail.com!

❖

Twitter: @aforarsh!

❖

Web: www.arshal.org

www.arshal.org
“ Good code is its own best documentation. As
you're about to add a comment, ask yourself,
"How can I improve the code so that this comment
isn't needed?" Improve the code and then
document it to make it even clearer.”

More Related Content

Recently uploaded

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Oracle talk 20131213

  • 1. www.arshal.org A new wave of JEE & JSF Arshal (@aforarsh)
  • 2. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 3. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 4. Before we start ! www.arshal.org
  • 5. Before we start ! www.arshal.org
  • 6. Before we start ! www.arshal.org
  • 7. Before we start ! www.arshal.org
  • 8. Before we start ! www.arshal.org
  • 9. Before we start ! www.arshal.org
  • 10. Before we start ! www.arshal.org
  • 11. Before we start ! www.arshal.org
  • 12. Before we start ! www.arshal.org
  • 13. Before we start ! www.arshal.org
  • 14. Before we start ! www.arshal.org
  • 15. Before we start ! ❖ www.arshal.org Download code
 http://bit.ly/18FJHh7
 http://www.arshal.org/2013/12/talk-at-oracle.html
  • 16. Before we start ! www.arshal.org
  • 17. Coming back.. ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 18. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 19. JSF 2.2 ❖ Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! ❖ Components! ❖ CSRF www.arshal.org
  • 20. JSF 2.2 ❖ Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! ❖ Components! ❖ CSRF www.arshal.org <h:inputText value="#{passthroughBean.age}" p:type="number"/>
  • 21. JSF 2.2 ❖ www.arshal.org Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! ❖ Components ! ❖ CSRF @FlowScoped(“flow1")! @FlowDefinition! flow.xml
  • 22. JSF 2.2 ❖ Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! ❖ Components! ❖ CSRF www.arshal.org <f:view contracts="#{contractsBean.contract}">
  • 23. JSF 2.2 ❖ Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! ❖ Components! ❖ CSRF www.arshal.org <h:inputFile value="#{fileUploadBean.file}"/>
  • 24. JSF 2.2 ❖ Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! !❖ ❖ Components! CSRF www.arshal.org
  • 25. JSF 2.2 ❖ Pass through attributes! ❖ Flow scoped! ❖ Resource library contracts! ❖ File upload! ❖ www.arshal.org Components! !❖ CSRF <protected-views>! <url-pattern>/jsf/file/index.xhtml</url-pattern>! </protected-views>
  • 26. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 27. CDI 1.1 ❖ Bean discovery mode! ❖ Vetoed beans www.arshal.org
  • 28. CDI 1.1 ❖ Bean discovery mode! ❖ Vetoed beans www.arshal.org bean-discovery-mode=“all"! bean-discovery-mode=“annotated”! bean-discovery-mode="none"
  • 29. CDI 1.1 ❖ Bean discovery mode! ❖ Vetoed beans @Vetoed www.arshal.org
  • 30. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 31. Bean Validation 1.1 ❖ Custom constraints! @NotNull(message = "{org.sample.zipcode.cannot_be_null}")! ! public @interface ZipCode { ❖ Method validation public String saveZip(@ZipCode String zip) www.arshal.org
  • 32. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 34. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 35. ` ❖ Transactional scoped beans! ❖ ❖ www.arshal.org @TransactionScoped! Transactional methods! ❖ @Transactional(value=Transactional.txType.Required, rollbackOn={SQLException.class, JMSException.class},  dontRollbackOn=SQLWarning.class)
  • 36. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 37. EJB 3.2 ❖ Asynchronous bean! ❖ ❖ @Asynchronous! Non persistent timer service! ❖ ❖ www.arshal.org @Schedule(hour="*", minute="*", second="*/5", info = "Every 5 second timer", persistent = false) ! Passivation capable! ❖ @PrePassivate
  • 38. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 39. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! • ❖ JSONP! • ❖ Batch Processing www.arshal.org • Non blocking I/O: Check for resource availability before trying for it.
 while (input.isReady()
 && (len = input.read(b)) != -1) { String data = new String(b, 0, len); System.out.println("--> " + data)
 }! Improved security! Async supported
 @WebServlet(urlPatterns="/async", asyncSupported=true)!
  • 40. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org
  • 41. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ JSONP! ❖ Batch Processing <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation=“http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/ persistence/persistence_2_1.xsd"> 
 <persistence-unit name="myPU" transaction-type="JTA">
 <properties>
 <property name=“javax.persistence.schema-generation.database.action" value="drop-and-create"/>
 <property name=“javax.persistence.schema-generation.create-source" value="script"/>
 <property name=“javax.persistence.schema-generation.drop-source" value="script"/>
 <property name=“javax.persistence.schema-generation.create-script-source" value="META-INF/create.sql"/>
 <property name=“javax.persistence.schema-generation.drop-script-source" value="META-INF/drop.sql"/>
 <property name=“javax.persistence.sql-load-script-source" value="META-INF/load.sql"/> 
 </properties>
 </persistence-unit>
 </persistence> JAX - RS 2.0! ❖ Schema generation! • Expression Language 3.0! ❖ www.arshal.org Bulk update/delete using criteria API
 • ! • CriteriaBuilder builder = em.getCriteriaBuilder();! CriteriaDelete deleteCriteria = builder.createCriteriaDelete(Student.class); Root<Student> updateRoot = deleteCriteria.from(Student.class); deleteCriteria.where(builder.equal(updateRoot.get(Student_.id), "1234")); Query q = em.createQuery(deleteCriteria); q.executeUpdate(); Unsynchronized persistence contexts
 @PersistenceContext(synchronization=SynchronizationType.UNSYNCHRONIZED)!
  • 42. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Expression Language 3.0! ❖ Web socket 1.1! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org • • • Simplified! Easier resource configuration! JMS resource definition annotations.
  • 43. Agenda ❖ JSF 2.2! ❖ CDI 1.1! ❖ Bean validation 1.1! ❖ Interceptors! ❖ JTA 1.2! ❖ EJB 3.2! ❖ Servlet 3.1! ❖ JPA! ❖ JMS 2.0! ❖ Web socket 1.1! ❖ Expression Language 3.0! ❖ JAX - RS 2.0! ❖ JSONP! ❖ Batch Processing www.arshal.org • Lambda expression support
  • 44. Q&A ❖ Contact Info! ❖ e-mail: aforarsham@gmail.com! ❖ Twitter: @aforarsh! ❖ Web: www.arshal.org www.arshal.org
  • 45. “ Good code is its own best documentation. As you're about to add a comment, ask yourself, "How can I improve the code so that this comment isn't needed?" Improve the code and then document it to make it even clearer.”