Java EE 7 Development with WildFly.pdf

(9340 KB) Pobierz
www.it-ebooks.info
Java EE 7 Development with WildFly
www.it-ebooks.info
Table of Contents
Java EE 7 Development with WildFly
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with WildFly
An overview of Java EE and WildFly
WildFly and Enterprise Application Platform
Welcome to Java EE 7
JavaServer Faces 2.2 – JSR 344
Enterprise JavaBeans 3.2 – JSR 345
Java Persistence API 2.1 – JSR 338
Contexts and Dependency Injection for Java EE 1.1 – JSR 346
Java Servlet API 3.1 – JSR 340
JAX-RS, the Java API for RESTful Web Services 2.0 – JSR 339
Java Message Service 2.0 – JSR 343
Bean Validation 1.1 – JSR 349
Concurrency utilities for Java EE 1.0 – JSR 236
Batch applications for the Java Platform 1.0 – JSR 352
Java API for JSON Processing 1.0 – JSR 353
Java API for WebSocket 1.0 – JSR 356
New features in WildFly
Installing the server and client components
Installing Java SE
www.it-ebooks.info
Testing the installation
Installing WildFly
Starting WildFly
Connecting to the server with the command-line interface
Stopping WildFly
Locating the shutdown script
Stopping WildFly on a remote machine
Restarting WildFly
Installing the Eclipse environment
Installing JBoss Tools
Alternative development environments
Installing Maven
Testing the installation
Summary
2. Your First Java EE Application on WildFly
WildFly 8 core concepts
The WildFly 8 directory layout
Managing the application server
Managing WildFly 8 with the web interface
Launching the web console
Deploying your first application to WildFly 8
Advanced Eclipse deployment options
Managing deployments with the web console
Changing the deployment scanner properties
Deploying applications using the command-line interface
Deploying applications to a domain
Summary
3. Introducing Java EE 7 – EJBs
EJB 3.2 – an overview
Developing singleton EJBs
Configuring the EJB project object module (pom.xml)
Coding our EJB application
Controlling bean concurrency
Using bean-managed concurrency
Cooking session beans
Adding a stateless bean
Adding a stateful bean
Deploying the EJB application
Creating a remote EJB client
Configuring the client’s project object module
Coding the EJB client
Adding the EJB client configuration
Running the client application
Adding user authentication
www.it-ebooks.info
Using the EJB timer service
Programmatic timer creation
Scheduling timer events
Adding asynchronous methods to our EJBs
Using fire-and-forget asynchronous calls
Returning a Future object to the client
Summary
4. Learning Context and Dependency Injection
Introducing Contexts and Dependency Injection
Named beans
CDI scopes
WildFly CDI implementation
Rethinking your ticketing system
Adding the required dependencies
Creating the beans
Building the view
JSF 2 facet suggestions
Getting ready to run the application
Combining the scheduler into our application
Installing RichFaces
Making your application rich
Running the application
Creating interceptors
Are EJBs and JSF Managed Beans obsolete?
Summary
5. Combining Persistence with CDI
Data persistence meets the standard
Working with JPA
Adding persistence to our application
Setting up the database
Installing the JDBC driver in WildFly
Using the command-line interface to create a new data source
Creating the Maven project
Adding the Maven configuration
Cooking entities
Adding Bean Validation
Configuring persistence
Adding producer classes
Coding queries for your application
Adding services to your application
Adding a controller to drive user requests
Coding the JSF view
Running the example
Summary
www.it-ebooks.info
Zgłoś jeśli naruszono regulamin