Together provides several productivity enhancing features especially for developers of distributed applications using Enterprise JavaBeans ® (EJB). For information about which products provide EJB support, visit www.togethersoft.com or contact your Together Distributor. This chapter describes how to use Together to create, develop, and deploy EJBs.
It's beyond the scope of this documentation to teach EJB fundamentals. Documentation assumes you are familiar with the concepts, terminology, and Java Enterprise APIs, and that you have some experience developing EJBs. If you're just getting started with EJBs, a good resource is Java Enterprise in a Nutshell (2nd edition) by David Flanagan et al, 1999 O'Reilly & Associates. ISBN 1-56592-483-5.
Together acts as a "control center" for EJB development: with it you can model, implement, compile, debug, document, and deploy your EJBs to an app server. Specifically, you can:
Create Together projects around existing EJBs. Together automatically reverse engineers the code and generates a visual model from which you can easily generate up-to-date documentation. Code and model remain synchronized at all times.
Create new session or entity EJBs with a single click. Together generates a default skeleton that includes both the visual model and the basic source code, which serve as the basis for further modeling and development. The skeleton includes home and remote interfaces as well as implementation class and primary key class (for entity beans).
Create multiple implementations. You can share Home and Remote interfaces among two or more EJB implementaion classes enabling you to deploy different implementations of the same interfaces on different servers.
Compile your EJBs and generate XML deployment descriptors. Create SDK 1.2 DTDs, either generic, or platform-specific for supported leading application servers. Handy "expert" GUI simplifies the process.
Generation a JSP test client. During the deployment process you can optionally choose to generate a simple JSP (Java Server Pages) that you can use to test a running EJB directly in the server environment.
"Hot deploy" you EJBs from the Together environment directly to supported application servers.
Create assembly diagrams for your remote applications showing what EJB components are required, EJB container handling, security roles and profiles, etc.
If you have developed EJBs before, then you know that the typical development process is something like this:
Model EJB in some CASE tool.
Generate source
code framework with CASE tool.
Develop the EJB
code using an IDE or code editor.
Compile the EJB
classes using IDE or JDK.
Debug any errors
with some debugger.
Write deployment
descriptor in XML (typically with a text editor) that describes
serialization and other properties of the EJB in the context of an application.
Generate
container-specific classes using tools from the application server vendor.
Package
everything into a JAR file using JDK utility or other tool.
Deploy the EJB to the app server using tools from the application server vendor.
|
|
|
Typical EJB development process & tools |
As you can see, the typical process involves a great deal of work that has nothing to do with actually developing business solutions. It adds the learning-curve overhead of a daunting array of different tools that only results in slowing down your distributed application development.
Together's EJB development features are designed to speed up the process, get your distributed systems working sooner, and let you to focus on good design and development and robust functionality.
|
|
A major benefit is that you don't have to write deployment descriptors. Together stores bean properties right in the model. You can put bean-specific info into a special diagram type: the EJB assembly diagram, and at deployment time Together packages up everything and deploys to the server. With Together, the EJB development process looks like this:
The EJB Deployment Expert is a time saver that automates many of the tedious post-development chores into a simple set of steps. The expert will:
|
Team Support is built right in
Together's approach fits seamlessly with team-based development. Because all bean information is stored with the right granularity, each EJB contains its own information, so that you can develop EJB's independently of one another. In the traditional approach there is one monolithic file - the "dreaded DD" - and all developers have to work with it. It has to be checked-in/out as a whole.
There are a number of configuration options that you may want to modify depending on where you are in the development process. You may find you want to set options differently depending on whether you are designing, implementing, or deploying an EJB.
The Boolean config option Recognize JavaBeans controls whether or not Together recognizes JavaBean classes. This options is set to True by default, meaning that Together treats classes having methods that begin with get or set as JavaBeans. For EJB development, you should set this option to True.
The main menu command Options | Recognize JavaBeans toggles this option. There is a parallel icon on the Main Toolbar. The setting applies at the Default configuration level. (For information on configuration levels, see User's Guide: Configuring Together: Multi-level Configuration.
Depending on whether you are in the modeling/design or implementation stage, you may want to change the view management option Diagram Detail Level. The levels are Analysis, Design, and Implementation. Each shows a greater level of detail in the class icons in Class diagrams.
To set this options, choose Options | [level] - View Management - Diagram Detail Level (where level is the menu command for the desired configuration level).
(For information on configuration levels, see User's Guide: Configuring Together: Multi-level Configuration.)
You can set view management options that show or hide the following elements in the Class diagrams that contain EJB classes/interfaces:
EJB Home interfaces
EJB Remote interfaces
EJB Implementation classes
EJB Primary Key classes
By default, only EJB classes are shown in Class diagrams. Any elements that are hidden by these settings in diagrams still show up in the Model tab of the Explorer, so you can always tell that they exist in your model and your code.
To modify EJB filtering options:
From the Main menu choose Options | [level] - View Management (where level is the menu command for the desired configuration level).
On the View Management page of the Options dialog, scroll the pane of options until you see the node named Show. Expand this node if necessary.
Check or clear the options as desired. Checking a box means the element should be shown in diagrams... clearing the box means the element should be hidden in diagrams.
While you have the Show options open, review the other options that apply to classes in general to make sure that you can see what you want to see in your Class diagrams for EJBs.
In the EJB tab of the Options dialog you can specify the suffixes for various types of EJB classes. The suffixes help Together to properly recognize EJB's. If a project is created outside Together, class names may not follow the Together conventions. You can enter specific suffixes for your EJB classes:

Before using Together for EJB development, you may want to review your entire configuration, especially View Management's Show Beans options for Java (Options | [level] - View Management - Java).
If your license supports Together's advanced Editor features, and you will use this editor for EJB development, you may want to configure the Editor as well. (For more information, see User's Guide: Using the Editor.)
See also:
Deploying
Enterprise JavaBeans
Deploying
EJBs to BEA Weblogic Server
EJB
Assembly diagrams