Oracle8i Enterprise JavaBeans and CORBA Developer's Guide
Release 8.1.5

A64683-01

Library

Product

Contents

Index

Prev  Chap Top Next

Implementation by Delegation is Different

For an Oracle8 i implementation by delegation (tie), the class you write extends a class you have defined and implements two Oracle-defined interfaces. The first interface, whose name is the IDL interface name concatenated with Operations, defines the methods corresponding to the IDL operations. The second interface, called ActivatableObject, defines a single method called _initializeAuroraObject(). To implement this method, create and return an instance. Here is a minimal example:

// IDL
module hello {
  interface Hello {
    wstring helloWorld ();
  };
};

// Aurora tie implementation
package helloServer;

import hello.*;
import oracle.aurora.AuroraServices.ActivatableObject;

public class HelloImpl implements HelloOperations, ActivatableObject 
//, extends <YourClass>
{
  public String helloWorld () {
    return "Hello World!";
  }

  public org.omg.CORBA.Object _initializeAuroraObject () {
    // create and initialize an instance and return it, for example ... 
    return new _tie_Hello (this);
  }
}



Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index