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:
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.
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.
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.
The client invokes the component’s business logic by executing its methods.
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.
EJB Server returns the results from the database to the client.
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.