Object implementation classes normally inherit from a servant class generated by the idl2java compiler. The servant class, in turn, inherits from
org.omg.PortableServer.Servant. When it is not convenient or possible to alter existing classes to inherit from the VisiBroker servant class, the
tie mechanism offers an attractive alternative.
The tie mechanism provides object servers with a delegator implementation class that inherits from
org.omg.PortableServer.Servant . The delegator implementation does not provide any semantics of its own. The delegator implementation simply delegates every request it receives to the real implementation class, which can be implemented separately. The real implementation class is not required to inherit from
org.omg.PortableServer::.Servant .
The following code sample shows the modifications to the Server class. Note the extra step of creating an instance of
AccountManagerManagerPOATie.
The changes made to the AccountManager class (in comparison with the
Bank_agent example) include:
The changes made to the Account class (in comparison with the Bank example) are that it no longer extends
Bank.AccountPOA.