JBoss at Work: A Practical Guide View Larger Image | Tom Marrs, Scott Davis O'Reilly Media, Paperback, Published October 2005, 306 pages, ISBN 0596007345 | List Price: $34.95 Our Price: $20.95 You Save: $14.00 (40% Off)
| | | Availability: In-Stock |
Read an excerpt:
Chapter 3: Building and Deploying an EAR
Excerpt provided courtesy of O'Reilly Media. Copyright © O'Reilly Media, Inc
Written permission from the publisher is required for any use of this material.
|
Customer Reviews: 2 Average Customer Rating:      Write a Review and tell the world about this title! People who purchase this book frequently purchase: - JBoss: A Developer's Notebook; Norman Richards, et al, $17.95, 40% Off!
- Enterprise JavaBeans 3.0, 5th Edition; Richard Monson-Haefel, et al, $29.95, 40% Off!
- Ant: The Definitive Guide, 2nd Edition; Steve Holzner, $20.95, 40% Off!
- Pro Spring; Rob Harrop, et al, $30.95, 38% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
Consisting of a number of well-known open source products, JBoss is more a
family of interrelated services than a single monolithic application. But, as
with any tool that's as feature-rich as JBoss, there are number of pitfalls
and complexities, too.
Most developers struggle with the same issues when deploying J2EE applications
on JBoss: they have trouble getting the many J2EE and JBoss deployment descriptors
to work together; they have difficulty finding out how to get started; their
projects don't have a packaging and deployment strategy that grows with the
application; or, they find the Class Loaders confusing and don't know how to
use them, which can cause problems.
JBoss at Work: A Practical Guide helps developers overcome these challenges.
As you work through the book, you'll build a project using extensive code examples.
You'll delve into all the major facets of J2EE application deployment on JBoss,
including JSPs, Servlets, EJBs, JMS, JNDI, web services, JavaMail, JDBC, and
Hibernate. With the help of this book, you'll:
- Implement a full J2EE application and deploy it on JBoss
- Discover how to use the latest features of JBoss 4 and J2EE 1.4, including
J2EE-compliant web services
- Master J2EE application deployment on JBoss with EARs, WARs, and EJB JARs
- Understand the core J2EE deployment descriptors and how they integrate with
JBoss-specific descriptors
- Base your security strategy on JAAS
Written for Java developers who want to use JBoss on their projects, the book
covers the gamut of deploying J2EE technologies on JBoss, providing a brief
survey of each subject aimed at the working professional with limited time.
If you're one of the legions of developers who have decided to give JBoss
a try, then JBoss at Work: A Practical Guide is your next logical purchase.
It'll show you in plain language how to use the fastest growing open source
tool in the industry today. If you've worked with JBoss before, this book will
get you up to speed on JBoss 4, JBoss WS (web services), and Hibernate 3.
Table of Contents
Preface
1. Getting Started with JBoss
Why "JBoss at Work"?
Why JBoss?
The Example: JAW Motors
The Tools
Installing JBoss
Deploying Applications to JBoss
Looking Ahead-
2. Web Applications
The Servlet Container
Three-Tier Applications
Exploring the Presentation Tier
Building the View Cars Page
Adding a Model and Controller
Looking Ahead-
3. Building and Deploying an EAR
WARs Versus EARs
Application.xml
Common JAR
Deploying the EAR
Adding a DAO
Using XDoclet
Looking Ahead-
4. Databases and JBoss
Persistence Options
JDBC
JNDI
JNDI References in web.xml
JBoss DataSource Descriptors
JDBC Driver JARs
Database Checklist
Accessing the Database Using Ant
Creating JDBCCarDAO
Looking Ahead-
5. Hibernate and JBoss
The Pros and Cons of ORMs
Hibernate Mapping Files
Hibernate MBean Service Descriptor
Creating a HAR
Adding the HAR to the EAR
Creating a JNDI lookup
Hibernate Checklist
HibernateCarDAO
Adding a Car
Editing a Car
Deleting a Car
Looking Ahead-
6. Stateless Session Beans
Issues with EJBs
Should I Use EJB or Not?
Business Tier
Enterprise JavaBeans
Our Example
Iteration 1-Introduce a Session Bean
Calling the Session Bean from the Controller Servlet
EJB-Based JNDI References in Web-Based Deployment Descriptors
Session Bean Types
Session Beans
Remote Versus Local EJB Calls
Local and Remote Interfaces
Home Interfaces
Reviewing Iteration 1
Testing Iteration 1
Iteration 2-Move Business Logic Out of the Controller
Reviewing Iteration 2
Testing Iteration 2
Iteration 3-Buy a Car
The AccountingDTO
Developing the HibernateAccountingDAO
Adding buyCar( ) to the InventoryFacadeBean
Reviewing Iteration 3
Testing Iteration 3
Final Thoughts on Session Beans
Looking Ahead . . .
7. Java Message Service (JMS) and Message-Driven Beans
Sending Messages with JMS
Upgrade the Site: Running a Credit Check
JMS Architecture Overview
JMS Messaging Models
Creating a Message
Sending the Message
Core JMS API
Sending a JMS Message
JMS-Based JNDI References in Web-Based Deployment Descriptors
Deploying JMS Destinations on JBoss
JMS Checklist
Message-Driven Beans (MDBs)
MDB Checklist
Testing the Credit Check
Looking Ahead . . .
8. JavaMail
Running a Credit Check
Sending Email Messages with JavaMail
Upgrading the MDB to Send an Email Message
Sending an Email Message
JavaMail-Based JNDI References in EJB Deployment Descriptors
Automating JavaMail-Based JNDI References with XDoclet
Deploying JavaMail on JBoss
JavaMail Checklist
Testing the Credit Check Notification Email
Looking Ahead . . .
9. Security
J2EE Security
Web-Based Security
Restricting Access with web.xml
JAAS
Deploying a JAAS-Based Security Realm on JBoss
Testing Secure JSPs
Protecting the Administrative Actions
Web Security Checklist
Integrating Web Tier and EJB Tier Security
EJB Security
EJB Security Checklist
Looking Ahead . . .
10. Web Services
Web Services Architecture
JBoss 4.x and Web Services
J2EE 1.4 and Web Services
Implementing J2EE 1.4 Web Services
Service Endpoint Interface (SEI)
Modifying ejb-jar.xml
webservices.xml
JAX-RPC Mapping File
WSDL File
Set the Web Service URL
Modifying the InventoryFacadeBean EJB
Web Services Deployment
Automating Web Services Deployment
J2EE Web Services Checklist
Testing Web Services Deployment
Web Services Client
Implementing a Web Service Client
Web Service Client Checklist
Testing the Web Service Client
Final Thoughts on J2EE 1.4 Web Services
Conclusion
Congratulations!
A. ClassLoaders and JBoss
B. Logging and JBoss
C. JAAS Tutorial
Index
About the Authors
Tom Marrs, a 20 year veteran in the software industry, is the Principal and
Senior Software Architect at Vertical Slice, a consulting firm that designs
and implements mission-critical business applications using the latest J2EE
and Open Source technologies, along with providing architecture evaluation and
developer training and mentoring services.
Tom is the lead author of JBoss At Work: A Practical
Guide (O’Reilly, 2005), has been published in Java Developers’
Journal, and authored and/or co-authored several technical training courses.
Tom teaches Java/J2EE/JBoss training classes, speaks regularly at software conferences
such as No Fluff Just Stuff, and reviews best-selling technical books for major
publishers.
An active participant in the local technical community, Tom has served as President
of the Denver Java Users Group. Scott Davis is
a senior software engineer with DigitalGlobe, a satellite imaging company. His
role in the company is technical evangelist: educating developers in geographic
technologies and making complex topics accessible to non-technical end users.
Scott is a frequent presenter at national conferences and local user
groups. He was the president of the Denver Java Users Group in 2003
when it was voted one of the top-ten JUGs in North America.
Customer Reviews
Customer Reviews: 2 Average Customer Rating:      Dec 28, 2006     Wayne from Martha's Vineyard, MA An odd book that has its place This is definitely not a programmer-level introduction to writing effective J2EE/JBoss applications or components, and definitely isn't sufficient as a deployment guide. It probably serves best as a relatively brief and fairly readable "here's an idea of what you can do with JBoss as your J2EE container" guide, if that's what you're after.
It really breezes along showing how an application *could* look, but without any details on essential performance optimizations you'd need for a real enterprise app, and without any detail on error conditions, etc. to guide through real-world development efforts. In that sense, it's like a consolidated series of articles from JavaPro or something, only a bit better written while not having the detail even that set of articles would have.
Even looking over the coverage of a few topics I've done significant implementation on (JMS and JavaMail, for example), you wouldn't implement things the simple way described here unless it was purely a proof of concept. Some key API pieces (JMX, for example) aren't even mentioned. Threading and execution scheduling is barely mentioned.
So if that kind of detail (or deliberate glossing over thereof) is what you're after, this is a perfectly fine book. For the real work necessary for deployment, look to much more complete guides--for J2EE, start with Rod Johnson's *J2EE Design and Deployment*. For Hibernate, the Bauer/King books are what you'd be after.
Problem is, for JBoss itself, the open source doc from the JBoss site *is* probably the best thing out there--other books that try to dive into the platform issues didn't sell sufficiently to warrant updating and keeping current, or are just badly written and organized. In that sense, Marrs and Davis' book does stand out as at least a good, you know, book.
Mar 21, 2006     Mike Cohn (mike@mountaingoatsoftware.com) from Boulder, CO This book truly is a practical guide The subtitle for this book is A Practical Guide. That subtitle is perfect. This is one of the most immediately useful and practical books Ive read in a long time. I began using JBoss at the same time I started reading this book and I appreciated that the book started out with the relatively simple task of getting JBoss installed. However, while the book starts at an introductory level it doesnt stay there. It progresses through more advanced topics such as JMS, JavaMail, JAAS, and Web Services. The writing is clear and enjoyable throughout. An extended example of a car dealer carries forward throughout the book. This helps the concepts fit together and build upon one another. JBoss at Work is highly informative and, as its subtitle promises, a practical guide. I highly recommend it.
|