Chapter 14 Working with Java


Understanding operation synchronization

Synchronization maintains the coherence of the whole model whenever a change is applied on operations, attributes, and exceptions. Synchronization occurs progressively as the model is modified.

Operation synchronization

Synchronization occurs from interface to Bean class. Interface operations have linked methods in the Bean class with name/code, return type and parameters synchronized with the interface operation. When you add an operation to an interface, you can verify that the corresponding linked method is created in the Bean class (it is grayed in the list). Whereas no operation is created in an interface if you add an operation to a Bean class.

For example, double-click the Bean class of a component, click the Operations tab, click the Add button at the bottom of the Operations page, and select EJB Create method (local): PowerDesigner adds this operation to the interface and automatically creates the ejbCreate and ejbPostCreate operations in the Bean class.

Exception synchronization

Exceptions are synchronized from the Bean class to interfaces. The exception list of the home interface create method is a superset of the union of the exception lists of the matching ejbCreate and ejbPostCreate implementation operations in the bean class.

The interface exception attributes are thus updated whenever the exception list of the bean class implementation method is modified.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.