Michael Juntao Yuan, Thomas Heute9780131347960, 0-13-134796-9
Table of contents :
JBox seam : simplicity and power beyond Java EE……Page 1
Table of Contents……Page 8
About This Book……Page 16
About the Authors……Page 18
Acknowledgments……Page 17
I. GETTING STARTED……Page 20
1.1. Integrate and Enhance Java EE Frameworks……Page 22
1.3. Designed for Stateful Web Applications……Page 24
1.5. POJO Services via Dependency Bijection……Page 26
1.7. Avoid XML Abuse……Page 27
1.8. Designed for Testing……Page 28
1.10. Let’s Start Coding!……Page 29
2. Seam Hello World……Page 30
2.1. Create a Data Model……Page 32
2.2. Map the Data Model to a Web Form……Page 33
2.3. Handle Web Events……Page 34
2.4. More on the Seam Programming Model……Page 36
2.5. Configuration and Packaging……Page 42
2.6. How Is This Simple?……Page 49
3. Recommended JSF Enhancements……Page 50
3.1. An Introduction to Facelets……Page 51
3.2. Seam JSF Enhancements……Page 59
3.3. Add Facelets and Seam UI Support……Page 63
3.4. PDF, Email, and Rich Text……Page 66
4.1. Prerequisites……Page 74
4.2. A Quick Tutorial……Page 75
4.3. Work with IDEs……Page 84
4.4. Generate CRUD Application from Database……Page 90
II. STATEFUL APPLICATIONS MADE EASY……Page 94
5.1. Correct Usage of ORM……Page 96
5.2. Better Performance……Page 99
5.3. Better Browser Navigation Support……Page 100
5.4. Less Memory Leak……Page 101
5.5. High Granularity Component Lifecycle……Page 102
5.6. Reduce Boilerplate Code……Page 103
6. A Simple Stateful Application……Page 106
6.1. Stateful Components……Page 107
6.2. Page Navigation Flow……Page 114
7. Conversations……Page 118
7.1. The Default Conversation Scope……Page 119
7.2. Long Running Conversations……Page 122
7.3. New Frontiers……Page 135
8.1. What Is a Workspace?……Page 136
8.2. Workspace Switcher……Page 139
8.3. Carry a Conversation Across Workspaces……Page 142
8.4. Managing the Conversation ID……Page 143
9. Transactions……Page 146
9.1. Managing a Transaction……Page 147
9.2. Forcing a Transaction Rollback……Page 149
9.3. Atomic Conversation (Web Transaction)……Page 151
III. INTEGRATING WEB AND DATA COMPONENTS……Page 154
10.1. Form-Validation Basics……Page 156
10.2. Validation Annotations on the Entity Bean……Page 158
10.3. Triggering the Validation Action……Page 161
10.4. Display Error Messages on the Web Form……Page 164
10.5. Use JSF Custom Validators……Page 166
11. Clickable Data Tables……Page 168
11.1. Implement a Clickable Data Table……Page 169
11.2. Seam Data-Binding Framework……Page 173
12. Bookmarkable Web Pages……Page 176
12.1. Using Page Parameters……Page 177
12.2. The Java-Centric Approach……Page 181
13.1. Data Access Objects (DAOs)……Page 188
13.2. Seam CRUD DAOs Are POJOs……Page 189
13.3. The Declarative Seam DAO Component……Page 190
13.4. Queries……Page 195
14. Failing Gracefully……Page 202
14.1. Why Not Standard Servlet Error Pages?……Page 203
14.2. Set Up the Exception Filter……Page 204
14.3. Annotate Exceptions……Page 205
14.4. Use pages.xml for System Exceptions……Page 207
14.5. Debug Information Page……Page 209
IV. AJAX SUPPORT……Page 214
15. Custom and AJAX UI Components……Page 216
15.1. Partial Form Submission Example……Page 218
15.2. Auto-complete Text Input Example……Page 221
15.3. Use ICEfaces with Seam……Page 224
15.4. Other JSF Component Libraries……Page 227
16. Enabling AJAX for Existing Components……Page 230
16.1. AJAX Validator Example……Page 231
16.2. Programatic AJAX……Page 233
16.3. AJAX Buttons……Page 236
16.4. AJAX Containers……Page 238
16.5. Other Goodies……Page 239
16.6. Configuring Ajax4jsf……Page 240
16.7. Pros and Cons……Page 242
17.1. AJAX Name Validation Example (Reloaded)……Page 244
17.2. The AJAX Progress Bar……Page 251
17.3. Integrating the Dojo Toolkit……Page 255
V. BUSINESS PROCESSES AND RULES……Page 262
18. Managing Business Processes……Page 264
18.1. jBPM Basics and Vocabulary……Page 265
18.2. Application Users and jBPM Actors……Page 268
18.3. Creating a Business Process……Page 270
18.4. Managing Tasks……Page 276
18.5. jBPM Libraries and Configuration……Page 282
19.1. Stateful Navigation Rules in pages.xml……Page 286
19.2. Associating a Business Process with a Web Page……Page 289
19.3. Pageflow and Stateful Conversation……Page 293
19.4. Configuration……Page 294
20.1. Authentication and User Roles……Page 296
20.2. Declarative Access Control……Page 299
20.3. Rule-Based Access Control……Page 302
VI. TESTING SEAM APPLICATIONS……Page 308
21. Unit Testing……Page 310
21.1. A Simple TestNG Test Case……Page 312
21.2. Simulating Dependency Bijection……Page 314
21.3. Mocking the Database and Transaction……Page 316
21.4. Loading the Test Infrastructure……Page 318
22. Integration Testing……Page 322
22.1. A Complete Test Script……Page 323
22.2. Accessing Seam Components Without the EL……Page 326
VII. PRODUCTION DEPLOYMENT……Page 330
23.1. JBoss AS 4.0.5……Page 332
23.2. JBoss AS 4.2.x and 5.x……Page 333
23.3. GlassFish……Page 334
24. Seam Without EJB3……Page 338
24.1. Seam POJO with JPA……Page 339
24.2. Using Hibernate POJOs and API……Page 346
25. Tomcat Deployment……Page 352
25.1. Packaging a POJO Application for Tomcat……Page 354
25.2. Packaging an EJB3 Application for Tomcat……Page 358
26.1. Installing and Setting Up the Database……Page 364
26.3. Defining a DataSource……Page 366
26.4. Configuring the Persistence Engine……Page 367
27. Performance Tuning and Clustering……Page 370
27.1. Tuning Performance on a Single Server……Page 371
27.2. Clustering for Scalability and Failover……Page 380
A.1. JDK 5.0 Is Required……Page 384
A.2. Installing JBoss AS……Page 385
A.3. Deploying and Running Applications……Page 388
B.1. Simple EJB3-Based Web Applications……Page 390
B.2. POJO-Based Web Applications……Page 397
B.3. Tomcat Applications……Page 402
B.4. More Complex Applications……Page 404
A……Page 406
B……Page 408
C……Page 409
D……Page 410
E……Page 411
H……Page 412
J……Page 413
N……Page 415
P……Page 416
S……Page 417
T……Page 419
U……Page 420
X……Page 421
Reviews
There are no reviews yet.