BEA Logo BEA WebLogic Enterprise Release 5.1

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

 

   WebLogic Enterprise Doc Home   |   Creating CORBA Java Server Applications   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Creating CORBA Java Server Applications

 

This document describes how programmers can implement key features in the BEA WebLogic EnterpriseTM (WLE) product to design and implement scalable, high-performance, Java server applications that run in a WebLogic Enterprise domain. The Java examples shown in this book are based on the sample applications described in the Guide to the Java Sample Applications.

This document is intended for programmers who are interested in creating secure, scalable, transaction-based server applications. It assumes you are knowledgeable with the BEA Tuxedo® system, CORBA, and Java programming.

 

Java Server Application Concepts

Overview

The Entities You Create to Build a WebLogic Enterprise Java Server Application

The Implementation of the CORBA Objects for Your Java Server Application

How Interface Definitions Establish the Operations on a CORBA Object

How You Implement the Operations on a CORBA Object

How Client Applications Access and Manipulate Your Application's CORBA Objects

The Server Object

Understanding Object References and Object State

Generating Object References

Managing Object State

About Object State

How to Manage Object State

Choosing Between Stateless and Stateful Objects

When You Want Stateless Objects

When You Want Stateful Objects

Reading and Writing an Object's Data

Available Mechanisms for Reading and Writing an Object's Durable State

Reading State at Object Activation

Reading State Within Individual Operations on an Object

Stateless Objects and Durable State

Stateful Objects and Durable State

Your Responsibilities for Object Deactivation

Avoiding Unnecessary I/O

Sample Activation Walkthrough

Using Design Patterns

 

Steps for Creating a Java Server Application

Summary of the Java Server Application Development Process

Step 1: Compile the OMG IDL File for the Server Application

Using the m3idltojava Compiler

Step 2: Write the Methods That Implement Each Interface's Operations

Creating an Object Implementation File

Implementing a Factory Object

Using Threads with WebLogic Enterprise

Step 3: Create the Server Object

Writing the Code That Creates and Registers a Factory

Releasing the Server Application

Step 4: Compile the Java Source Files

Step 5: Define the Object Activation and Transaction Policies

Specifying Policies in XML

Step 6: Verify the Environment Variables

Step 7: Finish the Server Description File

Step 8: Deploy the Server Application

Development and Debugging Tips

Use of CORBA and WebLogic Enterprise Exceptions and the User Log

Client Application View of Exceptions

Server Application View of Exceptions

Detecting Error Conditions in the Callback Methods

Common Pitfalls of OMG IDL Interface Versioning and Modification

Caveat for State Handling in com.beasys.Tobj_Servant.deactivate_object

 

Integrating Transactions into a Java Server Application

Overview of Transactions in the WebLogic Enterprise System

Integrating Transactions in a WebLogic Enterprise Client and Server Application

Making an Object Automatically Transactional

Enabling an Object to Participate in a Transaction

Preventing an Object from Being Invoked While a Transaction Is Scoped

Excluding an Object from an Ongoing Transaction

Assigning Policies

Using an XA Resource Manager

Opening an XA Resource Manager

Closing an XA Resource Manager

Transactions and Object State Management

Delegating Object State Management to an XA Resource Manager

Waiting Until Transaction Work Is Complete Before Writing to the Database

Notes on Using Transactions in the WebLogic Enterprise System

 

Scaling a Java Server Application

Overview of the Scalability Features Available in the WebLogic Enterprise System

Scaling a WebLogic Enterprise Server Application

Replicating Server Processes and Server Groups

Replicated Server Processes

Replicated Server Groups

Configuring Replicated Server Processes and Groups

Scaling the Application Via Object State Management

Factory-based Routing

How Factory-based Routing Works

Configuring for Factory-based Routing in the UBBCONFIG File

Implementing Factory-based Routing in a Factory

What Happens at Run Time

Enabling Multithreaded JavaServers

Additional Design Considerations for the Teller Object

Instantiating the Teller Object

Ensuring That Account Updates Occur in the Correct Server Group

How the Bankapp Server Application Can Be Scaled Further