15.5. Garbage collection issues

It is the EJB container’s responsibility to handle garbage collection, or at least to ensure that unused objects are made available for garbage collection. In an ideal world, at no point should the developer have to be concerned about garbage collection, or explicitly free allocated resources. In fact—so the story goes—garbage collection is so much a nonissue for the developer that the EJB Specification does not mention the subject even once.

In reality, the EJB architecture has some characteristics that support and assist the use of garbage collection, and some that mitigate against it. The main factor in its favor is that there is, in most cases, no direct relationship between the number of clients and the number ...

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.