Getting Started with Enterprise JavaBeans Modeling

Creating a diagram of Enterprise JavaBeans allows you to not only quickly create a set of beans which you can then populate with properties and methods, but also a graphical representation of those beans and the relationships and references between them.

To model Enterprise JavaBeans you need to start with an EJB diagram, although you can subsequently add other elements like UML classes, Java classes, business components, offline database tables, UML use cases and web services to the same diagram. For more information on creating a Java diagram, see Creating a Diagram of Enterprise JavaBeans.

UML notation is used to represent the elements on your diagram. For more information, see How to Read a Diagram of Enterprise JavaBeans.

Entity, Session and Message-Driven Beans

Enterprise JavaBeans are created on a diagram by using the Entity Bean  Entity Bean icon  icon, Session Bean Session Bean icon  icon or Message-Driven Bean Message-Driven Bean icon  icon on the EJB Component Palette for the diagram, and then clicking on the diagram where you want to create the element. The implementation files for the modeled elements are created in the location specified by your project settings. For more information, see Modeling an Enterprise JavaBean on a Diagram.

Tip: If you want to model the implementing Java classes for a modeled bean on a diagram, right-click the modeled bean and choose Show | Implementation Files.

Properties and methods can be added by either double-clicking the bean and adding the property or method using the EJB Module Editor or by creating the new property or method 'in-place' on the modeled bean itself. For more information, see Modeling Properties and Methods on Beans.

Relationships Between Beans

References can be created from any bean to any other bean with a remote interface using the EJB Reference EJB Reference icon  icon and local references can be created from any bean to any other bean with a local interface using the EJB Local Reference  EJB Local Reference icon  icon on the EJB Component Palette for the diagram. For more information, see Modeling a Reference Between Beans.

A variety of relationships can be created quickly between modeled entity beans using the 1 to * Relationship 1 to * Relationship icon  icon, Directed 1 to 1 Relationship Directed 1 to 1 Relationship icon  icon, Directed 1 to * Relationship Directed 1 to * Relationship icon and Directed Strong Aggregation Directed Strong Aggregation  icons on the EJB Component Palette for the diagram. For more information, see Modeling a Relationship Between Entity Beans.

Note: If you change, add to, or delete from, the implementation files for anything that is displayed on a diagram, those changes will be reflected on modeled representations of those elements. Conversely, any changes to the modeled Enterprise JavaBeans are also made to the underlying implementation files.

You can annotate a diagram of Enterprise JavaBeans using notes, dependency relationships and URL links. For more information, see Annotating a Diagram.


Creating a Diagram of Enterprise JavaBeans
How to Read a Diagram of Enterprise JavaBeans
Modeler's Guide

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.