[Previous] [Table of Contents] [Next]

Bojangles Tutorial
Creating a manageable version of the business object

Before the Account object can be made distribution and persistence capable, it must first be made manageable. Making a business object manageable is a two step process:

  • Create an interface for the business object
  • Utilitize emitters to create a manageable version of the business object
  • The Account.java module is the interface for the AccountBase object:

    package COM.ibm.jaws.tutorial1.example5;
    
    import COM.ibm.jaws.mofw.Manageable;
    
    public interface Account extends Manageable
    {
        public void
        deposit(float amount);
    
        public void
        withdrawal(float amount);
    
        public float
        getBalance();
    }
    

    The business object interface must extend the Manageable interface as the Account interface above does (denoted in green). It must also contain the set of method interfaces that the AccountBase object would like to make publicly available (denoted in red).

    The second step to making an object manageable is executing the manageable emitter on the AccountBase object:

    java COM.ibm.jaws.tools.emit.RunImplEmitter COM.ibm.jaws.tutorial1.AccountBase
    
    This command will produce a new object named AccountImpl.java that extends the AccountBase object and implements the new Account interface.


    [Previous] [Table of Contents] [Next]