About This Book |
|
xvii | |
About the Authors |
|
xix | |
Acknowledgments |
|
xxi | |
|
|
1 | (74) |
|
|
3 | (8) |
|
Integrating and Enhancing Java EE Frameworks |
|
|
4 | (1) |
|
A Web Framework That Understands ORM |
|
|
5 | (1) |
|
Supporting Stateful Web Applications |
|
|
6 | (1) |
|
|
7 | (1) |
|
POJO Services via Dependency Bijection |
|
|
7 | (1) |
|
Convention over Configuration |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (16) |
|
|
13 | (1) |
|
Map the Data Model to a Web Form |
|
|
13 | (1) |
|
|
14 | (1) |
|
Navigate to the Next Page |
|
|
15 | (1) |
|
EJB3 Bean Interface and Mandatory Method |
|
|
16 | (1) |
|
More on the Seam Programming Model |
|
|
17 | (3) |
|
|
17 | (1) |
|
|
18 | (1) |
|
Getter/Setter-Based Bijection |
|
|
18 | (1) |
|
Avoid Excessive Bijection |
|
|
19 | (1) |
|
Accessing Database via the EntityManager |
|
|
20 | (1) |
|
Configuration and Packaging |
|
|
20 | (5) |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
25 | (2) |
|
Recommended JSF Enhancements |
|
|
27 | (20) |
|
An Introduction to Facelets |
|
|
28 | (6) |
|
|
29 | (1) |
|
|
30 | (1) |
|
Use Facelets as a Template Engine |
|
|
31 | (3) |
|
|
34 | (1) |
|
|
34 | (4) |
|
|
34 | (2) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
Add Facelets and Seam UI Support |
|
|
38 | (2) |
|
PDF, Email, and Rich Text |
|
|
40 | (6) |
|
|
40 | (2) |
|
|
42 | (2) |
|
|
44 | (2) |
|
|
46 | (1) |
|
|
47 | (6) |
|
|
47 | (1) |
|
|
48 | (2) |
|
|
50 | (2) |
|
|
52 | (1) |
|
Rapid Application Development Tools |
|
|
53 | (22) |
|
|
54 | (1) |
|
|
54 | (9) |
|
|
54 | (3) |
|
Generating a Skeleton Application |
|
|
57 | (2) |
|
|
59 | (2) |
|
Developing the Application |
|
|
61 | (1) |
|
|
61 | (2) |
|
|
63 | (1) |
|
|
63 | (9) |
|
|
63 | (4) |
|
|
67 | (1) |
|
JBoss Tools and JBoss Developer Studio |
|
|
68 | (4) |
|
Generating a CRUD Application from a Database |
|
|
72 | (1) |
|
Seam-gen Command Reference |
|
|
73 | (2) |
|
PART II Stateful Applications Made Easy |
|
|
75 | (100) |
|
An Introduction to Stateful Framework |
|
|
77 | (10) |
|
|
77 | (2) |
|
|
79 | (2) |
|
Better Browser Navigation Support |
|
|
81 | (1) |
|
|
82 | (1) |
|
High Granularity Component Lifecycle |
|
|
83 | (1) |
|
Reducing Boilerplate Code |
|
|
84 | (3) |
|
|
87 | (14) |
|
|
87 | (5) |
|
|
90 | (1) |
|
|
90 | (2) |
|
Managing Stateful Components |
|
|
92 | (5) |
|
Stateful Component Lifecycle |
|
|
92 | (2) |
|
|
94 | (2) |
|
|
96 | (1) |
|
Configuring Components through XML |
|
|
97 | (2) |
|
|
99 | (2) |
|
|
101 | (24) |
|
|
102 | (4) |
|
The Default Conversation Scope |
|
|
102 | (2) |
|
|
104 | (2) |
|
Long-Running Conversations |
|
|
106 | (6) |
|
Introducing the Hotel Booking Example |
|
|
106 | (4) |
|
The Lifecycle of a Long-Running Conversation |
|
|
110 | (1) |
|
|
111 | (1) |
|
Managing Long-Running Conversations |
|
|
112 | (12) |
|
|
112 | (1) |
|
|
113 | (2) |
|
Beginning a Long-Running Conversation |
|
|
115 | (2) |
|
|
117 | (2) |
|
Ending a Long-Running Conversation |
|
|
119 | (4) |
|
|
123 | (1) |
|
|
124 | (1) |
|
Workspaces and Concurrent Conversations |
|
|
125 | (20) |
|
|
125 | (4) |
|
|
129 | (5) |
|
|
130 | (2) |
|
Carrying a Conversation across Workspaces |
|
|
132 | (1) |
|
Managing the Conversation ID |
|
|
133 | (1) |
|
|
134 | (6) |
|
Beginning a Natural Conversation via Links |
|
|
135 | (2) |
|
Redirecting to a Natural Conversation |
|
|
137 | (1) |
|
Resuming a Natural Conversation |
|
|
138 | (1) |
|
Rewriting to User-Friendly URLs |
|
|
139 | (1) |
|
|
140 | (3) |
|
Desktop Features in a Stateless Web |
|
|
143 | (2) |
|
|
145 | (14) |
|
Why Are Nested Conversations Needed? |
|
|
145 | (2) |
|
Continuing the Conversation |
|
|
147 | (5) |
|
Understanding the Nested Conversation Context |
|
|
148 | (1) |
|
|
149 | (3) |
|
|
152 | (5) |
|
Managing the Conversation Stack |
|
|
152 | (4) |
|
|
156 | (1) |
|
Nested Conversation Timeout |
|
|
156 | (1) |
|
Fine-Grained State Management |
|
|
157 | (2) |
|
Transactions and Persistence |
|
|
159 | (16) |
|
Seam-Managed Transactions |
|
|
160 | (5) |
|
|
162 | (2) |
|
Forcing a Transaction Rollback |
|
|
164 | (1) |
|
Atomic Conversation (Web Transaction) |
|
|
165 | (10) |
|
Managing the Persistence Context |
|
|
165 | (2) |
|
Seam-Managed Persistence Contexts |
|
|
167 | (5) |
|
One Transaction per Conversation |
|
|
172 | (3) |
|
PART III Integrating Web and Data Components |
|
|
175 | (82) |
|
|
177 | (10) |
|
|
177 | (2) |
|
Validation Annotations on Entity Beans |
|
|
179 | (2) |
|
Triggering the Validation Action |
|
|
181 | (2) |
|
Displaying Error Messages on the Web Form |
|
|
183 | (2) |
|
Using JSF Custom Validators |
|
|
185 | (2) |
|
|
187 | (6) |
|
Implementing a Clickable Data Table |
|
|
188 | (3) |
|
|
188 | (1) |
|
Injecting Selected Object into an Event Handler |
|
|
189 | (1) |
|
Using Extended EL in a Data Table |
|
|
190 | (1) |
|
Seam Data-Binding Framework |
|
|
191 | (2) |
|
Decoupling Components Using Events |
|
|
193 | (10) |
|
|
193 | (3) |
|
|
196 | (7) |
|
Raising Events Declaratively |
|
|
196 | (2) |
|
|
198 | (1) |
|
Event Processing and the Events API |
|
|
199 | (4) |
|
|
203 | (10) |
|
|
204 | (3) |
|
The Java-Centric Approach |
|
|
207 | (4) |
|
Obtaining Query Parameters from an HTTP GET Request |
|
|
208 | (1) |
|
Loading Data for the Page |
|
|
208 | (2) |
|
Further Processing from the Bookmarked Page |
|
|
210 | (1) |
|
|
211 | (2) |
|
The Seam CRUD Application Framework |
|
|
213 | (10) |
|
Data Access Objects (DAOs) |
|
|
213 | (1) |
|
|
214 | (1) |
|
A Declarative Seam DAO Component |
|
|
215 | (3) |
|
Using Simpler Names for the Entity Object |
|
|
216 | (1) |
|
Retrieving and Displaying an Entity Object |
|
|
217 | (1) |
|
Initializing a New Entity Instance |
|
|
217 | (1) |
|
|
217 | (1) |
|
|
218 | (5) |
|
|
219 | (2) |
|
Displaying Multipage Query Results |
|
|
221 | (2) |
|
|
223 | (10) |
|
Why Not Standard Servlet Error Pages? |
|
|
223 | (2) |
|
Setting Up the Exception Filter |
|
|
225 | (1) |
|
|
225 | (2) |
|
Using pages.xml for System Exceptions |
|
|
227 | (2) |
|
The Debug Information Page |
|
|
229 | (4) |
|
|
229 | (1) |
|
|
230 | (3) |
|
|
233 | (24) |
|
Authentication and User Roles |
|
|
234 | (3) |
|
Declarative Access Control |
|
|
237 | (6) |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
240 | (2) |
|
Type-Safe Role Annotations |
|
|
242 | (1) |
|
|
243 | (8) |
|
Using the JpaIdentityStore |
|
|
244 | (6) |
|
Using the LdapIdentityStore |
|
|
250 | (1) |
|
Additional Security Feature |
|
|
251 | (6) |
|
|
251 | (2) |
|
Telling Humans and Computers Apart with CAPTCHA |
|
|
253 | (4) |
|
|
257 | (36) |
|
Custom and AJAX UI Components |
|
|
259 | (10) |
|
Autocompletion Text Input Example |
|
|
261 | (2) |
|
Rich Input Control Examples |
|
|
263 | (1) |
|
|
264 | (1) |
|
Using RichFaces with Seam |
|
|
265 | (1) |
|
Other JSF Component Libraries |
|
|
266 | (3) |
|
Enabling AJAX for Existing Components |
|
|
269 | (10) |
|
|
270 | (2) |
|
|
272 | (2) |
|
|
274 | (2) |
|
|
276 | (1) |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
278 | (1) |
|
Direct JavaScript Integration |
|
|
279 | (14) |
|
AJAX Validator Example (Reloaded) |
|
|
280 | (4) |
|
|
280 | (1) |
|
Triggering a JavaScript Event on a Web Page |
|
|
281 | (1) |
|
|
282 | (2) |
|
|
284 | (3) |
|
|
285 | (1) |
|
Accessing Seam Components from JavaScript |
|
|
286 | (1) |
|
Integrating the Dojo Toolkit |
|
|
287 | (6) |
|
|
288 | (1) |
|
|
289 | (4) |
|
PART V Business Processes and Rules |
|
|
293 | (46) |
|
Rule-Based Security Framework |
|
|
295 | (10) |
|
Rule-Based Access Control |
|
|
295 | (1) |
|
Configuring Rule-Based Permissioning |
|
|
296 | (1) |
|
|
297 | (2) |
|
Per-Instance Access Rules |
|
|
299 | (3) |
|
|
302 | (3) |
|
Integrating Business Rules in Web Applications |
|
|
305 | (10) |
|
|
305 | (4) |
|
|
306 | (1) |
|
|
306 | (3) |
|
|
309 | (3) |
|
|
309 | (1) |
|
|
310 | (1) |
|
Dynamically Updatable Rules |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
313 | (2) |
|
Managing Business Processes |
|
|
315 | (20) |
|
jBPM Concepts and Vocabulary |
|
|
316 | (2) |
|
Application Users and jBPM Actors |
|
|
318 | (2) |
|
Creating a Business Process |
|
|
320 | (5) |
|
|
320 | (3) |
|
Creating a Business Process Instance |
|
|
323 | (1) |
|
Binding Data Objects in Process Scope |
|
|
323 | (2) |
|
|
325 | (5) |
|
Implementing Business Logic for Tasks |
|
|
325 | (2) |
|
Specifying a Task to Work On |
|
|
327 | (1) |
|
Selecting a Task in the UI |
|
|
328 | (2) |
|
Business Process-Based Page Navigation Flow |
|
|
330 | (3) |
|
jBPM Libraries and Configuration |
|
|
333 | (2) |
|
Integrating Business Processes and Rules |
|
|
335 | (4) |
|
|
335 | (2) |
|
|
337 | (1) |
|
|
338 | (1) |
|
PART VI Testing Seam Applications |
|
|
339 | (18) |
|
|
341 | (10) |
|
A Simple TestNG Test Case |
|
|
343 | (1) |
|
Simulating Dependency Bijection |
|
|
344 | (1) |
|
Mocking the Database and Transaction |
|
|
345 | (2) |
|
Loading the Test Infrastructure |
|
|
347 | (4) |
|
|
351 | (6) |
|
Simulating JSF Interactions |
|
|
352 | (1) |
|
|
353 | (2) |
|
Transactional Data Source |
|
|
355 | (2) |
|
PART VII Production Deployment |
|
|
357 | (26) |
|
Using a Production Database |
|
|
359 | (6) |
|
Installing and Setting Up the Database |
|
|
359 | (2) |
|
Installing the Database Driver |
|
|
361 | (1) |
|
|
361 | (1) |
|
Configuring the Persistence Engine |
|
|
362 | (1) |
|
|
362 | (3) |
|
|
365 | (6) |
|
|
365 | (1) |
|
|
366 | (1) |
|
|
367 | (4) |
|
Performance Tuning and Clustering |
|
|
371 | (12) |
|
Tuning Performance on a Single Server |
|
|
372 | (7) |
|
|
372 | (1) |
|
|
372 | (1) |
|
|
373 | (1) |
|
Tuning the HTTP Thread Pool |
|
|
374 | (1) |
|
Choosing Between Client- and Server-Side State Saving |
|
|
375 | (1) |
|
Using a Production Data Source |
|
|
376 | (1) |
|
Using a Second-Level Database Cache |
|
|
376 | (2) |
|
Using Database Transactions Carefully |
|
|
378 | (1) |
|
Clustering for Scalability and Failover |
|
|
379 | (4) |
|
Sticky Session Load Balancing |
|
|
380 | (1) |
|
|
380 | (1) |
|
|
381 | (2) |
|
PART VIII Emerging Technologies |
|
|
383 | (42) |
|
Scheduling Recurring Jobs from a Web Application |
|
|
385 | (8) |
|
|
386 | (1) |
|
Configuring the Quartz Scheduler Service |
|
|
387 | (2) |
|
|
389 | (1) |
|
Scheduling Jobs When Starting Up |
|
|
390 | (1) |
|
|
391 | (2) |
|
Improving Scalability with Multilayered Caching |
|
|
393 | (8) |
|
|
394 | (2) |
|
Integrating a Cache Provider through Seam |
|
|
396 | (2) |
|
Simplified Caching with Seam |
|
|
398 | (3) |
|
|
401 | (8) |
|
|
402 | (3) |
|
|
405 | (1) |
|
|
406 | (3) |
|
Introduction to Web Beans |
|
|
409 | (16) |
|
Defining a Web Beans Component |
|
|
410 | (1) |
|
|
411 | (3) |
|
|
414 | (2) |
|
|
416 | (3) |
|
|
419 | (2) |
|
Implementing Cross-Cutting Behavior |
|
|
421 | (2) |
|
|
423 | (2) |
|
Appendix A Installing and Deploying JBoss AS |
|
|
425 | (2) |
|
|
425 | (1) |
|
|
426 | (1) |
|
A.3 Deploying and Running Applications |
|
|
426 | (1) |
|
Appendix B Using Example Applications as Templates |
|
|
427 | (14) |
|
B.1 Simple EJB3-Based Web Application |
|
|
428 | (5) |
|
B.2 POJO-Based Web Applications |
|
|
433 | (5) |
|
B.3 More Complex Applications |
|
|
438 | (3) |
|
|
441 | (10) |
|
Appendix D Direct Access to the Hibernate API |
|
|
451 | (4) |
|
D.1 Using the Hibernate API |
|
|
451 | (2) |
|
|
453 | (2) |
Index |
|
455 | |