Index

A See also EJB containers; JAAS; JCA; JMX; Log4J; Web containers AbstractPasswordCredentiaiLoginModule class, supported by ]Boss 3.2, 3 org.jboss.security, 111 append property, HTTP listener, 149 AbstractServerLoginModule class, 87 appender element, log4j.xml me AbstractWebContainer class, org.jboss.web, child elements, 203 142-143 configuring, 202-209 configuring Tomcat, 159 pre-builtappende~, 204 deploying WAR components, 218 appender-ref element methods, 143 appender element, 204 subclasses, 142 root element, 211 acceptCount attribute, Connector element, 169 appende~, Log4J, 200 ActiveThreadCount attribute, WebServer MBean, pre-built appenders, 204-209 162 AsyncAppender, 208 addAppender method, Logger class, 200 FileAppender, 205 address attribute, Connector element, 169 JDBCAppender, 209 agent-level services, JMX, 34 JMSAppender, 206 accessing using the RMI adaptor, 46 LF5Appender, 209 accessing with the HTML adaptor, 44 NTEventLogAppender, 209 MLet service, 34 SMTP Appender, 207 monitoring services, 34 SockeU\ppender, 209 relation service, 34 SyslogAppender, 209 resource management, 30, 33-34 application servers timer service, 34 classloading models, 49 AJP (Apache JServ Protocol) application-managed resource security, 110 attributes, ALP listener, 153 application-policy configuring Apache for, 154 login-config.xml file, 75 configuring liS for, 155 AsyncAppender,208 Coyote connector support, 167 attribute element, entity-commands element, 311 enabling the AJP listener, 152 auditing, entity bean access, 306 HTTP session clustering and, 190, 194 auditType element, 306 integration with Apache and liS, 152 auth.conf me, 12 load balancing, 181 authentication Tomcat integration with Apache and liS, delegation to JBoss security layer, 67 173 EJB client authentication, 85 alias element, declared-sql element, 297 security-domain element, 258 alias-header-prefrx and -suffrx elements, type• AuthenticationCacheJndiName attribute mapping element, 271 JaasSecurityManagerService MBean, 72 alias-max-length element, type-mapping element, AuthenticationManager interface, 271 org.jboss.security, 67, 71 Apache JaasSecurityManager class and, 68 configuring to run with Tomcat, 173 authorization Apache JServ Protocol. See AJP delegation to ]Boss security layer, 67 . See Tomcat security-domain element, 258 Apache , configuring for AJP, 154 APis (Application Programming Interfaces), J2EE Index

AutoDiscovery" attributes, HANamingService CacheStore MBean, 122 MBean, 187 caching auto-increment element, cmp-field element, 279 behavior, EJB configuration, 249 automatic discovery entity bean commit options, 307 configuring HA-JNDI clients for, 188 read-ahead strategies, 299, 300 availability Call element, JettySetVice MBean, 145 DNS round robin load balancers, 181 CallbackHandler interface, JAAS, 86 CallerldentityLoginModule class, org.jboss.security, 111 B call-logging element, container-configuration BackLog attribute, HANamingSetVice MBean, element, 247 187 case-sensitivity, 294 Backlog attribute, naming service, 58 CatalinaHome and CatalinaBase attributes, BaseConnectionManager2 class, EmbeddedCatalinaService41 MBean, 16o org.jboss.resources.connectionmanager, 99 Category class BEA WebLogic server, 62 replaced by Logger class, 199, 210 bean element, client-interceptors element, 243 category element, configuration element, BeanCleaningDelay attribute, log4j.xml file, 212 HASessionStateService MBean, 189 CCA (Common Client Interface), 98 bean-level configuration, 251-257 Certificates, generating for SSL, 95 entity beans, 256 Cisco CSS 11150 Content Services Switch load message-driven beans, 257 balancer, 181 session beans, 252 class attribute, appender element, 203 bean-load-balance-policy element, cluster-config class attribute, Configure element, 145 element, 251 class element, dependent-value-class element, bidirectional one-to-one relationships, 288 281 \bin directory, 6 ClassCastExceptions and E]B client views, 53 BindAddress attribute ClassCircularityError startup problem, 27 HANamingService MBean, 187 classes, naming loggers after, 200, 210 naming service, 58 classloading optimized invocation layer, 117 architecture, 49-54 BindException error startup problem, 27 classloader repository, 52 BlockingTimeoutMillis attribute, Managed ]Boss, advantages and disadvantages, 53 Connection Pool MBean, 103 Main class, 50 boot libraries, specifying, 20 parent and unified classloaders, 54 boot method, Main class, 50 scoped classloading, 54 bootstrap classes, ]VM options, 55 Serverlmpl class, 51 bootstrap ffie, run.jar, 17, 49 ServerLoader class, 50 bufferSize attribute, AJP listener, 153 UnifiedClassLoader class, 52-54 bufferSize attribute, Connector element, 169 URLClassLoader class, 51 bug affecting classloading, 318 WebClassLoader class, 53 bug affecting in ]Boss 3.0.2, 318 custom login module class and, 92 c during startup, 50 C components, Tomcat connectors, 167 Jetty configuration, 144 CacheContext attribute, ExternalContext models, application servers, 49 MBean, 62 remote class files as classloaders, 55 CachedConnectionManagerMBean, 104 Tomcat configuration, 161 configuring databases without JCA support, unified classloader repository, 317 109 web deployment descriptor and, 228 cache-invalidation and cache-invalidation• className attribute, Connector element, 168 config elements, entity element, 256 className attribute, Engine element, 166 CachePolicy interface, 72 classpath cache-policy" elements, container-cache-conf startup option to add libraries, 19 element, 250 setting, 54 CacheStore attribute, Message Cache MBean, 122 /client directory, 7

328 Index

auth.conf, client login use of, 86 concurrency, CMP entity beans, 307 client-interceptors element, proxy-factory-config concurrent. jar file, 51 element, 243 \conf directory, default configuration set, 10, 12 ClientLoginModule class, root configuration file, 40-44 org.jboss.security.auth.spi, 85 ConfidentialPort and ConfidentialScheme ClientSocketFactory attribute, naming service, 58 attributes, AJP listener, 153 cluster-config element, container-configuration ConfidentialScheme property, H1TP listener, 148 element, 251, 255 Config attribute, Tomcat custom configuration, clustered element, jboss.xml file, 189, 255 164 clustering config property, java.security.auth.login, 87 clustering requirements, 182-182 config-property element, Managed configuring clusters, 179-195 Connection Factory MBean, 101 \farm directory, default configuration set:, ConfigResource attribute 11 XMLLoginConfig MBean, 74 }Boss 3.x functionality, 183-195 configuration architecture architecture, 183 basis in JMX, 29 clustered deployment, 194 Configuration attribute configuring clusters, 184 MailService MBean, 138, 139 E}Bs in a cluster, 189 Configuration class, javax.security.auth.login, 73 HA-JNDI configuration, 186 configuration element, log4j.xml file, 202, 212 H1TP session clustering, 1~194 configuration files proxies, 184 See also deployment descriptors, SAR load balancers, 180-181 •-service.xml files overview, 179-181 location, 11, 14 typical cluster topology, 180 cluster-service.xml file, 184, 187 ClusterPartition MBean, 183 CMP configuration files, 261-265 configuring, 186 default configuration set, 12 configuring clusters, 184 EJB configuration files, 236 H1TP session clustering, 190 hsqldb-jdbc-service.xml file, 122 cluster-service.xml file, 184, 187 jbossmqdestination-service.xml file, 128, ClusterStore class, org.jboss.jetty.session, 193 130 CMP. See container-managed persistence jbossmq-service.xml file, 115-120 cmp-field element, entity element, 277 mail-service.xml file, 137, 139 child elements, 278 root configuration file, 40-44 petstore application example, 279, 281, 283 SourceForge NT Wrapper utility, 23 cmr-field element, ejb-relationship-role element, specifying, 20 286, 288 transaction-service.xml file, 104 coded references. See JNDI configuration sets column-name element container configuration sets, 237 auditType element, 306 server configuration sets, 10-15 cmp-field element, 278 specifying, 19 key-fields element, 287, 288 ConfigurationElement attribute, JettyService relationship table mapping, 291 MBean, 144, 145 property element, 282, 284 setting HTTP listener properties, 147 columns, mapping CMP fields to, 277 setting HTTP request properties, 148 renaming, 284 configuration-name elements, 240 com.sun.j3ee.blueprints.purchaseorder session element, 253 package, CreditCard class, 280 ConfigurationURL attribute, Log4jService MBean, commit options, entity beans, 307 198 Instance Per Transaction configuration, 310 Configure element, JettyService MBean, 145 commit-option element, container-configuration ConfiguredidentityLoginModule class, element, 308 org.jboss.security, 111 communication frameworks, }Boss clustering, configuring naming, 57-64 183 connection pool, JDBC components, }Boss, 1-2 managed resource example, 31 compression attribute, Connector element, 169

329 Index

ConnectionFactory]NDffief attribute, RMI query mapping, 292 invocation layer, 116 DeclaredQL, 296 connectionLinger attribute, Connector element, DynamicQL, 295 169 ]BossQL, 293 Connectio~ger~ean,99-105 setting beans as read-only, 276 CachedConnectionManager MBean, 104 table creation and removal, 274 configuring databases without JCA support, table naming, 276 107 container-managed relationships, ejbCreate container-managed resource security, 111 and ejbPostCreate methods, 247 dependencies and attributes, 104 container-managed resource security, 110-112 Managed Connection Factory MBean, 100 container-name element, container-configuration Managed Connection Pool MBean, 102 element, 239, 247 connectionTimeout attribute, Connector element, container-pool-con£ element, container• 169 configuration element, 248 Connector element context paths, WAR deployment, 232-233 attributes tabulated, 168 context-root element, web deployment setting the SSL connection factory, 172 descriptor, 232 Tomcat custom configuration, 165 core components, ]Boss, 2 connector types, Tomcat, 167 Coyote connector, Tomcat, 167 console web applications. See JMX console create method, Service interface, 36 ConsoleAppender class, org.apache.log4j, 204, create-table element 213 defaults element, 275 container-cache-con£ element, container• entity element, 274 configuration element, 249 relation-table-mapping element, 290 child elements, 250 CreditCard class, container-configuration element, jboss.xml ffie com.sun.j3ee.blueprints.purchaseorder, 280 commit-option element, 308 Crimson parser, 19 entity bean configuration, 245 Criteria attribute, Managed Connection Pool invoker-proxy-binding-name element, 241 MBean, 103, 110 optimistic locking and, 304 custom features supported, 4, 319-325 optiond-refresh-rate element, 308 custom login modules, ]Boss, 87-92 structure, 238 container-configurations element, jboss.xml ffie, 238 D container-interceptors element, container• daemons. See UNIX configuration element, 247 DailyRollingFileAppender class, container-managed persistence (CMP) org.jboss.logging.appender, 205, 213 auditing, 306 \data directory, default configuration set, 11 CMP 2.0 configuration features, 261 data type mapping datasource mapping, 267 mapping element, 272 type mappings, 268-273 databases. See datasources datasource specification, 273 DatabaseServerLoginModule class, EJB name mapping, 266 org.jboss.security.auth.spi, 80-82 entity commands, 310 options, 81 JBossCMP component, 2 DataDirectory attribute, File Persistence Manager, locking and concurrency, 307 126 mapping CMP fields DataPopulationScheduler MBean, 319, 321, to database columns, 277 323 dependent value classes, 280 datasource element, defaults element, 274 mapping relationship tables, 289 datasource element, entity element, 273 mapping relationships, 284 datasource element, relation-table-mapping optimistic locking, 303 element, 290 performance tuning, 298-303 datasource mapping optinllzedloading, 301 CMP beans, 267 read-ahead for relationships, 302 type mappings, 268-273 read-ahead strategies, 299 preconfigured vendor mappings, 265

330 Index

standardjaws.xml file, 13 dependencies datasource-mapping element, defaults/entity ConnectionManager MBean, 104 element, 267 defining for MBean services, 38, 121 datasources dependent value classes (DVC), 280 See also JDBC DVC declaration, petstore example, 282 configuring databases without JCA support, nested DVCs and column renaming, 284 107-110 dependent-value-classes element, CMP CachedConnectionManager MBean, 109 configuration files, 264, 281 dependencies and attributes, 109 depends element Managed Connection Factory MBean, 107 ConnectionManager MBean, 107, 109, 110 Managed Connection Pool MBean, 109 container-configuration element, 251 container-managed resource security, Managed Connection Factory MBean, 101, 110-112 108 creating and removing tables, 274 Managed Connection Pool MBean, 103 example MBean configurations for, 105 SAR deployment descriptor, 39 JBossCX and, 105-112 depends-list element, SAR deployment not supporting JCA, 105 descriptor, 39 packaging datasource definitions as SARs, \deploy directory, default configuration set, 11, 315 13 specification for entity bean CMP, 273 resource adapters, 105 dbindex element, cmp-field element, 279 deploy method, MainDeployer MBean, 224 DeadlockDetection attribute, ClusterPartition Deployer interface, org.jboss.deployment, 218 MBean, 185 deployer.jar ftle, 7 deadlocks, 309 deployment architecture, 217-225 debug attribute deployers, 217-219 configuration element, 202 deployment process, 223--225 Connector element, 169 hot deployment, 219-222 Engine element, 166 recursive deployment, 219 debug method, Logger class, 199 deployment descriptors, EAR, 313, 314-318 debugging classloader repository, 317 See also Log4j deploying SAR components, 314-317 enabling remote debugging, 21 EAR deployment descriptor, 317 declarative security, 68 packaging the EAR file, 317 DeclaredSQL extending EJB-QL, 292 packaging the SAR files, 315 declared-sql element, 296-297 including SAR components, 323 default configuration set, 10-15 scoped classloading, 54 contents, 12 deployment descriptors, EJB, 236 DefaultCacheResolution and mapping remote references, 231 DefaultCacheTimeout attributes, securing, 69 JaasSecurityManagerService MBean, 72 security proxies and, 93 defaultHost attribute, Engine element, 166 deployment descriptors, SAR, 37, 57 defaults element defining dependencies, 39 CMP configuration files, 263 defining security implementations, 68 create-table element, 275 deploying SAR components, 37 datasource element, 274 jetty-web.xml file alternative, 146 fk-constraint and pk-constraint elements, location, 10 275 deployment descriptors, Web, 142, 227-233 preferred-relation-mapping element, 284 classloading, 228 read-only and read-time-out elements, 277 context paths, 232 remove-table element, 275 JNDI references, 229-232 Default&heme property, HTTP listener, 148 security, 46, 69 DeleteWorkDirs attribute, security domains, 229 EmbeddedCatalinaService41 MBean, 160 virtual-host element, 233 DeliveryActive element, MDBConfig element, deployment process, ]Boss, 223--225 244 MBeans, 51

331 Index

deployment scanners and hot deployment, dynamic loading 219 MBean service enabling, 41 DeploymentException error startup problem, MLet tags and MBean loading, 34 27 using Web classloaders, 244 DeploymentScanner MBeans, 220 dynamic MBeans, 32 DeploymentFilter MBean and, 44 DynamicQL, 292, 295 DeploymentSorter class, org.jboss.deployment, DynamicStateManager MBean, 123 220 description element, dependent-value-class element, 281 E destination manager, ]BossMQ, 119--121 eager load groups, 301 interceptor chain component, 120 eager-load-group element, read-ahead managing destinations at runtime, 131 element, 300 as a submodule, 114 EAR

332 Index

ejb-relation-name element, ejb-relation create-table element, 274 element, 285 datasource element, 273 ejb-relationship-role element load-group element, 300 ejb-relation element, 286 pk-constraint element, 274 read-ahead element, 302 query element, 293 ejb-relationship-role-name element, ejb• read-only element, 276 relationship-role element, 286 read-time-out element, 277 E]Bs (Enterprise Java Beans) remove-table element, 274 See also entity beans table-name element, 276 cluster deployment, 188, 189 entity-commands element, CMP configuration CMP entity beans in ]Boss, 261 files, 265, 310 configuring within ]Boss, 235-260 entity-create element, 311 bean-level configuration, 251 EntitylnstancePool element, 248 configuring security, 258 EntityMultilnstancelnterceptor class, JMSAppender and logging from, 206 org.jboss.ejb.plugins, 310 mapping local and remote references, 230 EntityMultilnstanceSynchronizationlnterceptor MBean service for deploying, 43 class, org.jboss.ejb.plugins, 310 multiple invocation protocols, 253 error messages, deployment process, 223 perfomance problems with EJB reads, 298 error method, Logger class, 199 secure sockets, invocation using, 66 errorHandler element, appender element, security features, 65 log4j.xml file, 203 e-mail, SMTP Appender and logging, 207 exploded MBeans, 314 Embedded class, org.apache.catalina.startup, 161 extended property, HTIP listener, 150 EmbeddedCatalinaService MBean extends attribute, container-name element, 239 DeleteWorkDirs attribute, 160 ExtemalContext MBean, 61 EmbeddedCatalinaService41 class, org.jboss.web.catalina, 159 EmbeddedCatalinaSX MBean F HTIP session clustering, 191 failover requirements, J2EE clustering, 182 Java2ClassLoadingCompliance attribute, 161 false-mapping element, type mapping, 272 EmbeddedTomcatService41 MBean, 160 \farm directory, default configuration set, 11 enableLookups attribute, Connector element, FarrnDeployDirectory attribute, 168 FarrnMemberService MBean, 195 EnableTcpNoDelay attribute, optimized FarrnMemberService MBean, 194 invocation layer, 117 fatal method, Logger class, 199 ENC CEJB Environment Naming Context), 53, features, ]Boss. See components; custom features 141 field-name element Engine element, Tomcat custom configuration, auditType element, 306 166 cmp-field element, 278 Enterprise JavaBeans. See E]Bs declared-sql element, 297 enterprise-beans element, jboss.xml file key-fields element, 287, 288 child elements for different E]Bs, 252 relationship table mapping, 291 configuration-name elements, 240 File Persistence Manager, 125-126 enterprise-beans element, jbosscmp-jdbc.xml me, FileAppender, parameters supported, 205 263 FileAppender class, org.apache.log4j, 213, 205 entity beans FileNotFoundException error, startup problem, See also container-managed persistence 27 auditing access, 306 Filter attribute bean-level configuration, 256 URLDeploymentScanner MBean, 220 commit options, 307 URLDirectoryScanner MBean, 222 ]Boss configuration, 245 filter element, appender element, 204 locking policies, 309 firewalls perfomance problems with EJB reads, 298 ]BossMQ invocation layers and, 115 entity commands, ]Boss, 310 problems with RMI-based JNDI, 64 entity element, enterprise-beans element, 263 first available load balancing, 190 cmp-field element, 277

333 Index

fk-constraint element HighMemoryMark attribute, Message Cache, 122 defaults element, 275 home element, client-interceptors element, 243 ejb-relationship-role element, 286 home-load-balance-policy element, cluster- fk-constraint-template element, type-mapping config element, 251 element, 270 host attribute, AJP listener, 153 flag attribute, login-module element, 75 hot deployment, 219-222 Fleury, Max, 1 clustering, 182 foreign keys MBean service for, 44 bidirectional relationship mapping and, 288 URLDeploymentScanner MBean, 220 default relationship mapping and, 285 URLDirectoryScanner MBean, 221 fk-constraint element, 275 hsqldb-jdbc-service.xml file, 122 fk-constraint-template element, 270 HfML adapter, JMX foreign-key-mapping element, ejb-relation accessing the JMX agent, 44 element, 285 HTTP from element, declared-sql element, 297 Coyote connector support for HTIP 1.1, function-mapping element, type-mapping 167 element, 272 naming implementation based on, 64 function-name and function-sql elements, HTIP listener, Jetty custom configuration, 147, function-mapping element, 273 149 HTTP Port property, HTTP listener, 147 HTTP request logs G Jetty custom configuration, 148 getCallerPrincipal method, EJBContext NCSARequestLog class, 149 interface, 258 HTTP session clustering, 190 getConnection method, DataSource class, 110 AJP configuration, 194 getldentity method, Jetty and Tomcat configuration, 191 AbstractServerLoginModule class, 88 httpd.conf file, 154, 174 getlnstancemethod, Category class, 210 http-invoker.sar ftle, 64 getlogger method, Logger class, 199, 210 HTIPS, configuring Jetty for, 150 getLoggerPriority method, Log4jService MBean, Hypersonic database, 11, 267 215 getProperties method, System class, 325 getRoleSets method AbstractServerLoginModule class, 88 identifyListener attribute, AJP listener, 153 UserNamePasswordLoginModule class, 89 IdentityLoginModule class, UsersRolesLoginModule class, 90 org.jboss.security.auth.spi, 78 getRootLogger method, Logger class, 199 IdleTimeoutMinutes attribute, Managed getUsersPassword method Connection Pool MBean, 103 UserNamePasswordLoginModule class, 88 liS Ontemet Information Services) UsersRolesLoginModule class, 91 configuring to run with Tomcat, 174 GoF Decorator pattern, 69 using AJP with Jetty and, 152, 155-158 group-name element, optimistic-lockingType info method, Logger class, 199 element, 305 init method, SecurityProxy interface, 93, 259 init method, Serverlmpl class, 51 initial context properties, JNDI client H configuration, 59 HA- prefix and clustering, 184 InitialContext attribute, ExternalContext HA-JNDI configuration, 186 MBean, 62 automatic discovery, 188 initialize method HANamingService MBean, 187 AbstractServerLoginModule class, 87 hardware load balancers, 181, 190 UserNamePasswordLoginModule class, 88 HASessionStateService MBean, 189 UsersRolesLoginModule class, 89 heap size, JVM options, 55, 56 Initia!Repetitions and InitialStartDate attributes, Hierarchica!LoaderRepository2 class, Scheduler MBean, 320 org.jboss.mx.loading, 318 insert-after-ejb-postcreate element, container• High Availability. See HA configuration element, 247

334 Index

installing ]Boss, 5-6 security, 65 default web containers, 159 limitations, 66 Instance Per Transaction configuration, 303, 309 JAAS (Java Authentication and Authorization instance-cache element, container-configuration Service) element, 249 CallbackHandler interface, 86 instance-pool element, container-configuration configuring the security manager, 70-73 element, jboss.xml flle, 248 JBossSX based on, 66 InstancePool interface, org.jboss.ejb, 248 MBean service enabling, 42 instrumentation level, JMX resource security-domain element and, 250 management, 30, 31-33 JAAS 1.0 as supported J2EE API, 3 Integra!Port and IntegralScheme properties, JAAS security domain, 92 HTTP listener, 148 JAAS security manager interceptors, client-side, 243 custom modules and, 87 interceptors, security, 69 EJB and Web components, security checks, defining in jboss.xml, 259 70 interceptor chain components, 120 EJB and web container interaction, 69 jbossmq-service.xml file, 120 JAAS security domain and, 92 security proxies and, 93 login configuration, 73-77 interceptors, server-side, 236 logins, 70 invalidation-group-name element SecurityConfig MBean, 73 cache-invalidation~config element, 256 XMLLoginConfig MBean, 74 invalidation-manager-name element JAASSecurityDomain MBean, 92, 171 cache-invalidation-config element, 257 JaasSecurityManager class, invocation layer, JBossMQ, 114-119 org.jboss.security.plugins, 68, 70 JVM invocation layer, 118 JaasSecurityManager MBean, 70-72, 104, 109 invocation layer MBeans, 115-118 Jakarta project. See AJP optimized invocation layer, 116 JAR files RMI invocation layer, 115 \client directory, 7 as a submodule, 114 \lib directory, 9 types, 114 JNP server, client configuration, 60 unified invocation layer, 117 packaging SAR components, 314 invocation storage location, 11 detached invocation, 236 JARDeployer MBean, 218 statistics, Tomcat configuration, 163 Java Authentication and Authorization Service. invoke and invokeHome methods, See]AAS SecurityProxy interface, 93, 260 Java Connector Architecture. See JCA Invoker attribute, RMI Invocation Layer, 116 Java Management Extensions See JMX invoker component, interceptor chain, 120 Java Message Service. See JMS invoker element, 253 Java Naming and Directory Interface. See ]NDl invoker proxy bindings, 240-245 Java Secure Socket Extension. See JSSE invoker-bindings element, session element, 253 java.security file, registering JSSE, 94 invoker-mbean element, 241 java.security.auth.login package invoker-proxy elements, 240 config property, 87 invoker-proxy-binding-name element Java2ClassLoadingCompliance attribute invoker element, 253 web deployment descriptor, 228 container-configuration element, 241, 247 EmbeddedCatalinaService41 MBean, 161 invoker-proxy-bindings element, jboss.xml flle, JettyService MBean, 144 240 Javagroups Framework and ]Boss clustering, isapi_redirect.dll filter, 156, 175 183, 185, 193 isapi_redirector2.dll filter, 152, 173 JavaMail isTraceEnabled method, Logger class, 215 configuring in ]Boss, 137 configuring the mail service, 139-140 Mai!Service MBean, 137-138, 139 J mail session properties, 138 J2EE JavaMail 1.2 as a supported J2EE API, 4 APis supported in ]Boss, 3-4 java-type element, mapping element, 272

335 Index

javax.security.auth package example of using, 294 Subject class, 87 jboss-service.xml ftle. See deployment javax.security.auth.login package descriptors, SAR Configuration class, 73 ]BossSX extension, 66 name property, 78, 79, 88 custom login modules, 87-92 password properties, 88 implementation, 68-93 javax.sql package as ]Boss core component, 2 DataSource class, 110 prebuilt login modules, 77-87 JAXP (Java API for XML Processing) parsers, security interceptors, use, 69 19 security layer, implementation of, 67 jboss.mq domain, ]MX console, 131, 133, 134 JbossTX as a ]Boss core component, 2 jboss.server.root.deployment.fllename system jboss-web.xml file. See deployment property, 40 descriptors, Web jboss.xml ftle. See deployment descriptors, EJB jboss-web_3_0.dtd file, 228 jboss-app.xml ftle. See deployment descriptos, jboss-xa.rar resource adapter, 105 EAR ]CA (Java Connector Architecture) JBossCMP as ]Boss core component, 2 databases without JCA support, 105 jbosscmp-jdbc.xml configuration ftle, 262 implementing in JBossCX, 98-105 See also individual elements internal use by ]Boss, 97 child elements, 263 overview, 97 ]BossCX resource adapters, 98 container-managed resource security, supported J2EE API, 3 110-112 JCP (Java Community Process) and the JMX datasources and, 105-112 specification, 29 implementing JCA, 98-105 ]DBC database connection, using JCA, 97 as a ]Boss core component, 2 ]DBC Optimistic Lock Policy, 304 relationship with JCA, 97 ]DBC2 Persistence Manager, 125, 126-127 jbossha-httpsession.sar file, 190 JDBCAppender, 209 jboss-local-jdbc.rar resource adapter, 105 ]DBCCreateEntityCommand class, ]bossManagedConnectionPool class, org.jboss.ejb.plugins.cmp.jdbc, 311 org.jboss.resources.connectionmanager, 102 ]DBCCreateEntityCommand interface, jboss-minimal.xml me, 12 org.jboss.ejb.plugins, 311 ]BossMQ ]DBCGetGeneratedKeysCreateCommand class, architecture, 113-114 org.jboss.ejb.plugins.cmp.jdbc.jdbc3, 311 configuring, 113-135 JDBCSqlCreateCommand class, destination manager, 119-121 org.jboss.ejb.plugins.cmp.jdbc, 311 destinations, 128-130 JDBCSybaseCreateCommand class, invocation layer, 114-119 org.jboss.ejb.plugins.cmp.jdbc.sybase, 311 ]Boss core component, 2 jdbc-type element JMS administration, 131-135 auditType element, 306 message cache, 121-122 cmp-field element, 278 persistence manager, 125-127 mapping element, 272 security manager, 130-130 property element, 282 state manager, 123-124 ]DK as a ]Boss installation requirement, 6 submodules, 114 ]Dom JAR file startup problems, 27 jbossmq-destinations-service.xml ftle, 128, 130 Jetty web container, 141-158 jbossmq-service.xml file configuring, 143-152 configuring ]Boss MBean services, 115, 119 custom configuration, 144-152 interceptor chain, 120 enabling SSL, 150 preconfigured services, 116, 117, 118, 119 HITP Listener, 147 jbossmq-state.xml file, 123, 124, 135 HITP request logs, 148 DurableSubscription and Roles elements, HTTP session clustering, 191 124 integration with ]Boss 3.2, 3 security manager and, 130 as ]Boss installation default, 141 ]BossQL, 292, 293 running with other Web servers, 152-158 EJB select methods and, 295 Apache server, 154

336 Index

liS web server, 155 clustering requirements, 182 JettyService class, org.jboss.jetty, 143 coded references, 229-232 JettyService MBean, 144 mapping EJB references, 230 ConfigurationElement attribute, 144 mapping resource environment references, Configure element, 145 231 H1TP session clustering, 191 mapping resource references, 232 Java2ClassLoadingCompliance attribute, 144 configuring HA-JNDI, 186 jetty-web.xml file as alternative to the SAR datasource specification for entity bean deployment descriptor, 146 CMP, 273 JGStore class, org.mortbay.j2ee.session, 193 external namespaces, 61 jkCoyoteHandler class, org.apache.jk.server, 170 HTI'P-based and RMI-based implementa- JMS (Java Message Service) tion, 64 See also JBossMQ invocation layer, JBossMQ and, 114 administering, 131-135 ]Boss implementation based on RMI, 57 JBossMQ as implementation, 113 JBossCX connections and, 98 JMS 1.02 specification as a supported API, 3 JNP server, client context properties for, 59 JMS destinations, J2EE clustering requirements, link references, 63 182 MBean]NDIView enabling, 41,60 JMSAppender, 206 JMX console view, 45 JMSProviderAdapter class, org.jboss.jms.jndi, 244 MBean NamingService, 41 JMSProviderAdapterJNDI element, proxy-factory- properties, LDAPLoginModule class use, 84 config element, 244 RMI-based implementation, 57, 64 JMX (Java Management Extensions), 29-35 Service Provider Interface, 71 See also MBeans supported J2EE API, 4 agent-level services, 34 troubleshooting, 61 access through the console, 44 jndi. properties ftle, 59 accessing using the RMI adaptor, 46 JndiName attribute invocation types, 43 ExternalContext MBean, 62 ]Boss configuration and, 29, 35 HASessionStateService MBean, 189 as a }Boss core component, 2 ManagedConnectionFactoryName MBean, MBean service for invoking, 43 101, 108 resource management architecture, 30 JNDIName attribute agent level, 30, 33-34 destinations MBeans, 128 distributed services level, 30, 35 Mai!Service MBean, 137, 139 instrumentation level, 30, 31-33 jndi-name element, invoker element, 253 role in ]Boss, 1, 4, 35-44 name mapping, 231 twiddle.jar file, 7 JNDIView MBean, 60 JMX console, 18 JNP (JBoss Naming Provider), 58 accessing thread counts, 162 properties required for connection, 60 administering JMS, 131 JNP server client configuration, 58 administering logging, 214 jnp-context element, proxy-factory-config configuring Jetty for HTI'PS, 151 element, 245 configuring task scheduling, 324 JNPServerSocketFactory attribute, naming service, configuring Tomcat for HTI'PS, 172 58 deployment status checking, 224 JPDA (Java Platform Debugger Architecture), destinations, setting, 132 21 JMX agent level access, 44 JRMP invoker, JMX, 43 JNDI namespace, viewing objects of, 61 JSP 1.2 specification MBean components, setting attributes of, Jetty compliance, 143 46 as a supported J2EE API, 3 security, 46 JSR (Java Specification Requests) startup problems, 27 JSR 3, 29 JMX Remoting 1.2, 35 JSR 77, 4, 8, 14, 40 JNDI (Java Naming and Directory Interface), 57 JSR 160, 35 client configuration, 58-60 JSSE (Java Secure Socket Extension) client JAR ftles, 6o configuring Jetty for HTTPS, 151

337 Index

installation, 94 loader repository. See classloading JTA 1.0.1 as a supportedJ2EE API, 3 loader-repository and loader-repository-class JTS 1.0 as a supported J2EE API, 3 elements, jboss-app.xml, 318 JVM invocation layer, ]BossMQ, 115, 118-119 LoaderRepository interface, org.jboss.mx.Joading, JVM options, setting, 55-56 318 jvmRoute attribute, Engine element, 166 loader-repository-config element, web ]VMs (Java Virtual Machines) restarting, 22 deployment descriptor, 228 JVMServerii.Service MBean, 118 LoadSunJSEProvider MBean, JAAS security domain, 93 local transactions K ManagedConnectionFactoryProperties at• key-fields element, ejb-relationship-role element, tribute, Managed (;onnection Factory 287 MBean, 102 key-generator-factory element, optimistic- local-jndi-name element, session element, 253 lockingType element, 305 Loca!TXConnectionManager class KeyPassword attribute, SSL listener, 151 ConnectionManager MBean, 99 Keystore attribute, SSL listener, 150 Loca!TXConnectionManagerMBean,315 keystore• MBeans, JAAS security domain, 92 locking policies, 309 keytool command, key pairs for SSL, 95 CMP default and optimistic locking, 303 \log directory, default configuration set, 11 log method, Logger class, 199 L Log4J layout element, appender element, 204 appenders, 200 layouts, Log4J, 201 layouts, 201 lazy load groups, 301 Logger and Category classes, 199 IDAPLoginModule class, MBean service enabling, 41 org.jboss.security.auth.spi, 82-85 overview, 198-201 Level class, org.apache.log4j, 199 renderers, 201 extends Priority class, 210 use by ]Boss, 197 level element, configuration element, 212 log4j.xml configuration rue, 198 level element, root element, 211 appender element, 202-209 LF5Appender, 209 configuration element, 212 \lib directory, 9 configuring logging, 202 default configuration set, 11 renderer element, 209 JAR files and classloading, 54 root element, 210 JAR files hard-coded, 50, 55 Log4jQuietMode attribute, Log4jService MBean, libraries, adding to classpath at startup, 19 198 LIKE clauses and JBossQL, 294 Log4jService MBean, 197 lingerTimeSecs attribute, AJP listener, 153 administering, 214 Linux. See UNIX; Linux configuring logging, 202 list method, JNDIView MBean, 46 logger class, org.jboss.logging, 199 listDeployed and listDeployedAsString methods, addAppender method, 200 MainDeployer MBean, 224 compared to Category class, 210 list-entity element, client-interceptors element, getLogger method, 210 243 isTraceEnabled method, 215 listincompletelyDeployed and methods, 199 listWaitingForDeployer methods, logger element, configuration element, 212 MainDeployer MBean, 224 logging, 197-215 load balancers, 180-181 administering logging, 214-215 home-load-balance-policy element, 251 configuring logging, 201-214 load balancing policy, clustered E]Bs, 190 console logging, 25 load groups, 300, 301 customizing output formats, 201 load• methods, UsersRolesLoginModule class, default logging configuration, 212 91 HTTP request logs, Jetty, 148 LoadBalancePolicy interface, internal logging, 198 org.jboss.ha.framework.interfaces, 190 logger hierarchy, 199

338 Index

MBean for, 41, 197 Manager MBean, 40 naming loggers, 200, 210 ManagerServiceName MBean, JAAS security remote logging, 209 domain, 93 TRACE priority level, 215 many-to-many relationships, 289, 290 login configuration, ]Boss, 73-77 mapping XMLLoginConfig MBean, 74 coded JNDI references, 230 login modules, ]Boss EJB references, ejb-ref-name element, 254 configuring, 111 ejb-name element, 266 custom modules, 87-92 entity object models to datasources, 267 prebuilt modules, 77-87 jbosscmp-jdbc.xml configuration file and, writing a login module, 89-92 262 login method query mapping, 292-296 AbstractServerLoginModule class, 88 users to passwords and roles, 80, 81, 89 CallbackHandler interface, 87 mapping element, type-mapping element, 272 UsersRolesLoginModule class, 90 mapping relationships, CMP beans, 284 login-config.xml flle one-to-many unidirectional relationships, container-managed resource security, 111 286 elements tabulated, 75 one-to-one bidirectional relationships, 288 example, 77 relationship table mapP.ing, 289 LoginContext class, JAAS, 70 MaxActiveThreadCount attribute, WebServer login-module element, login-config.xml file, MBean, 162 75 max-bean-life element, container-cache-conf LoginModule interface, JAAS, 74 element, 250 LogTimeZone property, HTI'P listener, 150 maxldleTimeMs attribute, AJP listener, 153 LowResourcePersistTimeMS property, HTI'P MaxldleTimeMS property, HTTP listener, 148 listener, 148 MaximurnSize element, container-pool-conf LRU (Least Recently Used) caches, 250 element, 248 MaxMemoryMark attribute, Message Cache, 122 MaxMessages element, proxy-factory-config M element, 244 mail. • session properties, JavaMail, 138 maxProcessors attribute, Connector element, 170 Mai!Service MBean, 137-138 maxReadTimeMs attribute, AJP listener, 153 configuring JavaMail in ]Boss, 139 MaxReadTimeMS property, HTI'P listener, 148 mail-service.xml file, 137, 139 MaxSize attribute, Managed Connection Pool Main class, org.jboss, 50 MBean, 103 MainDeployer interface, org.jboss.deployment, maxStopTimeMs attribute, AJP listener, 153 218 MaxStopTimeMS property, HTTP listener, 148 MainDeployer MBean, 218, 224 MaxThreads attribute, AJP listener, 153 managed beans. See MBeans MaxThreads property, HTI'P listener, 148 Managed Connection Factory MBean, 100 MBean components, 32, 36-39 configuring databases without JCA support, accessing with the JMX console, 44 107 CachedConnectionManager MBean, 104, depends element, 101 109 attributes, 108 CacheStore MBean, 121 Managed Connection Pool MBean, 102 ClusterPartition MBean, 183 attributes, 103 configuring databases without JCA support, configuring databases without JCA support, 105 109 ConnectionManager MBean, 99-105, 111 Criteria attribute, 110 configuring databases without JCA support, depends element, 103 107 ManagedConnectionFactoryProperties attribute, DataPopulationScheduler MBean, 319, 321, Managed Connection Factory MBean, 101, 323 102, 108 defining within the deployment descriptor, management applet, JMX, 34 38 management domains, MBean server, 40 deployer MBeans, 218 Manager class, org.mortbay.j2ee.sessio, 193 deploying exploded MBeans, 314

339 Index

DeploymentScanner MBeans, 220 UnifiedLoaderRepository MBean, 228 DeploymentFilter MBean and, 44 URLDeploymentScanner MBean, 220 DestinationManager MBean, 119, 131 URLDirectoryScanner MBean, 221 dynamic MBeans, 32 WebServer MBean, 160, 162 DynamicStateManager MBean, 123 XidFactory MBean, 42 EARDeployer MBean, 219, 313 XMLLoginConfig MBean, 74 EJBDeployer MBean, 219 MBean servers EmbeddedCatalinaSX MBean, 161, 191 ]Boss server, basis for, 35 EmbeddedTomcatService41 MBean, 160 method definitions, 33 ExtemalContext MBean, 61 shutting down ]Boss, 28 FarmMember MBean, 194 MBean services HANamingService MBean, 187 accessing with the RMI adaptor, 46 HASessionStateService MBean, 189 classloading architecture, 52 Invocation Layer MBeans, 115-118 configuring clusters, 184 JaasSecurityDomain MBean, 92, 171 configuring destination manager, 119 JaasSecurityManager MBean, 70-72, 104, configuring invocation layers, 115 109 configuring Message Cache, 121 JARDeployer MBean, 218 configuring Security Manager, 130 ]Boss SAR components, 37 defining dependencies, 38 dependencies, 39 defining MBeans, 38 ]Boss service MBeans, 36 deployment, 40 JettyService MBean, 144-145, 191 EAR deployer, 43 JNDIView MBean, 60 EJB deployer, 43 JVMServeriLService MBean, 118 enabling dynamic class loading, 41 lifecycle management in ]Boss, 36 enabling JAAS-based security, 42 LocalTxConnectionManager MBean, 315 enabling JNDI services, 41 Logging MBean, 41, 197-198 enabling Log4J initialization, 41 Mail Service MBean, 137-138 enabling management domains, 40 main deployment MBean, 35 hot deployment, 44 MainDeployer MBean, 218, 224 JMX invocation, 43 Managed Connection Factory MBean, 100 MBean lifecycle management, 36 Managed Connection Pool MBean, 102 for transactions, 42 Manager MBean, 40 UnifiedClassLoader class, 52 MessageCache MBean, 121 MBeans model MBeans, 32 See also MBean components NamingAlias MBean, 63 deployment process and, 51 Naming Service MBean, 57 JMX resource management and, 30 OILServeriLService MBean, 116 listing registered MBeans, 18 open MBeans, 32 MBeanServer interface, 33 PersistenceManager MBean, 119, 125, 126, mdb-client-id element, message-driven 134 element, 257 Queue MBean, 128, 129, 133 MDBConfig element, proxy-factory-config RARDeployer MBean, 219 element, 244 RMIServeriLService MBean, 115 mdb-subscription-id element, message-driven SARDeployer MBean, 218 element, 257 Scheduler MBean, 319, 321-323 MDBs (message-driven beans), 257 SecurityConfig MBean, 73 message cache, ]BossMQ, 121-122 SecurityManager MBean, 130 as a submodule, 114 service controller MBean, 35 MessageCache attribute standard MBeans, 32 File Persistence Manager, 126 StateManager MBean, 119, 134 JDBC2 Persistence Manager, 127 SystemProperties MBean, 325 MessageCache MBean, 122 Topic MBean, 128, 129, 133 message-driven beans (MDBs), 257 Tracinglnterceptor MBean, 130 messaging. See ]BossMQ; JMS TransactionManager MBean, 33 metadata, MBean component types, 32 UILServeriLService MBean, 117 method-attributes element, 255

340 Index

MethodOnlyE]BLock class, one-to-one bidirectional relationship mapping, org.jboss.ejb.plugins.lock, 309 288 method-permission element, 258 relationship table mapping, 291 MinimumSize element, container-pool-con£ on-find read-ahead strategies, 299 element, 248 on-load read-ahead strategies, 300 minProcessors attribute, Connector element, 170 OnlyOnceErrorHandler class, MinSize attribute, Managed Connection Pool org.jboss.logging.util, 203, 213 MBean, 103 open MBeans, 32 MinThreads attribute, A]P listener, 153 optimistic locking, 303 MinThreads property, IITI'P listener, 147 optimistic-lockingType element, 304 MLet service, JMX, 34 Optimized Invocation Layer, ]BossMQ, 115, mod_jk and modjk2 modules, 152, 173, 175 116--117 mod_jk load balancing, 181 optimized loading, CMP, 301 model MBeans, 32 optional-attribute-name attribute and the modified-strategy element, optimistic- depends element, 101, 103 lockingType element, 305 optiond-refresh-rate element, container• module-option element, login-config.xml file configuration element, 308 monitoring services, JMX, 34 options multiplicity element, ejb-relationship-role entity bean commit options, 307 element, 286, 288 ]VM options, 55-56 startup options, 19-20 Oracle databasess, configuring a datasource, N 107-110 name attribute ORDER BY clause and JBossQL, 293 config-property element, 101 order element, declared-sql element, 297 AJP listener, 153 org.apache.catalina.startup package appender element, 203 Embedded class, 161 category and logger elements, 212 org.apache.commons category, 213 Engine element, 166 org.apache.jk.server package name element, type-mapping element, 268 JkCoyoteHandler class, 170 name mapping, WAR deployment, 229-232 org.apache.log4j package name property, javax.security.auth.login, 78, 79, AsyncAppender class, 208 88 ConsoleAppender class, 204, 213 naming contexts and the FileAppender class, 205, 213 AbstractWebContainer class, 143 Level class, 199 naming service. See JNDI PatternLayout class, 201, 206, 213 NamingAlias MBean and JNDI link references, org.apache.log4j.net package 63 JMSAppender class, 206 NamingService MBean, 57 SMTPAppender class, 208 NCSARequestLog class, org.mortbay.http, 149 org.jboss package Nextlnterceptor attribute, Security Manager, 130 Main class, 50 not-null element, cmp-field element, 279 org.jboss.deployment package not-null element, property element, 282 Deployer interface, 218 NoTXConnectionManager class, DeploymentSorter class, 220 ConnectionManager MBean, 99 EARDeployer class, 313 NT service, running }Boss as, 22-25 MainDeployer class, 218 NTEventLogAppender, 209 SubDeployer interface, 218, 313 SubDeployerSupport class, 218, 313 org.jboss.deployment.scanner package 0 PrefixDeploymentSorter class, 220 ObjectName class, JMX, 33 org.jboss.ejb package ObjectRenderer interface, 201 InstancePool interface, 248 OIL (Optimized Invocation Layer, ]BossMQ), org.jboss.ejb.plugins package, 248, 249 115, 116--117 interceptors, 310 OILServeriLService MBean, 116 JDBCCreateEntityCommand interface, 311 one-to-many relationship mapping, 286 org.jboss.ejb.plugins.cmp.jdbc• packages, 311

341 Index

org.jboss.ejb.plugins.lock package org.jboss.web package locking option classes, 309 AbstractWebContainer class, 142-143 org.jboss.ha.framework.interfaces package WebClassLoader class, 53, 244 LoadBalancePolicy interface, 190 org.jboss.web.catalina package RoundRobin interface, 251 EmbeddedCatalinaService41 class, 159 org.jboss.jetty package org.mortbay.http package JettyService class, 143 NCSARequestLog class, 149 org.jboss.jetty.session package org.mortbay.j2ee.session package, 193 ClusterStore class, 193 Oswego concurrent JAR, 51 org.jboss.jms.asf package other element, declared-sql element, 297 ServerSessionPoo!Factory class, 244 org.jboss.jms.jndi package p JMSProviderAdapter class, 244 org.jboss.logging package page-size element, read-ahead element, 300 Logger class, 215 param element, appender element, 203 org.jboss.logging.appender package param element, root element, 211 DailyRollingFileAppender class, 213 parseGroupMembers method, org.jboss.logging. uti! package UsersRolesLoginModule class, 91 OnlyOnceErrorHandler class, 203, 213 parsers, JAXP, 19 org.jboss.mail package PartitionName attribute Mai!Service MBean, 139 ClusterPartition MBean, 185 org.jboss.metadata package FarmMemberService MBean, 195 Xrn!Loadable class, 248, 249 HANamingService MBean, 187 org.jboss.rnx.loading package HASessionStateService MBean, 189 Hierarchica!LoaderRepository2 class, 318 partition-name element, cluster-config element, LoaderRepository interface, 318 251 org.jboss.resources.connectionmanager package PartitionProperties attribute, ClusterPartition BaseConnectionManager2 class, 99 MBean, 185 JbossManagedConnectionPool class, 102 Partitions, }Boss clustering, 183, 185 RARDeployment class, 100 Password attribute org.jboss.security package Mai!Service MBean, 137, 139 AbstractPasswordCredentialLoginModule SSL listener, 150 class, 111 password property, javax.security.auth.login, CallerldentityLoginModule class, 111 88 ConfiguredldentityLoginModule class, 111 passwords, hashing, 79 interfaces, 67 PattemLayout class, org.apache.log4j, 201, 206, SecurityProxy interface, 93, 259 213 SecurityProxyFactory interface, 71 performance tuning, CMP, 298-303 SimplePrincipal class, 87 optimized loading, 301 org.jboss.security.auth.spi package read-ahead for relationships, 302 ClientLoginModule class, 85 read-ahead strategies, 299 DatabaseServerLoginModule class, 80-82 persistence manager, }BossMQ, 125-127 IdentityLoginModule class, 78 setting properties, 133 LDAPLoginModule class, 82-85 as a submodule, 114 UserRolesLoginModule class, 79, 80 PersistenceManager attribute, Destination org.jboss.security.plugins package Manager, 119 }aasSecurityManager class, 68 PersistenceManager MBean, 119, 125, 126, org.jboss.system package 134 Service interface petstore example application }Boss service MBeans, 36 CMP field mapping example, 279 org.jboss.system.server package Configuring datasources, 107, 110 Serverlmpl class, 51 dependent value classes, 280 ServerLoader class, 50 deploying, packaged as an EAR, 314 org.jboss.varia.scheduler package DVC declaration, 282 Schedulable interface, 320, 321 EJB name mapping example, 266 mapping relationships, 286

342 Index

bidirectional relationships, 288 web server proxy load balancing, 181, 190 relationship table mapping, 290 proxy-binding element, proxy-factory-config scheduling repopulation tasks, 321 element, 245 PingPeriod attribute, RMI invocation layer, 116 proxy-factory element, invoker-proxy-binding pk-constraint element element, 241 defaults element, 275 proxy-factory-config element, invoker-proxy• entity element, 274 binding element, 241, 242, 243-245 relation-table-mapping element, 290 proxyName attribute, Connector element, 170 pk-constraint-template element, type-mapping purchase orders. See petstore application element, 270 · pluggable components, 1 pluggable security layer, 66 Q poa element, proxy-factory-config element, 245 query element policy element, login-config.xml file, 75 entity element, 293 pooled invoker, JMX, 43 query-method element, 293 port attribute, A]P listener, 153 read-ahead element, 293, 299 port attribute, Connector element, 170 query mapping, E]B-QL, 292 Port attribute, HANamingSeiVice MBean, 187 DeclaredQL, 296 Port attribute, SSL listener, 151 DynamicQL, 295 port numbers, 17 JBossQL, 293 naming service, 58 query-method element, query element, 293 NT service wrappers, 24 Queue MBean, 128, 129, 133 post-table-create element and CMP, 275 QueuedPessimisticE]BLock class, pre-built appenders, Log4J, 204-209 org.jboss.ejb.plugins.lock, 309 AsyncAppender, 208 ConsoleAppender, 204 FileAppender, 205 R ]DBCAppender, 209 ra.xml flle, 98 JMSAppender, 206 RAR Deployment MBean, 108 LF5Appender, 209 RARDeployer element, 104, 110 NTEventLogAppender, 209 RARDeployer MBean, 219 SMTPAppender, 207 RARDeployment class, SocketAppender, 209 org.jboss.resources.connectionmanager, 100 SyslogAppender, 209 read-ahead element prebuilt login modules, ]Boss, 77--i57 ejb-relationship-role element, 286, 302 preferred-relation-mapping element, defaults query element, 293 element, 284 read-ahead for relationships, 302 PrefJ.XDeploymentSorter class, read-ahead strategies, CMP, 299 org.jboss.deployment.scanner, 220 on-find strategy, 299 primary keys. See pk-constraint on-load strategy, 300 Priority class extended by Level class, 210 read-only element priority element, configuration element, 212 cmp-field element, 278 priority element, root element, 211 defaults element, 277 Properties attribute ejb-relation element, 285 Extema!Context MBean, 62 entity element, 256, 276 SystemPropertiesService MBean, 325 read-strategy element, optimistic-lockingType properties flles, User Roles login modules, 80 element, 305 property element, cmp-field element, 279 read-time-out element property element, dependent-value-class cmp-field element, 278 element, 281 defaults element, 277 property-name element, property element, 282 ejb-relation element, 285 protoco!Handle!Ciass attribute, Connector entity element, 277 element, 170 RealmMapping interface, org.jboss.security, 67, proxies 71 ]Boss 3.x clustering, 184 JaasSecurityManager class and, 68 security proxies, 93-94 reconfiguremethod, Log4jSeiVice MBean, 215

343 Index

ReconnectlntervalSec element, MDBConfig resource-jndi-name element, 255 element, 244 resource-name element, 255 recursive deployment, 219 resource-ref element, jboss-web.xml flle, 230, RecursiveSearch attribute, 232, 253 URLDeploymentScanner MBean, 221 resource-ref-name element, 255 Red Hat Linux retainDays property, HITP listener, 149 jboss_init_redhat.sh script, 7 RMI (Remote Method Invocation) starting ]Boss on, 17 accessing MBean services with the RMI redeploy method, MainDeployer MBean; 225 adaptor, 46 redirectPort attribute, Connector element, 168 basis of ]Boss naming service, 57 RefreshPeriod attribute, Log4jService MBean, 198 invoking E]Bs with SSL, 94 register-ejbs-in-jnp-context element, proxy- problems with JNDI implementation based factory-config element, 245 on, 64 registry entries RMI Invocation Layer, ]BossMQ, 115-116 running Jetty with liS, 155 RMI-IIOP as supported J2EE API, 4 running Tomcat with liS, 175 RmiPort attribute, HANamingService MBean, 187 relation service, JMX, 34 RMIServeriLService MBean, 115 relational databases. See datasources role. properties file, securing the JMX console, relationship table mapping, CMP, 289 47 one-to-one bidirectional relationship, 291 role-based security, J2EE use, 65 relationships Roles element, jbossmq-state.xml file, 124 CMP and relationship mapping, 284 roles. properties file, user roles login module, read-ahead for relationships, 302 78, 80 relationships element, CMP configuration fLies, Rolling Logged Persistence Manager, 125, 126 264, 285 RollingFileAppender class, relation-table-mapping element, ejb-relation org.jboss.logging.appender, 205 element, 285, 290 root configuration file, \conf directory, 40-44 remote class fLies as classloaders, 55 root element, log4j.xml file, 210-211 remote debugging, enabling, 21 root loggers, Log4J, 199 remote debugging, JVM options, 56 ROOT. war ftle, 233 RemoteAccess attribute, ExternalContext round robin load balancing, 180, 190, 194 MBean, 62 RoundRobin interface, removeAllMessages method, Queue and Topic org.jboss.ha.framework.interfaces, 251 MBeans, 133 row-locking element remover-period element, container-cache-conf defaults element, 269 element, 250 entity element, 269 remove-table element relation-table-mapping element, 290 defaults element, 275 row-locking-template element, type-mapping entity element, 274 element, 269 relation-table-mapping element, 290 run. bat file, setting JVM options, 55 renderer element, log4j.xml file, 209 runtime properties, 49-56 renderers, Log4J, 201 classloading architecture, 49 renderingClass attribute, renderer element, 209 JVM options, 55 replication requirements, J2EE clustering, 182 setting classpath, 54 RequiredModelBean interface, 32 resource adapter connection factory, creating with MBeans, 98 s resource adapters, JCA, 98 SAR (Service Archive) files databases without JCA support, 105 ]Boss SAR components, 37 RARDeployer MBean and, 219 dependencies, 39 resource environment references, 231 location, 11 resource management, JMX architecture, 30 SAR components resource references, mapping, 232, 255 deploying as part of an EAR application, resource-env-ref element, jboss-web.xml flle, 314-317 230, 231 HTTP based JNDI implementation, 64 resource-env-ref-name element, 255 Jetty service, 143

344 Index

scheduling tasks, 323 SecurityManager attribute, destinations MBeans, SAR deployment descriptor. See deployment 128 descriptors, SAR SecurityManager MBean, 130 SARDeployer MBean, 218 SecurityManagerClassName attribute ScannerName attribute, FarmMemberService JaasSecurityManagerService MBean, 71 MBean, 195 security-proxy element, enterprise-beans ScanPeriod attribute element, 259 URLDeploymentScanner MBean, 221 session bean configuration, 253 URLDirectoryScanner MBean, 222 SecurityProxy interface, org.jboss.security, 67, 93, Schedulable interface, 259 org.jboss.varia.scheduler, 320, 321 SecurityProxyFactory interface, org.jboss.security, SchedulableArgument• attributes, Scheduler 71 MBean, 320 SecurityProxyFactoryClassName attribute SchedulableClass attribute, Scheduler MBean, JaasSecurityManagerService MBean, 71 320 security-role element and method permissions, SchedulableMBean" attributes, Scheduler MBean, 258 321 select element, declared-sql element, 297 SchedulablePeriod attribute, Scheduler MBean, server affmity 320 DNS round robin load balancers, 181 Scheduler MBean, 319 HTIP session clustering, 190 petstore repopulation example, 321-323 server configuration sets, 10-15 scheduling tasks, 319-324 all configuration set, 10, 184 scherme attribute, Connector element, 168 creating configuration sets, 15 scoped classloading, 54, 318 default configuration set, 10-15 script files, running ]Boss on Unix/Linux, 25 location, 9 secure attribute, Connector element, 168 minimal configuration set, 10 Secure Remote Password protocol. See SRP \server directory, 9 security Server element, Tomcat custom configuration, application managed, 110 165 configuring EJB security in ]Boss, 258 server implementation class, specifying, 20 configuring the JAAS Security Manager, server.policy file, default configuration set, 13 70-73 ServerBindPort attribute, optimized invocation container-managed security, 110-112 layer, 117 durable subscriptions, JBossMQ, 129 Serverlmpl class, org.jboss.system.server, 51 enabling SSL, 94 ServerLoader class, org.jboss.system.server, 50 features of JBoss, 66-66 ServerSessionPoo!Factory class, org.jboss.jms.asf, JBossSX implementation, 68-93 244 JMX console, 46 ServerSessionPoolFactory]NDI element, proxy- security interceptors. See interceptors factory-config element, 244 security layer, ]Boss, 67-{)8 ServerSocketFactory attribute, naming service, 58 security manager, JBossMQ, 130 Service controller MBean, 35 interceptor chain component, 120 Service interface, org.jboss.system, 36 as a submodule, 114 Service Provider Interface (SPO, ]NDI, 71 security proxies, 93-94 •-service.xml files. See configuration flies J2EE security and )Boss proxies, 66 Servlet 2.3 specification security-• elements, web deployment descriptor, classloading requirements, 144 229 Jetty compliance, 143 SecurityConf attribute, destinations MBeans, 128 as a supported J2EE API, 3 SecurityConfig MBean, 73 session beans, configuration, 252 security-domain element, deployment session tracking, load balancers, 181 descriptors, 70, 258 session-state-manager-jndi-name element, container-configuration element, 250 cluster-config element, 251 SecurityDomain interface, org.jboss.security, 67 Set element, JettyService MBean, 145 SecurityDomainjndiName attribute, Connection setEJBContext method Manager MBean, 112 SecurityProxy interface, 93, 260

345 Index

setLoggerPriotity method, Log4jService MBean, specifying system properties, 20 215 system properties, 20-21 shared repository. See dassloading troubleshooting, 27 shutdown commands, 28 state manager, ]BossMQ, 123-124 SimplePessimisticE]BLock class, storing state information, 135 org.jboss.ejb.plugins.lock, 309 as a submodule, 114 SimplePrincipal class, org.jboss.security, 87 StatelessSessionlnstancePool element, 248 SMTPAppender, 207 StateManager attribute, Destination Manager, 119 Snapshot* attributes, StateManager MBean, 119 EmbeddedCatalinaService41MBean, 191 setting properties with the JMX console, SocketAppender, 209 134 Sorting and ]BossQL, 293 Stats attribute, WebServer MBean, 163 SQL stop method, Service interface, 37 database login module, use, 80 strategy element, read-ahead element, 300, 301 generated by declared-sql element, 298 strictMaximurnSize and StrictTimeout elements, mapping Java data types to, 272 container-pool-coni element, 248 standardjbosscmp-jdbc.xml configuration SubDeployer interface, org.jboss.deployment, file and, 262 218, 313 SqlProperties attribute, JDBC2 Persistence SubDeployerSupport class, org.jboss.deployment, Manager, 127 313 sql-statement element, post-table-create element, Subject class, javax.security.auth, 87 275 SubjectsSecurityManager interface, sql-type element org.jboss.security, 67 auditType element, 306 sub-query element, type-mapping element, 271 cmp-field element, 278 Swing-based logging, 209 mapping element, 272 symbolic links, 63 property element, 282 sync-on-commit-only element, container- SRP (Secure Remote Password) protocol, 66 configuration element, 247 SSL (Secure Sockets Layer), 94-95 SyslogAppender, 209 EJB invocation, 66 System class, getProperties method, 325 enabling on Tomcat, 171 system properties, 20-21, 324-325 JAAS security domain support, 92 classloading and the list property, 51 Java Secure Socket Extension and, 94 SysternProperties MBean, 325 Jetty custom configuration, 150 setting the connection factory, 172 SSL Listener attributes tabulated, 150 T standard MBeans, 32 table creation and removal, 274 ]Boss service independence, 36 table-name element standardjaws.xml file, 13 entity element, 276 standardjboss.xml configuration file, 236, 237 relation-table-mapping element, 290, 291 bean-level configuration, 251 TCP/IP and ]BossMQ invocation layers, 115 invoker configurations, 240 tcpNoDelay attribute, Connector element, 170 standardjbosscmp-jdbc.xml configuration flle, test. properties files, 325 262 thread count, 162 See also individual elements threadClass attribute, AJP listener, 153 child elements, 263 threshold attribute, configuration element, start method, Service interface, 36 log4j.xml file, 202 start method, Serverlmpl class, 51 timer service, JMX, 34 StartAtStartup attribute, Scheduler MBean, 320 timestamp-column element, optimistic• starting ]Boss, 17-27 lockingType element, 305 as an •x daemon, 25-26 \tmp directory, default configuration set, 11 as an NT Service, 22-25 Tomcat (Apache) Web container, 159-177 classloading during startup, 50 configuring, 159-177 enabling remote debugging, 21 classloading behavior, 161 startup commands, 17 deleting work directories, 160 startup options, 19 invocation statistics, 163

346 Index

setting the Tomcat home directory, 160 UNIX thread count, 162 root access, 17 unpacking WAR files, 161 running }Boss as an •x daemon, 25 connector rypes supported, 167 starting }Boss on, 17 enabling SSL, 171 Syslog daemon, 209 custom configuration, 164-172 UnpackWars attribute, JettyService MBean, 144 H1TP session clustering, 191 uriworkermap.properties me, 155 }Boss 3.2 support, 3 uriworkers.properties flle, 175 ROOT. war file, 233 URL connection factories, mapping, 255 running with other Web servers, 173--177 URLClassLoader class, 51-53 configuring Apache to use AJP, 173 URLComparator attribute configuring liS to use AJP, 174 URLDeploymentScanner MBean, 220 web.xml file, 13 URLDirectoryScanner MBean, 222 \work directory, default configuration set, URLDeploymentScanner MBean, 220 11 URLDirectoryScanner MBean, 221 Topic MBean, 128, 129 URLList attribute, SystemPropertiesService removeAllMessages operation, 133 MBean, 325 TRACE priority level, 215 URLs (Uniform Resource Locators) tracer component, interceptor chain, 120 system properties specifying, 20--21 Tracinglnterceptor MBean, 130 URLs attribute TransactionManager attribute, 104, 110 URLDeploymentScanner MBean, 220 TransactionManagerMBean,33 URLDirectoryScanner MBean, 222 transactions User attribute, Mai!Service MBean, 137, 139 JBossTX, 2 user roles login module, 78 locking policies, 303, 309 user.properties file, securing the JMX console, MBean service for, 42 47 transaction-service.xml file, UserNamePasswordLoginModule class, 88 CachedConnectionManager MBean, 104 users.properties file, user roles login module, troubleshooting 78,80 naming and lookup problems, 61 UsersRolesLoginModule class, startup problems, 27 org.jboss.security.auth.spi, 79, 80, 89 true-mapping element, type mapping, 272 twiddle. jar file, 7 type attribute, config-property element, 101 v type mappings, CMP beans, 268-273 version-column element, optimistic-lockingType type-mapping element, type-mappings element, element, 305 268, 270--272 versions, ]Boss, 3 type-mappings element, CMP configuration files, bug affecting classloading, 318 265, 268 ]Boss 3.x clustering functionality, 183 }Boss 3.x EJB container, 235 }Boss 3.x, configuring CMP 2.0, 261 u Views, }Boss clustering, 183 UCASE function and JBossQL, 294 Virtual Directory Creation Wizard, 158, 177 UIL (Unified Invocation Layer, ]BossMQ), 115, virtual-host element, web deployment 117-118 descriptor, 233 UILServeriLService MBean, 117 unauthenticated-principal element, jboss.xml me, 258 w undeploy method, MainDeployer MBean, 225 WAR (Web application archive) files unidirectional relationships, one-to-many, 286 Jetty configuration and, 144 unified classloader repository, 317 Tomcat configuration and, 161 unified invocation layer,]BossMQ, 115, 117-118 WAR deployment, 218, 227-233 UnifiedClassLoader class, 52-54 classloading, 228 extends URLClassLoader class, 52 context paths, 232 UnifiedLoaderRepository MBean, 228 name mapping, 229-232 security domains, 229

347 Index

virtual hosts, 233 Windows warn method, Logger class, 199 running JBoss as an NT service, 22-25 Web containers starting JBoss on, 17 See also Jetty; Tomcat Windows registry AbstractWebContainer class and, 142 running Jetty with liS, 155 advantages of embedded containers, 141 running Tomcat with liS, 175 ]Boss core component, 2 \work directory, default configuration set, 11 ]Boss downloads, 5, 159 workers.properties ffie, 154, 155, 174 security delegation, 67 HTTP session clustering, 194 Web deployment descriptor. See deployment Wrapper utility (SourceForge), 22-23 descriptors, Web web server proxies, load balancing, 181, 190 Web servers X Apache, configuring to use AJP, 154 "X. See UNIX liS, configuring to use AJP, 155 -X* JVM options, 55-56 ]Boss defaults, 143 XA connections, 102 Jetty web container, 141, 152-158 XAConnectionFactoryJNDIRef attribute, RMI Tomcat web container, 173-177 invocation layer, 116 web.xml ffie, default configuration set, 13 XATXConnectionManager class, WebClassl.oader class, org.jboss.web, 244 ConnectionManager MBean, 99 classloading architecture, 53 XidFactory MBean, 42 extends URLClassLoader class, 53 XML (Extensible Markup Language) See web-class-loader element, proxy-factory-config configuration files element, 244 Xm!Loadable class, org.jboss.metadata, 248, 249 WebServer MBean, 160, 162 XMLLoginConfig MBean, 74 where element, dedared-sql element, 297

348 JOIN THE APRESS FORUMS AND BE PART OF OUR COMMUN11Y. You'll find discussions that cover topics of interest torr professionals, programmers, and enthusiasts just like you. ~you post a query to one of our forums, you can expect that some of the best minds in the business-especial~ Apress authors, who all write with The Expert's VoiceTM_will chime in to help you. Why not aim to become one of our most valuable partic• ipants (MVPs) and win cool stuff? Here's a sampling of what you'll find:

DATABASES PROGRAMMING/BUSINESS Data drives everything. Unfortunately, HIs. Share information, exchange ideas, and discuss any database Talk about the Apress line of books that cover software programming or administration issues. methodology, best practices, and how programmers interact with the 'suits.'

INTERNET TECHNOLOGIES AND NETWORKING WEB DEVELOPMENT/DESIGN Try living without plumbing (and eventually 1Pv6). Ugly doesn't cirt Hanymore, and CGI is absurd. Talk about networking topics including protocols, design, Help is in sight for your site. Rnd design solutions for your administration, wireless, wired, storage, backup, certifications, projects and get ideas for building an interactive Web site. trends, and new technologies.

JAVA SECURITY We've come a long way from the old Oak tree. Lots of bad guys out there-the good guys need help. Hang out and discuss Java in whatever flavor you choose: Discuss computer and network security issues here. Just don't let J2SE, J2EE, J2ME, Jakarta, and so on. anyone else know the answers!

MAC OS X TECHNOLOGY IN ACTION All about the Zen of OS X. Cool things. Fun things. OS X is both the present and the future for Mac apps. Make Its after hours. It's time to play. Whether you're into LEGQ® suggestions, offer up ideas, or boast about your new hardware. MINDSTORMS™ or turning an old PC into a DVR, this is where technology turns into fun.

OPEN SOURCE WINDOWS Source code is good; understanding (open) source is better. No defenestratlon here. Discuss open source technologies and related topics such as Ask questions about all aspects of Windows programming, get PHP, MySQL, Linux, Peri, Apache, Python, and more. help on Microsoft technologies covered in Apress books, or pro~de feedback on any Apress Windows book.

HOW TO PARTICIPATE: Go to the Apress Forums site at http://forums.apress.com/. Click the New User link.