WAS v8.5 > Develop applications > Develop EJB applicationsAssemble EJB modules
An enterprise bean is a Java component that can be combined with other resources to create Java Platform Enterprise Edition (Java EE) applications. This topic describes assembling EJB modules based on the EJB specifications.
This topic assumes that we have created and unit tested an enterprise bean file to assemble in an enterprise application and deploy onto an application server. Assemble an EJB module to contain enterprise beans and related code artifacts. Group web components, client code, and resource adapter code in separate modules. After assembling an EJB module, we can install it as a stand-alone application or combine it with other modules into an enterprise application.
Use an assembly tool to assemble an EJB module in any of the following ways:
- Import an existing EJB module (EJB JAR file).
- Create a new EJB module.
- Copy code artifacts, such as entity beans, from one EJB module into a new EJB module.
For information on assembling EJB modules, refer to the online documentation or the information center for the assembly tool. The Rational Application Developer product provides supported assembly tools.
- Assemble an EJB 2.x module. See the topic Assembling EJB 2.x modules.
- Assemble an EJB 3.x module. See the topic Assembling EJB 3.x modules.
After finishing assembling custom EJB module, you are ready to deploy your module.
Subtopics
- Assemble EJB 2.x modules
An enterprise bean is a Java component that can be combined with other resources to create Java EE applications. This topic describes assembling EJB modules based on the EJB 2.x and earlier specifications.- Assemble EJB 3.x modules
An enterprise bean is a managed Java component that can be combined with other resources to create Java EE applications.- Define container transactions for EJB modules
Container transaction properties specify how an EJB container is to manage transaction scopes for the enterprise bean method invocations.- References in application deployment descriptor files
References are logical names used to locate external resources for enterprise applications. References are defined in the application's deployment descriptor file. At deployment, the references are bound to the physical location (global JNDI name) of the resource in the target operational environment.- EJB references
Use this page to view and modify the EJB references to the enterprise beans. References are logical names used to locate external resources for enterprise applications. References are defined in the application's deployment descriptor file. At deployment, the references are bound to the physical location (global JNDI name) of the resource in the target operational environment.- EJB JNDI names for beans
Use this page to view and modify the JNDI names of non-message-driven enterprise beans in the application or module.- Bind EJB business settings
Use this dmgr console page to specify Java Naming and Directory (JNDI) name bindings for each enterprise bean with a business interface in an EJB module. Each enterprise bean with a business interface in an EJB module must be bound to a JNDI name. For any business interface that does not provide a JNDI name, or if its bean does not provide a JNDI name, a default binding name is provided. If its bean provides a JNDI name, the default JNDI name for the business interface is provided on top of its bean JNDI name by appending the package-qualified class name of the interface.- Sequence grouping for container-managed persistence in assembled EJB modules
After assembling an EJB module containing container-managed persistence beans, we can prevent certain types of database-related exceptions from occurring during application run time. Using sequence grouping, we can specify the order in which entity beans update relational database tables.- Set the run time for CMP sequence groups
By designating container managed persistence (CMP) sequence groups for entity beans, we can prevent certain types of database-related exceptions during the run time of custom EJB application. Specify in each group the order in which the beans update your relational database tables.- EJB modules
An EJB module is used to assemble one or more enterprise beans into a single deployable unit. An EJB module is stored in a standard JAR file.- EJB content in WAR modules
Use this topic to understand the packaging requirements of EJB content in web application archive (WAR) modules.- EJB 3.x module packaging overview
This topic describes application packaging when we use EJB 3.x beans.- Define container transactions for EJB modules
Container transaction properties specify how an EJB container is to manage transaction scopes for the enterprise bean method invocations.- References in application deployment descriptor files
References are logical names used to locate external resources for enterprise applications. References are defined in the application's deployment descriptor file. At deployment, the references are bound to the physical location (global JNDI name) of the resource in the target operational environment.- EJB references
Use this page to view and modify the EJB references to the enterprise beans. References are logical names used to locate external resources for enterprise applications. References are defined in the application's deployment descriptor file. At deployment, the references are bound to the physical location (global JNDI name) of the resource in the target operational environment.- EJB JNDI names for beans
Use this page to view and modify the JNDI names of non-message-driven enterprise beans in the application or module.- Bind EJB business settings
Use this dmgr console page to specify Java Naming and Directory (JNDI) name bindings for each enterprise bean with a business interface in an EJB module. Each enterprise bean with a business interface in an EJB module must be bound to a JNDI name. For any business interface that does not provide a JNDI name, or if its bean does not provide a JNDI name, a default binding name is provided. If its bean provides a JNDI name, the default JNDI name for the business interface is provided on top of its bean JNDI name by appending the package-qualified class name of the interface.
Related concepts:
Enterprise beans
Enterprise (Java EE) applications
Development and assembly tools
EJB modules
Related
Assemble applications
Install enterprise application files