Java EE 7 Development with WildFly
eBook - ePub

Java EE 7 Development with WildFly

Michal Cmil, Michal Matloka, Francesco Marchioni

Compartir libro
  1. 434 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Java EE 7 Development with WildFly

Michal Cmil, Michal Matloka, Francesco Marchioni

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Java EE 7 Development with WildFly un PDF/ePUB en línea?
Sí, puedes acceder a Java EE 7 Development with WildFly de Michal Cmil, Michal Matloka, Francesco Marchioni en formato PDF o ePUB, así como a otros libros populares de Computer Science y Client-Server Computing. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2014
ISBN
9781782171980
Edición
1

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...

Índice