Enterprise JavaBeans™(EJB) introduced a new way of writing server side Java applications. Using application servers supporting the EJB platform, an application can concentrate on creating business logic, and rely on the application servers’ middle tier services, with little or no additional programming.
The Enterprise JavaBeans data source in the Data Modeler is designed to use the EJB API directly to access the application data model. Because it does not assume any particular implementation of the application server, it is fully portable and conforms fully to the EJB standard.
EJB beans are server-side components written in Java. The beans can contain business logic for an application, as well as for the application data model. There are two classes of EJB beans:
A session bean corresponds to the client of an EJB server. Each client communicates with the server by invoking session bean methods. The session bean keeps track of the session states. When the client terminates, the session bean is discarded. Therefore, it is a transient component, and does not have persistent states.
An entity bean contains information for business objects. It is not tied to a particular session and is always persistent. The entity bean data can be stored in a database or in any persistent storage an application server chooses.
Each bean is placed in an EJB container. A container manages the beans. For entity beans, the container also provides methods for looking up entity beans using certain criteria. These methods are called finder methods.
Data Modeler’s EJB queries support the retrieval of information from entity beans. All entity beans are accessed through their container (home) using the finder methods. Session beans do not represent the application data model and cannot be used in the queries. However, session beans can be used with the Java Object data source (see below).
Similar to the CORBA data source, requests in an EJB data source are created from the EJB home Java class. Therefore, the Data Modeler must be able to load the EJB home class file in order to analyze the methods.
When the EJB home and entity bean interface are imported, the Data Modeler analyzes the class files to create the data source requests. Each EJB home finder method is converted to a request. The entity bean interface is used to create the output schema.
Two other options control which member of the classes is used when constructing a data tree from a Java object. The default settings include both public getter methods (methods starting with ‘get’) and public fields.
Once the classes are imported, the Data Modeler automatically creates a list of requests.
InetSoft Technology Corp.
InetSoft Technology Corp.