JEUS EJB Guide 

JEUS 8

Restricted Rights Legend

All TmaxSoft Software(JEUS®) 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 this document may only be distributed 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.

Java and Solaris are registered trademarks of Oracle Corporation and its subsidiaries and affiliates.

Microsoft, Windows, and Windows NT are registered trademarks or trademarks of Microsoft Corporation.

HP-UX is a registered trademark of Hewlett Packard Enterprise Company.

AIX is a registered trademark of International Business Machines Corporation.

UNIX is a registered trademark of X/Open Company, Ltd.

Linux is a registered trademark of Linus Torvalds.

Other products and company names are trademarks or registered trademarks of their respective owners.

The names of companies, systems, and products mentioned in this manual may not necessarily be indicated with a trademark symbol (TM, ®).

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

Title: JEUS EJB Guide 

Publication Date: 2018-01-31

Software Version: JEUS 8

Edition: v2.1.1


Table of Contents

About This Document
1. Introduction to EJBs
1.1. Overview
1.2. Components
1.3. EJB Environment and Configuration
1.3.1. EJB Environment and Configuration
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. Configuring the EJB Engine
2.4.1. Configuring Basic EJB Options
2.4.2. Configuring Active Management
2.4.3. Configuring Timer Service
2.5. Configuring System Logs
2.6. Controlling and Monitoring of EJB Engine
2.7. Tuning the EJB Engine
2.7.1. Tuning the Engine Resolution
2.7.2. Fast Deploy
2.7.3. Configuring System Logs for Maximum Performance
2.7.4. Not Using Active Management
2.7.5. Using the HTTP Invoke Mode
3. EJB Modules
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 a EJB JAR File
3.4. Deploying EJB Modules
3.4.1. Deployment
3.4.2. Directory Structure of a 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.2. Configuring EJBs
4.2.1. Configuring the Basic Environment
4.2.2. Configuring Thread Tickets
4.2.3. Configuring and Mapping External References
4.2.4. Configuring the HTTP Invocation Environment
4.2.5. Configuring the JEUS RMI
4.2.6. Configuring EJB Security
4.3. Monitoring EJBs
4.4. Tuning EJBs
4.4.1. Configuring Thread Ticket Pools
5. Interoperability and RMI-IIOP
5.1. Overview
5.1.1. Transaction Interoperability (OTS)
5.1.2. Security Interoperability (CSIv2)
5.2. Configuring Interoperability
5.2.1. COS Naming Service Configuration
5.2.2. Activating Interoperability
5.2.3. Configuring the CSIv2 Security Interoperability
5.2.4. Configuring EJB RMI-IIOP
5.3. RMI/IIOP Client
5.3.1. JEUS Managed Servers (MSs)
5.3.2. Other Vendors' WASs
5.3.3. Standalone Clients
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 Methods
6.2.4. Session Replication
6.3. Configuring EJB Clustering
6.3.1. Configuring Clustering through Annotation
6.3.2. Configuring Clustering Using XML
6.3.3. Configuring the Stateful Session Bean Clustering
6.4. EJB Failover Restrictions
7. Session Beans
7.1. Stateless Session Beans
7.1.1. Thread Ticket Pool (TTP) and Object Management
7.1.2. Web Service Endpoint
7.2. Stateful Session Beans
7.2.1. Thread Ticket Pool (TTP) and Object Management
7.2.2. Pooling Session Beans
7.2.3. Configuring the Bean Pool
7.2.4. Configuring the Session Data Persistence Mechanism
7.3. Commonly Used Configuration
7.3.1. Configuring Object Management
8. Entity Beans
8.1. Overview
8.2. Major Functions
8.2.1. Commonly Used Functions
8.2.2. BMP & CMP 1.1
8.2.3. CMP 1.1/2.0
8.2.4. CMP 2.0
8.3. Configuring Entity EJBs
8.3.1. Commonly Used Functions
8.3.2. CMP 1.1/2.0
8.3.3. CMP 2.0
8.3.4. Configuring the DB Insert Delay (CMP Only)
8.4. Tuning Entity EJBs
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 Beans (MDBs)
9.1. Overview
9.2. Configuring MDBs
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. Developing 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
용어해설
Index

List of Figures

[Figure 1.1] Main Components of an EJB Implementation Entity
[Figure 1.2] EJB Engine Setting
[Figure 2.1] EJB Engine Directory Structure
[Figure 2.2] Configuring an EJB Engine - Basic
[Figure 2.3] Configuring an EJB Engine - Active Management
[그림 3.1] Flow Chart for Managing EJB Modules
[그림 3.2] Structure of Java EE EJB Module JAR File
[그림 3.3] Deploying an Application - Application List
[그림 3.4] Deploying an Application - Setting the Deployment Properties
[그림 3.5] Deploying an Application - Result
[그림 3.6] Directory Structure of a Deployed EJB Module
[그림 3.7] List of the Deployed Applications
[그림 3.8] Undeploying an Application - Property Settings
[그림 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] EJB 3 Stateless Clustering Architecture
[Figure 7.1] TTP and Bean Pool of Stateless Session Bean
[Figure 7.2] Connection Pool, Thread Ticket Pool, and Bean Pool of a 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
[Figure 8.4] SINGLE_OBJECT 엔진 모드
[Figure 8.5] MULTIPLE_OBJECT Engine Mode
[Figure 10.1] Configuring Persistent Timer Service - Basic Options
[Figure 10.2] Persistent Timer Service - Advanced Options
[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 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>>
[예 3.1] DD in the EJB Specification: <<ejb-jar.xml>>
[예 3.2] JEUS EJB DD: <<jeus-ejb-dd.xml>>
[Example 4.1] Stateful Session Bean Class and DD: <<CounterEJB.java>>
[Example 4.2] Stateful Session Bean Class and DD: <<jeus-ejb-dd.xml>>
[Example 4.3] Configuring a BMP Bean: <<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] Configuring HTTP Invocation: <<jeus-ejb-dd.xml>>
[Example 4.8] Configuring Role Assignment: <<jeus-ejb-dd.xml>>
[Example 4.9] Configuring Run-as Identify: <<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] Configuring Clustering through Annotation: <<CounterEJB.java>>
[Example 6.2] Configuring Clustering by using XML: <<jeus-ejb-dd.xml>>
[Example 7.1] Configuring the Bean Pool: <<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>>