About This Book |
|
xv | |
About the Authors |
|
xvi | |
Acknowledgments |
|
xvii | |
|
|
1 | (74) |
|
|
3 | (8) |
|
Integrate and Enhance Java EE Frameworks |
|
|
3 | (2) |
|
A Web Frameworks That Understands ORM |
|
|
5 | (1) |
|
Designed for Stateful Web Applications |
|
|
5 | (2) |
|
|
7 | (1) |
|
POJO Services via Dependency Bijection |
|
|
7 | (1) |
|
Configuration by Exception |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (20) |
|
|
13 | (1) |
|
Map the Data Model to a Web Form |
|
|
14 | (1) |
|
|
15 | (2) |
|
More on the Seam Programming Model |
|
|
17 | (6) |
|
|
17 | (2) |
|
|
19 | (1) |
|
|
20 | (1) |
|
Getter/Setter-Based Bijection |
|
|
20 | (1) |
|
Avoid Excessive Bijection |
|
|
21 | (1) |
|
|
22 | (1) |
|
Access Database via the Entity Manager |
|
|
23 | (1) |
|
Configuration and Packaging |
|
|
23 | (7) |
|
|
26 | (2) |
|
|
28 | (2) |
|
|
30 | (1) |
|
Recommended JSF Enhancements |
|
|
31 | (24) |
|
An Introduction to Facelets |
|
|
32 | (8) |
|
|
32 | (2) |
|
|
34 | (1) |
|
Use Facelets as a Template Engine |
|
|
35 | (4) |
|
|
39 | (1) |
|
|
40 | (4) |
|
|
40 | (2) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
|
Add Facelets and Seam UI Support |
|
|
44 | (3) |
|
PDF, Email, and Rich Text |
|
|
47 | (8) |
|
|
48 | (2) |
|
|
50 | (3) |
|
|
53 | (2) |
|
Rapid Application Development Tools |
|
|
55 | (20) |
|
|
55 | (1) |
|
|
56 | (9) |
|
|
56 | (4) |
|
Generate a Skeleton Application |
|
|
60 | (1) |
|
|
61 | (2) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
65 | (6) |
|
|
65 | (4) |
|
|
69 | (2) |
|
Generate Crud Application from Database |
|
|
71 | (4) |
|
II. Stateful Applications Made Easy |
|
|
75 | (60) |
|
An Introduction to Stateful Framework |
|
|
77 | (10) |
|
|
77 | (3) |
|
|
80 | (1) |
|
Better Browser Navigation Support |
|
|
81 | (1) |
|
|
82 | (1) |
|
High Granularity Component Lifecycle |
|
|
83 | (1) |
|
|
84 | (3) |
|
A Simple Stateful Application |
|
|
87 | (12) |
|
|
88 | (7) |
|
|
91 | (1) |
|
|
91 | (2) |
|
Stateful Component Lifecycle |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
95 | (4) |
|
|
99 | (18) |
|
The Default Conversation Scope |
|
|
100 | (3) |
|
|
102 | (1) |
|
Long Running Conversations |
|
|
103 | (13) |
|
Define a Long-Running Conversational Component |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
109 | (2) |
|
|
111 | (3) |
|
|
114 | (2) |
|
|
116 | (1) |
|
Workspaces and Concurrent Conversations |
|
|
117 | (10) |
|
|
117 | (3) |
|
|
120 | (3) |
|
Carry a Conversation Across Workspaces |
|
|
123 | (1) |
|
Managing the Conversation ID |
|
|
124 | (3) |
|
|
127 | (8) |
|
|
128 | (2) |
|
Forcing a Transaction Rollback |
|
|
130 | (2) |
|
Rolling Back Transactions via Checked Exceptions |
|
|
130 | (1) |
|
Rolling Back Transactions via Return Values |
|
|
131 | (1) |
|
Atomic Conversation (Web Transaction) |
|
|
132 | (3) |
|
Manual Flush of the Persistence Context |
|
|
132 | (1) |
|
One Transaction per Conversation |
|
|
133 | (2) |
|
III. Integrating Web and Data Components |
|
|
135 | (60) |
|
|
137 | (12) |
|
|
137 | (2) |
|
Validation Annotations on the Entity Bean |
|
|
139 | (3) |
|
Triggering the Validation Action |
|
|
142 | (3) |
|
Display Error Messages on the Web Form |
|
|
145 | (2) |
|
Use JSF Custom Validators |
|
|
147 | (2) |
|
|
149 | (8) |
|
Implement a Clickable Data Table |
|
|
150 | (4) |
|
|
150 | (2) |
|
Inject Selected Object into Event Handler |
|
|
152 | (1) |
|
Use Extended EL in Data Table |
|
|
153 | (1) |
|
Seam Data-Binding Framework |
|
|
154 | (3) |
|
|
157 | (12) |
|
|
158 | (4) |
|
The Java-Centric Approach |
|
|
162 | (7) |
|
Obtaining Query Parameters in an HTTP GET Request |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
164 | (1) |
|
|
165 | (1) |
|
Further Processing from the Bookmarked Page |
|
|
166 | (3) |
|
The Seam CRUD Application Framework |
|
|
169 | (14) |
|
Data Access Objects (DAOs) |
|
|
169 | (1) |
|
|
170 | (1) |
|
The Declarative Seam DAO Component |
|
|
171 | (5) |
|
Use Simpler Names for the Entity Object |
|
|
173 | (1) |
|
Retrieving and Displaying an Entity Object |
|
|
174 | (1) |
|
Initializing a New Entity Instance |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (7) |
|
|
177 | (2) |
|
Displaying Multipage Query Results |
|
|
179 | (4) |
|
|
183 | (12) |
|
Why Not Standard Servlet Error Pages? |
|
|
184 | (1) |
|
Set Up the Exception Filter |
|
|
185 | (1) |
|
|
186 | (2) |
|
Use pages.xml for System Exceptions |
|
|
188 | (2) |
|
|
190 | (5) |
|
|
190 | (2) |
|
|
192 | (3) |
|
|
195 | (48) |
|
Custom and AJAX UI Components |
|
|
197 | (14) |
|
Partial Form Submission Example |
|
|
199 | (3) |
|
Auto-complete Text Input Example |
|
|
202 | (3) |
|
|
205 | (3) |
|
Other JSF Component Libraries |
|
|
208 | (3) |
|
Enabling AJAX for Existing Components |
|
|
211 | (14) |
|
|
212 | (2) |
|
|
214 | (3) |
|
|
217 | (2) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (2) |
|
|
223 | (2) |
|
Direct JavaScript Integration |
|
|
225 | (18) |
|
AJAX Name Validation Example (Reloaded) |
|
|
225 | (7) |
|
|
226 | (2) |
|
Triggering a JavaScript Event on the Web Page |
|
|
228 | (1) |
|
|
229 | (3) |
|
|
232 | (4) |
|
|
232 | (2) |
|
Accessing Seam Components from JavaScript |
|
|
234 | (2) |
|
Integrating the Dojo Toolkit |
|
|
236 | (7) |
|
|
236 | (2) |
|
|
238 | (5) |
|
V. Business Processes and Rules |
|
|
243 | (46) |
|
Managing Business Processes |
|
|
245 | (22) |
|
jBPM Basics and Vocabulary |
|
|
246 | (3) |
|
Application Users and jBPM Actors |
|
|
249 | (2) |
|
Creating a Business Process |
|
|
251 | (6) |
|
|
252 | (2) |
|
Creating a Business Process Instance |
|
|
254 | (1) |
|
Binding Data Objects in Process Scope |
|
|
255 | (2) |
|
|
257 | (6) |
|
Implementing Business Logic for Tasks |
|
|
257 | (2) |
|
Specifying a Task to Work On |
|
|
259 | (1) |
|
Selecting a Task in the UI |
|
|
260 | (1) |
|
The pooledTaskInstanceList Component |
|
|
261 | (1) |
|
|
261 | (1) |
|
The taskInstanceList Component |
|
|
262 | (1) |
|
The taskInstanceListBy Type Component |
|
|
262 | (1) |
|
jBPM Libraries and Configuration |
|
|
263 | (4) |
|
|
267 | (10) |
|
Stateful Navigation Rules in pages.xml |
|
|
267 | (3) |
|
Associating a Business Process with a Web Page |
|
|
270 | (4) |
|
Pageflow and Stateful Conversation |
|
|
274 | (1) |
|
|
275 | (2) |
|
Rule-Based Security Framework |
|
|
277 | (12) |
|
Authentication and User Roles |
|
|
277 | (3) |
|
Declarative Access Control |
|
|
280 | (3) |
|
|
280 | (1) |
|
|
281 | (1) |
|
Method-Level Access Control |
|
|
282 | (1) |
|
Rule-Based Access Control |
|
|
283 | (6) |
|
|
283 | (3) |
|
Per Instance Access Rules |
|
|
286 | (1) |
|
|
287 | (2) |
|
VI. Testing Seam Applications |
|
|
289 | (22) |
|
|
291 | (12) |
|
A Simple TestNG Test Case |
|
|
293 | (2) |
|
Simulating Dependency Bijection |
|
|
295 | (2) |
|
Mocking the Database and Transaction |
|
|
297 | (2) |
|
Loading the Test Infrastructure |
|
|
299 | (4) |
|
|
303 | (8) |
|
|
304 | (3) |
|
Simulating JSF Interactions |
|
|
304 | (2) |
|
|
306 | (1) |
|
Accessing Seam Components Without the EL |
|
|
307 | (4) |
|
Obtaining a Seam Component |
|
|
307 | (1) |
|
Binding Values to the Component |
|
|
308 | (1) |
|
Invoking UI Event Handler Method |
|
|
308 | (1) |
|
|
309 | (2) |
|
VII. Production Deployment |
|
|
311 | (54) |
|
|
313 | (6) |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
315 | (4) |
|
|
319 | (14) |
|
|
320 | (7) |
|
|
320 | (2) |
|
|
322 | (3) |
|
|
325 | (2) |
|
Using Hibernate POJOs and API |
|
|
327 | (6) |
|
|
328 | (1) |
|
|
329 | (4) |
|
|
333 | (12) |
|
Packaging a POJO Application for Tomcat |
|
|
335 | (4) |
|
|
335 | (2) |
|
Configuring the Transactional DataSource |
|
|
337 | (2) |
|
Bootstrapping the JBoss MicroContainer |
|
|
339 | (1) |
|
Packaging an EJB3 Application for Tomcat |
|
|
339 | (6) |
|
Bundling Necessary JARs in the War File |
|
|
340 | (1) |
|
Bundling Embeddable EJB3 Configuration Files |
|
|
341 | (1) |
|
Bootstrapping the JBoss MicroContainer |
|
|
342 | (1) |
|
Using an Alternative Data Source |
|
|
343 | (2) |
|
Using a Production Database |
|
|
345 | (6) |
|
Installing and Setting Up the Database |
|
|
345 | (2) |
|
Installing Database Driver |
|
|
347 | (1) |
|
|
347 | (1) |
|
Configuring the Persistence Engine |
|
|
348 | (3) |
|
Performance Tuning and Clustering |
|
|
351 | (14) |
|
Tuning Performance on a Single Server |
|
|
352 | (9) |
|
|
352 | (1) |
|
|
353 | (1) |
|
|
354 | (1) |
|
Tuning the HTTP Thread Pool |
|
|
355 | (1) |
|
Choosing between Client- and Server-Side State Saving |
|
|
356 | (1) |
|
Using a Production Data Source |
|
|
357 | (1) |
|
Using a Second-Level Database Cache |
|
|
358 | (2) |
|
Using Database Transactions Carefully |
|
|
360 | (1) |
|
Clustering for Scalability and Failover |
|
|
361 | (4) |
|
Sticky Session Load Balancing |
|
|
362 | (1) |
|
|
363 | (1) |
|
|
363 | (2) |
|
Installing and Deploying JBoss AS |
|
|
365 | (6) |
|
|
365 | (1) |
|
|
366 | (3) |
|
Deploying and Running Applications |
|
|
369 | (2) |
|
Using Example Applications as Templates |
|
|
371 | (16) |
|
Simple EJB3-Based Web Applications |
|
|
371 | (7) |
|
Pojo-Based Web Applications |
|
|
378 | (5) |
|
|
383 | (2) |
|
More Complex Applications |
|
|
385 | (2) |
Index |
|
387 | |