Let's assume for a moment that you are using entity beans to solve a
business problem where your entity domain is not stationary. A financial
application that processes earnings forecasts, a retail application that
processes orders, a shipping application that processes packages, an
insurance application that processes claims would all fit the bill.
If you are relying on an EJB platform that does not adequately support the
automatic recycling of unreferenced objects, chances are that after some
time your application will start complaining about exhausted resources. Even
if you followed all the "guidelines" of always wrapping entity beans in
session beans and never creating entity beans that are not part of the
domain (which I strongly oppose, see my previous rant).
Why? Because the entity objects (not instances!) that were created shortly
after the server was started are still hanging on to resources (memory,
socket resources, buffers etc.). This happens even if the associated
forecast, order etc. is long forgotten (i.e. no client or other local bean
has a reference to the entity object). Since the EJB architecture does not
have a mechanism to explicitly remove unreferenced entity objects, your
platform will not be able to release the resources used by them.
Which platforms could be affected? Standard CORBA platforms (since they
don't have GC at all) and standard JDK1.1 platforms (they don't have
adequate GC). Should the EJB spec be expanded to fix this behavior? No, IMHO
the EJB architecture is sound and is highly scalable. Paired with the Java 2
platform, that implements adequate DGC and "weak" references(coincidence?),
the above problem is not exhibited.
Imre Kifor
Valto Systems
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".