O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java EE 7 Development with NetBeans 8

Book Description

Develop professional enterprise Java EE applications quickly and easily with this popular IDE

In Detail

NetBeans has several features that greatly simplify Java EE development, but with many features and great flexibility, Java developers can become overwhelmed by the options available in NetBeans.

Java EE 7 Development with NetBeans 8 takes you through the most important parts of Java EE programming and shows you how to use the features of NetBeans that will improve your development experience through clear, careful instructions and screenshots. This book will take you through the major Java EE APIs and how to get them working in the NetBeans environment.

This is a practical guide that covers how to leverage NetBeans 8 functionality to quickly and easily develop enterprise applications compliant with the Java EE 7 standard.

What You Will Learn

  • Develop Java web applications by leveraging NetBeans' functionality
  • Build standard JSF applications by taking advantage of NetBeans' features
  • Develop aesthetically pleasing JSF web applications by leveraging JSF component libraries
  • Integrate NetBeans with a third-party RDBMS
  • Quickly and easily develop applications taking advantage of the Java Persistence API
  • Take advantage of NetBeans' functionality to easily develop Enterprise JavaBeans, including configuring transaction management via annotations
  • Utilize NetBeans to easily add messaging functionality to enterprise applications, through the Java Messaging Service API and through message-driven EJBs
  • Develop SOAP-based and RESTful web services using NetBeans, including exposing EJBs' functionality as web services

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. Java EE 7 Development with NetBeans 8
    1. Table of Contents
    2. Java EE 7 Development with NetBeans 8
    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. 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
    8. 1. Getting Started with NetBeans
      1. Introduction
      2. Obtaining NetBeans
      3. Installing NetBeans
        1. Microsoft Windows
        2. Mac OS X
        3. Linux
        4. Other platforms
        5. Installation procedure
      4. Starting NetBeans for the first time
      5. Configuring NetBeans for Java EE development
        1. Integrating NetBeans with a third-party application server
        2. Integrating NetBeans with a third-party RDBMS
          1. Adding a JDBC driver to NetBeans
          2. Connecting to a third-party RDBMS
      6. Deploying our first application
      7. NetBeans tips for effective development
        1. Code completion
        2. Code templates
        3. Keyboard shortcuts
        4. Understanding NetBeans visual cues
        5. Accelerated HTML5 development support
      8. Summary
    9. 2. Developing Web Applications Using JavaServer Faces 2.2
      1. Introduction to JavaServer Faces
      2. Developing our first JSF application
        1. Creating a new JSF project
          1. Modifying our page to capture user data
          2. Creating our CDI named bean
          3. Implementing the confirmation page
          4. Executing our application
          5. JSF validation
      3. Facelets templating
        1. Adding the Facelets template
        2. Using the template
      4. Resource library contracts
      5. Composite components
      6. Faces flows
      7. HTML5 support
        1. HTML5-friendly markup
        2. Pass-through attributes
      8. Summary
    10. 3. JSF Component Libraries
      1. Using PrimeFaces components in our JSF applications
      2. Using ICEfaces components in our JSF applications
      3. Using RichFaces components in our JSF applications
      4. Summary
    11. 4. Interacting with Databases through the Java Persistence API
      1. Creating our first JPA entity
        1. Adding persistent fields to our entity
        2. Creating a data access object
      2. Automated generation of JPA entities
        1. Named queries and JPQL
        2. Bean Validation
        3. Entity relationships
      3. Generating JSF applications from JPA entities
      4. Summary
    12. 5. Implementing the Business Tier with Session Beans
      1. Introducing session beans
      2. Creating a session bean in NetBeans
      3. Accessing the bean from a client
        1. Executing the client
      4. Session bean transaction management
      5. Implementing aspect-oriented programming with interceptors
        1. Implementing the Interceptor class
        2. Decorating the EJB with the @Interceptors annotations
      6. The EJB Timer service
      7. Generating session beans from JPA entities
      8. Summary
    13. 6. Contexts and Dependency Injection
      1. Introduction to CDI
      2. Qualifiers
      3. Stereotypes
      4. Interceptor binding types
      5. Custom scopes
      6. Summary
    14. 7. Messaging with JMS and Message-driven Beans
      1. Introduction to JMS
      2. Creating JMS resources from NetBeans
      3. Implementing a JMS message producer
      4. Consuming JMS messages with message-driven beans
        1. Seeing our messaging application in action
      5. Summary
    15. 8. Java API for JSON Processing
      1. The JSON-P object model API
        1. Generating JSON data with the JSON-P object model API
          1. Our example in action
        2. Parsing JSON data with the JSON-P object model API
      2. The JSON-P streaming API
        1. Generating JSON data with the JSON-P streaming API
        2. Parsing JSON data with the JSON-P streaming API
      3. Summary
    16. 9. Java API for WebSocket
      1. Examining the WebSocket code using samples included with NetBeans
        1. The sample Echo application in action
        2. Examining the generated Java code
        3. Examining the generated JavaScript code
      2. Building our own WebSocket applications
        1. Developing the user interface
        2. Developing the WebSocket server endpoint
        3. Implementing WebSocket functionality on the client
      3. Summary
    17. 10. RESTful Web Services with JAX-RS
      1. Generating a RESTful web service from an existing database
        1. Analyzing the generated code
      2. Testing our RESTful web service
      3. Generating RESTful Java client code
      4. Generating RESTful JavaScript clients for our RESTful web services
      5. Summary
    18. 11. SOAP Web Services with JAX-WS
      1. Introduction to web services
      2. Creating a simple web service
        1. Testing our web service
        2. Developing a client for our web service
      3. Exposing EJBs as web services
        1. Implementing new web services as EJBs
        2. Exposing existing EJBs as web services
        3. Creating a web service from an existing WSDL
      4. Summary
    19. Index