6.5. Some notes on the meaning of an ‘EJB instance’

When a stateful session EJB is created, there is a fairly clear relationship between the notion of ‘creation’ on the client, and ‘instantiation’ on the server. The EJB implementation class is instantiated exactly once for each create() call on the client. With stateless session EJBs, however, the relationship is less clear-cut. It is entirely possible that the client’s create() call does not lead to any class being instantiated on the server. If the instance required to satisfy the client’s request is taken from the pool for each method call, then the creation and removal operations on the client have no server counterpart. So what is it, exactly, that we create? The answer is that we have ...

Get Applied Enterprise JavaBeans™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.