Jonas 5 Configuration Guide

Total Page:16

File Type:pdf, Size:1020Kb

Jonas 5 Configuration Guide 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,
Recommended publications
  • 9. Platforms – Java ME and Osgi
    Department of Computer Science Institute for System Architecture, Chair for Computer Networks Application Development for Mobile and Ubiquitous Computing 9. Platforms – Java ME and OSGi Dr. Ing. Thomas Springer Technische Universität Dresden Chair of Computer Networks JAVA MICRO EDITION Java Micro Edition - Overview Creation of Stand-alone applications for resource limited devices • Native programming limits portability and reusability • Java is a widely deployed platform • supports portability and reusability • issues with resource-limited devices for Java SE Sun divides today the Java-technology into 3 domains: • Java SE (Standard Edition) ⇨ Desktop applications • Java ME (Micro Edition) ⇨ Resource restricted systems • Java EE (Enterprise Edition) ⇨ Server-side solution Goals of Java ME • Portability of applications for large range of resource-limited devices • same (Java) programming model • Comfortable development of applications for mobile devices Fast growing distribution of Java Micro Edition • Number of Java ME-enabled mobile phones: o 2002: 31 Mio. o 2003: 88 Mio. o 2008: 592 Mio. (prognosis) Dr. Thomas Springer Application Development - Lecture 9. Platforms - Java ME and OSGi 3 Application Domains of Java ME Designed for devices with restrictions concerning processor power, memory, display size and networking capabilities Heterogeneous requirements for Java ME devices • Personal, mobile, networked devices o Mobile phones, PDA`s, Smart phones, pagers o Characteristics:• Simple User Interfaces • Memory capacity: 128 – 512 kb • Wireless network connection (low bandwidth) • Commonly used, stationary, networked devices o Set-Top-Boxes, video-phones, entertainment and navigation systems… o Characteristics:• More complex user interfaces • Memory capacity: 2 – 16 MB • Broadband network connection over TCP/IP Dr. Thomas Springer Application Development - Lecture 9.
    [Show full text]
  • Full-Graph-Limited-Mvn-Deps.Pdf
    org.jboss.cl.jboss-cl-2.0.9.GA org.jboss.cl.jboss-cl-parent-2.2.1.GA org.jboss.cl.jboss-classloader-N/A org.jboss.cl.jboss-classloading-vfs-N/A org.jboss.cl.jboss-classloading-N/A org.primefaces.extensions.master-pom-1.0.0 org.sonatype.mercury.mercury-mp3-1.0-alpha-1 org.primefaces.themes.overcast-${primefaces.theme.version} org.primefaces.themes.dark-hive-${primefaces.theme.version}org.primefaces.themes.humanity-${primefaces.theme.version}org.primefaces.themes.le-frog-${primefaces.theme.version} org.primefaces.themes.south-street-${primefaces.theme.version}org.primefaces.themes.sunny-${primefaces.theme.version}org.primefaces.themes.hot-sneaks-${primefaces.theme.version}org.primefaces.themes.cupertino-${primefaces.theme.version} org.primefaces.themes.trontastic-${primefaces.theme.version}org.primefaces.themes.excite-bike-${primefaces.theme.version} org.apache.maven.mercury.mercury-external-N/A org.primefaces.themes.redmond-${primefaces.theme.version}org.primefaces.themes.afterwork-${primefaces.theme.version}org.primefaces.themes.glass-x-${primefaces.theme.version}org.primefaces.themes.home-${primefaces.theme.version} org.primefaces.themes.black-tie-${primefaces.theme.version}org.primefaces.themes.eggplant-${primefaces.theme.version} org.apache.maven.mercury.mercury-repo-remote-m2-N/Aorg.apache.maven.mercury.mercury-md-sat-N/A org.primefaces.themes.ui-lightness-${primefaces.theme.version}org.primefaces.themes.midnight-${primefaces.theme.version}org.primefaces.themes.mint-choc-${primefaces.theme.version}org.primefaces.themes.afternoon-${primefaces.theme.version}org.primefaces.themes.dot-luv-${primefaces.theme.version}org.primefaces.themes.smoothness-${primefaces.theme.version}org.primefaces.themes.swanky-purse-${primefaces.theme.version}
    [Show full text]
  • EJB 3 in Action by Debu Panda Reza Rahman Ryan Cuprak Michael Remijan
    S AMPLE CHAPTER MANNING SECOND EDITION Debu Panda Reza Rahman Ryan Cuprak Michael Remijan EJB 3 in Action by Debu Panda Reza Rahman Ryan Cuprak Michael Remijan Chapter 1 Copyright 2014 Manning Publications brief contents PART 1OVERVIEW OF THE EJB LANDSCAPE................................1 1 ■ What’s what in EJB 3 3 2 ■ A first taste of EJB 25 PART 2WORKING WITH EJB COMPONENTS ..............................47 3 ■ Building business logic with session beans 49 4 ■ Messaging and developing MDBs 93 5 ■ EJB runtime context, dependency injection, and crosscutting logic 117 6 ■ Transactions and security 160 7 ■ Scheduling and timers 196 8 ■ Exposing EJBs as web services 214 PART 3USING EJB WITH JPA AND CDI .................................251 9 ■ JPA entities 253 10 ■ Managing entities 294 11 ■ JPQL 321 12 ■ Using CDI with EJB 3 359 v vi BRIEF CONTENTS PART 4PUTTING EJB INTO ACTION.......................................395 13 ■ Packaging EJB 3 applications 397 14 ■ Using WebSockets with EJB 3 427 15 ■ Testing and EJB 458 What’s what in EJB 3 This chapter covers ■ The EJB container and its role in Enterprise applications ■ The different types of Enterprise Java Beans (EJBs) ■ Closely related technologies such as the Java Persistence API (JPA) ■ The different EJB runtime environments ■ Innovations started with EJB 3 ■ New changes with EJB 3.2 One day, when God was looking over his creatures, he noticed a boy named Sadhu whose humor and cleverness pleased him. God felt generous that day and granted Sadhu three wishes. Sadhu asked for three reincarnations—one as a ladybug, one as an elephant, and the last as a cow.
    [Show full text]
  • Getting Started with Jonas 5
    Getting started with JOnAS 5 JOnAS Team ( Philippe Coq, Guillaume Sauthier) - March 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 Preface ........................................................................................................................ v 1. First contact with JOnAS 5 ......................................................................................... 1 1.1. How do I set up a JOnAS environment? ............................................................. 1 1.1.1. JONAS_BASE creation ......................................................................... 1 1.2. How can I check if everything is correct? ............................................................ 2 1.2.1. jonas check ......................................................................................... 2 1.3. How can I run a JOnAS server? ........................................................................ 2 1.4. How can I run my first Java EE application? ....................................................... 3 1.5. Understanding how all of this runs out of the box ................................................. 4 1.6. First step in JOnAS administration ..................................................................... 5 2. Learning JOnAS by examples
    [Show full text]
  • The Glassfish Community Delivering a Java EE Application Server
    The GlassFish Community: An Overview The GlassFish Community Delivering a Java EE Application Server Eduardo Pelegri-Llopart Yutaka Yoshida Alexis Moussine-Pouchkine Sun Microsystems, Inc. http://blogs.sun.com/theaquarium Last Updated September 2007 The GlassFish Community 1 At JavaOne 2005, Sun announced Project GlassFish, an initiative to open source its Application Server and the Java EE Reference Implementation (see inset: Project GlassFish). This was the first step of open sourcing all the Java platform, but it also had other effects. Project GlassFish Project GlassFish accelerated the adoption of Java EE 5, added a new enterprise-quality App Server Sun launched Project GlassFish to the options available to the Open Source in June 2005, during JavaOne, to community, and has lead to a Open Source the Reference transformation of how Sun's AppServer is Implementation for Java EE 5 and developed, tested, made available, and Sun's Application Server. evolved, in the process creating a much The first release followed less better product. than a year after, at JavaOne 2006 A year and a half after the initial launch, the (May 2006). GlassFish community has already delivered The second release was released its first final release and is on its way to its in September 2007. second. In this article we will provide an overview of all the aspects of the GlassFish The focus is now on GlassFish v3, Community and the GlassFish AppServer. the modular and lightweight application server (see HK2). What is GlassFish GlassFish is a Community and an Application Server. The community's main deliverables are a Java EE 5 compatible Application Server, the GlassFish AppServer, and the Reference Implementation for the Java Persistence API, TopLink Essentials.
    [Show full text]
  • Service Coroner: a Diagnostic Tool for Locating Osgi Stale References
    Service Coroner: A Diagnostic Tool for Locating OSGi Stale References Kiev Gama and Didier Donsez University of Grenoble, LIG laboratory, ADELE team {firstname.lastname}@imag.fr Abstract Moreover, the OSGi specification applies service- The OSGi Services Platform provides a framework oriented architecture principles to Java application for the dynamic deployment of Java-based design. The concept of service is important to decouple applications. It allows to install, to activate, to update the application modules in order to dynamically and to uninstall application modules without the need substitute or update individual modules without to restart the host Java Virtual Machine. However, the affecting the entire system. mishandling of such OSGi dynamics may result in a The OSGi has proved to be successful in embedded problem described in the OSGi specification as Stale systems. Its adoption in the software industry is References, which happen when services from continuously growing as more applications tend to take uninstalled modules are still referenced by active code. advantage of its pluggable architecture. One of the well It may lead to inconsistencies in application’s known cases is the Eclipse project [2] that since behavior, state and memory. Currently, there are no version 3.0 has migrated to the OSGi platform. A new tools available to address this issue. This paper trend in desktop applications [2] and server presents a diagnostics tool named ServiceCoroner that middlewares [3] (i.e., JOnAS, Weblogic, WebSphere) detects such problems. It helps developers and shows the growing adoption of OSGi as a modular administrators diagnose OSGi applications running layer for either commercial or open-source Java-based either in production or test environments.
    [Show full text]
  • Unit Test Virtualization with VMVM
    Unit Test Virtualization with VMVM Jonathan Bell Gail Kaiser Columbia University Columbia University 500 West 120th St, MC 0401 500 West 120th St, MC 0401 New York, NY USA New York, NY USA [email protected] [email protected] ABSTRACT by the test suite. These tests are added to existing unit test Testing large software packages can become very time in- suites and in an ideal continuous integration environment, tensive. To address this problem, researchers have inves- executed regularly (e.g., upon code check-ins, or nightly). tigated techniques such as Test Suite Minimization. Test Because developers are often creating new tests, as software Suite Minimization reduces the number of tests in a suite grows in size and complexity, its test suite frequently grows by removing tests that appear redundant, at the risk of a similarly. Software can reach a point where its test suite has reduction in fault-finding ability since it can be difficult to gotten so large that it takes too long to regularly execute identify which tests are truly redundant. We take a com- | previous work has reported test suites in industry taking pletely different approach to solving the same problem of several weeks to execute fully [36]. long running test suites by instead reducing the time needed To cope with long running test suites, testers might turn to execute each test, an approach that we call Unit Test to Test Suite Minimization or Test Suite Prioritization [43]. Virtualization. With Unit Test Virtualization, we reduce Test Suite Minimization techniques such as [14, 15, 22, 23, the overhead of isolating each unit test with a lightweight 27, 28, 38, 41] seek to reduce the total number of tests to virtualization container.
    [Show full text]
  • Extending an Open Source Enterprise Service Bus for Multi-Tenancy Support Focusing on Administration and Management
    Institute of Architecture of Application Systems University of Stuttgart Universitätsstraße 38 D-70569 Stuttgart Diplomarbeit Nr. 3226 Extending an Open Source Enterprise Service Bus for Multi-Tenancy Support Focusing on Administration and Management Dominik Muhler Course of Study: Software Engineering Examiner: Prof. Dr. Frank Leymann Supervisor: Dipl.-Inf. Steve Strauch Dipl.-Inf. Tobias Binz Commenced: July 28, 2011 Completed: January 27, 2012 CR-Classification: C.2.4, D.2.11, H.2.1, H.3.4 Abstract As part of cloud computing, the service model Platform-as-a-Service (PaaS) has emerged, where customers can develop and host internet-scale applications on cloud infrastructure. The Enterprise Service Bus (ESB) is one possible building block of a PaaS offering, providing integration capabilities for service-oriented architectures. Bringing the ESB to the cloud requires scalability and multi-tenancy support. When applied, these characteristics lead to economies of scale, reducing the costs per customer. In this diploma thesis we specify, design, and implement a multi-tenant management ap- plication for an existing open source ESB. The management application grants tenant users limited configuration access to the ESB’s connectivity and integration services. A tenant registry and a service registry serve as platform-wide databases. We ensure data isolation between tenants for the management application and ESB message flows. Furthermore, the management application can control clusters of ESB instances, retaining elasticity. These goals also involve extensions to the ESB itself, which implements the Java Business Integration (JBI) specification. As a result, an integration scenario emerged from the EU-funded project 4CaaSt was applied to the system.
    [Show full text]
  • Multitenancy Guide
    Multitenancy Guide JOnAS Team () - Jun 2012 - Copyright © OW2 Consortium 2012 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. Multitenancy .................................................................................................. 1 1.2. Shared application server ................................................................................. 1 2. Tenant context .......................................................................................................... 2 3. Customization ........................................................................................................... 3 3.1. Context root customization ............................................................................... 3 3.2. Data isolation in database ................................................................................. 3 3.3. JNDI names customization ............................................................................... 4 3.4. MBeans customization ..................................................................................... 5 3.5. Tenants administration isolation ......................................................................... 6 3.6. Logs customization
    [Show full text]
  • EJB 3.0 Programmer's Guide
    EJB 3.0 Programmer's Guide (Florent BENOIT) - March 2009 - Copyright © OW2 Consortium 2008-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 to EJB3 .................................................................................................. 1 1.1. Overview ....................................................................................................... 1 1.2. The Advantage of EJB3 ................................................................................... 1 1.3. EJB2 vs EJB3: EoD ........................................................................................ 1 1.4. New Features ................................................................................................. 2 1.4.1. Metadata Annotations ............................................................................ 2 1.4.2. Business Interceptors ............................................................................. 2 1.4.3. Lifecycle Interceptors ............................................................................ 2 1.4.4. Dependency Injection ............................................................................ 2 1.4.5. Persistence .......................................................................................... 2 2. Writing a HelloWorld Bean .......................................................................................
    [Show full text]
  • Easybeans Developer's Guide
    EasyBeans Developer's guide Florent BENOIT, OW2 consortium EasyBeans Developer's guide by Florent BENOIT Published $Id: developerguide.xml 216 2006-03-16 19:01:07Z benoitf $ Copyright © 2006-2008 OW2 Consortium Abstract The EasyBeans developer guide is intended for developers wanting to work with the source distribution of EasyBeans. People wanted to contribute to EasyBeans should read this documentation. 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 [http://creativecommons.org/licenses/by/2.0/] or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Table of Contents 1. Building EasyBeans From Source. ................................................................................ 1 1.1. Requirements ................................................................................................. 1 1.1.1. JDK ................................................................................................... 1 1.1.2. Maven ................................................................................................ 1 1.1.3. Ant .................................................................................................... 1 1.1.4. TestNG ............................................................................................... 1 1.1.5. Clover ................................................................................................ 1 1.2. Optional Requirements
    [Show full text]
  • Java Open Application Server (Jonas): a J2EETM Platform
    Java Open Application Server (JOnAS): a J2EETM Platform Last modified at 2006−11−30, JOnAS 4.8 This document provides an overview of the JOnAS platform. The content of this document is the following: • Introduction ♦ J2EE ♦ ObjectWeb • JOnAS Features ♦ System Requirements ♦ Java Standard Conformance ♦ Key Features ♦ JOnAS Packages • JOnAS Architecture ♦ Communication and Naming service ♦ EJB Container service ♦ WEB Container service ♦ Ear service ♦ Transaction service ♦ Database service ♦ Security service ♦ Messaging service ♦ JCA Resources service ♦ Management service ♦ Mail service ♦ WebServices service ♦ HA service • JOnAS Development and Deployment Environment ♦ JOnAS Configuration and Deployment Facilities ♦ JOnAS Development Environments • Clustering and Performance • Perspectives Introduction Java Open Application Server (JOnAS): a J2EETM Platform 1 Java Open Application Server (JOnAS): a J2EETM Platform J2EE The SunTM J2EE specification, together with its related specifications ( EJBTM, JMSTM,...), defines an architecture and interfaces for developing and deploying distributed Internet JavaTM server applications based on a multi−tier architecture. This specification intends to facilitate and standardize the development, deployment, and assembling of application components; such components will be deployable on J2EE platforms. The resulting applications are typically web−based, transactional, database−oriented, multi−user, secured, scalable, and portable. More precisely, this specification describes two kinds of information: • The
    [Show full text]