You are previewing Advanced Java® EE Development with WildFly®.
O'Reilly logo
Advanced Java® EE Development with WildFly®

Book Description

Your one-stop guide to developing Java® EE applications with the Eclipse IDE, Maven, and WildFly® 8.1

In Detail

This book starts with an introduction to EJB 3 and how to set up the environment, including the configuration of a MySQL database for use with WildFly. We will then develop object-relational mapping with Hibernate 4, build and package the application with Maven, and then deploy it in WildFly 8.1, followed by a demonstration of the use of Facelets in a web application.

Moving on from that, we will create an Ajax application in the Eclipse IDE, compile and package it using Maven, and run the web application on WildFly 8.1 with a MySQL database. In the final leg of this book, we will discuss support for generating and parsing JSON with WildFly 8.1.

What You Will Learn

  • Use Maven to develop and deploy Java EE applications with WildFly 8.1

  • Develop Java EE applications for WildFly 8.1 using the Eclipse IDE

  • Create an EJB 3.0/JPA-based application with WildFly 8.1

  • Familiarize yourself with object-relational mapping with Hibernate 4

  • Build and package a JSF 2.0 Facelets application with Maven and then deploy it in WildFly 8.1

  • Build a JAX-WS 2.2 web service and a JAX-RS 2.0 RESTful web service and learn how to use Spring MVC 3.1

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Advanced Java® EE Development with WildFly®
      1. Table of Contents
      2. Advanced Java® EE Development with WildFly®
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Disclaimer
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      9. 1. Getting Started with EJB 3.x
        1. Setting up the Environment
        2. Creating a WildFly runtime
        3. Creating a Java EE project
        4. Configuring a data source with MySQL database
        5. Creating entities
        6. Creating a JPA persistence configuration file
        7. Creating a session bean facade
        8. Creating a JSP client
        9. Configuring the jboss-ejb3-ejb subproject
        10. Configuring the jboss-ejb3-web subproject
        11. Configuring the jboss-ejb3-ear subproject
        12. Deploying the EAR module
        13. Running the JSP client
        14. Configuring a Java EE 7 Maven project
        15. Summary
      10. 2. Developing Object/Relational Mapping with Hibernate 4
        1. Setting up the environment
        2. Creating a Java EE web project
        3. Creating a Hibernate XML Mapping file
        4. Creating a properties file
        5. Creating a Hibernate configuration file
        6. Creating JSPs for CRUD
        7. Creating the JavaBean class
        8. Exporting schema
        9. Creating table data
        10. Retrieving table data
        11. Updating a table row
        12. Deleting a table row
        13. Installing the Maven project
        14. Running a schema export
        15. Creating table rows
        16. Retrieving table data
        17. Updating the table
        18. Deleting the table row
        19. Summary
      11. 3. Developing JSF 2.x Facelets
        1. Setting up the environment
        2. Creating a Java EE web project
        3. Creating a managed bean
        4. Creating a Facelets template
        5. Creating header and footer
        6. Creating input and output Facelets composition pages
        7. Creating a web descriptor
        8. Deploying the web project with Maven
        9. Running the Facelets application
        10. Summary
      12. 4. Using Ajax
        1. Setting up the environment
        2. Creating a Java EE web project
        3. Creating a user interface
        4. Creating a servlet
        5. Deploying the Ajax application with Maven
        6. Running the Ajax application
        7. Summary
      13. 5. Using GWT
        1. Setting up the environment
        2. Running the starter project on WildFly 8.1
        3. Creating a GWT project in Eclipse
        4. Deploying the starter project to WildFly 8.1
        5. Running the starter project on WildFly 8.1
        6. Creating a new GWT project
        7. Creating a GWT module
        8. Creating an entry-point class
        9. Creating an HTML host page
        10. Deploying the GWT project with Maven
        11. Running the GWT project
        12. Summary
      14. 6. Developing a JAX-WS 2.2 Web Service
        1. Setting up the environment
        2. Creating a Java EE web project
        3. Creating a web descriptor
        4. Creating a JAX-WS web service
        5. Creating a web service client
        6. Deploying the JAX-WS application with Maven
        7. Running the JAX-WS application
        8. Summary
      15. 7. Developing a JAX-RS 1.1 Web Service
        1. Setting up the environment
        2. Creating a Java EE web project
        3. Creating a sample RESTful web service
        4. Deploying the RESTful web service
        5. Running the RESTful web service
        6. Creating a Java client
        7. Running the Java client
        8. Creating a JSP client
        9. Running the JSP client
        10. Summary
      16. 8. Using Spring MVC 4.1
        1. Setting up the environment
        2. Creating a Spring MVC project
        3. Creating a JPA configuration file
        4. Creating the Model
        5. Creating the Data Access Object design pattern
        6. Creating a web descriptor
        7. Creating a request handler
        8. Creating the View
        9. Creating a Spring MVC context
        10. Deploying the Spring project with Maven
        11. Creating deployment structure and infrastructure deployment descriptors
        12. Installing the Spring MVC Maven project
        13. Running the Spring MVC application
        14. Summary
      17. 9. Using JAX-RS 2.0 in Java EE 7 with RESTEasy
        1. Setting up the environment
        2. Creating a Java EE web project
        3. The Client API
          1. Creating a client instance
          2. Accessing a resource
          3. Setting a query parameter
          4. Setting a template parameter
        4. Filters and interceptors
          1. Creating a client filter
        5. Creating a container filter
        6. Asynchronous processing
          1. Suspended response
          2. Resuming request processing
          3. Resuming a request with a suspend timeout handler
          4. Cancelling a request
        7. Session bean EJB resource
        8. Making an asynchronous call from the client
        9. Fixing a common issue
        10. Summary
      18. 10. Processing JSON with Java EE 7
        1. Setting up the environment
        2. Creating a Maven project
        3. Creating JSON
        4. Parsing JSON
        5. Processing JSON in a RESTful web service
          1. JsonArray as a return type in the resource method for a GET request
          2. Encoding a JsonObject object for a GET request
          3. JsonObject as a parameter type in the resource method for a POST request
        6. Summary
      19. Index