The EJB Server runtime environment

A typical EJB Server application has an applet or HTML page associated with it. Once you build and deploy such an application, it runs in the following fashion:

  1. EJB Server receives an HTTP request and downloads the requested HTML page or applet. Included with the applet are the Java stubs, which through a proxy, instantiate components and invoke the methods on those components.

  2. The client establishes a session with EJB Server. The session, unlike an HTTP connection, allows the client and EJB Server to maintain a connection throughout the transaction.

  3. The client creates a component instance through a client-side proxy. The proxy used depends on the type of component being instantiated. EJB Server validates the user against the component’s access list. If the user is validated, the dispatcher checks the location and status of the component and creates an instance.

  4. The client invokes the component’s business logic by executing its methods.

  5. The component may interact with the database server. If it does, the component obtains a connection to the database using the Sybase high-speed JDBC driver.

  6. EJB Server returns the results from the database to the client.

  7. The client indicates that it has completed the operation. EJB Server destroys the component instance or returns it to a pool for future client instantiations. The client disconnects from EJB Server.