Mastering Java EE Development with WildFly
上QQ阅读APP看书,第一时间看更新

What this book covers

Chapter 1Introducing Java EE and Configuring the Development Environment, gives an introduction to Java EE, focusing on the novelties introduced in version 7. The book provides several examples, and this chapter will explain how to install and use them when reading the various chapters.

Chapter 2, Working with Dependency Injection, states that dependency injection has brought innovation to the way of programming. The instantiation of automatically rendered objects at the configuration level has made it simpler and more performative in the development of applications, avoiding the problems of lack of memory and memory leaks. Thanks to annotations almost completely replacing XML configurations, development has become even simpler and more portable. In this chapter, we'll see how to use the CDI inside WildFly 10.

Chapter 3Persistence, explores the significant novelties annotations have brought to the development of entities. It has now become very easy to create objects and make them persistent in a relational database. The JPA deals with this. We will look at the JPA 2.1 features on WildFly 10 in detail, with related examples.

Chapter 4, Implementing Business Logic, says that EJBs are the historical components provided by Java EE to implement the business logic. This chapter will show the novelties and all types of EJBs so that the reader can choose the most suitable component for their needs.

Chapter 5Working with Distributed Transactions, teaches that distributed transactions are the key element of Java EE. Java Transaction Architecture (JTA) does not need much work to handle transactional operations; it is very easy to handle transactions not only between different applications, but also between different databases and application servers. In this chapter, we will show Narajana, the open source product that implements JTA within WildFly 10 and the possible transaction scenarios.

Chapter 6Creating REST Services, explains that the latest specifications have conveyed the use of REST as the key to building services. REST is very easy to use, fast, and fits very well with the latest requirements of HTML 5. In this chapter, we will focus on the use of JAX-RS 2.0 implemented by RESTEasy and featured on WildFly since its inception.

Chapter 7Implementing Web Sockets, states that the main innovation introduced by Java EE 7 is the web sockets that revolutionized the web world as it did in its AJAX times. With web sockets, we finally have a direct channel between the browser and web applications, so asynchronous mechanisms, such as notifications and messaging, make it simpler, safer, and faster.

Chapter 8Working with Messaging, says that JMS is a historical framework for Java EE. JMS provides good support for writing clients who receive messages from queues or topics. Version 7 introduces improvements in development by leveraging annotations to write a lot less code. In this chapter, we will analyze the development and configuration of the messaging server implemented by ActiveMQ Artemis.

Chapter 9Implementing a Mail Client, teaches you to send emails with JavaMail. WildFly provides a dedicated session for mails to be included in enterprise applications. We will see several examples and how to test them with the open source SubEtha Mail product.

Chapter 10Asynchronous REST, finishes the work on REST by dwelling on the asynchronous mechanisms introduced in the last two Java EE specifications, such as timeouts and callbacks. We will write examples of clients using REST asynchronous.

Chapter 11Asynchronous EJB, continues the discussion of EJBs by focusing on new asynchronous mechanisms, such as timers, schedulers, and timeouts, described in Java EE 6 and 7. We will also provide examples of listener and message-driven beans and explain how to support transactions.

Chapter 12Batches and Workflows, discusses the scheduler's speech by analyzing new batch specifications introduced in Java EE 7. With WildFly 10, you can write rather complex batches and workflows by competing with highly consolidated BPM specifications.

Chapter 13Working with Servlets and JSP, is entirely dedicated to the web and its Java components. We'll see how undertow, the new engine that implements web connectors, implements servlets 3.1 and JSP 2.3 through several examples of web pages.

Chapter 14Writing a JSF Application, outlines how to develop Java Server Faces 2.2 applications with the help of the Mojarra engine present in WildFly 10. We will show examples of configurations, navigation, and major JSF components.

Chapter 15Sharing the Web Sessions, covers how to set up a cluster with WildFly using standalone and domain mode. This chapter will also teach us how the data is propagated with the help of Infinispan, the product that implements the second-level cache, and which allows us to replicate the data in the WildFly cluster.

Chapter 16WildFly in Cloud, showcases how to install and use WildFly in a cloud machine provided by OpenShift; the chapter will provide details on this product used to manage cloud machines in an open context.

Chapter 17Share your Data, analyzes Infinispan components and displays network configurations in order to have special configurations depending on the network used.

Chapter 18Deployment, looks at deployment as a key part of the application server. We will see examples of deploying different applications and custom configurations in this chapter.

Chapter 19Working with OSGI,  takes you through the modular structure of WildFly provided by JBoss modules, a framework that allows a strong personalization of the components that make up WildFly. In addition, we will see an extension of JBoss modules, JBoss OSGI, which allows us to deploy applications through OSGI.