EJB

EJB

Pre-requisite:

Knowledge of Java syntax, HTML, SQL and working programming experience with any procedural or object-oriented language. This class targets experienced Java programmers, who would like to learn EJB technology and its architectural implications. Our company can provide the light version of the class for the junior and itnermediate developer desiring to familiarize with EJB only from the prospective of writing the code.

Duration:

40 hours

Objectives:

General concepts

  • Transaction Monitors
  • Object Request Brokers
  • Distributed Object Architectures

EJB overview

  • Remote interface
  • Home interface
  • Bean class
  • Primary key
  • Deployment descriptors
  • Deployment and generated pieces

Setting up Application Server

  • Data Source
  • Deployment

Entity Bean (container managed persistence)

  • EntityBean interface
  • EntityContext interface
  • Create methods
  • Activation and passivation
  • Exceptions
  • Deployment

The client view of EJB

  • Finding Remote Interface using JNDI
  • Communication protocols (RMI, IIOP)
  • Using finders
  • Creating beans
  • Removing beans
  • Bean handle

Entity Bean (bean managed persistence)

  • Obtaining database connection
  • Deployment implication of using Data Source.
  • Saving to and retrieving from the database (ejbLoad() and ejbStore() methods)
  • Implementing finders

Stateless Session Bean

  • Accessing environment naming context (JNDI ENC)
  • Deployment
  • Life cycle

Stateful Session Bean

Declarative transaction management.

  • Transaction scope.

Application Exceptions

  • CreateException
  • DuplicateKeyException
  • FinderException
  • ObjectNotFoundException
  • RemoveException

Design strategies

  • When to use Entity Beans
  • When to use Session beans
  • When to use dependent objects and data objects.
  • When to use object-to-lreational mapping isntead of EJB-s
  • Bean adapters
  • Common interfaces.

(Java Training)