Jonas 5 Configuration Guide
Total Page:16
File Type:pdf, Size:1020Kb
JOnAS 5 Configuration guide JOnAS Team ( ) - September 2009 - Copyright © OW2 Consortium 2007-2009 This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license,visit http://creativecommons.org/licenses/by-sa/2.0/deed.en or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Table of Contents 1. Introduction .............................................................................................................. 1 1.1. Configuring JOnAS ......................................................................................... 1 1.2. Terminology .................................................................................................. 1 1.2.1. Server or JOnAS instance ...................................................................... 1 1.2.2. Service ............................................................................................... 1 1.2.3. Container ............................................................................................ 1 1.2.4. Domain .............................................................................................. 1 1.2.5. Master server ....................................................................................... 2 1.2.6. Cluster ................................................................................................ 2 2. Configuring a JOnAS instance ..................................................................................... 3 2.1. Configuring JOnAS Environment ....................................................................... 3 2.1.1. JONAS_ROOT structure ........................................................................ 3 2.1.2. JONAS_BASE structure ........................................................................ 4 2.1.3. JONAS_BASE creation ......................................................................... 5 2.1.4. JONAS_BASE/conf description .............................................................. 6 2.1.5. Server and services configuration ............................................................ 7 2.2. Configuring the communication protocol and JNDI ............................................. 12 2.2.1. Choosing the Protocol ......................................................................... 12 2.3. Configuring the logging System ....................................................................... 14 2.3.1. Monolog ........................................................................................... 14 2.3.2. trace.properties syntax ......................................................................... 14 2.3.3. default trace.properties file ................................................................... 16 2.3.4. Tips for setting loggers for JOnAS ......................................................... 16 2.3.5. Logging with particular log systems ....................................................... 18 2.4. Configuring JOnAS Services ........................................................................... 18 2.4.1. cmi service configuration ..................................................................... 18 2.4.2. db service configuration ....................................................................... 20 2.4.3. depmonitor service configuration ........................................................... 21 2.4.4. dbm service configuration .................................................................... 21 2.4.5. discovery service configuration ............................................................. 22 2.4.6. ear service configuration ...................................................................... 24 2.4.7. ejb2 Service configuration .................................................................... 25 2.4.8. ejb3 service configuration ..................................................................... 26 2.4.9. ha service configuration ....................................................................... 27 2.4.10. jaxrpc service configuration ................................................................ 27 2.4.11. jaxws service configuration ................................................................. 28 2.4.12. jmx service configuration ................................................................... 28 2.4.13. jtm service configuration .................................................................... 30 2.4.14. mail service configuration ................................................................... 30 2.4.15. registry service configuration ............................................................... 33 2.4.16. resource service configuration ............................................................. 33 2.4.17. security service configuration .............................................................. 34 2.4.18. smartclient service configuration .......................................................... 34 2.4.19. versioning service configuration ........................................................... 35 2.4.20. wc service configuration ..................................................................... 38 2.4.21. web service configuration ................................................................... 38 2.4.22. wm service configuration .................................................................... 39 2.4.23. wsdl-publisher service configuration ..................................................... 40 2.5. Configuring Security ...................................................................................... 41 2.5.1. jonas-realm.xml .................................................................................. 42 2.5.2. Servlet Authentication ......................................................................... 43 2.5.3. Client container Authentication ............................................................. 47 2.5.4. JAAS configuration ............................................................................. 47 2.6. Configuring JDBC Resource Adapters .............................................................. 50 2.6.1. Generic JDBC Resource Adapters .......................................................... 50 ii JOnAS 5 Configuration guide 2.6.2. Specific JDBC Resource Adapter ........................................................... 51 2.6.3. Examples of Specific JDBC Resource Adapter ......................................... 55 2.6.4. Tracing SQL Requests through P6Spy .................................................... 57 2.6.5. Migration from dbm service to the JDBC RA ........................................... 58 2.7. Configuring JMS Resource Adapters ................................................................ 59 2.7.1. JORAM Resource Adapter configuration files .......................................... 59 2.7.2. JORAM's Resource Adapter tuning ........................................................ 67 2.7.3. Undeploying and Redeploying a JORAM Adapter ..................................... 68 2.8. Configuring JDBC DataSources ....................................................................... 68 2.8.1. Configuring DataSources ...................................................................... 68 3. EasyBeans Server Configuration File .......................................................................... 73 3.1. Introduction .................................................................................................. 73 3.2. Configuration ............................................................................................... 74 3.2.1. RMI Component ................................................................................. 74 3.2.2. Transaction Component ....................................................................... 74 3.2.3. JMS Component ................................................................................. 74 3.2.4. HSQL Database .................................................................................. 75 3.2.5. JDBC Pool ........................................................................................ 75 3.2.6. Mail component ................................................................................. 75 3.2.7. SmartServer Component ...................................................................... 75 3.3. Advanced Configuration ................................................................................. 75 3.3.1. Mapping File ..................................................................................... 75 3.3.2. Other Configuration Files ..................................................................... 77 4. Glossary ................................................................................................................. 78 iii List of Examples 2.1. Configuring the cmi service in the server mode .......................................................... 19 2.2. Configuring the cmi service in the client mode ........................................................... 20 iv Chapter 1. Introduction 1.1. Configuring JOnAS Configuration is a task that may be more or less complex. Configuring a unique instance is obviously easier than configuring a cluster of servers. Configuration task consists mainly in customizing a set of JOnAS configuration files that compose the JOnAS environment see Section 2.1, “Configuring JOnAS Environment”. First of all, some terms used is this document must be defined: 1.2. Terminology 1.2.1. Server or JOnAS instance A server,