BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   Programming WebLogic Enterprise JavaBeans:   Previous Topic   |   Next Topic   |   Contents   

 

Programming WebLogic Enterprise JavaBeans

 

Contents

 

1. EJB Features and Changes in WebLogic Server Version 6.0

Overview

EJB 2.0 Features

Supported features

Features in development

Application assembly support in deploying EJBs

DDConverter upgrade utility

Full JNDI support for EJB environment

New resource factory support

Support for EJB home handles

Improved free pool management

Improved manageability for multiple persistence types

is-modified-method-name support for bean-managed EJBs

New Java type support for multi-object finders

Changed behavior

EJB deployment

javax.ejb.deployment classes not used

Default transaction properties

XML deployment descriptors

Text descriptor to XML element mapping

Deleted deployment properties

.jar and directory deployment units

Unsupported deployment utilities

Persistence Services

File-based persistence not supported

JDBC-based persistence renamed to RDBMS-based persistence

Entity EJB changes

Primary key changes for container-managed EJBs

Simple and compound primary keys

EJB exception changes

New ejbc syntax

Required changes for EJB 1.1 compliance

Updates for EJB classes and interfaces

General EJB updates

Entity EJB Updates

EJBs using the UserTransaction interface

Deprecated methods from javax.ejb.EJBContext

Updates for EJB Clients

Accessing EJBs

Removing session beans

2. WebLogic Server EJB Design and Development

Overview

Invoking deployed EJBs

Local vs. remote clients

Restrictions for accessing EJB instances

Storing EJB references in home handles

Using home handles across a firewall

EJB Design Tips

Preserve transaction resources

Allow the datastore to manage transactions

Use container-managed transactions over bean-managed transactions

Never demarcate transactions from a client application

Use correct modeling for entity EJBs

Entity EJBs should be coarse-grained

Entity EJBs should contain business logic

Optimize entity EJB data access

Use isModified() where appropriate

Using inheritance with EJBs

Using Session Beans

3. Using Message-driven beans

Overview

What are message-driven beans?

Differences from standard JMS consumers

Differences from Stateless Session EJBs

Basic invocation procedure

Developing message-driven beans

Bean class requirements

Creating and removing bean instances

Using the message-driven bean context

Implementing business logic with onMessage()

Handling exceptions

Transaction Services for Message-driven Beans

Message receipts

Message acknowledgement

Deploying Message-driven beans in WebLogic Server

Deployment Elements

4. The WebLogic Server EJB Container

Overview

EJB Lifecycle in WebLogic Server

Stateless session EJB lifecycle

Initializing EJB instances

Activating and pooling EJBs

Stateful EJB lifecycle

Initializing and using EJB instances

Passivating stateful EJBs

Removing stateful session EJB instances

Stateful session EJB requirements

Locking Model for Entity EJBs

ejbLoad() and ejbStore() behavior for entity EJBs

Using db-is-shared to limit calls to ejbLoad()

Restrictions and warnings for db-is-shared

Using is-modified-method-name to limit calls to ejbStore()

Warning for is-modified-method-name

Using delay-updates-until-end-of-tx to change ejbStore() behavior

Setting the entity EJBs to read-only

read-write cache strategy

read-only cache strategy

"read-mostly" pattern

EJBs in WebLogic Server Clusters

Overview

Clustered EJBHome objects

Clustered EJBObjects

Session EJBs in a cluster

Stateless session EJBs

Stateful session EJBs

Entity EJBs in a cluster

read-write entity EJBs

Transaction management

Transaction management responsibilities

Using javax.transaction.UserTransaction

Restriction for container-managed EJBs

Distributing transactions across multiple EJBs

Calling multiple EJBs from a single transaction context

Encapsulating a multi-operation transaction

Distributing transactions across EJBs in a WebLogic Server cluster

Transaction isolation level

Limitations of TRANSACTION_SERIALIZABLE

Special note for Oracle Databases

Resource Factories

Setting up JDBC datasource factories

Setting up URL connection factories

Setting up javax.mail.Session resources

Persistence Services

Using WebLogic Server RDBMS Persistence

Writing Finders for RDBMS Persistence

Using WebLogic Query Language (WLQL)

EJB 1.1 and 2.0 Features

Locking and Caching Services for Entity EJBs

Database locking services

Setting up database locking

In-memory Replication for Stateful Session EJBs

Requirements and Configuration

Limitations

Home Method Support for Entity EJBs

5. 00WebLogic Server Container-Managed Persistence Services

Overview

EJB 2.0 Persistence Features and Changes

"get" and "set" method restrictions

EJB QL requirement for EJB 2.0 beans

BLOB and CLOB DBMS columns

isModified() not required for CMP beans

Using EJB QL

Basic syntax

EJB QL String literals

Finder parameter placeholders

EJB QL operators

EJB QL conditional expressions

Migrating from WLQL to EJB QL

EJB QL examples

Groups

Data Types

Relationships

6. Deploying EJBs in WebLogic Server

Overview

Required steps for deploying EJBs

Setting deployment properties

Generating EJB container classes

Loading EJB classes into WebLogic Server

Deploying EJBs at startup

Deploying EJBs in a running WebLogic Server (Dynamic Deployment)

Dynamic deploy concepts and restrictions

EJB deployment names

Undeployment

Updating deployment units

Viewing deployed EJBs

Deploying new EJBs

Undeploying deployed EJBs

Updating deployed EJBs

7. Deploying EJBs in the EJB Container

Overview

Roles and responsibilities

WebLogic Server deployment files

Automatic Deployment Directory

Deploying compiled EJB .jar files

Deploying uncompiled EJB .jar files

Deploying from an EJB .jar directory

8. WebLogic Server EJB Utililties

Overview

ejbc

Syntax

Arguments

Options

Examples

DDConverter

Syntax

Arguments

Options

Examples

deploy

Syntax

Arguments

Options

9. WebLogic Server 6.0 EJB Deployment Properties

Overview

Manually editing XML deployment files

DOCTYPE header information

Document Type Definitions (DTDs) for validation

XML deployment properties

weblogic-ejb-jar.xml properties

Index of WebLogic Server Deployment Elements

allow-concurrent-calls

ejb-name

ejb-reference-description

ejb-ref-name

Example

enable-call-by-reference

entity-cache

entity-clustering

entity-descriptor

concurrency-strategy

db-is-shared

description

delay-updates-until-end-of-tx

destination-jndi-name

finders-load-bean

home-call-router-class-name

home-is-clusterable

home-load-algorithm

idle-timeout-seconds

initial-beans-in-free-pool

is-modified-method-name

isolation-level

jndi-name

lifecycle

max-beans-in-cache

max-beans-in-free-pool

message-driven-descriptor

method

method-intf

method-name

method-param

method-params

passivation-strategy

persistence

persistence-type

persistence-use

persistent-store-dir

pool

principal-name

read-timeout-seconds

reference-descriptor

replication-type

res-env-ref-name

res-ref-name

resource-env-description

resource-description

role-name

run-as-identity-principal

security-role-assignment

stateful-session-cache

stateful-session-clustering

stateful-session-descriptor

stateless-bean-call-router-class-name

stateless-bean-is-clusterable

stateless-bean-load-algorithm

stateless-bean-methods-are-idempotent

stateless-clustering

stateless-session-descriptor

transaction-descriptor

transaction-isolation

trans-timeout-seconds

type-identifier

type-storage

type-version

weblogic.cmp.rdbms.jar.xml properties

ejb-name

data-source-name

table-name

field-map

cmp-field

dbms-column

column-map

foreign-key-column

key-column

relation-name

weblogic-relationship-role

relationship-role-name

field-group

cmr-field

group-name

finder

finder-name

finder-param

finder-query

find-for-update

10. WebLogic Server 5.1 EJB Deployment Properties

Overview

Manually editing XML deployment files

Basic conventions

DOCTYPE header information

Document Type Definitions (DTDs) for validation

XML deployment properties

weblogic-ejb-jar.xml Properties

Caching properties

Persistence properties

Clustering properties

Transaction properties

EJB references

Isolation level settings

Security role assignments

weblogic-cmp-rdbms-jar.xml Properties

RDBMS definition elements

EJB field-mapping elements

Finder elements