JBoss at Work: A Practical Guide. A Practical Guide - Helion
ISBN: 978-05-965-5293-0
stron: 308, Format: ebook
Data wydania: 2005-10-13
Księgarnia: Helion
Cena książki: 109,65 zł (poprzednio: 127,50 zł)
Oszczędzasz: 14% (-17,85 zł)
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.
Osoby które kupowały "JBoss at Work: A Practical Guide. A Practical Guide", wybierały także:
- Zen Steve'a Jobsa 29,67 zł, (8,90 zł -70%)
- ASP.NET MVC. Kompletny przewodnik dla programistów interaktywnych aplikacji internetowych w Visual Studio 86,77 zł, (26,90 zł -69%)
- jQuery, jQuery UI oraz jQuery Mobile. Receptury 57,74 zł, (17,90 zł -69%)
- Scratch. Komiksowa przygoda z programowaniem 36,06 zł, (11,90 zł -67%)
- Baltie. Kurs video. Poziom pierwszy. Elementarz programowania w języku wizualnym 59,00 zł, (26,55 zł -55%)
Spis treści
JBoss at Work: A Practical Guide. A Practical Guide eBook -- spis treści
- JBoss at Work: A Practical Guide
- A Note Regarding Supplemental Files
- About the Author
- Preface
- Audience
- About This Book
- Assumptions This Book Makes
- Conventions Used in This Book
- Using Code Examples
- Safari Enabled
- Comments and Questions
- Acknowledgments
- Toms Acknowledgments
- Scotts Acknowledgments
- 1. Getting Started with JBoss
- 1.1. Why JBoss at Work?
- 1.2. Why JBoss?
- 1.3. The Example: JAW Motors
- 1.4. The Tools
- 1.4.1. Installing Java
- 1.4.2. Installing Ant
- 1.4.3. Installing XDoclet
- 1.5. Installing JBoss
- 1.5.1. Touring the JBoss Directory Structure
- 1.5.2. Server Configurations
- 1.5.3. Touring the Server Configuration Directory Structure
- 1.6. Deploying Applications to JBoss
- 1.7. Looking Ahead...
- 2. Web Applications
- 2.1. The Servlet Container
- 2.2. Three-Tier Applications
- 2.3. Exploring the Presentation Tier
- 2.4. Building the View Cars Page
- 2.4.1. Iteration 1: HTML
- 2.4.2. Iteration 2: JSP and JSTL
- 2.4.3. Iteration 3: CSS
- 2.4.4. Deploying the Application as a WAR File
- 2.4.5. A Deeper Examination of the WAR
- 2.4.6. Ant
- 2.5. Adding a Model and Controller
- 2.5.1. The Model
- 2.5.2. The Controller
- 2.6. Looking Ahead...
- 3. Building and Deploying an EAR
- 3.1. WARs Versus EARs
- 3.2. Application.xml
- 3.3. Common JAR
- 3.3.1. Exploring the New Directory Structure
- 3.3.1.1. The common sub-project
- 3.3.1.2. The webapp sub-project
- 3.3.1.3. The master build
- 3.3.1.4. Ant EAR task
- 3.3.1. Exploring the New Directory Structure
- 3.4. Deploying the EAR
- 3.5. Adding a DAO
- 3.6. Using XDoclet
- 3.7. Looking Ahead...
- 4. Databases and JBoss
- 4.1. Persistence Options
- 4.2. JDBC
- 4.3. JNDI
- 4.4. JNDI References in web.xml
- 4.5. JBoss DataSource Descriptors
- 4.6. JDBC Driver JARs
- 4.7. Database Checklist
- 4.8. Accessing the Database Using Ant
- 4.9. Creating JDBCCarDAO
- 4.10. Looking Ahead...
- 5. Hibernate and JBoss
- 5.1. The Pros and Cons of ORMs
- 5.2. Hibernate Mapping Files
- 5.3. Hibernate MBean Service Descriptor
- 5.4. Creating a HAR
- 5.5. Adding the HAR to the EAR
- 5.6. Creating a JNDI Lookup
- 5.7. Hibernate Checklist
- 5.8. HibernateCarDAO
- 5.9. Adding a Car
- 5.10. Editing a Car
- 5.11. Deleting a Car
- 5.12. Looking Ahead...
- 6. Stateless Session Beans
- 6.1. Issues with EJBs
- 6.2. Should I Use EJB or Not?
- 6.3. Business Tier
- 6.4. Enterprise JavaBeans
- 6.5. Our Example
- 6.6. Iteration 1Introduce a Session Bean
- 6.6.1. Modifying the CAR Table
- 6.6.2. Upgrading the CarDTO with a Status Field
- 6.6.3. Adding filterByStatus() to the HibernateDAO
- 6.7. Calling the Session Bean from the Controller Servlet
- 6.7.1. Factoring Out the JNDI Calls
- 6.8. EJB-Based JNDI References in Web-Based Deployment Descriptors
- 6.8.1. Automating EJB-Related JNDI Settings in Web-Based Deployment Descriptors
- 6.9. Session Bean Types
- 6.10. Session Beans
- 6.11. Remote Versus Local EJB Calls
- 6.11.1. Exploring the New Directory Structure
- 6.11.1.1. The ejb sub-project
- 6.11.1. Exploring the New Directory Structure
- 6.12. Local and Remote Interfaces
- 6.12.1. Local Interface
- 6.12.2. Remote Interface
- 6.13. Home Interfaces
- 6.13.1. Local Home Interface
- 6.13.2. Remote Home Interface
- 6.13.3. The Bean Class
- 6.13.4. EJB Deployment Descriptors
- 6.13.5. EJB Transaction Settings
- 6.13.6. Difficulties Using EJB
- 6.13.7. Automating Stateless Session Bean Deployment Using XDoclet Tags
- 6.13.8. Ant Build Script Using XDoclet
- 6.13.9. EJB JAR File
- 6.13.10. Ant Task for Creating EJB JAR
- 6.13.11. Adding an EJB JAR to the EAR
- 6.14. Reviewing Iteration 1
- 6.15. Testing Iteration 1
- 6.16. Iteration 2Move Business Logic Out of the Controller
- 6.16.1. Refactoring the Business Logic
- 6.16.2. Hibernate 3 and CMT
- 6.17. Reviewing Iteration 2
- 6.18. Testing Iteration 2
- 6.19. Iteration 3Buy a Car
- 6.19.1. Upgrade the Web Site: Adding a Buy Car Link
- 6.19.2. Creating the ACCOUNTING Table
- 6.20. The AccountingDTO
- 6.21. Developing the HibernateAccountingDAO
- 6.22. Adding buyCar() to the InventoryFacadeBean
- 6.23. Reviewing Iteration 3
- 6.24. Testing Iteration 3
- 6.25. Final Thoughts on Session Beans
- 6.26. Looking Ahead ...
- 7. Java Message Service (JMS) and Message-Driven Beans
- 7.1. Sending Messages with JMS
- 7.2. Upgrade the Site: Running a Credit Check
- 7.3. JMS Architecture Overview
- 7.4. JMS Messaging Models
- 7.4.1. Choosing a Messaging Model
- 7.5. Creating a Message
- 7.6. Sending the Message
- 7.7. Core JMS API
- 7.8. Sending a JMS Message
- 7.8.1. JMS Unified Client API
- 7.8.2. Factoring Out the JNDI Calls
- 7.9. JMS-Based JNDI References in Web-Based Deployment Descriptors
- 7.9.1. JMS and Its Relationship to J2EE Transactions
- 7.9.2. Automating JMS-Related JNDI Settings in Web-Based Deployment Descriptors
- 7.10. Deploying JMS Destinations on JBoss
- 7.11. JMS Checklist
- 7.12. Message-Driven Beans (MDBs)
- 7.12.1. Writing an MDB
- 7.12.2. MDB Transaction Settings
- 7.12.3. Deploying an MDB
- 7.12.4. Automating MDB Deployment with XDoclet
- 7.13. MDB Checklist
- 7.14. Testing the Credit Check
- 7.15. Looking Ahead ...
- 8. JavaMail
- 8.1. Running a Credit Check
- 8.2. Sending Email Messages with JavaMail
- 8.3. Upgrading the MDB to Send an Email Message
- 8.4. Sending an Email Message
- 8.4.1. JavaMail Sessions
- 8.4.2. Factoring out the JNDI Calls
- 8.5. JavaMail-Based JNDI References in EJB Deployment Descriptors
- 8.6. Automating JavaMail-Based JNDI References with XDoclet
- 8.7. Deploying JavaMail on JBoss
- 8.8. JavaMail Checklist
- 8.9. Testing the Credit Check Notification Email
- 8.10. Looking Ahead ...
- 9. Security
- 9.1. J2EE Security
- 9.2. Web-Based Security
- 9.2.1. Protecting the Administrative Pages
- 9.3. Restricting Access with web.xml
- 9.3.1. Web-Based Authentication
- 9.3.2. Form-Based Authentication
- 9.3.3. The Login Form
- 9.3.4. Automating Declarative Authentication and Authorization in web.xml
- 9.3.5. Creating a Security Realm
- 9.4. JAAS
- 9.4.1. LoginModule
- 9.5. Deploying a JAAS-Based Security Realm on JBoss
- 9.5.1. JBoss LoginModule Configuration
- 9.5.2. Custom LoginModule Configuration
- 9.5.3. JAAS Domain Settings in jboss-web.xml
- 9.5.4. Automating JAAS Domain Settings in jboss-web.xml
- 9.6. Testing Secure JSPs
- 9.7. Protecting the Administrative Actions
- 9.7.1. Are We Done with Web Security Yet?
- 9.7.2. Propagating Security Credentials from the Web Tier
- 9.7.3. Automating Security Credential Propagation in web.xml
- 9.7.4. Testing Web Security
- 9.8. Web Security Checklist
- 9.9. Integrating Web Tier and EJB Tier Security
- 9.10. EJB Security
- 9.10.1. JAAS Domain in jboss.xml
- 9.10.2. Automating JAAS Domain Settings in jboss.xml
- 9.10.3. Protecting EJBs with ejb-jar.xml
- 9.10.4. Automating EJB Security Settings with XDoclet
- 9.10.5. Testing Secure EJB Methods
- 9.11. EJB Security Checklist
- 9.12. Looking Ahead ...
- 10. Web Services
- 10.1. Web Services Architecture
- 10.2. JBoss 4.x and Web Services
- 10.3. J2EE 1.4 and Web Services
- 10.4. Implementing J2EE 1.4 Web Services
- 10.5. Service Endpoint Interface (SEI)
- 10.6. Modifying ejb-jar.xml
- 10.7. webservices.xml
- 10.8. JAX-RPC Mapping File
- 10.9. WSDL File
- 10.10. Set the Web Service URL
- 10.11. Modifying the InventoryFacadeBean EJB
- 10.11.1. Web Services Data Types
- 10.11.2. Web Services and Collections
- 10.12. Web Services Deployment
- 10.13. Automating Web Services Deployment
- 10.13.1. Web Services Ant Script
- 10.14. J2EE Web Services Checklist
- 10.15. Testing Web Services Deployment
- 10.16. Web Services Client
- 10.16.1. Exploring the New Directory Structure
- 10.16.1.1. The client sub-project
- 10.16.1. Exploring the New Directory Structure
- 10.17. Implementing a Web Service Client
- 10.18. Web Service Client Checklist
- 10.19. Testing the Web Service Client
- 10.20. Final Thoughts on J2EE 1.4 Web Services
- 10.21. Conclusion
- 10.22. Congratulations!
- A. ClassLoaders and JBoss
- A.1. Namespaces
- A.2. Class Loading in the J2EE
- A.3. Class Loading with JBoss
- A.4. Common ClassLoader Issues
- A.5. ClassLoader Options
- A.6. Solving ClassLoader Issues
- A.7. Conclusion
- B. Logging and JBoss
- B.1. Jakarta Commons Logging (JCL) API
- B.1.1. Using the Apache JCL
- B.1.2. Using a Logging Implementation
- B.1.3. Property File
- B.1.4. Logging Levels
- B.2. Apache Log4J
- B.2.1. Log4J Core Concepts
- B.2.2. PatternLayout
- B.2.3. Log4J Configuration File
- B.2.4. Log4J Initialization
- B.2.5. Initialization Servlet
- B.3. Adding Application-Specific Properties to System Properties
- B.4. Configuring Log4J with a Configuration File
- B.5. Loading Resources from the CLASSPATH
- B.6. Logging Deployment
- B.7. Logging Checklist
- B.8. Testing Logging
- B.9. Conclusion
- B.1. Jakarta Commons Logging (JCL) API
- C. JAAS Tutorial
- C.1. JAAS
- C.1.1. JAAS Core Concepts, Classes, and Interfaces
- C.1.2. LoginContext
- C.1.3. LoginModule
- C.1.4. Callback
- C.1.5. CallbackHandler
- C.1.6. JAAS LoginModule Configuration and Deployment
- C.1.7. LoginModule Configuration Flags
- C.2. Client-Side JAAS
- C.2.1. External Client Application that Uses JAAS
- C.2.2. Client-Side LoginModule Configuration
- C.2.3. J2SE Security Policy File
- C.2.4. Setting the Client CLASSPATH
- C.3. Conclusion
- C.1. JAAS
- Index
- About the Authors
- Colophon
- Copyright