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

JBoss Tools 3 Developer's Guide

Book Description

Develop JSF, Struts, Seam, Hibernate, jBPM, ESB, web services, and portal applications faster than ever using JBoss Tools for Eclipse and the JBoss Application Server

  • Develop complete JSF, Struts, Seam, Hibernate, jBPM, ESB, web service, and portlet applications using JBoss Tools

  • Tools covered in separate chapters so you can dive into the one you want to learn

  • Manage JBoss Application Server through JBoss AS Tools

  • Explore Hibernate Tools including reverse engineering and code generation techniques

In Detail

JBoss Tools consist of the best Java frameworks and technologies placed together under the same "roof". Discovering JBoss Tools is like exploring a cave; at first everything seems unknown and complicated, but once you become familiar with the main features of the Tools, you will start to feel at home.

This is the first book in the market on JBoss Tools, waiting to assist you to throw away all the tiny, dedicated tools you have used earlier, thus helping you to reduce the time you spend on developing a Java application. This book will explore the tools that will help you to build Hibernate, Seam, JSF, Struts, Web Services, jBPM, ESB, and so on and show you how to use them through screenshots, examples, and source code. JBoss Tools comes with a set of dedicated wizards, generators, editors, reverse engineering capabilities, configuration files, templates, syntax highlighting, and more for each of these technologies. Just choose the technologies, and JBoss Tools will glue them together in amazing Java web applications.

This book will show you how to develop a set of Java projects using a variety of technologies and scenarios. Everything is described through JBoss Tools "eyes". After we settle the project (or scenario) that will be developed, we configure the proper environment for the current tool (the selected projects cover the main components of a web application, with regard to the backstage technology). We continue by exploring the tool to accomplish our tasks and develop the project's components. A cocktail of images, theoretical aspects, source code, and step-by-step examples will offer you a complete insight into every tool.

At the end, we deploy and test the project. In addition, every chapter is rich with pure notions about the underlying technology, which will initiate into you or remind you of the basic aspects of it. It will also show you complete and functional applications, and get you familiar with the main aspects of every tool. By the end you will have enough information to successfully handle your own projects with JBoss Tools.

Table of Contents

  1. JBoss Tools 3 Developer's Guide
    1. Table of Contents
    2. JBoss Tools 3 Developer's Guide
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. 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 for the book
        2. Errata
        3. Piracy
        4. Questions
    7. 1. An overview of JBoss Tools
      1. What's new in JBoss Tools 3?
      2. Installing JBoss Tools
        1. Installing Eclipse version 3.4.x (Eclipse Ganymede)
        2. Installing JBoss Tools through Eclipse software updates
        3. Manual installation of JBoss Tools
      3. Summary
    8. 2. JBoss AS Tools
      1. JBoss AS plug-in and the Eclipse Web Tools Platform
        1. Adding a WTP Runtime in Eclipse
        2. Adding a WTP server in Eclipse
      2. Creating our first web project—a dynamic web project stub
        1. Deploying the test project on JBoss 4.2 Server
      3. JBoss AS Perspective
        1. JBoss Server View
          1. Top part of JBoss Server View
            1. Starting the JBoss AS
            2. Stopping the JBoss AS
            3. Additional operations on JBoss AS
            4. Server publish status
          2. Bottom part of JBoss Server View
            1. Modules category
            2. Event Log category
            3. XML configuration category
            4. JMX Console category
          3. Project archives view
          4. Creating and deploying projects
      4. Summary
    9. 3. JBoss Tools Palette
      1. JBoss Tools Palette Toolbar
        1. Palette Editor
          1. Creating a set of icons
          2. Importing an icon
          3. Creating a group of tag libraries
          4. Creating a tag library
          5. Creating a new tag
        2. Show/Hide
        3. Importing third-party tag libraries
      2. Using tags in text files
      3. Summary
    10. 4. JSF Tools
      1. Overview of JSF
      2. Creating a JSF project stub
      3. JSF Project Verification
      4. JSF application configuration file
        1. The Diagram view
          1. Creating pages
          2. Adding navigation rules
        2. The Tree view
          1. Working with Managed Beans
          2. Working with custom converters
          3. Working with custom validators
        3. The Source view
      5. Editing pages code sources
        1. Editing the register.jsp page
        2. Editing the success.jsp page
        3. Editing a start page for the registerJSF project
        4. Testing the registerJSF project
      6. Adding/Removing JSF capabilities for an existing project
      7. Facelets support
      8. Summary
    11. 5. Struts Tools
      1. Overview of Struts
      2. Struts project verification
      3. Creating a Struts project stub
      4. Struts editors
        1. Graphical editor for struts-config.xml
          1. Diagram view
            1. Creating JSP pages
            2. Creating an action mapping
            3. Connecting a JSP page with action mappings
            4. Creating a forward
            5. Creating a global forward
            6. Creating a global exception
          2. Let's add some code inside JSPs
          3. Generate source code
          4. Tree view
            1. Creating a form bean
          5. Source view
        2. Graphical editor for tiles files
          1. Creating a new tiles file
          2. Tree view
          3. Diagram view
          4. Source view
        3. Create a start page for the registerStruts application
        4. Testing registerStruts application
        5. Struts Tools and validation aspects
          1. Turning on the automatic validator
          2. Creating the properties file for validation purposes
          3. Graphical editor for validation files
              1. Custom message for the name property (required rule)
              2. Custom message for the zip property (required and mask rules)
              3. Custom message for the email property (required and email rules)
          4. Client-side validation
          5. Server-side validation
      5. Debugging support for Struts projects
      6. Summary
    12. 6. Seam Tools
      1. Overview of Seam
      2. Preparations
      3. Creating a new Seam project
        1. General section
        2. Database section
        3. Code Generation section
      4. Test testSeam project
      5. Creating Seam components
        1. Creating a Seam Action
        2. Creating a Seam Form
        3. Creating a Seam Conversation
        4. Creating a Seam Entity
      6. Seam views
        1. Seam Components view
        2. Project Explorer view
      7. Using TestNG for Seam projects
      8. Generating a Seam project from an existing database
        1. Running the generated Seam application (generateSeam)
      9. Modify Seam preferences
      10. Summary
    13. 7. Hibernate Tools
      1. Overview of Hibernate
      2. Preparations
      3. Hibernate Tools for Eclipse
        1. Manual installation
        2. Hibernate perspective
        3. Creating a Hibernate mapping file (.hbm.xml)
          1. Hibernate XML Editor
            1. Tree View
              1. Adding a <class> element
              2. Adding an <id> element
              3. Adding a <property> element
              4. Adding a <set> element
              5. Adding a <one-to-many> element
        4. Creating a Hibernate configuration file
          1. Hibernate Configuration XML Editor
            1. Session Factory view
            2. Security view
            3. Source view
        5. Creating a Hibernate Console Configuration
          1. Main tab
          2. Options tab
          3. Classpath tab
          4. Mappings tab
          5. Common tab
          6. Hibernate Configurations view
            1. Mapping diagram
            2. HQL Editor
            3. Hibernate Criteria Editor
          7. Hibernate Query Result view
          8. Hibernate Dynamic SQL Preview view
          9. Query Parameters view
          10. Properties view
        6. Reverse engineering and code generation techniques
          1. Main tab
          2. Exporters tab
          3. Refresh tab
          4. Common tab
          5. Generating Hibernate artifacts
          6. Customize and control reverse engineering (reveng.xml)
            1. Overview view
            2. Table Filters view
            3. Type Mappings view
            4. Table & Columns view
            5. Design view
            6. Source view
      4. Hibernate Tools for Ant
        1. The <hibernatetool> Ant Task
        2. Adding Hibernate tools dependencies
        3. Hibernate Configurations
        4. Hibernate Tools exporters
          1. Hibernate Mapping Files Exporter
          2. POJOs Exporter
          3. Hibernate Configuration File Exporter
          4. Database Schema Exporter
          5. Documentation Exporter
          6. Query Exporter
          7. Import all libraries dependencies
      5. Summary
    14. 8. jBPM Tools
      1. Downloading and installing the JBoss jBPM Suite
      2. Creating a jBPM stub project
      3. Creating a jBPM process definition
      4. Launching the jBPM JPDL perspective
      5. jBPM GPD Editor
        1. Diagram view
          1. Adding states
          2. Adding task-nodes
          3. Adding nodes
          4. Adding a fork-join system
          5. Adding a mail node
          6. Adding transitions
          7. Customizing node names
          8. Customizing transition's names
          9. Defining swimlanes
          10. Defining a task for the start-state
          11. Defining a task for the task-node
          12. Decorating graph with actions
          13. Configuring Mail node
        2. Source view
        3. Design view
        4. Deployment view
      6. Running a process on JBoss jBPM server
      7. Creating a JUnit test for a jBPM process
      8. Summary
    15. 9. ESB Tools
      1. Downloading and installing the JBossESB Server
      2. Creating a JBossESB stub project
      3. JBoss ESB Editor
        1. Defining a Service skeleton in JBossESB
        2. Defining the Action Pipeline
        3. Defining a list of Listeners
      4. Configuring message queues in JBossESB Server
      5. Indicating the classes loading order
      6. Sending an ESB Message through the ServiceInvoker
      7. Sending a JMS Message in a classical manner
      8. Service Registry configuration
      9. Importing the "endorsed" libraries
      10. Preparing and deploying a Service on JBossESB Server
      11. Testing the ESB Service
      12. What just happened?
      13. Summary
    16. 10. Web Services Tools—JBossWS
      1. Overview of Web Services
      2. Downloading and installing JBossWS Native
      3. Configuring JBossWS under Eclispe IDE
      4. Creating a web service using Web Services Tools
        1. Adding the JBoss Web Service facet
        2. Writing a WSDL document using the WSDL wizard
        3. Generating the web service from a WSDL document
          1. Providing service business logic
        4. Generating the web service's client from a WSDL
          1. Providing client business logic
        5. Deploying and testing a web service
      5. Testing a web service through Web Services Explorer
      6. Creating a Web service from a Java bean
      7. Publishing web services and business entities
        1. A brief introduction to UDDI
        2. JBoss AS 4.2 and jUDDI
        3. Preparing the jUDDI database
        4. Using Web Services Explorer as a UDDI Browser
        5. Adding a Registry to the Web Services Explorer
          1. Publishing a business entity
          2. Publishing a web service
          3. Discovering our own web service through WSE
          4. Discovering "external" web service through WSE
        6. WSDL to WSIL, WSIL in WSE
          1. Convert WSDL to WSIL
          2. WSIL and WSE
      8. Summary
    17. 11. JBoss Portal Tools
      1. Overview of Portals and Portlets
      2. Downloading and installing JBoss Portal + JBoss AS
      3. Configuring the JBoss Portal bundle under Eclipse IDE
      4. Starting JBoss Portal
      5. Adding a Java portlet in JBoss Portal
        1. Adding JBoss Portlets Facet
        2. Creating a Java Portlet
      6. Deploying and running a portlet
      7. Adding a JSP portlet in JBoss Portal
        1. Creating a JSP Portlet
          1. Implementing the init method
          2. Implementing the doView method
          3. Implementing the view.jsp page
          4. Implementing the doEdit method
          5. Implementing the edit.jsp page
          6. Implementing the doHelp method
          7. Implementing the help.jsp page
          8. Implementing the processAction method
          9. Writing and configuring a dedicated validator
      8. Adding a JSF portlet in JBoss Portal
      9. Adding a Seam portlet in JBoss Portal
      10. Summary
    18. Index