BeanDeployer User's Guide

Introduction

The BeanDeployer tool is an ejb-jar file editor.

The ejb-jar file is the standard format for packaging enterprise beans, as defined in the Enterprise JavaBeans specifications.
The ejb-jar file format is the contract between the Bean Provider and the Application Assembler, and between the Application Assembler and the Deployer.

The ejb-jar file contains the XML deployment descriptor in the format defined by the Enterprise JavaBeans specification. This standard deployment descriptor must be stored with the name META-INF/ejb-jar.xml in the ejb-jar file.
Moreover, for JOnAS, the ejb-jar file contains the JOnAS specific XML deployment descriptor in the format defined in the JOnAS documentation. This JOnAS specific deployment descriptor must be stored with the name META-INF/jonas-ejb-jar.xml in the ejb-jar file.

The ejb-jar file also includes the class files of the beans.

The BeanDeployer tool is a graphical editor of ejb-jar file which allows to:

In this document, the reader will find a brief description of the graphical interface of BeanDeployer, following by two examples which show how to create the ejb-jar files associated to the JOnAS examples.

Main principles

The main window of BeanDeployer is composed of:

Here is an example of the main window of the BeanDeployer tool:

The sb JOnAS example

This chapter shows, step by step, how to generate an ejb-jar file for the sb JOnAS example with the BeanDeployer tool.

Launch the BeanDeployer tool

Create an Ejb-Jar

Create the session bean Op

Define the environment entry 'prop1'

Define the container-transaction for the Op bean methods

To associate a different transactionnal attribute to a specific method, you should define an other container-transaction.

Insert class files

Save the ejb-jar file

The ejb jar tree structure

The eb JOnAS example

This chapter allows to show, step by step, how to create an ejb-jar file for the eb JOnAS example with the BeanDeployer tool.

Launch the BeanDeployer tool

Create the Ejb-Jar

Create the entities beans AccountExpl and AccountImpl

Define the reference of the resource used by the bean AccountExpl

Define the container-managed fields of the bean AccountImpl

Define the mapping for the persistence for the AccountImpl bean

The needed mapping information is the mapping of the bean fields to the database table columns, and the description of each finder method.

Define the container-transaction for the AccountExpl bean methods

To associate a different transactionnal attribute to a specific method, you should define an other container-transaction.

Define the container-transaction for the AccountImpl bean methods

To associate a different transactionnal attribute to a specific method, you should define an other container-transaction.

Insert class files

Save the ejb-jar file

The ejb jar tree structure