1168
B1WS-1045-03ENZ0(00) April 2014 Windows/Solaris/Linux FUJITSU Software Interstage Application Server Java EE Operator's Guide (Java EE 6 Edition)

Java EE Operator's Guide (Java EE 6 Edition)Java EE Operator's Guide (Java EE 6 Edition) Preface Purpose of this Document This document introduces the environment builds and application

  • Upload
    others

  • View
    61

  • Download
    0

Embed Size (px)

Citation preview

  • B1WS-1045-03ENZ0(00)April 2014

    Windows/Solaris/Linux

    FUJITSU SoftwareInterstage Application Server

    Java EE Operator's Guide (Java EE 6 Edition)

  • Preface

    Purpose of this DocumentThis document introduces the environment builds and application operations for the development of Interstage Java EE 6 applications.

    This manual is intended for the following readers:

    - People who operate applications using Java EE components

    Difference in Edition Features

    There are no Java EE 6-specific differences between Enterprise Edition and Standard-J Edition.

    Intended Readers

    It is assumed that readers of this document have some knowledge of the following:

    - Basic knowledge of the OS used

    - Basic knowledge about Java

    - Basic knowledge about Web Service

    - Basic knowledge about XML

    - Basic knowledge about the Internet

    - Basic knowledge about the relational database

    - Basic knowledge about the transaction model (client/server model)

    Structure of This Document

    This manual is organized as shown below:

    Chapter 1 Java EE 6 Overview

    This chapter provides an overview of Java EE 6, explains restrictions, and provides notes for the Java EE runtime environment.

    Chapter 2 Functionality Provided in the Java EE Application Runtime Environment

    This chapter explains the functionality provided in the Java EE application.

    Chapter 3 Java EE Application Development

    This chapter explains the development process of the Java EE application.

    Chapter 4 Java EE Application Operation

    This chapter explains the Java EE application operation method.

    Chapter 5 Java EE 6 Security

    This chapter explains the security features of Java EE 6.

    Chapter 6 Java EE 6 Tuning

    This chapter explains Java EE 6 tuning.

    Chapter 7 List of Definition Items

    This chapter explains the definition items for Java EE application operations. Refer to this chapter for details on the default values foreach definition item and the ranges that can be specified.

    Chapter 8 Maintenance(Resource Backup / migration of Resources to Another Server)

    This chapter explains the maintenance of the Java EE 6 application operating environment.

    - i -

  • Chapter 9 Java EE 6 Operation Commands

    This chapter explains the Java EE 6 operation commands.

    Chapter 10 Java EE 6 Messages

    This chapter explains the Java EE 6 related messages.

    Chapter 11 Troubleshooting

    This chapter explains how to solve problems in Java EE application operations.

    Chapter 12 Migrating Java EE 6

    This chapter explains how to migrate Java EE 6.

    Chapter 13 Tutorial

    This chapter explains the flow from building the production environment using Java EE 6 to operation of the sample application.

    Appendix A Java DB

    This appendix explains the Java DB.

    Appendix B File Configuration

    This appendix explains the Interstage Java EE 6 DAS service file configuration.

    Appendix C Log Files

    This appendix provides information about the logs that are output in Java EE 6.

    Appendix D Port Numbers

    This appendix explains using port numbers in Interstage Application Server.

    Appendix E Resident Processes

    This appendix provides information on the Interstage Application Server resident processes that need to be monitored.

    Appendix F Software Requirements

    This appendix lists the software required to use Java EE 6.

    Appendix G Message Information

    This appendix explains the messages that must be monitored.

    Appendix H Functional Comparison with Interstage HTTP Server 2.2

    This appendix explains the functional differences between the Interstage HTTP Server 2.2 and Java EE 6.

    Conventions

    Representation of Platform-specific Information

    In the manuals of this product, there are parts containing content that relates to all products that run on the supported platform. In this case,an icon indicating the product platform has been added to these parts if the content varies according to the product. For this reason, referonly to the information that applies to your situation.

    Indicates that this product (32-bit) is running on Windows.

    Indicates that this product (64-bit) is running on Windows.

    Indicates that this product (32/64-bit) is running on Windows.

    Indicates that this product (32-bit) is running on Solaris.

    Indicates that this product (64-bit) is running on Solaris.

    Indicates that this product (32/64-bit) is running on Solaris.

    Indicates that this product (32-bit) is running on Linux.

    Indicates that this product (64-bit) is running on Linux.

    - ii -

  • Indicates that this product (32/64-bit) is running on Linux.

    Terminology in this Document

    In this document, both machine property settings (Windows(R)) and Interstage startup environment variables (Solaris/Linux) may also bereferred to as "system environment variables".

    Product Notation

    The notation used in this document (shown below) corresponds to the product that supports the respective software.

    Notation Explanation

    RHEL5(x86) Interstage Application Server for Red Hat Enterprise Linux 5 (for x86)

    RHEL5(Intel64) Interstage Application Server for Red Hat Enterprise Linux 5 (for Intel64)

    RHEL6(x86) Interstage Application Server for Red Hat Enterprise Linux 6 (for x86)

    RHEL6(Intel64) Interstage Application Server for Red Hat Enterprise Linux 6 (for Intel64)

    Export Controls

    Exportation/release of this document may require necessary procedures in accordance with the regulations of the Foreign Exchange andForeign Trade Control Law of Japan and/or US export control laws.

    Trademarks

    Trademarks of other companies are used in this documentation only to identify particular products or systems.

    Product Trademarks/Registered Trademarks

    Microsoft, Active Directory, ActiveX, Excel, Internet Explorer, MS-DOS, MSDN, Visual Basic, Visual C++,Visual Studio, Windows, Windows NT, Windows Server, Win32 are either registered trademarks or trademarksof Microsoft Corporation in the United States and/or other countries.

    Oracle and Java are registered trademarks of Oracle and/or its affiliates.

    Other company and product names in this documentation are trademarks or registered trademarks of their respective owners.

    Copyrights

    Copyright 2012-2014 FUJITSU LIMITED

    April 2014 Third Edition

    November 2012 First Edition

    - iii -

  • ContentsChapter 1 Java EE 6 Overview................................................................................................................................................1

    1.1 Overview of Java EE 6........................................................................................................................................................................11.1.1 Servlet/JSP....................................................................................................................................................................................31.1.2 Enterprise JavaBeans (EJB)..........................................................................................................................................................31.1.3 Java Persistence API (JPA)...........................................................................................................................................................41.1.4 Web Service..................................................................................................................................................................................41.1.5 Transaction Service.......................................................................................................................................................................51.1.6 Java Message Service (JMS)........................................................................................................................................................61.1.7 Java EE Connector Architecture (Connector)..............................................................................................................................7

    1.2 Restrictions..........................................................................................................................................................................................71.2.1 Interstage Java EE 6 DAS Service Restrictions............................................................................................................................71.2.2 Application Operations Restrictions.............................................................................................................................................81.2.3 Security Functionality Restrictions.............................................................................................................................................111.2.4 Deployment Functionality Restrictions......................................................................................................................................111.2.5 asadmin Command Execution Restrictions................................................................................................................................131.2.6 Web Server Linkage Restrictions...............................................................................................................................................141.2.7 Other Restrictions.......................................................................................................................................................................14

    1.3 Notes on Interstage Operation...........................................................................................................................................................151.3.1 Notes About Deployment...........................................................................................................................................................161.3.2 Notes About Web Applications..................................................................................................................................................171.3.3 Notes About JMS........................................................................................................................................................................201.3.4 Notes on the Java EE 6 Password...............................................................................................................................................201.3.5 Notes on Log File Rotation.........................................................................................................................................................211.3.6 Notes on Executing the asadmin Command...............................................................................................................................211.3.7 Notes About EJB........................................................................................................................................................................211.3.8 Notes About JPA........................................................................................................................................................................211.3.9 Notes on the Connector Function...............................................................................................................................................221.3.10 Notes on the Web Service/Web Service Client........................................................................................................................231.3.11 Notes on Context and Dependency Injection (CDI).................................................................................................................231.3.12 Notes on Access Privileges for the Resource when the Service Operator User was Changed.................................................231.3.13 Notes Related to Date/Time......................................................................................................................................................231.3.14 Notes on the Temporary File....................................................................................................................................................241.3.15 Notes on Using Security Manager............................................................................................................................................24

    Chapter 2 Functionality Provided in the Java EE Application Runtime Environment.............................................................262.1 Overall Configurations......................................................................................................................................................................26

    2.1.1 Interstage Java EE 6 Operating Environment.............................................................................................................................262.1.2 JDK/JRE used by Java EE 6.......................................................................................................................................................272.1.3 Java EE 6 Common Directory....................................................................................................................................................272.1.4 Repository Synchronization........................................................................................................................................................282.1.5 User Name and Password Used in the Java EE 6 Environment.................................................................................................302.1.6 Customizing a Service Operator User........................................................................................................................................30

    2.2 PCMI Service.....................................................................................................................................................................................302.2.1 Functions Provided in the PCMI Service...................................................................................................................................312.2.2 PCMI Service File Configuration...............................................................................................................................................332.2.3 PCMI Service Logs.....................................................................................................................................................................35

    2.3 Interstage Java EE 6 DAS Service.....................................................................................................................................................352.3.1 Interstage Java EE 6 DAS Service File Configuration...............................................................................................................362.3.2 Interstage Java EE 6 DAS Service Current Directory................................................................................................................362.3.3 Interstage Java EE 6 DAS Service Log Files.............................................................................................................................362.3.4 Interstage Java EE 6 DAS Service Instance Names and Definition Information.......................................................................362.3.5 Differences with IJServer Cluster...............................................................................................................................................37

    2.4 IJServer Cluster..................................................................................................................................................................................372.4.1 IJServer Cluster File Configuration............................................................................................................................................382.4.2 IJServer Cluster Multiple Process Configurations......................................................................................................................39

    - iv -

  • 2.4.3 Degeneration...............................................................................................................................................................................412.5 Common Function of the Interstage Java EE 6 DAS Service and IJServer Cluster (Server Instance).............................................42

    2.5.1 Life-and-death Monitoring of the Java VM Process..................................................................................................................422.5.2 Controlling Insufficient Space in the Java Heap/Permanent Generation Area...........................................................................442.5.3 Monitoring the Maximum Application Processing Time...........................................................................................................452.5.4 Process Start Time Monitoring/Stop Time Monitoring..............................................................................................................482.5.5 Keep Alive Monitoring...............................................................................................................................................................502.5.6 Alert Monitoring.........................................................................................................................................................................51

    2.5.6.1 Alert Monitoring Warning Message (Java Heap)................................................................................................................522.5.6.2 Alert Monitoring Warning Message (Garbage Collection).................................................................................................53

    2.6 Web Container...................................................................................................................................................................................552.6.1 Servlet.........................................................................................................................................................................................55

    2.6.1.1 HTTP Session......................................................................................................................................................................552.6.1.2 Error Page............................................................................................................................................................................562.6.1.3 Welcome File.......................................................................................................................................................................572.6.1.4 File Upload Function...........................................................................................................................................................57

    2.6.2 JSP..............................................................................................................................................................................................572.6.2.1 JSP Auto Reload..................................................................................................................................................................57

    2.6.3 Character Encoding.....................................................................................................................................................................592.6.4 Default MIME Type...................................................................................................................................................................61

    2.7 HTTP Service....................................................................................................................................................................................622.7.1 HTTP Listener............................................................................................................................................................................63

    2.7.1.1 Changing the HTTP Listener Port Number.........................................................................................................................632.7.1.2 HTTP Listener Port Blocking..............................................................................................................................................64

    2.7.2 HTTP Access Log.......................................................................................................................................................................642.7.3 HTTP Trace Log.........................................................................................................................................................................642.7.4 Network Configuration...............................................................................................................................................................65

    2.7.4.1 Number of Simultaneous Processes/Connections................................................................................................................652.7.4.2 Access Control/Security Measures......................................................................................................................................652.7.4.3 Size Constraints...................................................................................................................................................................652.7.4.4 Timeout................................................................................................................................................................................662.7.4.5 Keep Alive...........................................................................................................................................................................66

    2.8 Web Server Connector.......................................................................................................................................................................662.8.1 Request Distribution Control by Web Server Connector...........................................................................................................672.8.2 Monitoring Web Server Connector Faults..................................................................................................................................68

    2.9 Functionality Provided in EJB...........................................................................................................................................................702.9.1 Session Bean Runtime Environment..........................................................................................................................................702.9.2 Message-driven Bean Runtime Environment.............................................................................................................................71

    2.10 Time Monitoring Functionality that can be Used in the EJB Container.........................................................................................732.10.1 Non-communication Time Monitoring Functionality for the Stateful Session Bean Instance.................................................742.10.2 Transaction Completion Time Monitoring Functionality for the EJB Container.....................................................................752.10.3 EJB Timer Service....................................................................................................................................................................75

    2.11 Functionality Provided in JPA.........................................................................................................................................................792.11.1 JPA Runtime Environment.......................................................................................................................................................792.11.2 Persistence Provider Settings....................................................................................................................................................802.11.3 Supported Database and Settings..............................................................................................................................................822.11.4 Supporting Java Data Types and DBMS SQL Data Types Defined in the Entity....................................................................832.11.5 Functionality for the Automatic Generation of Primary Key Values.......................................................................................852.11.6 Lock Functionality for the Line................................................................................................................................................862.11.7 SQL Log Functionality.............................................................................................................................................................87

    2.12 ORB (Object Request Broker)/RMI-IIOP.......................................................................................................................................882.13 Application Client Container...........................................................................................................................................................892.14 JNDI.................................................................................................................................................................................................90

    2.14.1 Naming Service.........................................................................................................................................................................922.14.2 Environment Naming Context..................................................................................................................................................952.14.3 Differences in Specifications between Naming Service and Environment Naming Context.................................................103

    2.15 Transaction Control.......................................................................................................................................................................104

    - v -

  • 2.15.1 Local Transactions and Global Transactions..........................................................................................................................1052.15.2 How to Control Transactions..................................................................................................................................................1082.15.3 2-phase Commit Protocol.......................................................................................................................................................1082.15.4 Managing Transaction Resources...........................................................................................................................................1102.15.5 Transaction Log......................................................................................................................................................................1102.15.6 Transaction Monitoring and Freeze Functionality..................................................................................................................110

    2.16 Connection Pool.............................................................................................................................................................................1112.17 Database Connection/JDBC..........................................................................................................................................................1132.18 Time Monitoring Functionality that can be Used at the Time of Database Connection...............................................................1142.19 JMS Functions that are Provided...................................................................................................................................................115

    2.19.1 Message Broker......................................................................................................................................................................1162.19.2 Message Broker Functions......................................................................................................................................................1182.19.3 Physical Storage Destination Management............................................................................................................................1192.19.4 Connection Service.................................................................................................................................................................1242.19.5 Port mapper.............................................................................................................................................................................1262.19.6 Routing service.......................................................................................................................................................................1272.19.7 Persistence Service.................................................................................................................................................................1272.19.8 High-reliability Function........................................................................................................................................................1272.19.9 Predelivery..............................................................................................................................................................................130

    2.20 Functionality Provided in the Connector.......................................................................................................................................1342.20.1 Definition of the Connector Connection Pool and Connector Resources..............................................................................1342.20.2 Outbound/resource Adapter Transaction Control...................................................................................................................1352.20.3 Connections with Message-driven Bean.................................................................................................................................1352.20.4 Definition of Managed Object Resources...............................................................................................................................1362.20.5 JavaBean Configurations........................................................................................................................................................1362.20.6 Execution of Work when the Thread Pool is Used.................................................................................................................137

    2.21 Time Monitoring Functionality that can be Used in the Connector..............................................................................................1372.22 Class Loader..................................................................................................................................................................................137

    2.22.1 Class Loader Configuration....................................................................................................................................................1382.22.2 Classification of Class Loaders...............................................................................................................................................1392.22.3 Changing the Delegation Model of the Web Class Loader....................................................................................................1412.22.4 Settings for classes used in Interstage Java EE 6....................................................................................................................1412.22.5 Setting the XML Parser..........................................................................................................................................................1422.22.6 Notes About Using the Class Loader......................................................................................................................................142

    2.23 JAX-RS..........................................................................................................................................................................................1432.23.1 JAX-RS Applications.............................................................................................................................................................1432.23.2 JAX-RS Application Development........................................................................................................................................1442.23.3 Support for JSON in JAX-RS Applications...........................................................................................................................144

    2.24 Lifecycle Module...........................................................................................................................................................................1442.24.1 Design Procedure for the Lifecycle Module...........................................................................................................................1452.24.2 Operation Procedure for the Lifecycle Module......................................................................................................................146

    2.25 Time Monitoring Features that can be Used in IIOP Communication..........................................................................................1462.25.1 IIOP Connection Wait Time Monitoring Feature...................................................................................................................1462.25.2 IIOP Communication Server Method Recovery Time Monitoring Feature...........................................................................1492.25.3 IIOP Communication Socket Send/Receive Wait Time Monitoring Feature.........................................................................150

    Chapter 3 Java EE Application Development.......................................................................................................................1543.1 Creating the Application..................................................................................................................................................................154

    3.1.1 Developing Web Service Applications.....................................................................................................................................1543.1.2 Developing Web Service Client Applications..........................................................................................................................1583.1.3 Data Types that can be Used in Web Service Communication................................................................................................1613.1.4 WSDL Descriptions that are Used in the Web Service/Web Service Client............................................................................1703.1.5 Creating the Client Application................................................................................................................................................1713.1.6 How to Use JNDI......................................................................................................................................................................1723.1.7 Creating Applications that Connect to the Database................................................................................................................1733.1.8 Creating the Lifecycle Module.................................................................................................................................................1753.1.9 Creating JMS Client Applications............................................................................................................................................178

    - vi -

  • 3.1.10 How to Create JAX-RS Applications.....................................................................................................................................1783.1.11 How to Use JSON Data in JAX-RS Applications..................................................................................................................182

    3.1.11.1 Overview of JSON Data..................................................................................................................................................1823.1.11.2 How to Use JSON Data...................................................................................................................................................1833.1.11.3 Serialization Rules...........................................................................................................................................................1853.1.11.4 Deserialization Rules.......................................................................................................................................................1873.1.11.5 Library Module................................................................................................................................................................1903.1.11.6 Encoding..........................................................................................................................................................................1913.1.11.7 Coding Examples.............................................................................................................................................................191

    3.2 deployment descriptor......................................................................................................................................................................1923.2.1 Interstage deployment descriptor..............................................................................................................................................193

    3.2.1.1 Interstage application deployment descriptor (glassfish-application.xml)........................................................................1933.2.1.2 Interstage Web application deployment descriptor (glassfish-web.xml)...........................................................................1943.2.1.3 Interstage EJB application deployment descriptor (glassfish-ejb-jar.xml)........................................................................1963.2.1.4 Interstage application client deployment descriptor (glassfish-application-client.xml)....................................................2003.2.1.5 Interstage ACC deployment descriptor (sun-acc.xml)......................................................................................................2013.2.1.6 Tag and Description of the Interstage deployment descriptor...........................................................................................202

    3.3 Application Debugging....................................................................................................................................................................2143.3.1 Debugging Using the Application Debug Information.............................................................................................................2143.3.2 Debugging Using the Debugger...............................................................................................................................................2143.3.3 Debugging Using the Thread Stamp.........................................................................................................................................2143.3.4 Debugging Using the Java Method Trace Function.................................................................................................................214

    Chapter 4 Java EE Application Operation............................................................................................................................2154.1 Operations Using Commands..........................................................................................................................................................2154.2 PCMI Service Operations................................................................................................................................................................215

    4.2.1 Interstage Java EE 6 Installation and PCMI Service................................................................................................................2154.2.2 Starting......................................................................................................................................................................................2164.2.3 Stopping....................................................................................................................................................................................2164.2.4 Obtaining Status Information....................................................................................................................................................2174.2.5 Automatically Starting/Stopping the Service...........................................................................................................................2184.2.6 Exit Function during Service Startup/Stop...............................................................................................................................218

    4.2.6.1 Exit Function Definition File.............................................................................................................................................2184.2.6.2 Script Files Executed in Exit Functions.............................................................................................................................220

    4.2.7 Changing the Settings...............................................................................................................................................................2224.3 Interstage Java EE 6 DAS Service Operations................................................................................................................................222

    4.3.1 Operations.................................................................................................................................................................................2224.3.2 Changing the Settings...............................................................................................................................................................2234.3.3 Environment Variable Settings.................................................................................................................................................2234.3.4 Deploying the Application........................................................................................................................................................2234.3.5 Creating Resources...................................................................................................................................................................2234.3.6 Automatically Starting/Stopping the Service...........................................................................................................................223

    4.4 IJServer Cluster Operations.............................................................................................................................................................2234.4.1 Creating/Deleting an IJServer Cluster......................................................................................................................................2234.4.2 Adding/Deleting a Server Instance...........................................................................................................................................2244.4.3 Starting/Stopping/Displaying the Operational Status of an IJServer Cluster...........................................................................2254.4.4 Starting/Stopping/Displaying the Operational Status of a Server Instance..............................................................................2254.4.5 Recovering a "Partially Running" IJServer Cluster..................................................................................................................226

    4.5 Deploying Applications...................................................................................................................................................................2264.5.1 Overview of Java EE Deployment............................................................................................................................................2274.5.2 Procedure for Deploying Applications.....................................................................................................................................2274.5.3 Procedure for Undeploying Applications.................................................................................................................................2284.5.4 Displaying a List of Deployed Applications.............................................................................................................................2284.5.5 Setting the Environment for Applications that have Already been Deployed..........................................................................2284.5.6 Changing the Activity State of Applications............................................................................................................................2284.5.7 Redeploying Applications.........................................................................................................................................................229

    4.6 Operation Configurations for Accessing Applications....................................................................................................................230

    - vii -

  • 4.6.1 Operation Configurations Determined by Differences in Purpose...........................................................................................2304.6.2 Operation Configurations Determined by Differences in Communication Paths....................................................................2314.6.3 Operation Configurations Determined by Differences in the Number of Concurrent Processes.............................................232

    4.6.3.1 Operations Involving a Single Process..............................................................................................................................2324.6.3.2 Operations based on Concurrent Processes on a Single Machine.....................................................................................2334.6.3.3 Operations involving Multiple Machines..........................................................................................................................234

    4.6.4 Operation Configurations that Use an SSL Accelerator...........................................................................................................2364.7 Preparations for Operations Performed via a Web Server...............................................................................................................237

    4.7.1 Setting the Web Server Environment.......................................................................................................................................2374.7.2 Setting the Web Server Connector Environment......................................................................................................................2374.7.3 Linkage Settings for the Web Server and the IJServer Cluster................................................................................................237

    4.7.3.1 Operating the Web Server and the IJServer Cluster on the Same Machine......................................................................2384.7.3.2 Operating the Web Server and the IJServer Cluster on Different Machines.....................................................................239

    4.7.4 Preparatory Monitoring Web Server Connector Faults Operations..........................................................................................2414.8 Preparations for Operations Not Performed via a Web Server........................................................................................................243

    4.8.1 Building a New Environment...................................................................................................................................................2434.8.2 Changing from Operations Using the Web Server...................................................................................................................243

    4.8.2.1 Operating the Web Server and the IJServer Cluster on the Same Machine......................................................................2444.8.2.2 Operating the Web server and the IJServer Cluster on Different Machines.....................................................................244

    4.9 Java EE Application Client Operations...........................................................................................................................................2444.9.1 Setting the Java EE Application Client Environment...............................................................................................................2444.9.2 Java EE Application Client Operation......................................................................................................................................246

    4.10 Procedure When the Web Service Is Used....................................................................................................................................2484.10.1 Deploying Web Service Applications.....................................................................................................................................2494.10.2 Customizing the Web Service Operating Environment..........................................................................................................249

    4.11 Procedure When the Web Service Client Is Used.........................................................................................................................2514.11.1 Web Service Client Operating Environment..........................................................................................................................2514.11.2 Executing the Web Service Client..........................................................................................................................................252

    4.12 Setting the JNDI Environment.......................................................................................................................................................2524.12.1 Setting Environment Variables...............................................................................................................................................2524.12.2 Settings When the Initial Context Is Generated......................................................................................................................2534.12.3 Settings for Connections from the Client to the Server..........................................................................................................253

    4.13 Preparatory Tasks for Resource Definitions..................................................................................................................................2544.13.1 Procedure When JMS Is Used................................................................................................................................................2544.13.2 Procedure When JavaMail Is Used.........................................................................................................................................2544.13.3 Procedure When JDBC Is Used..............................................................................................................................................2544.13.4 Procedure When the Connector Is Used.................................................................................................................................2554.13.5 Procedure When a Resource Defined by the User Independently Is Used.............................................................................255

    4.13.5.1 Method Used to Define Custom Resources.....................................................................................................................2554.13.5.2 Method Used to Define External Resources....................................................................................................................257

    4.13.6 Procedure for Changing the Resource Status.........................................................................................................................2574.13.7 Procedure for Selecting the Target for Running Resources...................................................................................................2584.13.8 Relationship between JMS Resources and Connector Resources..........................................................................................259

    4.14 Setting the Database Environment.................................................................................................................................................2614.14.1 Setting the JDBC Driver Environment...................................................................................................................................2614.14.2 Java DB JDBC Driver (Type4)...............................................................................................................................................2654.14.3 Oracle Thin JDBC Driver (Type4).........................................................................................................................................2674.14.4 Oracle OCI JDBC Driver (Type2)..........................................................................................................................................2684.14.5 Symfoware JDBC Driver (Type2)..........................................................................................................................................2704.14.6 Microsoft(R) SQL Server(TM) JDBC Driver (Type4)...........................................................................................................2744.14.7 Ping Functionality...................................................................................................................................................................275

    4.15 JMS Operation Methods................................................................................................................................................................2764.15.1 Design Methods......................................................................................................................................................................2774.15.2 Message Broker Operation Modes.........................................................................................................................................2794.15.3 Message Broker Operations in REMOTE mode....................................................................................................................2804.15.4 Message Broker Operations in EMBEDDED mode...............................................................................................................2864.15.5 Preparation for Sending/Receiving JMS Messages................................................................................................................290

    - viii -

  • 4.15.6 Operating JMS Client Applications........................................................................................................................................2924.15.7 Message Broker Log...............................................................................................................................................................293

    4.16 Connector Operation Method........................................................................................................................................................2944.16.1 Deploying the Connector Module and Creation of Resource Definitions..............................................................................2944.16.2 Undeploying the Connector Module and Deleting Resource Definitions..............................................................................297

    4.17 Java EE Application Logs..............................................................................................................................................................2974.17.1 Server Log...............................................................................................................................................................................2984.17.2 Java VM Log..........................................................................................................................................................................3004.17.3 HTTP Access Log...................................................................................................................................................................3024.17.4 HTTP Trace Log.....................................................................................................................................................................3054.17.5 Log File Rotation....................................................................................................................................................................3084.17.6 Notes on when the Log is Output from the Application.........................................................................................................311

    4.18 Operations where Enterprise JavaBeans are Accessed..................................................................................................................3124.18.1 Accessing Session Beans........................................................................................................................................................3124.18.2 Accessing Message-Driven Beans..........................................................................................................................................3154.18.3 Settings for the Client (the Caller)..........................................................................................................................................315

    Chapter 5 Java EE 6 Security..............................................................................................................................................3165.1 Security Measures for Java EE........................................................................................................................................................3165.2 Java EE 6 Operating Environment Security Function.....................................................................................................................318

    5.2.1 Java EE 6 Operating Environment Security Overview............................................................................................................3185.2.2 Java EE 6 Operating Environment Roles.................................................................................................................................3195.2.3 Effective User for Processes.....................................................................................................................................................3215.2.4 Login Authentication................................................................................................................................................................3225.2.5 Privileges and Authenticated Users..........................................................................................................................................3225.2.6 Registering the Administrator User..........................................................................................................................................324

    5.2.6.1 Realm for Login Authentication........................................................................................................................................3245.2.6.2 File Realm Settings............................................................................................................................................................3255.2.6.3 Notes on Updating Admin-realm and Administrator User Information............................................................................326

    5.2.7 Specifying the Administrator User...........................................................................................................................................3265.2.7.1 Login Authentication for the asadmin Command..............................................................................................................327

    5.2.8 Master Password.......................................................................................................................................................................3275.2.9 Encrypted Communication for Operation Management Operations........................................................................................328

    5.3 Java EE 6 Application Security Functionality.................................................................................................................................3295.3.1 Authentication...........................................................................................................................................................................3305.3.2 Authorization............................................................................................................................................................................3315.3.3 SSL............................................................................................................................................................................................332

    5.3.3.1 Java EE 6 Runtime Environment Settings.........................................................................................................................3325.3.3.2 Certificates.........................................................................................................................................................................3325.3.3.3 Certificate Settings.............................................................................................................................................................3345.3.3.4 Settings for the Certificate Signed by the CA....................................................................................................................3355.3.3.5 Self-Signed Certificate Settings.........................................................................................................................................3395.3.3.6 Deleting the Certificate......................................................................................................................................................339

    5.3.4 User/Group/Role.......................................................................................................................................................................3405.3.5 Realm........................................................................................................................................................................................3415.3.6 Spreading Authentication Information to the EJB Container...................................................................................................3415.3.7 Security Manager......................................................................................................................................................................343

    5.4 Method of Operation Using the Security Functionality...................................................................................................................3445.4.1 Role and Role-based Access Restriction Settings....................................................................................................................3445.4.2 Mapping a User/Group to a Role..............................................................................................................................................3465.4.3 Creating the Realm...................................................................................................................................................................3485.4.4 Default Realm Settings.............................................................................................................................................................3485.4.5 Managing File Realm Users and Groups..................................................................................................................................3485.4.6 Security Manager Operations...................................................................................................................................................349

    5.5 Web Service Security Settings.........................................................................................................................................................3505.6 Web Service Client Security Settings..............................................................................................................................................3505.7 Authentication Information at the time of Resource Access...........................................................................................................351

    - ix -

  • 5.8 JMS Security Function.....................................................................................................................................................................3535.8.1 Users and groups.......................................................................................................................................................................3535.8.2 Access Control Properties File.................................................................................................................................................3545.8.3 Authentication Method for Using JMS from an Application...................................................................................................358

    Chapter 6 Java EE 6 Tuning................................................................................................................................................3606.1 Interstage Java EE 6 DAS Service Tuning......................................................................................................................................360

    6.1.1 Port Numbers Used in Operation Management........................................................................................................................3606.1.2 Java VM Heap and Permanent Area Size.................................................................................................................................3646.1.3 Number of Garbage Collections...............................................................................................................................................364

    6.1.3.1 Tuning the Frequency of Java RMI Automatic Garbage Collection.................................................................................3646.2 PCMI Service Tuning......................................................................................................................................................................364

    6.2.1 Changing the PCMI Profile......................................................................................................................................................3656.2.2 Process Automatic Retry Count................................................................................................................................................3686.2.3 Changing the PCMI Service Operation Definition...................................................................................................................369

    6.3 IJServer Cluster Tuning...................................................................................................................................................................3696.3.1 Java VM Heap and Permanent Area Size.................................................................................................................................3696.3.2 Number of Garbage Collections...............................................................................................................................................370

    6.3.2.1 Occurrence Count for Automatic Garbage Collection using the RMI Feature.................................................................3706.4 Web Container Tuning.....................................................................................................................................................................370

    6.4.1 Web Container Processing Flow...............................................................................................................................................3706.4.2 Number of Simultaneous Processes..........................................................................................................................................3716.4.3 Number of Connections............................................................................................................................................................3726.4.4 Keep Alive................................................................................................................................................................................373

    6.5 EJB Container Tuning.....................................................................................................................................................................3746.5.1 Thread Pooling..........................................................................................................................................................................3746.5.2 Enterprise Bean Instance Caching............................................................................................................................................3776.5.3 Enterprise Bean Instance Pooling.............................................................................................................................................3786.5.4 Functionality that Prevents Data Copying Using Remote Access in the Same Java VM........................................................380

    6.6 JPA Tuning......................................................................................................................................................................................3806.6.1 Persistence Context Cache........................................................................................................................................................3806.6.2 Shared Persistence Unit Cache.................................................................................................................................................382

    6.7 Web Service Tuning........................................................................................................................................................................3856.8 Tuning the Database Linkage Environment....................................................................................................................................385

    6.8.1 Number of Connections in the Pool..........................................................................................................................................3856.8.2 Connection Validation..............................................................................................................................................................3876.8.3 Transaction Management..........................................................................................................................................................3896.8.4 Detail Attributes........................................................................................................................................................................389

    6.9 Connector Tuning............................................................................................................................................................................3906.9.1 Number of Connections in the Pool..........................................................................................................................................3906.9.2 Connection Validation..............................................................................................................................................................3926.9.3 Transaction Management..........................................................................................................................................................3936.9.4 Shutdown Timeout....................................................................................................................................................................393

    6.10 Transaction Service Tuning...........................................................................................................................................................3946.11 ORB Tuning...................................................................................................................................................................................394

    6.11.1 ORB........................................................................................................................................................................................3956.11.2 Notes on Communication Data Size.......................................................................................................................................397

    6.12 Action when a Warning is Generated by the Alert Monitoring Function.....................................................................................3986.13 Interstage Java EE 6 DAS Service Heap Size...............................................................................................................................3996.14 Correlative Time Monitoring Function Relationships...................................................................................................................400

    6.14.1 HTTP Communication............................................................................................................................................................4016.14.2 IIOP Communication..............................................................................................................................................................4036.14.3 Transactions and Database Access.........................................................................................................................................404

    6.15 Resource Requirements.................................................................................................................................................................4056.15.1 Disk Space Requirements.......................................................................................................................................................405

    6.16 System Resource Settings..............................................................................................................................................................4086.16.1 Java EE 6 Thread Number......................................................................................................................................................408

    - x -

  • Chapter 7 List of Definition Items.........................................................................................................................................4107.1 PCMI Service Definition Items.......................................................................................................................................................4127.2 Server Instance Definition Items.....................................................................................................................................................4197.3 Cluster Definition Items...................................................................................................................................................................4207.4 Application-related Definition Items...............................................................................................................................................421

    7.4.1 Java EE Application Definition Items......................................................................................................................................4217.4.2 Web Application Definition Items............................................................................................................................................4237.4.3 EJB Module Definition Items...................................................................................................................................................4257.4.4 Application Client Module Definition Items............................................................................................................................4277.4.5 Connector Module Definition Items.........................................................................................................................................4287.4.6 Lifecycle Module Definition Items...........................................................................................................................................430

    7.5 Resource-related Definition Items...................................................................................................................................................4327.5.1 JDBC Connection Pool Definition Items..................................................................................................................................4327.5.2 JDBC Resource Definition Items.............................................................................................................................................4427.5.3 JMS Connection Factory Definition Items...............................................................................................................................4447.5.4 JMS Send Destination Resource Definition Items...................................................................................................................4497.5.5 JavaMail Session Definition Items...........................................................................................................................................4517.5.6 Connector Connection Pool Definition Items...........................................................................................................................4557.5.7 Connector Resource Definition Items.......................................................................................................................................4627.5.8 Managed Object Resource Definition Items.............................................................................................................................4637.5.9 Resource Adapter Definition Information Definition Items.....................................................................................................4657.5.10 Custom Resource Definition Items.........................................................................................................................................4667.5.11 External Resource Definition Items........................................................................................................................................468

    7.6 Message Broker Option Properties..................................................................................................................................................4717.6.1 Connection Service Properties..................................................................................................................................................4717.6.2 Routing Service Properties.......................................................................................................................................................4747.6.3 Physical Storage Destination Automatic Generation Properties..............................................................................................4767.6.4 Persistence Service Properties..................................................................................................................................................4807.6.5 Security Properties....................................................................................................................................................................4817.6.6 Log Function Properties............................................................................................................................................................4817.6.7 Physical Storage Destination Generation or Update Properties...............................................................................................482

    7.7 Operating Environment-related Definition Items............................................................................................................................4857.7.1 Properties Used when Creating and Updating Definitions.......................................................................................................4857.7.2 HTTP Service Definition Items................................................................................................................................................4897.7.3 Network Configuration Definition Items..................................................................................................................................4957.7.4 IIOP Service Definition Items..................................................................................................................................................5097.7.5 Managed Service Definition Items...........................................................................................................................................5147.7.6 Connector Service Definition Items.........................................................................................................................................5157.7.7 Web Container Definition Items...............................................................................................................................................5167.7.8 EJB Container Definition Items................................................................................................................................................5177.7.9 Message-driven Bean Default Pool Definition Items...............................................................................................................5237.7.10 JMS Service Definition Items.................................................................................................................................................5257.7.11 Logger Definition Items..........................................................................................................................................................5277.7.12 Security Definition Items........................................................................................................................................................5297.7.13 Transaction Service Definition Items.....................................................................................................................................5327.7.14 Java VM Definition Items.......................................................................................................................................................5367.7.15 Thread Pool Definition Items.................................................................................................................................................543

    Chapter 8 Maintenance(Resource Backup / migration of Resources to Another Server)....................................................5478.1 Backing Up and Restoring Resources.............................................................................................................................................547

    8.1.1 Resources that can be Backed Up and Restored.......................................................................................................................5478.1.1.1 Java EE 6 resources...........................................................................................................................................................5478.1.1.2 Web Server Connector (for Interstage HTTP Server 2.2) resources.................................................................................547

    8.1.2 Backup Procedure.....................................................................................................................................................................5478.1.2.1 Stopping Services..............................................................................................................................................................5478.1.2.2 Backup Command..............................................................................................................................................................548

    8.1.3 Restore Procedure.....................................................................................................................................................................549

    - xi -

  • 8.1.3.1 Stopping Services..............................................................................................................................................................5498.1.3.2 Restore Command..............................................................................................................................................................5498.1.3.3 Tasks that Follow the Restore of the Java EE 6 Resources...............................................................................................550

    8.2 Moving Resources to Another Server(export/import).....................................................................................................................5518.2.1 Resources..................................................................................................................................................................................5518.2.2 Export Procedure......................................................................................................................................................................5518.2.3 Import Procedure......................................................................................................................................................................551

    8.2.3.1 Stopping Services..............................................................................................................................................................5518.2.3.2 Restore Command..............................................................................................................................................................5518.2.3.3 Tasks After the Resources are Imported............................................................................................................................552

    Chapter 9 Java EE 6 Operation Commands........................................................................................................................5569.1 asadmin...........................................................................................................