Java EE 7 Development with WildFly
eBook - ePub

Java EE 7 Development with WildFly

Michal Cmil, Michal Matloka, Francesco Marchioni

Condividi libro
  1. 434 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Java EE 7 Development with WildFly

Michal Cmil, Michal Matloka, Francesco Marchioni

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Java Enterprise Edition is a well-known platform for application development. Its seventh release brings many new features and API improvements. WildFly is a successor of the JBoss Application Server family and fully implements the Java EE 7 standards.

Java EE 7 Development with WildFly shows you how to use the latest version of the Java EE 7 platform, including its most advanced features. Every topic is presented using working examples that are prepared to work out of the box with the new WildFly application server. This book will give you an insight into JBoss' message-oriented middleware, which allows you to loosely couple heterogeneous systems together, while typically providing reliability and many other features.

By the end of the book, you will have covered important topics such as learning the most important info about Java EE technologies, what changes the Java EE 7 brought, and how to use JBoss Forge scaffolding mechanisms (for example AngularJS) and perform endpoint generation, including JAX-RS.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Java EE 7 Development with WildFly è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Java EE 7 Development with WildFly di Michal Cmil, Michal Matloka, Francesco Marchioni in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Client-Server Computing. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2014
ISBN
9781782171980

Java EE 7 Development with WildFly


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
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
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
6. Developing Applications with JBoss JMS Provider
A short introduction to JMS
The building blocks of JMS
The JBoss messaging subsystem
Creating and using connection factories
Using JMS destinations
Adding message-driven beans to your application
Cooking message-driven beans
Adding the JMS producer
Compiling and deploying the application
Specifying which message to receive using selectors
Transaction and acknowledgment modes
Using JMS to integrate with external systems
A real-world example – HornetQ and ActiveMQ integration
Installing the ActiveMQ resource adapter
Consuming ActiveMQ messages
Summary
7. Adding Web Services to Your Applications
Developing SOAP-based web services
Strategies to build SOAP-based web services
JBoss SOAP-based web services stack
A brief look at the JAX WS architecture
Coding SOAP web services with WildFly
Developing a POJO web service
Inspecting the web service from the console
Testing our simple web service
EJB3 Stateless Session Bean (SLSB) web services
Developing a web service consumer
Developing REST-based web services
Accessing REST resources
JBoss REST web services
Activating JAX-RS
Adding REST to our ticket example
Adding filters
Consuming our REST service
Compiling our ticket example
Adding AngularJS
Choosing between SOAP and REST services
Summary
8. Adding WebSockets
An overview of WebSockets
How do WebSockets work
Creating our first endpoint
Expanding our client application
Transforming POJOs to JSON
An alternative to WebSockets
Summary
9. Managing the Application Server
Entering the WildFly CLI
Launching the CLI
Connecting from remote hosts
Using a CLI in the graphical mode
Constructing CLI commands
Determining the resource address
Performing operations on resources
Using the tab completion helper
Deploying applications using the CLI
Deploying applications to a WildFly domain
Deploying to all server groups
Deploying to a single server group
Creating CLI scripts
Deploying an application to several WildFly nodes
Restarting servers in a domain
Installing a data source as a module
Adding JMS resources
Using advanced languages to create powerful CLI scripts
Using scripting languages to wrap CLI execution
Using the raw management API to manage the application server
Reading management model descriptions via the raw management API
Creating your resource watches using the detyped API
Role-based security
Auditing administrative operations
Patching a running instance
Summary
10. Securing WildFly Applications
Approaching the Java security API
The WildFly security subsystem
Setting up your first login module
Using the login module in the Ticket web application
Switching to FORM-based security
Creating a Database login module
Encrypting passwords
Using the...

Indice dei contenuti