JBoss Administration and Development

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

The Official JBoss Development and Administration Guide offers a single source for information about deploying, administering, and extending JBoss. The book provides up-close and in-depth information both about the intricacies of JBoss and the best practices of J2EE development. The reader will be able, though this book, to install JBoss and develop J2EE applications as well as extending and enhancing JBoss itself - a primary benefit of the open-source nature of the JBoss product.

Author(s): Scott Stark, Marc Fleury, The JBoss Group
Series: Kaleidoscope
Publisher: Sams
Year: 2002

Language: English
Pages: 527

Forward......Page 22
About the Authors......Page 23
Acknowledgments......Page 24
About Open Source......Page 25
The J2EE APIs......Page 26
Who Uses J2EE Technology......Page 27
JBoss: A Full J2EE Implementation with JMX......Page 28
JBossServer......Page 29
JBossMQ......Page 30
JBossCMP......Page 31
JBossCX......Page 33
What this Book Covers......Page 34
Getting the Binary......Page 35
Directory Structure......Page 36
Configuration Files......Page 37
jboss.conf......Page 39
jndi.properties......Page 40
Testing the Installation......Page 41
Understanding CVS......Page 42
Understanding the JBoss CVS Modules......Page 43
Building the JBoss-2.4.5 Distribution Using the CVS Cource Code......Page 44
Building the JBoss-2.4.5/Tomcat-4.0.3 Integrated Bundle Using the CVS Source Code......Page 50
Summary......Page 51
JMX......Page 52
An Introduction to JMX......Page 53
Instrumentation Level......Page 54
Distributed Services Level......Page 55
Managed Beans or MBeans......Page 56
Notification Model......Page 57
MBean Server......Page 58
Agent Services......Page 59
The MLet Configuration File......Page 60
JBoss and JMX......Page 62
The ConfigurationService MBean......Page 65
The Service life-cycle interface......Page 66
The start method......Page 67
Writing JBoss MBean services......Page 68
A simple custom MBean example......Page 69
The Core JBoss MBeans......Page 74
The bootstrap MBeans, jboss.conf......Page 75
org.jboss.logging.Log4jService......Page 76
org.jboss.configuration.ConfigurationService......Page 77
The standard MBean services, jboss.jcml......Page 78
org.jboss.ejb.ContainerFactory......Page 86
org.jboss.ejb.AutoDeployer......Page 87
com.sun.jdmk.comm.HtmlAdaptorServer......Page 88
org.jboss.util.Scheduler......Page 89
EJBObject and EJBHome......Page 90
Dynamic proxies......Page 91
From client to server......Page 92
ContainerInvoker – the container transport handle......Page 93
The JRMPContainerInvoker......Page 94
ContainerRemote Interface–Two Forms of Invoke Met......Page 95
Other ContainerInvoker duties......Page 96
ContainerFactory MBean......Page 97
Container configuration information......Page 99
Verifying EJB deployments......Page 102
Inside the EJB org.jboss.ejb.Container class......Page 103
org.jboss.ejb.ContainerPlugin......Page 104
org.jboss.ejb.Interceptor......Page 105
org.jboss.ejb.InstancePool......Page 106
org.jboss.ebj.InstanceCache......Page 107
org.jboss.ejb.EntityPersistenceManager......Page 108
org.jboss.ejb.StatefulSessionPersistenceManager......Page 113
Tracing the call through container......Page 114
Summary......Page 117
An Overview of JNDI......Page 118
Names......Page 119
Obtaining a Context using InitialContext......Page 120
J2EE and JNDI – The Application Component Environ......Page 121
The ejb-jar.xml ENC Elements......Page 123
The web.xml ENC Elements......Page 125
The jboss-web.xml ENC Elements......Page 128
Environment Entries......Page 129
EJB References......Page 131
EJB References with jboss.xml and jboss-web.xml......Page 133
EJB Local References......Page 134
Resource Manager Connection Factory References......Page 136
Resource Manager Connection Factory References with jboss.xml and jboss-web.xml......Page 138
Resource Environment References......Page 139
The JBossNS Architecture......Page 140
The JBossNS InitialContext Factory......Page 143
org.jboss.naming.ExternalContext MBean......Page 145
The org.jboss.naming.NamingAlias MBean......Page 147
The org.jboss.naming.JNDIView MBean......Page 148
Summary......Page 151
An Overview of JMS......Page 152
Message Destinations and Connection Factories......Page 153
The JMS provider......Page 154
The JMS API......Page 155
Connection factories and message destinations interfaces......Page 156
Messages......Page 157
A PTP Example......Page 158
Message driven beans......Page 161
An MDB example......Page 162
An Overview of the JBossMQ Architecture......Page 171
JBossMQ Application Server Facilities......Page 175
org.jboss.mq.server.JBossMQServ8ice MBean......Page 177
org.jboss.mq.server.StateManager MBean......Page 178
org.jboss.mq.pm.jdbc.PersistanceManager MBean......Page 179
org.jboss.mq.il.oil.UILServerILService MBean......Page 180
org.jboss.mq.il.rmi.RMIServerILService MBean......Page 181
org.jboss.jms.jndi.JMSProviderLoader MBean......Page 182
Summary......Page 183
Container Managed Persistence – CMP......Page 184
The JBossCMP Architecture......Page 185
A Custom file based persistence manager......Page 189
Using the FileStore......Page 197
Limitations of the FileStore......Page 204
What is O-R mapping?......Page 205
Customizing the behavior of JAWS......Page 206
Java to SQL type mapping definitions......Page 210
Entity bean to database mapping and usage options......Page 211
Customization of entity bean home interface finder methods......Page 214
Configuring JDBC......Page 215
The Default JDBC HypersonicDatabase......Page 220
Summary......Page 221
Transaction/JTA Overview......Page 222
Pessimistic and optimistic locking......Page 223
The components of a distributed transaction......Page 224
Heuristic exceptions......Page 225
Interposing......Page 226
JBoss Transaction Internals......Page 227
Adapting a Transaction Manager to JBoss......Page 228
The Tyrex Transaction Manager......Page 229
UserTransaction Support......Page 230
JCA Overview......Page 231
An Overview of the JBossCX Architecture......Page 236
ConnectionManagerFactoryLoader MBean......Page 237
ConnectionFactoryLoader MBean......Page 238
A Sample Skeleton JCA Resource Adaptor......Page 240
Summary......Page 252
J2EE declarative security overview......Page 253
Security References......Page 256
Security Identity......Page 257
Security roles......Page 258
EJB method permissions......Page 259
Web content security constraints......Page 262
Enabling Declarative Security in JBoss......Page 263
What is JAAS?......Page 264
Subject and Principal......Page 265
Authentication of a Subject......Page 266
The JBoss Security Model......Page 269
Enabling Declarative Security in JBoss Revisited......Page 272
The JBossSX security extension architecture......Page 278
How the JaasSecurityManager Uses JAAS......Page 280
The JaasSecurityManagerService MBean......Page 284
An Extension to JaasSecurityManagerService, the JaasSecurityDomain MBean......Page 286
org.jboss.security.auth.spi.IdentityLoginModule......Page 287
org.jboss.security.auth.spi.UsersRolesLoginModule......Page 288
org.jboss.security.auth.spi.LdapLoginModule......Page 290
org.jboss.security.auth.spi.DatabaseServerLoginModule......Page 294
org.jboss.security.ClientLoginModule......Page 296
Writing Custom Login Modules......Page 297
Support for the Subject Usage Pattern......Page 298
The Secure Remote Password (SRP) Protocol......Page 303
Inside of the SRP algorithm......Page 307
An SRP example......Page 311
Running JBoss with a Java 2 security manager......Page 315
Using SSL with JBoss using JSSE......Page 317
Summary......Page 324
The jboss.xml Descriptor......Page 325
The container-invoker and container-invoker-conf elements......Page 331
The container-interceptors element......Page 333
The instance-cache and container-cache-conf elements......Page 334
The transaction-manager element......Page 336
The commit-option and optiond-refresh-rate element......Page 337
Summary......Page 338
The AbstractWebContainer Class......Page 339
The AbstractWebContainer Contract......Page 340
Integrate Logging Using log4j......Page 345
Delegate web container authentication and authorization to JBossSX......Page 346
JBoss/Tomcat-4.x bundle notes......Page 347
Server......Page 348
The HTTP Connector......Page 349
The Warp Connector......Page 350
Alias......Page 351
Valve......Page 352
Using SSL with the JBoss/Tomcat bundle......Page 353
Setting up Virtual Hosts with the JBoss/Tomcat-4.x bundle......Page 357
Using Apache with the JBoss/Tomcat-4.x bundle......Page 359
JBoss/Jetty-4.0.0 Bundle Notes......Page 361
Summary......Page 362
Building and running enterprise applications with JBoss......Page 363
The MailAccount, MailHandlerMDB and NewMailService component details......Page 366
Building and assembling the mail forwarding application......Page 371
Testing the mail forwarding application......Page 381
Securing the mail forwarding application......Page 386
Building the secured mail forwarding application......Page 394
Testing the secured mail forwarding application......Page 396
Migrating the Java Pet Store 1.1.2 Application to JBoss......Page 398
Patching the JPS distribution......Page 399
Creating the jboss.xml and jboss-web.xml descriptors......Page 401
Configure the Hypersonic database......Page 404
Building and deploying the JPS EAR......Page 409
Using the JBossTest unit testsuite......Page 410
The GNU lesser general public license (LGPL) and X license......Page 415
The JBoss server jboss.xml descriptor DTD......Page 430
The JBoss server jaws.xml descriptor DTD......Page 445
The JBoss server jboss-web.xml descriptor DTD......Page 448
The JBoss server jboss.jcml configuration file DTD......Page 449
The JBoss server jbossmq-state.xml configuration file DTD......Page 451
The Book CD Contents......Page 453
Using Ant......Page 455
The org.apache.log4j.Category class......Page 461
The JBoss org.jboss.log.Logger wrapper......Page 463
Configuring log4j using org.apache.log4j.PropertyConfigurator......Page 464
Log4j usage patterns......Page 469
The Log4jService MBean revisited......Page 470
Installing and Using the Book Examples......Page 471
Building and Running An Example......Page 472
Rel_2_4_5_2......Page 474
Rel_2_4_5_11......Page 475
Rel_2_4_5_16......Page 477
Rel_2_4_5_21......Page 479
Rel_2_4_5_24......Page 480
Changes between JBoss_2_4_6 and JBoss_2_4_5......Page 481
Index......Page 482