![]() |
The Bean Wizard generates interfaces during bean creation which must comply with EJB specifications. To modify these interfaces using Bean Wizard, the bean needs to be generated again. The Interface Wizard in Studio improves the efficiency in such situations, by allowing interfaces to be added and removed, and generated interfaces to be modified.
This document describes the Interface Wizard and how the tedious work involved in defining interfaces repeatedly, is spared.
Select Tools > Interface Wizard from the main menu. This brings up Interface Wizard for the active desk. There are two types of interfaces defined in the specification - Local and Remote. Local interfaces allow session beans and entity beans to be tightly coupled with their clients and to be directly accessed without the overhead typically associated with remote method calls. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence.
Remote Interfaces hold references to the business logic that is specific to the bean, and remote home interfaces hold functions generic to the execution of the bean in its environment. Follow the given sections to add, remove and modify interfaces in the active desk.
Super interface generation is supported in case of Auto-Interface generation. Methods present in the super class of a bean are not added to its interfaces directly. If the bean class has a super class, and you want to expose its methods in Local or Remote sets of interfaces, then these methods should be added to the respective interfaces, manually.
In Interface Wizard, the first panel assists in defining local and remote interfaces for the generated beans.
All generated interfaces extend their javax.ejb.xxx interface as defined in J2EE specification. You need not specify javax.ejb.xxx in the Adv panel. After entering all required information, click Next. This displays Methods to publish in Interface(s) panel.
Check the Home and Local Home interfaces for finder methods created previously. These methods are then placed in Home interface. Click Next to open Methods to be published in Remote and Local interfaces panel.
The Methods to be published in Remote and Local interfaces panel displays all get/set methods for CMFs and CMRs, and the business methods defined earlier. Check Remote and Local interfaces for the methods to be placed in Local interface. The setXXX() methods for primary key fields is not displayed for selection in this panel. Click Finish. The Interface Wizard then re-generates Local and Remote interfaces for the bean.
| Pramati Technologies © Copyright |
|