Home Programming JBoss Tools 3 Developers Guide

JBoss Tools 3 Developers Guide

books-svg-icon Book
eBook $25.99 $17.99
Print $43.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $25.99 $17.99
Print $43.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    An overview of JBoss Tools
About this book
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.
Publication date:
April 2009
Publisher
Packt
Pages
408
ISBN
9781847196149

 

Chapter 1. An overview of JBoss Tools

As you probably know, JBoss Tools are a set of Eclipse plug-ins that offer support for developing, deploying, and testing applications based on JBoss.org (http://www.jboss.org/) projects.

If this definition doesn't say much, then let's just say that JBoss Tools is an "all-in-one" product that provides complete support for developing Java SE and Java EE applications. Also, it's important to note that JBoss Tools can sustain the development of each tier of an enterprise/desktop application by providing dedicated components like editors, wizards, syntax-highlighting, import/export skills, code completion, refactoring, etc.

If you are familiar with the JBoss Tools evolution, then it is impossible to skip the fact that the new JBoss Tools 3 Candidate Release 2 (JBoss Tools 3.0.0 CR2) version is the "king" of all versions. But, if JBoss Tools is a new challenge for you, then try to be careful; JBoss Tools creates dependency and it seems that the current software market doesn't offer an antidote yet. This compelling superiority is because JBoss Tools provides tools for both standard J2SE/J2EE technologies like EJB3 and JPA as well as open source technologies that have become widely accepted in enterprise Java development, for example, Hibernate, JBPM, Seam, etc. It brings everything that you'll ever need—together!

Looking inside the 3.0.0 CR2 bundle, we see the following tools (this is just a brief overview meant to reveal the JBoss Tools covered technologies):

  • JBoss AS Tools: To manage application servers (especially for JBoss AS)

  • JBoss JSF Tools: Tools dedicated to supporting JSF/JSF-related technologies

  • JBoss Struts Tools: Tools dedicated to the Struts framework

  • JBoss Seam Tools: Tools dedicated to Seam projects

  • JBoss Hibernate Tools: Tools dedicated to the Hibernate framework

  • JBoss jBPM Tools: Tools to design and deploy jBPM business processes

  • JBossWS Tools: WTP Tooling for JBoss Web Services

  • Portlet Tools: Tooling for Portlets

  • JBoss ESB Tools: Tools to develop ESB components

  • JBoss XDoclet Tools: Tools to integrate XDoclet in Eclipse

  • JBoss Freemarker IDE: Syntax-highlighting editor for Freemarker files

  • JBoss RichFaces VPE: Visual Page editor for Richfaces, JSF, HTML, and CSS

  • BIRT Tools: Reporting Tooling for JBoss J2EE Servers (not presented in this book)

  • JBoss Smooks: Tooling Tools for Smooks (not presented in this book)

Next, in this chapter, you will see a brief listing of the features of JBoss Tools and after that we will proceed to install and configure the 3.0.0 CR2 release.

Further, in the following chapters, we will discuss the main tools and see that JBoss Tools can be a complete solution for Java developers.

What's new in JBoss Tools 3?

To amaze its fans and win new ones, JBoss Tools comes with a long list of bug fixes and very important add-ons, like Seam 2, JBossWS, and Mac OS X support. Based on new features and the finest interactivity, JBoss Tools give us a strong feeling of control and robustness.

Here is a short list of the JBoss Tools features. These are the "checkpoints" in JBoss Tools evolution from its first release until version 3.0.0 CR2:

  • Seam Tools:

    • Change Seam parent project

    • Easier view-id selection

    • Seam pages editor preferences

    • Seam Ear project validator

    • Seam project settings validator

    • Seam components/EL

    • Sub classes/inner classes

  • Hibernate Tools:

    • Console configuration created for JPA project

    • Export diagram

    • Query editor

    • Code completion for Hibernate configuration properties

    • hbm.xml and cfg.xml editor

  • JBoss AS Tools:

    • Drag-and-drop to JBoss Server View

    • "Explore" shortcut in Server View

    • More strict server launches

    • JBoss AS 5 support

    • JMX Console

  • JBoss ESB Tools:

    • XSD

    • jboss-esb.xml editor

  • VPE:

    • Richfaces 3.3

    • Restore Default for Palette

    • Tabbed Page Design Option dialog

    • New CSS Dialog performance

    • Folding in source editor

    • Memory tuning

    • TLD Version support

    • XUL Runner

Note

For a complete list of the JBoss Tools features, please check the http://docs.jboss.org/tools/whatsnew/ features page.

"Pretty impressive!" you may say! Well, the above list was just a brief overview of the JBoss Tools features. It is only when put under a microscope that every individual JBoss tool reveals its real power. So, what are we waiting for? Let's install it!

 

What's new in JBoss Tools 3?


To amaze its fans and win new ones, JBoss Tools comes with a long list of bug fixes and very important add-ons, like Seam 2, JBossWS, and Mac OS X support. Based on new features and the finest interactivity, JBoss Tools give us a strong feeling of control and robustness.

Here is a short list of the JBoss Tools features. These are the "checkpoints" in JBoss Tools evolution from its first release until version 3.0.0 CR2:

  • Seam Tools:

    • Change Seam parent project

    • Easier view-id selection

    • Seam pages editor preferences

    • Seam Ear project validator

    • Seam project settings validator

    • Seam components/EL

    • Sub classes/inner classes

  • Hibernate Tools:

    • Console configuration created for JPA project

    • Export diagram

    • Query editor

    • Code completion for Hibernate configuration properties

    • hbm.xml and cfg.xml editor

  • JBoss AS Tools:

    • Drag-and-drop to JBoss Server View

    • "Explore" shortcut in Server View

    • More strict server launches

    • JBoss AS 5 support

    • JMX Console

  • JBoss ESB Tools:

    • XSD

    • jboss-esb.xml editor

  • VPE:

    • Richfaces 3.3

    • Restore Default for Palette

    • Tabbed Page Design Option dialog

    • New CSS Dialog performance

    • Folding in source editor

    • Memory tuning

    • TLD Version support

    • XUL Runner

Note

For a complete list of the JBoss Tools features, please check the http://docs.jboss.org/tools/whatsnew/ features page.

"Pretty impressive!" you may say! Well, the above list was just a brief overview of the JBoss Tools features. It is only when put under a microscope that every individual JBoss tool reveals its real power. So, what are we waiting for? Let's install it!

 

Installing JBoss Tools


Installing JBoss Tools is a straightforward process that can be accomplished in multiple ways. Next, you will see two of the most secure and used methods for installing JBoss Tools on the supported platforms.

Installing Eclipse version 3.4.x (Eclipse Ganymede)

It is obvious that before installing JBoss Tools, you will need to download and install the Eclipse IDE. For getting the best results in a short time, it is recommended to use Eclipse version 3.4.x (we downloaded the Eclipse 3.4.1—component of Eclipse Ganymede Packages) and the embedded WTP version. The quickest way to get this is to download the Eclipse IDE for Java EE Developers, which is available at http://www.eclipse.org/downloads/ for three platforms: Windows, Linux, and Mac OS X. Notice that for all the platforms, the Eclipse IDE for Java EE Developers requires at least Java 5.

Note

In this book, we have used the Eclipse IDE version 3.4.1 and the embedded WTP, which was the latest stable release when this book was written. In addition to this, the examples were developed and tested on Windows XP operating system.

Uaually Eclipse is provided as a ZIP/RAR archive that should be unzipped in your favorite location. Afterwards, the Eclipse can be launched through eclipse.exe executable file. Anyway, for troubleshooting, you have a detailed documentation of Eclipse at http://help.eclipse.org/ganymede/index.jsp.

Installing JBoss Tools through Eclipse software updates

The quickest and simplest way to install the JBoss Tools consists of using a great facility of Eclipse, named Software Updates. This is a graphical wizard that will guide you through the search/install process of the latest plug-ins/add-ons for Eclipse. For installing JBoss Tools, you can use this wizard as follows:

  1. 1. Launch the Eclipse IDE.

  2. 2. From the Help menu, select Software Updates.

  3. 3. Switch to the Available Software tab.

  4. 4. Click on the Manage Sites button.

  5. 5. Click on the the Add button and type http://download.jboss.org/jbosstools/updates/development in the Add Site window—if it is already listed, make sure it is enabled (checked).

    Note

    The JBoss Tools update sites are:

    • Stable Updates: download.jboss.org/jbosstools/ updates/stable.

    • Development Updates: download.jboss.org/jbosstools/ updates/development.

    • Nightly Updates: download.jboss.org/jbosstools/ updates/nightly/trunk.

  6. 6. Return to the previous wizard and expand the newly added node (left-panel)—this is the checkbox especially created for http://download.jboss.org/jbosstools/updates/development resource. Wait for Eclipse to pending this resource. When the pending ends, you should see a list of checkboxes (one for each JBoss Tools component) under the resource node.

  7. 7. For this book, it is recommended to download and install the entire package of tools by selecting all the corresponding checkboxes. Note that in case you want to install only a subset of tools, you have to keep in mind the dependencies between standalone plug-ins (a diagram of dependencies between the most used plug-ins is in the first figure). After you decide what tools to install, just click on the Install button and follow the wizard instructions.

Any error/warning/info that occurs while download/install is in progress will be reported in the Problems view or in installation wizard pages. This Problems view will appear automatically when the download process begins and in the best case, it will remain empty during the download/install process (as shown in the following screenshot).

A common error while installing JBoss Tools 3 under Eclipse 3.4, appears in the installation wizard after we click on the Install button. These errors are about invalid jars or missing dependencies. To be precise, the message error is something like this: Unable to satisfy dependency from org.eclipse.birt.report.viewer.... Fixing this error can be done by the following steps:

  1. 1. Cancel current operation, close and reopen the Software Updates wizard.

  2. 2. Use the Manage Site button to add two more sites, as follows (if they already exist, then just check them): http://download.eclipse.org/birt/update-site/2.3/ and http://download.eclipse.org/releases/ganymede/. Check these two entries in the Available Software Sites wizard, and click the OK button.

  3. 3. Returning to the main wizard page, make sure that all checkboxes are deselected and click on the Refresh button.

  4. 4. Wait until the refresh is accomplished, then mark as selected the checkbox corresponding to http://download.jboss.org/jbosstools/updates/development. After pending ends, select all under-checkboxes and click on the Install button. This time you should not get any errors.

Manual installation of JBoss Tools

If you want to get more involved in the installation process, then you can choose to "manually" download and install JBoss Tools. This is a three-step process as follows:

  1. 1. To start, you have to download the JBoss Tools according to your platform (Windows/x86, Linux/GTK/x86, Linux/GTK/x86_64, Mac OS X Carbon/Universal) from the http://www.jboss.org/tools/download/index.html address (or this link: http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=242269).

    Note

    You can download a bundle of all the JBoss Tools plug-ins (recommended for this book) or you can download a subset of tools. In case of downloading a subset of tools, you have to keep in mind the dependencies between standalone plug-ins (shown in the previous figure).

  2. 2. Next, unzip the files into your eclipse plugins/features directory, and restart Eclipse with the -clean option, like this:

    
    eclipse –clean
    
  3. 3. When Eclipse restarts, the new features will be ready to serve you! To check if something was installed, try the New | Other option in the File menu. In the projects type list, you should see new entries like Hibernate, Web Services, ESB and so on. These appear because you just successfully installed JBoss Tools.

 

Summary


In this chapter, we learnt some basic notions about the JBoss Tools package. Also, we saw how to download and install JBoss Tools as a bundle or as a sub-set.

Being an introduction to JBoss Tools, we focused on covering the main questions about JBoss Tools, like "What is it good for?", "What exactly is contained in the JBoss Tools package?", "What is the latest stable version?", "Can I see some features?", "Can I install it on my machine?", and so on.

JBoss Tools 3 Developers Guide
Unlock this book and the full library FREE for 7 days
Start now