• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

Large enterprise software projects involve multiple stakeholders with different responsibilities. Without clear role separation, code, deployment, and operations become chaotic—developers might hardcode server paths, or deployers might not know which security settings to apply.

Core Idea

EJB formalizes the software development lifecycle by dividing it into distinct roles, each with clear responsibilities. This separation of concerns ensures that code is portable, reusable, and professionally managed.

How It Works

The EJB specification defines these roles:

RoleResponsibility
Bean ProviderWrites the Java code (Bean Class, Interfaces) and business logic
Application AssemblerCombines multiple beans into a complete application
EJB DeployerInstalls and configures the application on the server
System AdministratorMonitors the live system, ensures server health
Container/Server ProviderBuilds the application server (e.g., Oracle, IBM, JBoss)

Visual Explanation

EJBRoles BP Bean Provider (Writes Code) AA Application Assembler (Combines Beans) BP->AA Java files D Deployer (Installs on Server) AA->D Ejb-jar file SA System Administrator (Monitors Live) D->SA Running app CP Container Provider (Builds Server) CP->D Application Server

Key Properties

  • Bean Provider only writes business logic—never server-specific code
  • Application Assembler doesn’t need to know implementation details of each bean
  • Deployer uses vendor-specific tools but deploys standard EJB-JAR files
  • Portability: Code written by Bean Provider runs on any EJB container

Connections

Edge Cases & Gotchas

  • In small teams, one person may wear multiple roles (Bean Provider + Assembler + Deployer)
  • Container Provider role is only for big vendors (Oracle, IBM, Red Hat)—most developers are Bean Providers
  • Miscommunication between Assembler and Deployer causes deployment failures