An EJB System is logically a three-tier system.The three tiers are as follows:
1)The Client
2)The EJB Server
3)The database(or other persistent store)
* This structure is a logical architecture because the three tiers dont neccessarily have to reside on three different machines.For Example
The EJB Server and the database might reside on the same machine.This case could arise if the EJB Server includes built in functionability for persistent storage.
* The client and the EJB Server might reside on the same machine.This case occurs when an EJB bean makes a call to another EJB bean in the same container.The caller EJB bean is acting as a client in this instance.
* If you comine the two cases above ,all the three tiers might reside on a single machine.Most commonly,the client,the EJB Server and the database will reside on seperate machines though not neccessary.For example,if you are using an application servert that supports servlets,you may put your servlet clients on the same physical box as your EJB objects.If you are using an application server that directly supports persistent data storage,you may not involve an external database..

------------------
The Javix