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"

Author(s): Stark S.
Edition: 3
Year: 2003

Language: English
Pages: 674

JBoss Administration and Development Third Edition (3.2.x Series)......Page 1
Contents......Page 3
List of Listings......Page 15
List of Figures......Page 21
Forward......Page 25
About the Authors......Page 26
About Open Source......Page 27
JBoss: A Full J2EE Implementation with JMX......Page 28
What this Book Covers......Page 29
CHAPTER 1 Installing and Building the JBoss Server......Page 31
Installing the Binary Package......Page 32
Directory Structure......Page 33
conf/jboss-service.xml......Page 35
conf/standardjbosscmp-jdbc.xml......Page 36
deploy/jmx-invoker-adaptor-server.sar......Page 37
deploy/jboss-local-jdbc.rar......Page 38
deploy/mail-service.xml......Page 39
deploy/user-service.xml......Page 40
Basic Installation Testing......Page 41
Booting from a Network Server......Page 43
Understanding CVS......Page 47
Obtaining a CVS Client......Page 48
Building the JBoss-3.2.1 Distribution Using the CVS Source Code......Page 49
Building the JBoss-3.2.1/Tomcat-4.1.24 Integrated Bundle......Page 50
An Overview of the JBoss CVS Source Tree......Page 51
Using the JBossTest unit testsuite......Page 52
CHAPTER 2 The JBoss JMX Microkernel......Page 57
An Introduction to JMX......Page 58
Agent Level......Page 60
JMX Component Overview......Page 61
Notification Model......Page 62
MBean Server......Page 63
Agent Services......Page 64
Class Loading and Types in Java......Page 65
ClassCastExceptions - I’m Not Your Type......Page 66
IllegalAccessException - Doing what you should not......Page 71
LinkageErrors - Making Sure You Are Who You Say You Are......Page 74
Debugging Class Loading Issues......Page 80
Inside the JBoss Class Loading Architecture......Page 82
Viewing Classes in the Loader Repository......Page 83
The Complete Class Loading Model......Page 86
JBoss XMBeans......Page 89
Descriptors......Page 90
The Constructors......Page 93
The Attributes......Page 94
The Operations......Page 96
Notifications......Page 97
Inspecting the Server - the JMX Console Web Application......Page 99
Securing the JMX Console......Page 102
Connecting to JMX Using RMI......Page 104
Command Line Access to JMX......Page 111
Sample twiddle Command Usage......Page 112
Connecting to JMX Using Any Protocol......Page 116
The Startup Process......Page 117
The SARDeployer MBean......Page 119
The Service Life Cycle Interface......Page 123
The ServiceController MBean......Page 124
The create(ObjectName) method......Page 125
Specifying Service Dependencies......Page 126
Hot Deployment of Components, the URLDeploymentScanner......Page 128
Writing JBoss MBean Services......Page 130
A Standard MBean Example......Page 131
XMBean Examples......Page 135
Version 1, the Annotated JNDIMap XMBean......Page 136
Deployment Ordering and Dependencies......Page 159
The JBoss Deployer Architecture......Page 181
Deployers and ClassLoaders......Page 184
Remote Access to Services, Detached Invokers......Page 186
A Detached Invoker Example, the MBeanServer Invoker Service......Page 191
The JRMPInvoker - RMI/JRMP Transport......Page 198
The HttpInvoker - RMI/HTTP Transport......Page 199
The HA HttpInvoker - Clustered RMI/HTTP Transport......Page 200
Steps to Expose Any RMI Interface via HTTP......Page 201
CHAPTER 3 Naming on JBoss - The JNDI Naming Service......Page 205
Names......Page 206
Contexts......Page 207
Obtaining a Context using InitialContext......Page 208
J2EE and JNDI - The Application Component Environment......Page 209
ENC Usage Conventions......Page 210
The ejb-jar.xml ENC Elements......Page 211
The web.xml ENC Elements......Page 212
The jboss.xml ENC Elements......Page 213
The jboss-web.xml ENC Elements......Page 214
Environment Entries......Page 215
EJB References......Page 217
EJB References with jboss.xml and jboss-web.xml......Page 219
EJB Local References......Page 220
Resource Manager Connection Factory References......Page 222
Resource Manager Connection Factory References with jboss.xml and jboss-web.xml......Page 224
Resource Environment References......Page 225
The JBossNS Architecture......Page 227
The Naming InitialContext Factories......Page 230
The HTTP InitialContext Factory Implementation......Page 232
The Login InitialContext Factory Implementation......Page 233
Accessing JNDI over HTTP......Page 234
Accessing JNDI over HTTPS......Page 238
Securing Access to JNDI over HTTP......Page 241
Securing Access to JNDI with a Read-Only Unsecured Context......Page 243
org.jboss.naming.ExternalContext MBean......Page 245
The org.jboss.naming.JNDIView MBean......Page 248
Transaction/JTA Overview......Page 253
Pessimistic and optimistic locking......Page 254
The components of a distributed transaction......Page 255
Heuristic exceptions......Page 256
Transaction IDs and branches......Page 257
Adapting a Transaction Manager to JBoss......Page 258
org.jboss.tm.XidFactory......Page 259
UserTransaction Support......Page 260
The EJB Client Side View......Page 261
Specifying the EJB Proxy Configuration......Page 266
The EJB Server Side View......Page 270
Detached Invokers - The Transport Middlemen......Page 271
The HA HttpInvoker - Clustered RMI/HTTP Transport......Page 276
The EJB Container......Page 277
EJBDeployer MBean......Page 278
Deploying EJBs Into Containers......Page 279
Container configuration information......Page 280
The instance-pool and container-pool-conf Elements......Page 285
The instance-cache and container-cache-conf Elements......Page 287
The locking-policy Element......Page 289
The commit-option and optiond-refresh-rate Element......Page 290
cluster-config......Page 291
Container Plug-in Framework......Page 292
org.jboss.ejb.ContainerPlugin......Page 293
org.jboss.ejb.Interceptor......Page 294
org.jboss.ejb.InstancePool......Page 295
org.jboss.ebj.InstanceCache......Page 296
org.jboss.ejb.EntityPersistenceManager......Page 298
org.jboss.ejb.StatefulSessionPersistenceManager......Page 304
Entity Bean Lifecycle......Page 306
Transaction Lock......Page 307
Pluggable Interceptors and Locking Policy......Page 308
Dedlock Detection......Page 309
Viewing Lock Information......Page 311
Ordered Access......Page 312
Explicitly Defining Read-Only Methods......Page 313
Instance Per Transaction Policy......Page 314
Running Within a Cluster......Page 316
Hangs and Transaction Timeouts......Page 317
CHAPTER 6 Messaging on JBoss - JMS Configuration and Architecture......Page 319
A Point-To-Point Example......Page 320
A Pub-Sub Example......Page 323
A Pub-Sub With Durable Topic Example......Page 331
A Point-To-Point With MDB Example......Page 334
OIL IL......Page 344
HTTP IL......Page 345
Persistence Manager......Page 346
Queues......Page 347
JBoss Messaging Configuration and MBeans......Page 348
org.jboss.mq.il.rmi.RMIServerILService......Page 349
org.jboss.mq.il.oil.OILServerILService......Page 350
org.jboss.mq.il.uil2.UILServerILService......Page 351
org.jboss.mq.server.jmx.Invoker......Page 353
org.jboss.mq.security.SecurityManager......Page 354
org.jboss.mq.server.MessageCache......Page 355
org.jboss.mq.pm.rollinglogged.PersistenceManager......Page 356
org.jboss.mq.pm.jdbc2.PersistenceManager......Page 357
org.jboss.mq.server.jmx.Queue......Page 359
Destination Security Configuration......Page 360
Creating Topics At Runtime......Page 361
Checking to see how the Message Cache is performing......Page 362
JCA Overview......Page 365
An Overview of the JBossCX Architecture......Page 370
BaseConnectionManager2 MBean......Page 372
RARDeployment MBean......Page 373
JBossManagedConnectionPool MBean......Page 374
A Sample Skeleton JCA Resource Adaptor......Page 375
Configuring JDBC DataSources......Page 385
Configuring Generic JCA Adaptors......Page 392
Sample Configurations......Page 396
J2EE Declarative Security Overview......Page 399
Security References......Page 403
Security Identity......Page 404
Security roles......Page 405
EJB method permissions......Page 406
Web Content Security Constraints......Page 409
What is JAAS?......Page 411
Subject and Principal......Page 412
Authentication of a Subject......Page 413
The JBoss Security Model......Page 417
Enabling Declarative Security in JBoss Revisited......Page 420
The JBoss Security Extension Architecture......Page 426
How the JaasSecurityManager Uses JAAS......Page 428
The JaasSecurityManagerService MBean......Page 431
An Extension to JaasSecurityManager, the JaasSecurityDomain MBean......Page 434
An XML JAAS Login Configuration MBean......Page 435
The JAAS Login Configuration Management MBean......Page 437
org.jboss.security.auth.spi.IdentityLoginModule......Page 438
org.jboss.security.auth.spi.UsersRolesLoginModule......Page 439
org.jboss.security.auth.spi.LdapLoginModule......Page 442
org.jboss.security.auth.spi.DatabaseServerLoginModule......Page 446
org.jboss.security.auth.spi.ProxyLoginModule......Page 448
org.jboss.security.auth.spi.RunAsLoginModule......Page 449
org.jboss.security.ClientLoginModule......Page 450
Writing Custom Login Modules......Page 451
Support for the Subject Usage Pattern......Page 452
A Custom LoginModule Example......Page 457
The Secure Remote Password (SRP) Protocol......Page 462
Providing Password Information for SRP......Page 467
Inside of the SRP algorithm......Page 469
An SRP example......Page 473
Running JBoss with a Java 2 security manager......Page 476
Using SSL with JBoss using JSSE......Page 480
The AbstractWebContainer Class......Page 489
The AbstractWebContainer Contract......Page 491
Use the Thread Context Class Loader......Page 496
Delegate web container authentication and authorization to JBossSX......Page 497
JBoss/Tomcat-4.1.x bundle notes......Page 498
The HTTP Connector......Page 501
The Coyote Connector......Page 503
Engine......Page 504
Manager......Page 505
Listener......Page 506
Using SSL with the JBoss/Tomcat bundle......Page 507
Setting up Virtual Hosts with the JBoss/Tomcat-4.x bundle......Page 513
Using Apache with the JBoss/Tomcat-4.x bundle......Page 516
Using Clustering......Page 517
Deployment......Page 518
Configuration......Page 519
Classloading behaviour......Page 524
Changing other HTTP listener port attributes......Page 525
Using SSL......Page 526
Using Distributed HttpSessions......Page 527
Using virtual hosts......Page 528
Running with Apache front-ending Jetty......Page 529
System Properties Management......Page 531
Property Editor Management......Page 532
Services Binding Management......Page 533
Running Two JBoss Instances......Page 536
Scheduling Tasks......Page 550
org.jboss.varia.scheduler.Scheduler......Page 551
The JBoss Logging Framework......Page 555
org.jboss.web.WebService......Page 556
Getting Started......Page 559
Example Code......Page 560
Tests......Page 565
Read-ahead......Page 567
The jbosscmp-jdbc Structure......Page 568
Entity Beans......Page 570
Entity Mapping......Page 573
CMP-Field Declaration......Page 578
CMP-Field Column Mapping......Page 579
Read-only Fields......Page 581
Auditng Entity Access......Page 582
Dependent Value Classes (DVCs)......Page 583
CMR-Field Abstract Accessors......Page 588
Relationship Declaration......Page 589
Relationship Mapping......Page 591
Relationship Role Mapping......Page 593
Foreign Key Mapping......Page 596
Relation-table Mapping......Page 597
Finder and ejbSelect Declaration......Page 599
EJB-QL Declaration......Page 600
Overriding the EJB-QL to SQL Mapping......Page 602
JBossQL......Page 603
DynamicQL......Page 604
DeclaredSQL......Page 606
Parameters......Page 610
BMP Custom Finders......Page 611
Loading Scenario......Page 612
Load Groups......Page 614
on-find......Page 615
on-load......Page 617
none......Page 619
Commit Options......Page 620
Eager-loading Process......Page 621
Lazy-loading Process......Page 623
Relationships......Page 624
Transactions......Page 627
Optimistic Locking......Page 631
Entity Commands and Primary Key Generation......Page 637
Existing Entity Commands......Page 638
Defaults......Page 641
Datasource Customization......Page 645
Type Mapping......Page 648
The GNU Lesser General Public License (LGPL)......Page 651
Appendix B The JBoss DTDs......Page 665
Appendix C Book Example Installation......Page 667
Index......Page 669