Oracle8i CORBA Developer's Guide and Reference Release 3 (8.1.7) Part Number A83722-01 |
Library | Service | Contents | Index

## 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);
      }
    }

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index