EJB

Medea provides a set of templates to generate EJB classes, interfaces and configuration files from a class diagram. Classes marked will entity stereotype will create CMP EJBs, service stereotypes will create stateless session EJBs with methods described as operations in the class.

Templates

These templates produce all artifacts needed to create an EJB tier. You can incorporate the results to your project. Medea provides other templates to create a Facade session EJB to manipulate CMPs as well as PersistenceFacade module to use in a 3-tier J2EE application. Look for more details in CRUD with Jsp section.

  • Service: creates stateless session EJBs
  • CMP: creates CMP EJBs
  • ejb-jar_cmp: ejb-jar.xml with CMP EJBs
  • jboss_cmp: jboss.xml with CMP EJBs
  • jboss-app_cmp: jboss-app.xml with ejb module
  • jbosscmp-jdbc: jbosscmp-jdbc.xml
  • BeanLocator: helper class to look up CMP beans
  • FacadeLocator: helper class to look up Facade EJB
  • Facade: interface for the Facade EJB
  • Locator: helper class for jndi lookup
  • CMPFacadeBean: implementation of Facade stateless session EJB with CMP persistence
  • PersistenceManager: interface with persistence methods for all entities to be used in front end
  • CMPManager: CMP implementation of PersistenceManager interface
  • PersistenceManagerFactoryCMP: helper PersistenceManagerFactory creates CMP implementation of PersistenceManager

Build targets

Medea provides the following build targets to create EJB components:

  • trans_locator: Transform source files for locator in ejb tier
  • trans_cmp: Transform source files for the ejb tier with CMP persistence
  • trans_facade_cmp: Transform source files for CMP persistence facade
  • trans_jboss_cmp: Transform config files for JBoss with CMP persistence
  • compile_ejb: Compile ejb classes
  • jar_ejb: Make an ejb jar file with ejb classes and deployment descriptors
  • redeploy_jar: Deploy ejb archive by copying ejb file