preface |
|
xvii | |
acknowledgments |
|
xx | |
about this book |
|
xxii | |
about the cover illustration |
|
xxix | |
PART 1 THE JBOSS APPLICATION SERVER |
|
1 | |
|
|
3 | |
|
|
4 | |
|
|
4 | |
|
Exploring the JEMS lineup |
|
|
6 | |
|
Why is JBoss AS so popular? |
|
|
7 | |
|
1.2 Installing JBoss Application Server |
|
|
9 | |
|
Preparing for the installation |
|
|
10 | |
|
Installing from the binary distribution |
|
|
11 | |
|
|
11 | |
|
1.3 Exploring the installation |
|
|
13 | |
|
|
13 | |
|
|
14 | |
|
|
15 | |
|
|
15 | |
|
|
15 | |
|
Understanding server configurations |
|
|
16 | |
|
Exploring the configuration structure |
|
|
17 | |
|
Customizing your configuration |
|
|
19 | |
|
1.4 Starting and stopping the server |
|
|
20 | |
|
|
20 | |
|
Starting an alternative configuration |
|
|
21 | |
|
Verifying that the server is running |
|
|
22 | |
|
|
23 | |
|
1.5 Deploying to the server |
|
|
23 | |
|
|
24 | |
|
Deploying the application |
|
|
25 | |
|
Undeploying the application |
|
|
26 | |
|
|
27 | |
|
|
27 | |
|
2 Managing the JBoss Application Server |
|
|
28 | |
|
2.1 Examining the JBoss Application Server architecture |
|
|
29 | |
|
Understanding the micro container |
|
|
29 | |
|
|
31 | |
|
2.2 Configuring the application server |
|
|
33 | |
|
|
34 | |
|
Configuring directory locations |
|
|
37 | |
|
Defining system properties |
|
|
39 | |
|
2.3 Exploring the management tools |
|
|
40 | |
|
|
40 | |
|
Using the twiddle utility |
|
|
42 | |
|
2.4 Examining interesting MBeans |
|
|
43 | |
|
Viewing system properties |
|
|
44 | |
|
Viewing the JNDI namespaces |
|
|
44 | |
|
Changing the logging levels |
|
|
45 | |
|
Increasing the thread pool size |
|
|
46 | |
|
Obtaining application server information |
|
|
46 | |
|
|
46 | |
|
|
46 | |
|
|
47 | |
|
3.1 Understanding deployment |
|
|
48 | |
|
|
48 | |
|
Understanding application packaging |
|
|
49 | |
|
Understanding application types |
|
|
50 | |
|
Understanding deployment ordering |
|
|
52 | |
|
Deployment configuration options |
|
|
52 | |
|
3.2 Understanding class loading |
|
|
55 | |
|
Understanding multiple class loaders |
|
|
55 | |
|
|
56 | |
|
Understanding loader repositories |
|
|
57 | |
|
3.3 Fixing common deployment errors |
|
|
58 | |
|
Class not found exception |
|
|
58 | |
|
|
59 | |
|
|
60 | |
|
|
60 | |
|
3.4 Deploying miscellaneous applications |
|
|
61 | |
|
|
61 | |
|
Deploying a Hibernate archive |
|
|
67 | |
|
|
72 | |
|
|
72 | |
|
|
73 | |
|
4.1 Understanding security |
|
|
71 | |
|
Understanding application security |
|
|
75 | |
|
Understanding authentication |
|
|
76 | |
|
Understanding authorization |
|
|
77 | |
|
|
78 | |
|
Dynamic login configuration 80 |
|
|
|
Logging security on the server |
|
|
81 | |
|
4.2 Using secure communication |
|
|
82 | |
|
Understanding symmetric and asymmetric encryption |
|
|
82 | |
|
Understanding certificates and source authentication |
|
|
84 | |
|
Creating and signing certificates |
|
|
85 | |
|
Modifying the cacerts file |
|
|
87 | |
|
Understanding certificate-based client authentication |
|
|
87 | |
|
Configuring an SSL-aware security domain |
|
|
90 | |
|
4.3 Configuring login modules |
|
|
91 | |
|
Using the file-based login module |
|
|
92 | |
|
Using the database login module |
|
|
94 | |
|
Using the LDAP login module |
|
|
95 | |
|
Using the identity login module |
|
|
102 | |
|
|
102 | |
|
Using the client certificate login module |
|
|
104 | |
|
|
105 | |
|
|
105 | |
PART 2 APPLICATION SERVICES |
|
107 | |
|
5 Configuring JBoss Web Server |
|
|
109 | |
|
5.1 Understanding web applications |
|
|
110 | |
|
Understanding the web application structure |
|
|
110 | |
|
Understanding web application configuration |
|
|
111 | |
|
5.2 Configuring JBoss Web Server |
|
|
115 | |
|
|
115 | |
|
Exploring JBoss Web Server Configuration |
|
|
116 | |
|
Exploring the WAR deployer configuration file |
|
|
119 | |
|
5.3 Configuring URL paths |
|
|
120 | |
|
|
121 | |
|
Configuring context paths |
|
|
123 | |
|
Changing the root context path |
|
|
125 | |
|
5.4 Configuring connectors |
|
|
126 | |
|
Understanding connector configuration |
|
|
128 | |
|
|
129 | |
|
|
129 | |
|
Configuring a proxy hostname and port |
|
|
129 | |
|
5.5 Configuring web class loading |
|
|
129 | |
|
|
130 | |
|
5.7 Configuring JavaServer Faces |
|
|
132 | |
|
|
133 | |
|
|
134 | |
|
6 Securing web applications |
|
|
135 | |
|
6.1 Configuring web security |
|
|
136 | |
|
Configuring security in web.xml |
|
|
137 | |
|
Configuring security in jbossweb.xml |
|
|
139 | |
|
Configuring security in server.xml |
|
|
139 | |
|
|
140 | |
|
Understanding the web authentication strategies |
|
|
141 | |
|
|
142 | |
|
Form-based authentication |
|
|
144 | |
|
|
145 | |
|
|
146 | |
|
Configuring authorization |
|
|
146 | |
|
Allowing access to any authenticated user |
|
|
147 | |
|
6.4 Encrypting web communication |
|
|
148 | |
|
|
148 | |
|
Enabling transport guarantees |
|
|
150 | |
|
Enabling mutual authentication |
|
|
152 | |
|
Creating browser certificates |
|
|
153 | |
|
6.5 Enabling client-certificate authentication |
|
|
154 | |
|
Enabling protocol-level mutual authentication |
|
|
155 | |
|
Setting the authentication method |
|
|
155 | |
|
Specifying the JaasSecurityDomain MBean |
|
|
155 | |
|
Specifying the security domain |
|
|
156 | |
|
Pointing to the security domain from the application |
|
|
156 | |
|
Selecting a strategy for forming the principal from the certificate |
|
|
157 | |
|
Adding principals and roles to the authorization datastore |
|
|
157 | |
|
Adding the client's certificate to the server's truststore |
|
|
158 | |
|
Creating a browser certificate |
|
|
158 | |
|
6.6 Changing the default security domain |
|
|
159 | |
|
|
159 | |
|
|
160 | |
|
7 Configuring enterprise applications |
|
|
161 | |
|
|
162 | |
|
Understanding session beans |
|
|
164 | |
|
Understanding Hibernate and JPA |
|
|
165 | |
|
Understanding enterprise packaging |
|
|
166 | |
|
7.2 Creating an EJB application |
|
|
167 | |
|
Coding the example application |
|
|
168 | |
|
Packaging and panning the example application |
|
|
171 | |
|
7.3 Understanding EJB configuration |
|
|
172 | |
|
Where does everything go? |
|
|
172 | |
|
Configuring EJB applications |
|
|
173 | |
|
Configuring the EJB server |
|
|
176 | |
|
7.4 Configuring session beans |
|
|
177 | |
|
Changing the JNDI binding |
|
|
177 | |
|
Looking up a session bean |
|
|
179 | |
|
Configuring EJB containers |
|
|
179 | |
|
7.5 Configuring entity persistence |
|
|
182 | |
|
Injecting Hibernate objects |
|
|
182 | |
|
Deploying Hibernate mappings |
|
|
183 | |
|
7.6 Creating JMX service objects |
|
|
184 | |
|
Creating a service object |
|
|
184 | |
|
Running the sample application |
|
|
186 | |
|
Accessing MBeans without injection |
|
|
187 | |
|
7.7 Configuring the transport protocol |
|
|
188 | |
|
Understanding transport configuration |
|
|
188 | |
|
|
190 | |
|
|
191 | |
|
Securing EJBs via annotations |
|
|
192 | |
|
SecuringEJBs via configuration |
|
|
194 | |
|
|
195 | |
|
Securing EJB communication |
|
|
197 | |
|
|
199 | |
|
|
200 | |
|
|
201 | |
|
8.1 Understanding messaging systems |
|
|
202 | |
|
Understanding messaging system architectures |
|
|
202 | |
|
Understanding the messaging models |
|
|
203 | |
|
Understanding the JMS API |
|
|
204 | |
|
Understanding the JBoss Messaging architecture |
|
|
206 | |
|
8.2 Developing a JMS application |
|
|
207 | |
|
Coding the example application |
|
|
207 | |
|
Packaging and running the example application |
|
|
213 | |
|
8.3 Using message-driven beans |
|
|
214 | |
|
|
215 | |
|
|
217 | |
|
Using a descriptor file with an MDB |
|
|
218 | |
|
8.4 Using message-driven POJOs |
|
|
219 | |
|
Implementing a message-driven POJO consumer |
|
|
219 | |
|
Implementing a message-driven POJO producer |
|
|
221 | |
|
Packaging a message-driven POJO |
|
|
222 | |
|
8.5 Configuring JBoss Messaging |
|
|
222 | |
|
Configuring a data source |
|
|
223 | |
|
Configuring access control |
|
|
224 | |
|
|
227 | |
|
|
228 | |
|
Running the modified example |
|
|
229 | |
|
|
230 | |
|
Configuring secure message transport |
|
|
230 | |
|
|
233 | |
|
|
234 | |
|
9 Configuring Web Services |
|
|
235 | |
|
9.1 Understanding Web Services |
|
|
236 | |
|
Understanding web service terminology |
|
|
237 | |
|
Understanding SOAP binding styles |
|
|
237 | |
|
9.2 Developing a web service |
|
|
238 | |
|
|
238 | |
|
Packaging the web service |
|
|
239 | |
|
Manually generating the WSDL |
|
|
240 | |
|
Developing a web service using the top-down strategy |
|
|
241 | |
|
|
242 | |
|
|
244 | |
|
Revisiting the SOAP binding styles |
|
|
245 | |
|
9.3 Exploring JBossWS annotations |
|
|
246 | |
|
Understanding the WebContext annotation |
|
|
246 | |
|
Understanding the EndpointConfig annotation |
|
|
248 | |
|
9.4 Securing a web service |
|
|
249 | |
|
Authorizing web service access |
|
|
249 | |
|
Defining the security realm |
|
|
250 | |
|
9.5 Encrypting SOAP messages |
|
|
252 | |
|
Generating the certificate |
|
|
253 | |
|
Securing the server using WS-Security |
|
|
254 | |
|
Securing the client using WS-Security |
|
|
256 | |
|
Signing the messages using WS-Security |
|
|
258 | |
|
|
260 | |
|
|
260 | |
|
10 The JBoss Portal and portlets |
|
|
263 | |
|
10.1 Introducing the JBoss Portal |
|
|
264 | |
|
|
265 | |
|
Understanding portal terminology |
|
|
265 | |
|
Installing the JBoss Portal |
|
|
266 | |
|
Administering the JBoss Portal |
|
|
268 | |
|
|
270 | |
|
|
270 | |
|
Coding the JSP-related source files |
|
|
275 | |
|
Understanding the portlet descriptors |
|
|
279 | |
|
Building and deploying the portlet |
|
|
282 | |
|
10.3 Creating a portlet instance |
|
|
283 | |
|
Creating an instance using the portlet instance.xml file |
|
|
283 | |
|
Creating an instance using the Admin portlet |
|
|
284 | |
|
10.4 Declaring a portlet window |
|
|
284 | |
|
Declaring a portlet window using the * object.xml file |
|
|
284 | |
|
Declaring a portlet window using the Admin punk |
|
|
285 | |
|
|
288 | |
|
|
288 | |
|
11 Configuring the JBoss Portal |
|
|
289 | |
|
11.1 Configuring window appearance |
|
|
290 | |
|
Configuring window appearance using *-object.xml |
|
|
291 | |
|
11.2 Working with multiple windows and instances |
|
|
292 | |
|
Configuring multiple instances and windows using the descriptor files |
|
|
293 | |
|
11.3 Working with the CMS portlet |
|
|
295 | |
|
Gathering example CMS data |
|
|
296 | |
|
Displaying the new content |
|
|
297 | |
|
|
298 | |
|
|
299 | |
|
|
299 | |
|
|
300 | |
|
Understanding access control |
|
|
301 | |
|
11.5 Developing a custom portal |
|
|
308 | |
|
Defining the requirements |
|
|
308 | |
|
|
308 | |
|
|
309 | |
|
|
312 | |
|
|
315 | |
|
|
316 | |
|
|
318 | |
|
12 Understanding clustering |
|
|
321 | |
|
12.1 Understanding clustering |
|
|
322 | |
|
|
322 | |
|
Cluster topology and makeup |
|
|
325 | |
|
Automatic discovery and multicasting |
|
|
327 | |
|
|
328 | |
|
Replication and fault tolerance |
|
|
329 | |
|
|
332 | |
|
Distribution versus clustering |
|
|
333 | |
|
12.2 Setting up a simple cluster |
|
|
334 | |
|
Bringing up a JBoss cluster |
|
|
334 | |
|
|
336 | |
|
Deploying your application |
|
|
337 | |
|
Calling the clustered EJB |
|
|
337 | |
|
12.3 Understanding JBoss clustering |
|
|
338 | |
|
Understanding the JGroups architecture |
|
|
339 | |
|
Configuring JBoss clustering services |
|
|
340 | |
|
Configuring the protocol stack |
|
|
343 | |
|
12.4 Configuring JBoss Cache |
|
|
346 | |
|
Examining the JBoss Cache configuration files |
|
|
347 | |
|
|
350 | |
|
|
351 | |
|
|
352 | |
|
13 ClusteringJBoss AS services |
|
|
353 | |
|
|
354 | |
|
Load balancing with native web servers |
|
|
355 | |
|
Load balancing with hardware |
|
|
356 | |
|
13.2 HTTP session replication |
|
|
356 | |
|
|
356 | |
|
Understanding session usage |
|
|
357 | |
|
Using field-level replication |
|
|
359 | |
|
|
360 | |
|
13.3 Clustering session beans |
|
|
361 | |
|
Load balancing session beans |
|
|
362 | |
|
Replicating stateful session beans |
|
|
363 | |
|
|
364 | |
|
Replicating the entity cache |
|
|
364 | |
|
|
367 | |
|
Understanding the HA-JNDI service |
|
|
367 | |
|
|
369 | |
|
|
370 | |
|
Deciding whether to use HAJNDI |
|
|
371 | |
|
|
372 | |
|
|
373 | |
|
14 Tuning the JBoss Application Server |
|
|
374 | |
|
14.1 Defining performance |
|
|
375 | |
|
14.2 Performance tuning methodology |
|
|
376 | |
|
Holistic performance tuning |
|
|
376 | |
|
Performance analysis test cycle |
|
|
377 | |
|
14.3 Tuning the hardware and network |
|
|
379 | |
|
Setting network card Aimed |
|
|
380 | |
|
Choosing the number of CPUs |
|
|
381 | |
|
Choosing 32-bit or 64-bit |
|
|
381 | |
|
|
382 | |
|
Understanding processor affinity |
|
|
382 | |
|
|
384 | |
|
Understanding the Java heap |
|
|
385 | |
|
Understanding garbage collection |
|
|
387 | |
|
Gathering garbage collection data |
|
|
389 | |
|
|
396 | |
|
Resolving out of memory exceptions |
|
|
397 | |
|
Exploring more tuning options |
|
|
397 | |
|
|
398 | |
|
|
398 | |
|
Configuring the HTTP request thread pool |
|
|
400 | |
|
|
401 | |
|
14.7 Tuning your application |
|
|
402 | |
|
|
403 | |
|
|
403 | |
|
|
406 | |
|
|
407 | |
|
|
408 | |
|
15.1 Selecting a platform |
|
|
409 | |
|
|
409 | |
|
Selecting a JBoss AS version |
|
|
410 | |
|
|
413 | |
|
15.2 Collocating multiple application server instances |
|
|
414 | |
|
|
414 | |
|
|
415 | |
|
Shutting down multiple nodes |
|
|
422 | |
|
15.3 Removing unwanted services |
|
|
422 | |
|
15.4 Securing the server applications |
|
|
423 | |
|
Removing the server applications |
|
|
424 | |
|
Adding security to the server applications |
|
|
424 | |
|
Limiting access to the local machine |
|
|
424 | |
|
15.5 Changing the default database |
|
|
425 | |
|
Configuring the EJB3 timer service |
|
|
426 | |
|
15.6 Starting the application server as a service |
|
|
427 | |
|
Registering a service in Windows |
|
|
428 | |
|
Registering multiple services |
|
|
429 | |
|
Registering a service in Linux |
|
|
432 | |
|
15.7 Configuring JSP compilation |
|
|
434 | |
|
|
435 | |
|
|
436 | |
appendix A JNDI namespaces |
|
437 | |
appendix B Change is inevitable |
|
442 | |
Index |
|
453 | |