uCosminexus Application Server

EJB Container Functionality Guide

3020-3-Y06-10(E)


Contents

Notices
Summary of amendments
Preface

1. Application Server Functionality
1.1 Classification of functionality
1.1.1 Functionality that serves as a platform for executing applications
1.1.2 Functionality for operating and maintaining a platform for executing applications
1.1.3 Correspondence between functionality and manuals
1.2 Functionality corresponding to the purpose of the system
1.2.1 EJB container functionality
1.2.2 Functionality of EJB Client
1.3 Explanation of the functionality described in this manual
1.3.1 Meaning of the classification
1.3.2 Example table describing the classification
1.4 Main updates in the functionality of Application Server 09-50

2. EJB Container
2.1 Organization of this chapter
2.2 Executing an Enterprise Bean
2.2.1 Types of Enterprise Bean
2.2.2 Interface for Enterprise Bean
2.2.3 Lifecycle of Enterprise Beans
2.3 Checking the compliance with EJB specifications
2.4 Mapping of CMP fields and data types
2.4.1 Range of Java data type supported in CMP
2.4.2 Mapping the CMP field and database
2.4.3 Precautions for using CMP
2.5 Registering a reference in the JNDI name space of the EJB container
2.5.1 Registering a reference in the java:comp/env name space
2.5.2 Defining in cosminexus.xml
2.5.3 Setting up in the execution environment
2.6 Connecting to an external resource
2.7 Transaction management in an Enterprise Bean
2.7.1 Types of transaction management methods in an Enterprise Bean
2.7.2 BMT
2.7.3 CMT
2.7.4 Defining in cosminexus.xml
2.7.5 Settings in the execution environment
2.8 Cache models of an Entity Bean
2.8.1 Types of cache models of an Entity Bean
2.8.2 Defining in cosminexus.xml
2.8.3 Settings in the execution environment
2.9 Managing the Enterprise Bean pool
2.9.1 Pooling of Stateless Session Beans
2.9.2 Pooling of Entity Beans
2.9.3 Pooling of Message-driven Beans
2.9.4 Defining in cosminexus.xml
2.9.5 Settings in the execution environment
2.10 Controlling the access to the Enterprise Beans
2.10.1 Preventing access control to an Enterprise Bean
2.10.2 Settings in the execution environment
2.11 Setting up a timeout in the EJB container
2.11.1 Types of timeouts
2.11.2 Timeout of a Stateful Session Bean
2.11.3 Timeout of the EJB objects in the Entity Beans
2.11.4 Timeout in awaiting instance acquisition
2.11.5 Timeout of RMI-IIOP communication
2.11.6 Defining in cosminexus.xml
2.11.7 Implementing a timeout for RMI-IIOP communications
2.11.8 Settings in the execution environment
2.11.9 Precautions during setup of a communication timeout
2.12 Timer Service functionality
2.12.1 Overview of the Timer Service
2.12.2 Operation during the generation of an EJB timer and execution of a callback
2.12.3 Automatically generating an EJB timer
2.12.4 Deleting the EJB timer
2.12.5 Functionality for operating the Timer Service
2.12.6 Operations of the EJB timer and callback
2.12.7 Implementing an application using the Timer Service
2.12.8 Precautions when using the Timer Service
2.12.9 Settings in the execution environment
2.12.10 Precautions when using the Timer Service
2.13 Invoking the remote interface of EJB
2.13.1 Optimizing local invocation in the EJB remote interface
2.13.2 Referencing and passing the values of the EJB remote interface
2.13.3 Operation during the occurrence of a communication failure in the EJB remote interface
2.13.4 Defining in cosminexus.xml
2.13.5 Settings in the execution environment
2.13.6 Precautions concerning invocation of the EJB remote interface
2.14 Fixing the communication port and IP address of the EJB container (TPBroker options)
2.14.1 Fixing the communication port
2.14.2 Fixing the IP address
2.14.3 Settings in the execution environment
2.15 Using the interceptor
2.15.1 Overview of the usage of the interceptor
2.15.2 Defining in an annotation or a DD
2.15.3 Controlling the invocation of upper level interceptor
2.15.4 Execution order of the interceptors
2.15.5 Configuring the execution environment
2.15.6 Notes on inceptors
2.16 Omitting local business interfaces (Using No-Interface view)
2.16.1 Overview of No-Interface view
2.16.2 Definition for using No-Interface view
2.16.3 Methods that cannot be used
2.16.4 Precautions during development
2.17 Asynchronous invocation of Session Bean
2.17.1 Applicability of asynchronous invocation of Session Bean
2.17.2 Handling transactions in asynchronous invocation
2.17.3 Handling root application information in asynchronous invocation
2.17.4 Defining the annotation used for asynchronous invocation
2.17.5 Specifying return values for an asynchronous method
2.17.6 Operation for execution status and execution result of an asynchronous method based on Future<V> object
2.17.7 Definitions in cosminexus.xml
2.17.8 Notes on annotation when implementing an asynchronous method
2.17.9 Notes on operation of an asynchronous method
2.18 Specifications in Session Synchronization annotation
2.18.1 Method of setting Session Synchronization with annotation
2.18.2 Rules for implementation
2.18.3 Notes on implementation
2.19 Using Singleton Session Beans
2.19.1 Exclusive control of Singleton Session Beans
2.19.2 Error handling in Singleton Session Beans
2.19.3 Precautions when using Singleton Session Beans

3. EJB Client
3.1 Organization of this chapter
3.2 Functionality that can be used in an EJB client
3.3 Starting EJB Client Applications
3.3.1 Commands used for starting an EJB client application
3.3.2 Using the cjclstartap command
3.3.3 Using the vbj command
3.3.4 Specifying the environment variables required for executing an EJB client application
3.3.5 Specifying the property of an EJB client application
3.4 Invoking an Enterprise Bean
3.4.1 Flow of Enterprise Bean invocation from an EJB client application
3.4.2 Implementation for invoking an Enterprise Bean
3.5 Implementing a transaction in an EJB client application
3.5.1 Procedure for using a transaction in the EJB client
3.5.2 Obtaining UserTransaction using lookup
3.5.3 Precautions during the implementation of a transaction in the EJB client application
3.6 Implementing security in an EJB client application
3.6.1 Preconditions for implementing security
3.6.2 Sample program when security is implemented
3.7 Obtaining RMI-IIOP stubs and interfaces
3.7.1 Overview of obtaining RMI-IIOP stubs and interfaces
3.7.2 Manual download with server management commands
3.7.3 Dynamic class loading
3.7.4 Specifying JAR files in the class path of the EJB client application
3.7.5 Precautions during the use of uCosminexus Client
3.8 System log output of an EJB client application
3.8.1 Overview of the system log of an EJB client application
3.8.2 Output destination subdirectory of the system log
3.8.3 Changing the output destination and output level of the system log
3.8.4 Sharing the log output destination subdirectory among multiple processes
3.8.5 Setting up the access permission of the log output destination directory

4. Precautions During the Implementation of Enterprise Beans
4.1 Organization of this chapter
4.2 Common precautions for all Enterprise Beans
4.2.1 Rules for naming an Enterprise Bean and related classes
4.2.2 Acquiring and releasing a resource connection
4.2.3 Differentiating the use of a local interface and remote interface
4.2.4 Usage of the local invocation optimization functionality
4.2.5 Method for invoking an Enterprise Bean of another J2EE application with the component interface
4.2.6 Method for invoking an Enterprise Bean of another J2EE application with the business interface
4.2.7 Precautions concerning the acquisition of a class loader
4.2.8 Precautions during the use of the URLConnection class
4.2.9 Precautions concerning loading of the native library
4.2.10 About the timeout of access exclusion of an Entity Bean (common for CMP and BMP)
4.2.11 About the occurrence of a deadlock during the use of an Entity Bean (Common for CMP and BMP)
4.2.12 Precautions regarding the methods of the javax.ejb.EJBContext interface
4.2.13 About the <prim-key-class> tag of the Entity Bean (common for CMP and BMP) property file
4.2.14 Precautions concerning EJB specifications
4.2.15 About multi-byte characters
4.2.16 Precautions concerning transmission of Unicode supplementary characters
4.2.17 Precautions concerning API of EJB 3.0
4.2.18 Precautions when using ejb-jar.xml of EJB 3.0 or later
4.2.19 Precautions related to use Generics
4.2.20 Precautions when using EJB 3.1
4.2.21 About the getCause()method
4.2.22 Precautions concerning the name of resource reference
4.2.23 Precautions concerning the libraries of Application Server
4.3 Precautions for each type of the Enterprise Bean
4.3.1 Precautions during the implementation of a Stateless Session Bean
4.3.2 Precautions during the implementation of a Stateful Session Bean
4.3.3 Precautions during the implementation of an Entity Bean (BMP)
4.3.4 Precautions during the implementation of an Entity Bean (CMP)
4.3.5 Precautions during the implementation of a Message-driven Bean
4.3.6 Precautions during the implementation of Singleton Session Beans

Appendixes
A. uCosminexus Client
A.1 Functionality of uCosminexus Client
A.2 Installation procedure
A.3 Directory configuration of uCosminexus Client
B. Main updates in the functionalities of each version
B.1 Main updates in the functionality of 09-00
B.2 Main updates in the functionality of 08-70
B.3 Main updates in the functionality of 08-53
B.4 Main updates in the functionality of 08-50
B.5 Main updates in the functionality of 08-00
C. Glossary

Index