SlideShare ist ein Scribd-Unternehmen logo
1 von 41
1

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan

&

Martin Fousek

Software Architect
Software Developer
at T2 Yazılım Ltd.
at Oracle, NetBeans
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.

3

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Agenda
 Introduction
– Java EE 7 & JavaServer Faces 2.2, PrimeFaces, NetBeans IDE

 Tour through 10 features of the JSF and PF
– Feature overview

– Samples in action

4

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 7 & JavaServer Faces 2.2


Java EE 7 – 14 JSRs and 9 MRs, themes:
–
–

Developer productivity

–



HTML5

Enterprise demands

JavaServer Faces 2.2 big ticket features:
–
–

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Faces Flow

–

5

HTML(5) Friendly Markup
Resource Library Contract
PrimeFaces


Open Source Component Library for JSF 2.x
JSF 2.2 is supported with PF version 4.x



Very Lightweight w/ Zero Configuration
 Plenty of examples in Showcase, extensive
theming, provides mobile components
 Well documented, user guides, books & etc.
 Large and active community

6

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
NetBeans IDE


Open source IDE
 Support for Java, PHP, C/C++, Groovy
 Latest features
– Java SE 7, Java EE 7 and JavaFX
– HTML(5) client side development,

CSS preprocessors, JavaSciprt frameworks
– Cordova, FindBugs, VCS improvements
– PHP 5.4 and the newest PHP frameworks

7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Sample Codes


Sample codes to demonstrate the tips
 Mavenized projects from Java EE 7 archetype
 Repository:

github.com/marfous/j1demo-pf

8

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
HTML(5) Friendly Markup

9

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
HTML(5) Friendly Markup

 New namespaces
– passthrough elements: http://xmlns.jcp.org/jsf (TagDecorator)
– passthrough attributes: http://xmlns.jcp.org/jsf/passthrough (RenderKit)

 Advantages
– Getting control over rendered Facelets
– JSF components / JavaScript components / arbitrary mixing
– Write and style pure HTML with benefits of JSF

10

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
HTML(5) Friendly Markup
Form with usage of HTML friendly markup: validation by
Bean Validation API with localized messages, custom Bean
Validation annotation, passthrough attributes and elements,
usage of jQuery plugin at JSF component.
01-HtmlFriendlyMarkup
https://github.com/marfous/j1demo-pf

11

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Resource Libraries
Contracts

12

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Resource Libraries Contracts

 Theme definitions across one or more web applications
 Libraries consisting of templates, insertion points, resources
 Can be bundled directly into Web Application or within .jar library
 How to choose the used one:
– there is only one option
– static or dynamic view definition
– URL based definition within faces-config

 Multi-templating

13

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Resource Libraries Contracts
Simple Resource Libraries Contracts usage, switching
RLCs dynamically using Expression Language and
ManagedBean.
02-ResourceLibrariesContracts
https://github.com/marfous/j1demo-pf

14

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Expression Language 3.0

15

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Expression Language 3.0

 Communication between presentation layer and application logic
 Deferred or immediate evaluation of expressions
 Sets and gets data, invokes methods
 Features
– Standalone ELProcessor
– Concatenation, semicolon and assignments operators
– Static collections
– Collection Operations (aligned with Java SE 8)
– Lambda Expressions (aligned with Java SE 8)
16

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Expression Language 3.0
Examples of Expression Language 3.0 features:
standalone EL Processor, operators, static fields,
collections, lambdas and collection operations.
03-ExpressionLanguage3
https://github.com/marfous/j1demo-pf

17

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
-Prime Time with
PrimeFaces Components

18

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
-Prime Time with PrimeFaces Components
 With 100+ Rich Set of Components
 Built-in Ajax based on standard JSF 2.0 Ajax APIs
 Client APIs based on

 Enterprise theming w/ Theme Roller

With 4.0 – Sentinel We’re introducing cool stuff like,
– Client Side Validation
– Dialog Framework
– Tree Drag & Drop
– Deferred Loading and many more…
19

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
-Prime Time with PrimeFaces Components
Examples on advanced UI components:
DataTable, Gmap, AutoComplete, Client Side
Validation, Tree Drag and Drop, The Dialog Framework
and others.
10-PrimeFacesComponents
https://github.com/marfous/j1demo-pf

20

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In the Jungle of
PrimeFaces Themes

21

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In the Jungle of PrimeFaces Themes

 Powered w/ jQueryUI and ThemeRoller CSS Framework

Skinning and Structural CSS architecture
 ThemeRoller provides visual editor to create new themes
 ~40 themes available by only adding JAR dependency
 Advanced themes are also available
– Twitter Bootstrap Theme
– Metro UI Theme ($$)

 Configuration is done by <context-param> in web.xml

22

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In the Jungle of PrimeFaces Themes
Theme variations on UI Components
Configuration of theme infrastructure
04-PrimeFacesThemes
https://github.com/marfous/j1demo-pf

23

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
PrimePush, PrimeUI and
PrimeMobile

24

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
PrimePush, PrimeUI and PrimeMobile

 PrimePush brings first class support with Atmosphere Framework
– WebSockets, long polling, streaming, jsonp

 PrimeUI is spin-off from the JSF suite, provides rich javascript widgets
– autoComplete, dataTable and many others (~35 components)

 PrimeMobile offers UI components for mobile devices, supports for:
– powered by jQuery

25

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
PrimePush, PrimeUI and PrimeMobile
PrimePush Checkin Demo w/ PrimeMobile in Action
PrimeUI integrated with REST Services
05-PrimePushUiMobile
https://github.com/marfous/j1demo-pf

26

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JSF scaffolding with
PrimeFaces

27

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JSF scaffolding with PrimeFaces

 Generation of CRUD skeleton from the database
– NetBeans IDE: JSPs or vanilla Facelets
– nbpfcrudgen plugin: Facelets with PrimeFaces

 Last feature – NetBeans 7.3.1 generates CDI artifacts
 Procedure
– Generate entity classes from database
– Generate JSF pages from entities

28

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JSF scaffolding with PrimeFaces
CRUD application generation using standard
JavaServer Faces templates, generation of
PrimeFaces templates.
06-JsfPrimeFacesScaffolding
https://github.com/marfous/j1demo-pf

29

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Faces Flows

30

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Faces Flows

 Reusable collection of screens with defined entry and exit points
 Nodes like switchNode, finalizer, methodCall etc.
 Derived from proven technologies: Spring WebFlow, ADF Task Flow
 JSF bound with CDI - @FlowScoped
 Definition:
– Faces-config configuration file
– Java definition using FlowBuilder (@FlowDefinition)

31

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Faces Flows
Sample wizard using navigation elements of the Faces
Flow, flow scope defined bean, Faces Flow component
as a plugable library.
07-FacesFlow, 07-FacesFlowLibrary
https://github.com/marfous/j1demo-pf

32

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Annotation based
component registration

33

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Annotation based component registration

 Improved FacesComponent interface
 Eliminates needs for the TLD file
 CDI capable component
 @FacesComponent(createTag = true,

namespace = ... , // implicitly: http://xmlns.jcp.org/jsf/component

tagName = ...)

34

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

// implicitly: lowercased class name
Annotation based component registration
Usage of the tag defined by @FacesComponent without
any tag library, CDI binding in the component, Java SE
project as a custom tag library.
08-FacesComponent, 08-FacesComponentLibrary
https://github.com/marfous/j1demo-pf

35

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
File Upload

36

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
File Upload

 Servlet 3.0 multipart architecture
 Standard component with/without AJAX requests
 For lower JSF versions already available as PrimeFaces component
 Prerequisites
– Enctype multipart/form-data of the form
– Servlet 3.0

37

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
File Upload
File Upload of the standard JSF 2.2 and PrimeFaces
library in action, with validation of type and size limit.

09-FileUpload
https://github.com/marfous/j1demo-pf

38

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
PrimeFaces Cookbook

Over 90 practical
recipes to learn
PrimeFaces
written by:
Oleg Varaksin
& Yours Truly

Author discount 40%
with code: -

39

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Useful Links
 http://docs.oracle.com/javaee/7/tutorial/doc/home.htm
 http://www.primefaces.org/showcase

 http://blog.primefaces.org
 https://netbeans.org/kb/trails/java-ee.html

 http://sourceforge.net/projects/nbpfcrudgen

40

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Graphic Section Divider

41

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Weitere ähnliche Inhalte

Was ist angesagt?

Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?Fred Rowe
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)Fred Rowe
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentBruno Borges
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6Rakuten Group, Inc.
 
All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1Markus Eisele
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationFredrik Öhrström
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
 
2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0mnriem
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overviewbettlebrox
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015Edward Burns
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesChris Muir
 
Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001jucaab
 
Introduction to Ibatis by Rohit
Introduction to Ibatis by RohitIntroduction to Ibatis by Rohit
Introduction to Ibatis by RohitRohit Prabhakar
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgArun Gupta
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsOracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsChris Muir
 

Was ist angesagt? (20)

Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
 
All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
 
J2ee seminar
J2ee seminarJ2ee seminar
J2ee seminar
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
 
J2ee
J2eeJ2ee
J2ee
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
 
Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001
 
JDK versions and OpenJDK
JDK versions and OpenJDKJDK versions and OpenJDK
JDK versions and OpenJDK
 
Introduction to Ibatis by Rohit
Introduction to Ibatis by RohitIntroduction to Ibatis by Rohit
Introduction to Ibatis by Rohit
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsOracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
 

Ähnlich wie 10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013

55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8Simon Ritter
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production EnvironmentsBruno Borges
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverCodemotion
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Reza Rahman
 
Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Amit Naik
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...jaxLondonConference
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOFglassfish
 
Consuming Java EE in Desktop, Web, and Mobile Frontends
Consuming Java EE in Desktop, Web, and Mobile FrontendsConsuming Java EE in Desktop, Web, and Mobile Frontends
Consuming Java EE in Desktop, Web, and Mobile FrontendsGeertjan Wielenga
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8jclingan
 
Building microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineBuilding microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineDonghuKIM2
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Edward Burns
 
Lambdas and-streams-s ritter-v3
Lambdas and-streams-s ritter-v3Lambdas and-streams-s ritter-v3
Lambdas and-streams-s ritter-v3Simon Ritter
 
OSI_MySQL_Performance Schema
OSI_MySQL_Performance SchemaOSI_MySQL_Performance Schema
OSI_MySQL_Performance SchemaMayank Prasad
 

Ähnlich wie 10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013 (20)

55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
 
Java SE 8
Java SE 8Java SE 8
Java SE 8
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
 
Consuming Java EE in Desktop, Web, and Mobile Frontends
Consuming Java EE in Desktop, Web, and Mobile FrontendsConsuming Java EE in Desktop, Web, and Mobile Frontends
Consuming Java EE in Desktop, Web, and Mobile Frontends
 
Java 8
Java 8Java 8
Java 8
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8
 
Building microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineBuilding microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipeline
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
 
Lambdas and-streams-s ritter-v3
Lambdas and-streams-s ritter-v3Lambdas and-streams-s ritter-v3
Lambdas and-streams-s ritter-v3
 
Ramji
RamjiRamji
Ramji
 
OSI_MySQL_Performance Schema
OSI_MySQL_Performance SchemaOSI_MySQL_Performance Schema
OSI_MySQL_Performance Schema
 

Kürzlich hochgeladen

Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyOrtega Alikwe
 
美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作ss846v0c
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一lvtagr7
 
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量sehgh15heh
 
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样umasea
 
Protection of Children in context of IHL and Counter Terrorism
Protection of Children in context of IHL and  Counter TerrorismProtection of Children in context of IHL and  Counter Terrorism
Protection of Children in context of IHL and Counter TerrorismNilendra Kumar
 
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一z xss
 
LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024Bruce Bennett
 
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一A SSS
 
Ch. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfCh. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfJamalYaseenJameelOde
 
Application deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfApplication deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfCyril CAUDROY
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证nhjeo1gg
 
Crack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interviewCrack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interviewNilendra Kumar
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607dollysharma2066
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of JobRemote DBA Services
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Riya Pathan
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书saphesg8
 
Jumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3AJumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3Ajumarkdiezmo1
 
Unlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator EvolutionUnlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator EvolutionRhazes Ghaisan
 
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证diploma001
 

Kürzlich hochgeladen (20)

Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary Photography
 
美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
 
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
 
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
 
Protection of Children in context of IHL and Counter Terrorism
Protection of Children in context of IHL and  Counter TerrorismProtection of Children in context of IHL and  Counter Terrorism
Protection of Children in context of IHL and Counter Terrorism
 
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
定制(SCU毕业证书)南十字星大学毕业证成绩单原版一比一
 
LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024
 
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
 
Ch. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdfCh. 9- __Skin, hair and nail Assessment (1).pdf
Ch. 9- __Skin, hair and nail Assessment (1).pdf
 
Application deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfApplication deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdf
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
 
Crack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interviewCrack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interview
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Job
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
 
Jumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3AJumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3A
 
Unlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator EvolutionUnlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator Evolution
 
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
 

10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013

  • 1. 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 2. 10 Tips for Java EE 7 with PrimeFaces Mert Çalışkan & Martin Fousek Software Architect Software Developer at T2 Yazılım Ltd. at Oracle, NetBeans
  • 3. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 4. Agenda  Introduction – Java EE 7 & JavaServer Faces 2.2, PrimeFaces, NetBeans IDE  Tour through 10 features of the JSF and PF – Feature overview – Samples in action 4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 5. Java EE 7 & JavaServer Faces 2.2  Java EE 7 – 14 JSRs and 9 MRs, themes: – – Developer productivity –  HTML5 Enterprise demands JavaServer Faces 2.2 big ticket features: – – Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Faces Flow – 5 HTML(5) Friendly Markup Resource Library Contract
  • 6. PrimeFaces  Open Source Component Library for JSF 2.x JSF 2.2 is supported with PF version 4.x  Very Lightweight w/ Zero Configuration  Plenty of examples in Showcase, extensive theming, provides mobile components  Well documented, user guides, books & etc.  Large and active community 6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 7. NetBeans IDE  Open source IDE  Support for Java, PHP, C/C++, Groovy  Latest features – Java SE 7, Java EE 7 and JavaFX – HTML(5) client side development, CSS preprocessors, JavaSciprt frameworks – Cordova, FindBugs, VCS improvements – PHP 5.4 and the newest PHP frameworks 7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 8. Sample Codes  Sample codes to demonstrate the tips  Mavenized projects from Java EE 7 archetype  Repository: github.com/marfous/j1demo-pf 8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 9. HTML(5) Friendly Markup 9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 10. HTML(5) Friendly Markup  New namespaces – passthrough elements: http://xmlns.jcp.org/jsf (TagDecorator) – passthrough attributes: http://xmlns.jcp.org/jsf/passthrough (RenderKit)  Advantages – Getting control over rendered Facelets – JSF components / JavaScript components / arbitrary mixing – Write and style pure HTML with benefits of JSF 10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 11. HTML(5) Friendly Markup Form with usage of HTML friendly markup: validation by Bean Validation API with localized messages, custom Bean Validation annotation, passthrough attributes and elements, usage of jQuery plugin at JSF component. 01-HtmlFriendlyMarkup https://github.com/marfous/j1demo-pf 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 12. Resource Libraries Contracts 12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 13. Resource Libraries Contracts  Theme definitions across one or more web applications  Libraries consisting of templates, insertion points, resources  Can be bundled directly into Web Application or within .jar library  How to choose the used one: – there is only one option – static or dynamic view definition – URL based definition within faces-config  Multi-templating 13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 14. Resource Libraries Contracts Simple Resource Libraries Contracts usage, switching RLCs dynamically using Expression Language and ManagedBean. 02-ResourceLibrariesContracts https://github.com/marfous/j1demo-pf 14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 15. Expression Language 3.0 15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 16. Expression Language 3.0  Communication between presentation layer and application logic  Deferred or immediate evaluation of expressions  Sets and gets data, invokes methods  Features – Standalone ELProcessor – Concatenation, semicolon and assignments operators – Static collections – Collection Operations (aligned with Java SE 8) – Lambda Expressions (aligned with Java SE 8) 16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 17. Expression Language 3.0 Examples of Expression Language 3.0 features: standalone EL Processor, operators, static fields, collections, lambdas and collection operations. 03-ExpressionLanguage3 https://github.com/marfous/j1demo-pf 17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 18. -Prime Time with PrimeFaces Components 18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 19. -Prime Time with PrimeFaces Components  With 100+ Rich Set of Components  Built-in Ajax based on standard JSF 2.0 Ajax APIs  Client APIs based on  Enterprise theming w/ Theme Roller With 4.0 – Sentinel We’re introducing cool stuff like, – Client Side Validation – Dialog Framework – Tree Drag & Drop – Deferred Loading and many more… 19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 20. -Prime Time with PrimeFaces Components Examples on advanced UI components: DataTable, Gmap, AutoComplete, Client Side Validation, Tree Drag and Drop, The Dialog Framework and others. 10-PrimeFacesComponents https://github.com/marfous/j1demo-pf 20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 21. In the Jungle of PrimeFaces Themes 21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 22. In the Jungle of PrimeFaces Themes  Powered w/ jQueryUI and ThemeRoller CSS Framework Skinning and Structural CSS architecture  ThemeRoller provides visual editor to create new themes  ~40 themes available by only adding JAR dependency  Advanced themes are also available – Twitter Bootstrap Theme – Metro UI Theme ($$)  Configuration is done by <context-param> in web.xml 22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 23. In the Jungle of PrimeFaces Themes Theme variations on UI Components Configuration of theme infrastructure 04-PrimeFacesThemes https://github.com/marfous/j1demo-pf 23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 24. PrimePush, PrimeUI and PrimeMobile 24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 25. PrimePush, PrimeUI and PrimeMobile  PrimePush brings first class support with Atmosphere Framework – WebSockets, long polling, streaming, jsonp  PrimeUI is spin-off from the JSF suite, provides rich javascript widgets – autoComplete, dataTable and many others (~35 components)  PrimeMobile offers UI components for mobile devices, supports for: – powered by jQuery 25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 26. PrimePush, PrimeUI and PrimeMobile PrimePush Checkin Demo w/ PrimeMobile in Action PrimeUI integrated with REST Services 05-PrimePushUiMobile https://github.com/marfous/j1demo-pf 26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 27. JSF scaffolding with PrimeFaces 27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 28. JSF scaffolding with PrimeFaces  Generation of CRUD skeleton from the database – NetBeans IDE: JSPs or vanilla Facelets – nbpfcrudgen plugin: Facelets with PrimeFaces  Last feature – NetBeans 7.3.1 generates CDI artifacts  Procedure – Generate entity classes from database – Generate JSF pages from entities 28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 29. JSF scaffolding with PrimeFaces CRUD application generation using standard JavaServer Faces templates, generation of PrimeFaces templates. 06-JsfPrimeFacesScaffolding https://github.com/marfous/j1demo-pf 29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 30. Faces Flows 30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 31. Faces Flows  Reusable collection of screens with defined entry and exit points  Nodes like switchNode, finalizer, methodCall etc.  Derived from proven technologies: Spring WebFlow, ADF Task Flow  JSF bound with CDI - @FlowScoped  Definition: – Faces-config configuration file – Java definition using FlowBuilder (@FlowDefinition) 31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 32. Faces Flows Sample wizard using navigation elements of the Faces Flow, flow scope defined bean, Faces Flow component as a plugable library. 07-FacesFlow, 07-FacesFlowLibrary https://github.com/marfous/j1demo-pf 32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 33. Annotation based component registration 33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 34. Annotation based component registration  Improved FacesComponent interface  Eliminates needs for the TLD file  CDI capable component  @FacesComponent(createTag = true, namespace = ... , // implicitly: http://xmlns.jcp.org/jsf/component tagName = ...) 34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. // implicitly: lowercased class name
  • 35. Annotation based component registration Usage of the tag defined by @FacesComponent without any tag library, CDI binding in the component, Java SE project as a custom tag library. 08-FacesComponent, 08-FacesComponentLibrary https://github.com/marfous/j1demo-pf 35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 36. File Upload 36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 37. File Upload  Servlet 3.0 multipart architecture  Standard component with/without AJAX requests  For lower JSF versions already available as PrimeFaces component  Prerequisites – Enctype multipart/form-data of the form – Servlet 3.0 37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 38. File Upload File Upload of the standard JSF 2.2 and PrimeFaces library in action, with validation of type and size limit. 09-FileUpload https://github.com/marfous/j1demo-pf 38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 39. PrimeFaces Cookbook Over 90 practical recipes to learn PrimeFaces written by: Oleg Varaksin & Yours Truly Author discount 40% with code: - 39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 40. Useful Links  http://docs.oracle.com/javaee/7/tutorial/doc/home.htm  http://www.primefaces.org/showcase  http://blog.primefaces.org  https://netbeans.org/kb/trails/java-ee.html  http://sourceforge.net/projects/nbpfcrudgen 40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 41. Graphic Section Divider 41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.