EJB Properties

You can open the EJB page in the component property sheet to display the following properties:

Property

Description

Remote home interface

Defines methods and operations used in a remote client view. Extends the javax.ejb.EJBHome interface

Remote interface

Provides the remote client view. Extends the javax.ejb.EJBObject interface

Local home interface

Defines methods and operations used locally in a local client view. Extends the javax.ejb.EJBLocal-Home interface

Local interface

Allows beans to be tightly coupled with their clients and to be directly accessed. Extends the javax.ejb.EJBLocalObject interface

Bean class

Class implementing the bean business methods

Primary key class

Class providing a pointer into the database. It is linked to the Bean class. Only applicable to entity beans

Note:

You can open the EJB page by right clicking the EJB component symbol in the diagram, and selecting EJB from the contextual menu.

For more information on interface methods and implementation methods, see Understanding operation synchronization.

Previewing the Component Code

You can preview the code of an EJB by clicking the Preview tab in the component property sheet. The Preview page contains tabbed pages that correspond to each interface and class of the EJB. You can see the relation between an EJB and its classes and interfaces from the Preview page without generating any file.

In the class and interface property sheets, the Preview page is a keyboard shortcut to show what will be generated.

In the model or package property sheet, the Preview page describes the EJB deployment descriptor file with the name of the generated EJB and its methods. It allows you to view what will be generated.

You can use the following tools and keyboard shortcuts from the Preview toolbar:

Tool

Description

Keyboard shortcut



Open Editor Contextual menu

Shift + F11



Refresh

F5



Show Generation Options

ctrl + W



Select Generation Targets

ctrl + F6

Showing Generation Options

If you click the Show Generation Options tool, the Generation Options dialog box is displayed. You can change generation options from this dialog box and see the impact on the code.

Select Generation Targets

This tool is available when at least one extended model definition flagged for generation is linked to the model, and when it contains entries in the Generated Files category for the current type of object. When available, it displays the list of targets for the current object. If you add a generation target, the corresponding tab is added to the Preview page. If you deselect a generation target, the corresponding tab disappears from the Preview page.

For more information on setting an extended model definition for generation, see "Extended Model Definitions" in the Resource Files and the Public Metamodel chapter of the Customizing and Extending PowerDesigner manual.

Script Bookmarks

In the Preview page, you can add and remove bookmarks at specific points in the code and then navigate forwards or backwards from bookmark to bookmark:

Keyboard shortcut

Description

ctrl + F2

Adds a new bookmark. A blue bookmark box is displayed. If you repeat this action from the same position, the bookmark is deleted and the blue marker disappears

F2

Jumps to bookmark

shift + F2

Jumps to previous bookmark

Note that bookmarks are not printable and are lost if you use the Refresh, or Show Generation Options tools.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com