Programmers Guide

About this book

Overview

Creating Component-Based Applications

Application architecture

Designing the EAServer application

Implementing components and clients

Deploying the application

Understanding Transactions and Component Lifecycles

Component lifecycles

EAServer’s transaction processing model

EAServer Transaction Manager

Managing Applications and Packages in EAServer Manager

Defining applications

Defining packages

Defining Components

Defining components

Installing components

Configuring component properties

Running components externally

Defining Component Interfaces

Defining interfaces graphically

Importing interfaces from compiled Java files

Importing interfaces from registered ActiveX components

Defining modules, interfaces, and types in IDL

Enterprise JavaBeans

Enterprise JavaBeans Overview

About Enterprise JavaBeans components

EAServer EJB support

EJB 2.0 differences from 1.1

EJB 1.1 differences from EJB 1.0

Creating Enterprise JavaBeans Components

Defining an EJB component

Configuring the component properties

Deploying the component classes

Creating Enterprise JavaBeans Clients

Developing an EJB client

Generating EJB stubs

Instantiating home interface proxies

Instantiating remote or local interface proxies

Calling remote interface methods

Calling local interface methods

Managing transactions

Serializing and deserializing bean proxies

Runtime requirements

EAServer EJB Interoperability

Intervendor EJB interoperability

Invoking non-EJB components from EJB clients

Invoking EJB components from CORBA C++ clients

Invoking EJB components from PowerBuilder clients

Invoking EJB components from ActiveX clients

Invoking EJB components from CORBA Java clients

Invoking EJB components using the MASP interface

Creating Application Clients

Creating an application client

Configuring application client properties

Running application clients

CORBA-Java Components and Clients

Creating CORBA Java Components

Requirements

Procedure for creating Java components

Define the component interface and properties

Choose implementation datatypes

Write the Java source file

Advanced techniques

Deploy Java components

Debug Java components

Creating CORBA Java Clients

Overview

Procedure for creating CORBA-compatible Java clients

Generating Java stubs

Instantiating proxy instances

Executing component methods

Cleaning up client resources

Serializing component instance references

Handling exceptions

Deploying and running Java clients

Instantiating proxies with the CosNaming API

Using other CORBA ORB implementations

CORBA-C++ Components and Clients

CORBA C++ Overview

Overview

Requirements

Supported datatypes

Creating CORBA C++ Components

Procedure for creating C++ components

Defining C++ components

Generating required C++ files

Writing the class implementation

Compiling source files

Debugging C++ components

Running C++ components externally

Creating C++ components for multiplatform clusters

Creating CORBA C++ Clients

Procedure for creating CORBA C++ clients

Generating stubs

Writing CORBA C++ clients

Compiling C++ clients

Deploying C++ clients

Using the CosNaming interface

Using CORBA ORB implementations other than EAServer

PowerBuilder Components and Clients

Creating PowerBuilder Components

Creating PowerBuilder Clients

ActiveX Components and Clients

ActiveX Overview

Overview

Requirements

ActiveX datatype support

Creating ActiveX Components

Procedure for creating ActiveX components

Defining ActiveX components

Writing ActiveX components

Deploying ActiveX components

Creating ActiveX Clients

Procedure for creating ActiveX clients

Generate .tlb and .reg files for components

Develop and test the ActiveX client

Deploy the ActiveX client

Web Applications

Creating Web Applications

What is a Web application?

Contents of a Web application

Creating Web applications

Configuring Web application properties

The EASDefault Web application

Using Java extensions

Localizing Web applications

Creating Java Servlets

Introduction to Java servlets

Writing servlets for EAServer

Installing and configuring servlets

Web application support

Server properties for servlets

Using Filters and Event Listeners

Servlet filters

Application lifecycle event listeners

Creating JavaServer Pages

About JavaServer Pages

Why use JSPs?

Syntax summary

Objects and scopes

Application logic in JSPs

Error handling

Using JSPs in EAServer

Advanced Features

Sending Result Sets

Overview

Sending result sets with Java

Sending result sets from a PowerBuilder component

Sending result sets from an ActiveX component

Sending result sets from a C or C++ component

Using Connection Management

Overview of connection management

When to use Connection Manager

Connection caches and security

Defining connection caches

Using Java Connection Manager classes

Using Connection Manager routines in C, C++, and ActiveX components

Using cached connections in PowerBuilder components

Connection Manager guidelines

Creating Entity Components

Implementing entity components

Coding to support manual persistence

Understanding the automatic persistence architecture

Configuring automatic or EJB CMP persistence

Specifying the CMP version for EJB 2.0 entity beans

Setting Persistence/General subtab properties

Enabling automatic key generation

Creating database tables

Configuring concurrency control

Setting field-mapping properties

Specifying finder- and ejbSelect-method queries

Configuring table-mapping properties

Using relationship components

Configuring Persistence for Stateful Session Components

How it works

Supported component implementations

Using EJB activation and passivation

Using automatic persistence

Configuring Persistence Mechanisms

Storage components

Supported Java, IDL, and JDBC/SQL types

Table schema for binary storage

Requirements for in-memory stateful failover

Configuring Custom Java Class Lists

Understanding how the class loader works

Deciding which classes to add to the custom list

Configuring an entity’s custom class list

Troubleshooting class loader configuration issues

Using the Message Service

Overview

Developing JMS applications

Developing EAServer messaging service applications

Using the Thread Manager

About the Thread Manager

Using the Thread Manager

Creating Service Components

Introduction

Creating service components

Determining service state

Refreshing service components

Creating and Using EAServer Pseudocomponents

Benefits of pseudocomponents

Creating pseudocomponents

Instantiating pseudocomponents

Debugging C++ pseudocomponents

Creating JavaMail

Introduction to JavaMail

Writing JavaMail for EAServer

Deploying JavaMail-enabled applications

Configuring Java XML Parser Support

About JAXP

Configuring JAXP properties in EAServer Manager

Exporting and importing application clients

Executing Methods As Stored Procedures

Creating invocation commands

Limitations

Using MASP from isql

Using MASP from application builder tools

Configuring the return status

Migrating Open Server Applications to EAServer

Migration overview

Coding changes and examples

Modified APIs and new event handlers

EAServer configuration

Additional event handler information

Creating C Components

C component lifecycle

Requirements

Procedure for creating C components

Define component interface and properties

Generate C component files

Write C components

Compile C components

Debug C components

Using the Command Line IDL Compiler

com.sybase.CORBA.idl.Compiler