Table of Contents
- Title and Copyright Information
- Preface
- 1 Introduction and Roadmap
-
2
Understanding Enterprise JavaBeans
- How Do Applications Use EJBs?
- EJB Anatomy and Environment
- EJBs, Clients, and Application Objects
- EJBs and Message Destination References
-
WebLogic Server Value-Added EJB Features
- Performance-Enhancing Features for WebLogic Server EJBs
- Pooling Improves EJB Response Time
- Caching Improves EJB Performance
- Additional Caching Capabilities for CMP Entities
- Field Groups for Efficient Queries (CMP Entities)
- Configurable Write Behaviors
- Operation Ordering and Batching (CMP Entities)
- Optimized Database Updates (CMP Entities)
- Read-Only Pattern and Read-Only Invalidation (CMP Entities)
- CMP Beans Increase Developer Productivity
- Automatic Primary Key Generation (CMP Entities)
- Automatic Table Creation (CMP Entities)
- Dynamic Queries (CMP Entities)
- Reliability and Availability Features
- Load Balancing Among Clustered EJBs Increases Scalability
- Failover for Clustered EJBs Increases Reliability
- Securing EJBs
-
3
Designing Enterprise JavaBeans
- Choosing the Right Bean Type
- Persistence Management Alternatives
-
Transaction Design and Management Options
- Understanding Transaction Demarcation Strategies and Performance
- Demarcating Transactions at the Server Level is Most Efficient
- Container-Managed Transactions Are Simpler to Develop and Perform Well
- Bean-Level Transaction Management
- Client-Level Transaction Management is Costly
- Transaction Isolation: A Performance vs. Data Consistency Choice
- Satisfying Application Requirements with WebLogic Server EJBs
-
4
Implementing Enterprise JavaBeans
- Overview of the EJB Development Process
- Create a Source Directory
-
Create EJB Classes and Interfaces
- Using WebLogic Server Generic Bean Templates
- Programming Client Access to EJBs
- Programming Client to Obtain Initial Context
- Programming Client to Look Up a Home Interface
- Configuring EJBs to Send Requests to a URL
- Specifying an HTTP Resource by URL
- Specifying an HTTP Resource by Its JNDI Name
- Accessing HTTP Resources from Bean Code
- Configuring Network Communications for an EJB
- Programming and Configuring Transactions
- Programming Container-Managed Transactions
- Configuring Automatic Retry of Container-Managed Transactions
- Programming Bean-Managed Transactions
- Programming Transactions That Are Distributed Across EJBs
-
Programming the EJB Timer Service
- Clustered Versus Local EJB Timer Services
- Clustered EJB Timer Services
- Local EJB Timer Services
- Using Java Programming Interfaces to Program Timer Objects
- EJB 2.1 Timer-related Programming Interfaces
- WebLogic Server-specific Timer-related Programming Interfaces
- Timer Deployment Descriptors
- Configuring Clustered EJB Timers
- Declare Web Service References
- Compile Java Source
- Generate Deployment Descriptors
- Edit Deployment Descriptors
- Generate EJB Wrapper Classes, and Stub and Skeleton Files
- Package
- Deploy
- Solving Problems During Development
- WebLogic Server Tools for Developing EJBs
- 5 Session EJBs
-
6
Entity EJBs
- Managing Entity Bean Pooling and Caching
-
Using Primary Keys
- Specifying Primary Keys and Primary Key Classes
- Guidelines for Primary Keys
- Automatically Generating Primary Keys
- Specifying Automatic Key Generation for Oracle Databases
- Specifying Automatic Key Generation for Microsoft SQL Server
- Generating Primary Keys with a Named Sequence Table
- Declaring Primary Key Field Type
- Support for Oracle Database SEQUENCE
- String-Valued CMP Field Trimming
- Benefits of String Trimming
- Disabling String Trimming
-
Configuring Entity EJBs for Database Operations
- Configuring Table Mapping
- Automatic Table Creation (Development Only)
- Delaying Database Inserts
- Why Delay Database Inserts?
- Configuring Delayed Database Inserts
- Limiting Database Reads with cache-between-transactions
- Updating the Database Before Transaction Ends
- Dynamic Queries
- Enabling Dynamic Queries
- Executing Dynamic Queries
- Enabling BLOB and CLOB Column Support for Oracle or DB2 Databases
- Specifying a BLOB Column Using the Deployment Descriptor
- Serialization for cmp-fields of Type byte[] Mapped to an Oracle Blob
- Specifying a CLOB Column Using the Deployment Descriptor
- Optimized CLOB Column Insertion on Oracle 10g
- Specifying Field Groups
- Ordering and Batching Operations
- Operation Ordering
- Batch Operations Guidelines and Limitations
- Using Query Caching (Read-Only Entity Beans)
- Using SQL in Entity Beans
-
Using Container-Managed Relationships (CMRs)
- CMR Requirements and Limitations
- CMR Cardinality
- CMR Direction
- Removing CMRs
- Defining Container-Managed Relationships (CMRs)
- Specifying Relationships in ejb-jar.xml
- Specifying Relationships in weblogic-cmp-jar.xml
- About CMR Fields and CMR Field Accessor Methods
- Using Cascade Delete for Entities in CMRs
- Relationship Caching
- Enabling Relationship Caching
-
Choosing a Concurrency Strategy
- Exclusive Concurrency
- Database Concurrency
- Optimistic Concurrency
- Preventing Stale Optimistic Bean Data
- Explicit Invalidation of Optimistic Beans
- Invalidation Options for Optimistic Concurrency in Clusters
- Check Data for Validity with Optimistic Concurrency
- Optimistic Concurrency and Oracle Databases
- Read Only Concurrency
- Concurrency Strategy Trade-Offs
- Configuring Concurrency Strategy
- Deadlock Prevention for Exclusive Concurrency and Cascade Deletes
- Using the Read-Mostly Pattern
- Configuring Entity Beans for Read-Mostly Pattern
- Invalidating Read-Only Entity EJBs Implicitly
- Invalidating Entity EJBs Explicitly
- CMP Entity Bean Descriptors Element by Feature
- 7 Message-Driven EJBs
-
8
Deployment Guidelines for Enterprise JavaBeans
- Before You Deploy an EJB
- Understanding and Performing Deployment Tasks
-
Deployment Guidelines for EJBs
- Deploy EJBs as Part of an Enterprise Application
- Deploy EJBs That Call Each Other in the Same Application
- Deploying EJBs that Use Dependency Injection
- Deploy Homogeneously to a Cluster
- Deploying Pinned EJBs to a Cluster
- Redeploying an EJB
- Using FastSwap Deployment to Minimize Deployment
- Understanding Warning Messages
- Disabling EJB Deployment Warning Messages
- A Deployment Descriptor Schema and Document Type Definitions Reference
-
B
weblogic-ejb-jar.xml Deployment Descriptor Reference
- 2.1 weblogic-ejb-jar.xml File Structure
- 2.1 weblogic-ejb-jar.xml Elements
- allow-concurrent-calls
- allow-remove-during-transaction
- cache-between-transactions
- cache-type
- client-authentication
- client-cert-authentication
- clients-on-same-server
- component-factory-class-name
- concurrency-strategy
- confidentiality
- connection-factory-jndi-name
- connection-factory-resource-link
- create-as-principal-name
- delay-updates-until-end-of-tx
- description
- destination-jndi-name
- destination-resource-link
- disable-warning
- dispatch-policy
- distributed-destination-connection
- durable-subscription-deletion
- ejb-name
- ejb-reference-description
- ejb-ref-name
- enable-bean-class-redeploy
- enable-call-by-reference
- enable-dynamic-queries
- entity-always-uses-transaction
- entity-cache
- entity-cache-name
- entity-cache-ref
- entity-clustering
- entity-descriptor
- estimated-bean-size
- externally-defined
- finders-load-bean
- generate-unique-jms-client-id
- global-role
- home-call-router-class-name
- home-is-clusterable
- home-load-algorithm
- idempotent-methods
- identity-assertion
- idle-timeout-seconds
- iiop-security-descriptor
- init-suspend-seconds
- initial-beans-in-free-pool
- initial-context-factory
- integrity
- invalidation-target
- is-modified-method-name
- isolation-level
- jms-client-id
- jms-polling-interval-seconds
- jndi-binding
- jndi-name
- local-jndi-name
- max-beans-in-cache
- max-beans-in-free-pool
- max-messages-in-transaction
- max-queries-in-cache
- max-suspend-seconds
- message-destination-descriptor
- message-destination-name
- message-driven-descriptor
- method
- method-intf
- method-name
- method-param
- method-params
- network-access-point
- passivate-as-principal-name
- persistence
- persistence-use
- persistent-store-dir
- persistent-store-logical-name
- pool
- principal-name
- provider-url
- read-timeout-seconds
- remote-client-timeout
- remove-as-principal-name
- replication-type
- resource-env-ref-name
- res-ref-name
- resource-adapter-jndi-name
- resource-description
- resource-env-description
- resource-link
- retry-count
- retry-methods-on-rollback
- role-name
- run-as-identity-principal
- run-as-principal-name
- run-as-role-assignment
- security-permission
- security-permission-spec
- security-role-assignment
- service-reference-description
- session-timeout-seconds
- singleton-bean-call-router-class-name
- singleton-bean-is-clusterable
- singleton-bean-load-algorithm
- singleton-clustering
- singleton-session-descriptor
- stateful-session-cache
- stateful-session-clustering
- stateful-session-descriptor
- stateless-bean-call-router-class-name
- stateless-bean-is-clusterable
- stateless-bean-load-algorithm
- stateless-clustering
- stateless-session-descriptor
- stick-to-first-server
- timer-descriptor
- timer-implementation
- transaction-descriptor
- transaction-isolation
- transport-requirements
- trans-timeout-seconds
- type-identifier
- type-storage
- type-version
- use-serverside-stubs
- use81-style-polling
- weblogic-compatibility
- weblogic-ejb-jar
- weblogic-enterprise-bean
- work-manager
-
C
weblogic-cmp-jar.xml Deployment Descriptor Reference
- 2.1 weblogic-cmp-jar.xml Deployment Descriptor File Structure
- 2.1 weblogic-cmp-jar.xml Deployment Descriptor Elements
- allow-readonly-create-and-remove
- automatic-key-generation
- caching-element
- caching-name
- check-exists-on-method
- cluster-invalidation-disabled
- cmp-field
- cmr-field
- column-map
- compatibility
- create-default-dbms-table
- database-specific-sql
- database-type
- data-source-jndi-name
- db-cascade-delete
- dbms-column
- dbms-column-type
- dbms-default-value
- default-dbms-tables-ddl
- delay-database-insert-until
- description
- disable-string-trimming
- ejb-name
- ejb-ql-query
- enable-batch-operations
- enable-query-caching
- field-group
- field-map
- finders-return-nulls
- foreign-key-column
- foreign-key-table
- generator-name
- generator-type
- group-name
- include-updates
- instance-lock-order
- key-cache-size
- key-column
- lock-order
- max-elements
- method-name
- method-param
- method-params
- optimistic-column
- order-database-operations
- pass-through-columns
- primary-key-table
- query-method
- relation-name
- relationship-caching
- relationship-role-map
- relationship-role-name
- serialize-byte-array-to-oracle-blob
- serialize-char-array-to-bytes
- sql
- sql-query
- sql-select-distinct
- sql-shape
- sql-shape-name
- table-map
- table-name
- trigger-updates-optimistic-column
- unknown-primary-key-field
- use-select-for-update
- validate-db-schema-with
- verify-columns
- verify-rows
- version-column-initial-value
- weblogic-ql
- weblogic-query
- weblogic-rdbms-bean
- weblogic-rdbms-jar
- weblogic-rdbms-relation
- weblogic-relationship-role
- D appc Reference
-
E
EJBGen Reference
-
Running EJBGen
- EJBGen Distribution and Examples
- Invoking EJBGen
- EJBGen Command Options
- Using Key EJBGen Features
- Controlling the Files EJBGen Generates
- Using Property Files with EJBGen
- Using User Variables
- Using Predefined Variables
- Surround Attributes that Contain Spaces With Double Quotes
- EJBGen Supports Tag Inheritance
- Examples of EJBGen Tag Usage
- Enum Attribute Constant Values
- EJBGen Annotation Reference
-
EJB Container Annotations
- weblogic.ejbgen.ActivationConfigProperties
- weblogic.ejbgen.ActivationConfigProperty
- Attributes
- weblogic.ejbgen.AutomaticKeyGeneration
- Attributes
- weblogic.ejbgen.CmpField
- Attributes
- weblogic.ejbgen.CmrField
- Attributes
- weblogic.ejbgen.Compatibility
- Attributes
- weblogic.ejbgen.CreateDefaultDbmsTables
- weblogic.ejbgen.CreateDefaultRdbmsTables
- weblogic.ejbgen.DBSpecificSQL
- Attributes
- weblogic.ejbgen.EjbClientJar
- weblogic.ejbgen.EjbInterface (deprecated)
- Attributes
- weblogic.ejbgen.EjbLocalRef
- Attributes
- weblogic.ejbgen.EjbLocalRefs
- weblogic.ejbgen.EjbRef
- Attributes
- weblogic.ejbgen.EjbRefs
- weblogic.ejbgen.Entity
- Attributes
- weblogic.ejbgen.EntityCacheRef
- Attributes
- weblogic.ejbgen.EnvEntries
- weblogic.ejbgen.EnvEntry
- Attributes
- weblogic.ejbgen.FileGeneration
- Attributes
- weblogic.ejbgen.Finder
- Attributes
- weblogic.ejbgen.Finders
- weblogic.ejbgen.ForeignJmsProvider
- Attributes
- weblogic.ejbgen.JarSettings
- Attributes
- weblogic.ejbgen.JndiName
- Attributes
- weblogic.ejbgen.LocalHomeMethod
- Attributes
- weblogic.ejbgen.LocalMethod
- Attributes
- weblogic.ejbgen.MessageDestination
- Attributes
- weblogic.ejbgen.MessageDestinationRef
- Attributes
- weblogic.ejbgen.MessageDestinationRefs
- weblogic.ejbgen.MessageDestinations
- weblogic.ejbgen.MessageDriven
- Attributes
- weblogic.ejbgen.MethodIsolationLevelPattern
- Attributes
- weblogic.ejbgen.MethodIsolationLevelPatterns
- weblogic.ejbgen.MethodPermissionPattern
- Attributes
- weblogic.ejbgen.MethodPermissionPatterns
- weblogic.ejbgen.PrimKeyField
- weblogic.ejbgen.Relation
- Attributes
- weblogic.ejbgen.Relations
- weblogic.ejbgen.RelationshipCachingElement
- Attributes
- weblogic.ejbgen.RelationshipCachingElements
- weblogic.ejbgen.RemoteHomeMethod
- Attributes
- weblogic.ejbgen.RemoteMethod
- Attributes
- weblogic.ejbgen.ResourceEnvRef
- Attributes
- weblogic.ejbgen.ResourceEnvRefs
- weblogic.ejbgen.ResourceRef
- Attributes
- weblogic.ejbgen.ResourceRefs
- weblogic.ejbgen.RoleMapping
- Attributes
- weblogic.ejbgen.RoleMappings
- weblogic.ejbgen.SecurityRoleRef
- Attributes
- weblogic.ejbgen.SecurityRoleRefs
- weblogic.ejbgen.Select
- Attributes
- weblogic.ejbgen.ServiceEndpointMethod
- Attributes
- weblogic.ejbgen.ServiceRef
- Attributes
- weblogic.ejbgen.ServiceRefs
- weblogic.ejbgen.Session
- Attributes
- weblogic.ejbgen.SqlFinder
- Attributes
- weblogic.ejbgen.SqlFinders
- weblogic.ejbgen.SqlShape
- Attributes
- weblogic.ejbgen.SqlShapeTable
- Attributes
- weblogic.ejbgen.SqlShapes
- weblogic.ejbgen.ValueObject
- Attributes
- weblogic.ejbgen.ValueObjectField
- Attributes
-
Running EJBGen
-
F
Important Information for EJB 1.1 Users
- Writing for RDBMS Persistence for EJB 1.1 CMP
- Using WebLogic Query Language (WLQL) for EJB 1.1 CMP
- Using SQL for CMP 1.1 Finder Queries
- Tuned EJB 1.1 CMP Updates in WebLogic Server
- Using is-modified-method-name to Limit Calls to ejbStore()
- 5.1 weblogic-ejb-jar.xml Deployment Descriptor File Structure
-
5.1 weblogic-ejb-jar.xml Deployment Descriptor Elements
- caching-descriptor
- max-beans-in-free-pool
- initial-beans-in-free-pool
- max-beans-in-cache
- idle-timeout-seconds
- cache-strategy
- read-timeout-seconds
- persistence-descriptor
- is-modified-method-name
- delay-updates-until-end-of-tx
- persistence-type
- db-is-shared
- stateful-session-persistent-store-dir
- persistence-use
- clustering-descriptor
- home-is-clusterable
- home-load-algorithm
- home-call-router-class-name
- stateless-bean-is-clusterable
- stateless-bean-load-algorithm
- stateless-bean-call-router-class-name
- stateless-bean-methods-are-idempotent
- transaction-descriptor
- trans-timeout-seconds
- reference-descriptor
- resource-description
- ejb-reference-description
- enable-call-by-reference
- jndi-name
- transaction-isolation
- isolation-level
- Oracle-Only Isolation Levels
- method
- security-role-assignment
- 1.1 weblogic-cmp-jar.xml Deployment Descriptor File Structure
- 1.1 weblogic-cmp-jar.xml Deployment Descriptor Elements
-
G
EJB Query Language (EJB-QL) and WebLogic Server
- EJB QL Requirement for EJB 2.x Beans
-
Using the EJB 2.x WebLogic QL Extension for EJB QL
- upper and lower Functions
- upper
- lower
- Using ORDER BY
- Using Subqueries
- Subquery Return Types
- Subqueries as Comparison Operands
- Correlated and Uncorrelated Subqueries
- Using Arithmetic Functions
- Using Aggregate Functions
- Using Queries that Return ResultSets
- Using Oracle SELECT HINTS
- "get" and "set" Method Restrictions
- Properties-Based Methods of the Query Interface
- Migrating from WLQL to EJB QL
- Known Issue with Implied Cross Products
- EJB QL Error-Reporting