EJB (deprecated)#

The Lattix EJB module supports EJB 2.1.

To install please contact Lattix to obtain the EJB module. Unzip and extract the file ejb_plugin.jar. Copy this file into the bin/plugins sub-directory of your Lattix installation. On Windows, this is typically C:Program FilesLattix9.xbinplugins. Now you can start Lattix and the EJB module will be available.

Creating a Model#

The EJB Module is part of the Enterprise Java Profile. To create a new project, select File –> New. Select the Enterprise-Java Profile and then choose the Module Type to EJB.

  • Navigate to the source for your project and press Add Files.

image0

  • If you project has XML files in several directories, you can enable directory structure partitions. Click on the Partition Options tab:

image1

Initial View#

The EJB module parses all the XML files in the list and discards the ones it does not understand.

image2

Atom and Dependency Kinds#

Atom Kinds#

  • Class - Java Class

  • EJB - atom created from <ejb> elements as described in <sun-ejb-jar> constructs

  • Entity Bean - atom created from <entity> element in <ejb-jar> constructs

  • Session Bean - atom created from <session> element in <ejb-jar> constructs

  • Message Bean - atom created from <message-driven> element in <ejb-jar> constructs

  • Field - Data member of a Java Class or a Bean

  • Method - Method member of a Java Class or a Bean

Dependency Kinds#

  • Message Destination Type - The Class specified by the <message-destination-type> tag in a <message-driven> construct

  • EJB Class - Relationship between a Bean and the Class specified by the <ejb-Class> element

  • Local Interface - Relationship between a Bean and the Class specified by the <local> element

  • Local Home Interface - Relationship between a Bean and the Class specified by the <local-home> element

  • Remote Interface - Relationship between a Bean and the Class specified by the <local> element

  • Home Interface - Relationship between a Bean and the Class specified by the <home> element

  • EJB Link - Relationship between a Bean and the Class specified by the <ejb-link> element

  • Query - Relationship between a Bean and the Method specified within the <query-method> element

  • Accessor Method - Relationship between a Field in a Bean and a Method in a Class derived from the <field-name> element

Options#

  • Verbose Processing - causes the EJB Module to produce diagnostic information while parsing XML files.

  • Create Dependencies from JNDI Information - more here

Integrating With Java#

Using multi module projects, it is possible to show relationships between your EJB XML files and your Java code. To do this, create a Multi Module Project:

  • Create a new project by selecting New from the File menu.

  • Add your Java jars/classes to the project

image3

  • It is often useful to have directory structure for multi-jar projects. Select Partition Options and turn on Create Subsystems Corresponding to Directory Structure.

image4

  • Click on the Input Sources tab and change the module type to EJB and add your EJB files

image5

  • Select the Project Options tab and set the module merge options. Make sure that Java is first in the Module Merge Order.

image6

  • Click on Create Project

ejb-merge-initial