JEUS EJB Guide 

JEUS v7.0 Fix #4

Restricted Rights Legend

All TmaxSoft Software (Tmax®) and documents are protected by copyright laws and international convention. TmaxSoft software and documents are made available under the terms of the TmaxSoft License Agreement and may only be used or copied in accordance with the terms of this agreement. No part of this document may be transmitted, copied, deployed, or reproduced in any form or by any means, electronic, mechanical, or optical, without the prior written consent of TmaxSoft Co., Ltd.

Nothing in this software document and agreement constitutes a transfer of intellectual property rights regardless of whether or not such rights are registered) or any rights to TmaxSoft trademarks, logos, or any other brand features.

This document is for information purposes only. The company assumes no direct or indirect responsibilities for the contents of this document, and does not guarantee that the information contained in this document satisfies certain legal or commercial conditions.

The information contained in this document is subject to change without prior notice due to product upgrades or updates. The company assumes no liability for any errors in this document.

Trademarks

JEUS® is registered trademark of TmaxSoft Co., Ltd. Other products, titles or services may be registered trademarks of their respective companies.

Open Source Software Notice

Some modules or files of this product are subject to the terms of the following licenses. : APACHE2.0, CDDL1.0, EDL1.0, OPEN SYMPHONY SOFTWARE1.1, TRILEAD-SSH2, Bouncy Castle, BSD, MIT, SIL OPEN FONT1.1

Detailed Information related to the license can be found in the following directory : ${INSTALL_PATH}/lib/licenses

Document Information

Document Name: JEUS EJB Guide 

Document Created: 2017-03-13

Software Version: JEUS v7.0 Fix #4

Document Version: v2.1.6


Table of Contents

About This Document
1. Introduction to EJB
1.1. Overview
1.2. Components
1.3. EJB Environment and Configuration
1.3.1. Directory Structure
1.3.2. XML Configuration File
1.3.3. Related Tools
1.4. EJB Basic Settings
2. EJB Engine
2.1. Overview
2.2. Major Functions
2.3. EJB Engine Directory Structure
2.4. EJB Engine Configuration
2.4.1. Configuring Basic EJB Options
2.4.2. Configuring Active Management
2.4.3. Configuring Timer Service
2.5. System Log Configuration
2.6. Controlling and Monitoring of EJB Engine
2.7. EJB EngineTuning
2.7.1. Tuning Engine Resolution
2.7.2. Fast Deploy
2.7.3. Configuring System Log for Maximum Performance
2.7.4. Not Using Active Management
2.7.5. Using the HTTP Invoke Mode
3. EJB Module
3.1. Overview
3.2. Managing EJB Modules
3.3. Assembling EJB Modules
3.3.1. Compiling EJB Classes
3.3.2. Creating Deployment Descriptors
3.3.3. Packaging EJB JAR File
3.4. Deploying EJB Modules
3.4.1. Deployment
3.4.2. Directory Structure of Deployed EJB Module
3.5. Controlling and Monitoring EJB Modules
3.5.1. Controlling EJB Modules
3.5.2. Monitoring EJB Modules
4. Common Characteristics of EJB
4.1. Overview
4.1.1. EJB Types
4.1.2. Deployment Descriptor Configuration by EJB Type
4.2. Configuring EJB
4.2.1. Basic Environment Configuration
4.2.2. Thread Ticket Configuration
4.2.3. External Reference Configuration and Mapping
4.2.4. HTTP Invoke Environment Configuration
4.2.5. JEUS RMI Configuration
4.2.6. EJB Security Configuration
4.3. Monitoring EJB
4.4. Tuning EJB
4.4.1. Thread Ticket Pool Configuration Tuning
5. Interoperability and RMI-IIOP
5.1. Overview
5.1.1. Transaction Interoperability (OTS)
5.1.2. Security Interoperability (CSIv2)
5.2. Interoperability Configuration
5.2.1. COS Naming Service Configuration
5.2.2. Interoperability Activation Configuration
5.2.3. CSIv2 Security Interoperability Configuration
5.2.4. EJB RMI-IIOP Configuration
5.3. RMI-IIOP Client
5.3.1. JEUS Managed Server
5.3.2. WAS from Other Vendors
5.3.3. Standalone Client
5.4. Known Issues
6. EJB Clustering
6.1. Overview
6.2. Major Functions
6.2.1. Load Balancing
6.2.2. Failover(EJB Restoration)
6.2.3. EJB Recovery through Idempotent Method
6.2.4. Session Replication
6.3. EJB Clustering Configuration
6.3.1. Clustering Configuration through Annotation
6.3.2. Clustering Configuration through xml
6.3.3. Clustering Configuration for Stateful Session Bean
6.4. EJB Failover Restrictions
7. Session Bean
7.1. Stateless Session Bean
7.1.1. Thread Ticket Pool(TTP) and Object Management
7.1.2. Web Service Endpoint
7.2. Stateful Session Bean
7.2.1. Thread Ticket Pool(TTP) and Object Management
7.2.2. Pooling Session Bean
7.2.3. Bean Pool Configuration
7.2.4. Session Data Persistence Mechanism Configuration
7.3. Commonly Used Configuration
7.3.1. Object Management Configuration
8. Entity Bean
8.1. Overview
8.2. Major Functions
8.2.1. Commonly Used Functions
8.2.2. BMP and CMP 1.1
8.2.3. CMP 1.1/2.0
8.2.4. CMP 2.0
8.3. Entity EJB Configuration
8.3.1. Commonly Used Functions
8.3.2. CMP 1.1/2.0
8.3.3. CMP 2.0
8.3.4. DB Insert Delay Configuration (CMP Only)
8.4. Entity EJB Tuning
8.4.1. Common
8.4.2. BMP & CMP 1.1
8.4.3. CMP 1.1/2.0
8.4.4. CMP 2.0
8.5. CMP 2.0 Entity Bean Example
9. Message Driven Bean(MDB)
9.1. Overview
9.2. MDB Configuration
9.2.1. Configuring Basic Settings
9.2.2. Configuring JMS Settings
9.2.3. Configuring JNDI SPI
10. EJB Timer Service
10.1. Configuring the Timer Service
10.1.1. Configuring the Persistent Timer Service (EJB Engine)
10.1.2. Processing the Persistent Timer (jeus-ejb-dd.xml)
10.1.3. Configuring the Cluster-Wide Timer Service
10.2. Configuring Timer Monitoring
10.3. Warnings for Timer Service
10.3.1. Persistent Timer and JDBC Connection
11. EJB Client
11.1. Overview
11.2. Programming a Client to Access EJB
11.3. Configuring InitialContext
11.3.1. Configuring Naming Attributes Using JVM Properties
11.3.2. Configuring Naming Attributes Using a Hashtable
12. Additional Functions
12.1. WorkArea Service
12.1.1. UserWorkArea Interface
12.1.2. PropertyModeType
12.1.3. Exceptions
12.1.4. Nested UserWorkArea
12.1.5. Development of Application Programs that Use UserWorkArea
A. Basic Java Type and Database Field Mappings
A.1. Overview
A.2. Tibero Field - Column Type Mapping
A.3. Oracle Field - Column Type Mapping
A.4. Sybase Field - Column Type Mapping
A.5. MSSQL Field - Column Type Mapping
A.6. DB2 Field - Column Type Mapping
A.7. Cloudscape Field - Column Type Mapping
A.8. Informix Field - Column Type Mapping
B. Instant EJB QL API Reference
B.1. Overview
B.2. EJBInstanceFinder Interface
B.3. EJBInstanceFinder Method
Glossary
Index

List of Figures

[Figure 1.1] Main Components of EJB Implementation Entity
[Figure 2.1] EJB Engine Directory Structure
[Figure 2.2] Configuring an EJB Engine - Basic
[Figure 2.3] Configuring an EJB Engine - Active Management
[Figure 3.1] Flow Chart for Managing EJB Modules
[Figure 3.2] Structure of Java EE EJB Module JAR File
[Figure 3.3] Deploying an Application - Application List
[Figure 3.4] Deploying an Application- Setting the Deployment Properties
[Figure 3.5] Deploying an Application - Result
[Figure 3.6] Directory Structure of Deployed EJB Module
[Figure 3.7] List of the Deployed Applications
[Figure 3.8] Undeploying an Application - Property Settings
[Figure 3.9] Undeploying an Application - Result
[Figure 4.1] TTP State Chart
[Figure 5.1] Configuring interoperability Activation
[Figure 5.2] Configuring CSIv2 Security Interoperability -Interop Ssl Config
[Figure 6.1] EJB Clustering Architecture
[Figure 6.2] Session Router Config - Properties
[Figure 7.1] TTP and Bean Pool of Stateless Session Bean
[Figure 7.2] Connection Pool, Thread Ticket Pool, and Bean Pool of Stateful Session Bean
[Figure 8.1] Entity Bean Object and Instance Management in the JEUS EJB Engine
[Figure 8.2] Scenarios where ejbLoad() is Called Periodically
[Figure 8.3] EXCLUSIVE_ACCESS Mode Scenario
[Figure 8.4] SINGLE_OBJECT Engine Mode
[Figure 8.5] MULTIPLE_OBJECT Engine Mode
[Figure 10.1] Configuring Persistent Timer Service - Basic Option
[Figure 10.2] Persistent Timer Service - Advanced Option
[Figure 10.3] Configuring Cluster-Wide Timer Service
[Figure 10.4] Timer Monitoring
[Figure 10.5] Cancelling the Timer
[Figure 12.1] Registration Information in Nested UserWorkArea

List of Tables

[Table 4.1] Configurable Features and Components of JEUS EJB
[Table 4.2] Relationship of Tags in ejb-jar.xml and JEUS EJB DD Files
[Table 5.1] JVM –D Parameters Related to Keystore and Truststore
[Table 8.1] Configurable Elements of Entity Bean Types
[Table 8.2] The Three Engine Modes and Their Disadvantages and Advantages
[Table 8.3] Original EJB Fields for EmployeeBean Instances
[Table 8.4] ResultSet Result
[Table 8.5] Selecting Entity Bean Engine Type and Whether to Use Clustering
[Table A.1] EJB CMP Field - DB Column Type Mapping for Tibero
[Table A.2] EJB CMP Field - DB Column Type Mapping for Oracle
[Table A.3] EJB CMP Field - DB Column Type Mapping for Sybase
[Table A.4] EJB CMP Field - DB Column Type Mapping for MSSQL
[Table A.5] EJB CMP Field - DB Column Type Mapping for DB2
[Table A.6] EJB CMP Field - DB Column Type Mapping for Cloudscape
[Table A.7] EJB CMP Field - DB Column Type Mapping for Informix

List of Examples

[Example 1.1] XML Header : <<domain.xml>>
[Example 1.2] XML Header : <<ejb-jar.xml >>
[Example 1.3] XML Header : <<jeus-ejb-dd .xml>>
[Example 3.1] DD in the EJB Specification: <<ejb-jar.xml>>
[Example 3.2] JEUS EJB DD : <<jeus-ejb-dd.xml>>
[Example 4.1] Stateful Session Bean Class and DDs: <<CounterEJB.java>>
[Example 4.2] Stateful Session Bean Class and DDs: <<jeus-ejb-dd.xml>>
[Example 4.3] BMP Bean Configuration: <<jeus-ejb-dd.xml>>
[Example 4.4] Mapping External Reference to JNDI: <<CounterEJB.java>>
[Example 4.5] Mapping External Reference to JNDI: <<ejb-jar.xml>>
[Example 4.6] Mapping External Reference to JNDI: <<jeus-ejb-dd.xml>>
[Example 4.7] HTTP Invoke Configuration: <<jeus-ejb-dd.xml>>
[Example 4.8] Role Assignment Configuration: <<jeus-ejb-dd.xml>>
[Example 4.9] Run-as Identify Configuration: <<jeus-ejb-dd.xml>>
[Example 4.10] Security Setting: <<CustomerBean.java>>
[Example 4.11] Security Setting: <<EmployeeServiceBean.java>>
[Example 4.12] Security Setting: <<ejb-jar.xml>>
[Example 4.13] Security Setting: <<jeus-ejb-dd.xml>>
[Example 4.14] Security Setting: <<accounts.xml>>
[Example 5.1] Configuring EJB RMI-IIOP : <<jeus-ejb-dd.xml>>
[Example 5.2] Using Corbaname Lookup
[Example 5.3] Using PROVIDER URL
[Example 5.4] Servlet EJB Injection
[Example 5.5] RMI-IIOP EJB Mapping : <<jeus-web-dd.xml>>
[Example 5.6] Using Standalone Client
[Example 5.7] NullPointerException Occurrence
[Example 6.1] Clustering Configuration through Annotation:<<CounterEJB.java>>
[Example 6.2] Clustering Configuration Using XML: <<jeus-ejb-dd.xml>>
[Example 7.1] Bean Pool Configuration: <<jeus-ejb-dd.xml>>
[Example 7.2] Object Management Configuration: <<jeus-ejb-dd.xml>>
[Example 8.1] Automatic Primary Key Generation Support for Oracle DB: <<jeus-ejb-dd.xml>>
[Example 8.2] Automatic Primary Key Generation Support for MS SQL Server DB: <<jeus-ejb-dd.xml>>
[Example 8.3] Automatic Primary Key Generation Support for Other DB Types: <<jeus-ejb-dd.xml>>
[Example 8.4] Configuring the Basic Shared Settings for Entity EJB: <<jeus-ejb-dd.xml>>
[Example 8.5] Configuring Object Management : <<jeus-ejb-dd.xml>>
[Example 8.6] Configuring ejbLoad() and ejbStore() Persistence Optimization: <<jeus-ejb-dd.xml>>
[Example 8.7] Configuring ejbLoad() and ejbFind() CM Persistence Optimization: <<jeus-ejb-dd.xml>>
[Example 8.8] Configuring DB Schema Information: <<jeus-ejb-dd.xml>>
[Example 8.9] Configuring One-to-one/One-to-many Relationship Mapping: <<jeus-ejb-dd.xml>>
[Example 8.10] Configuring Many-to-many Relationship Mapping: <<jeus-ejb-dd.xml>>
[Example 8.11] Configuring Instant EJB QL: <<jeus-ejb-dd.xml>>
[Example 8.12] Typing ">" and "<" inside an XML DD File: <<ejb-jar.xml>>
[Example 8.13] Configuring DB Insert Delay: <<jeus-ejb-dd.xml>>
[Example 8.14] Remote Interface : <<Book.java>>
[Example 8.15] Home Interface : <<BookHome.java>>
[Example 8.16] Bean Implementation : <<BookEJB.java>>
[Example 8.17] Java EE EJB DD : <<ejb-jar.xml>>
[Example 8.18] JEUS EJB DD : <<jeus-ejb-dd.xml>>
[Example 9.1] Configuring Basic Settings: <<jeus-ejb-dd.xml>>
[Example 9.2] Configuring JMS Settings: <<MyMDB.class>>
[Example 9.3] Configuring JMS Settings: <<jeus-ejb-dd.xml>>
[Example 9.4] Configuring JNDI SPI: <<jeus-ejb-dd.xml>>
[Example 10.1] Processing Persistent Timer: <<jeus-ejb-dd.xml>>
[Example 11.1] <<HelloClient.java>>
[Example 12.1] <<UserWorkArea Interface>>
[Example 12.2] Access to UserWorkArea : <<UserWorkAreaSampleSenderBean.java>>
[Example 12.3] Starting New UserWorkArea : <<UserWorkAreaSampleSenderBean.java>>
[Example 12.4] Configuring Registration in WorkArea: <<UserWorkAreaSampleSenderBean.java>>
[Example 12.5] Obtaining Registration Information Configured in WorkArea: <<UserWorkAreaSampleReceiverBean.java>>
[Example 12.6] Completing UserWorkArea: <<UserWorkAreaSampleSenderBean.java>>