ejb@glassfish.java.net

Help understanding EJB features

From: Blake McBride <blake_at_mcbride.name>
Date: Tue, 26 Jan 2010 07:20:31 -0600

Greetings,

I have a rather large web service app written in Java and (currently)
running under tomcat. I am having a number of problems that I will describe
below. One of my associates suggested that EJB's & Glassfish could solve my
problems. Before I spend an inordinate amount of time, I though I would ask
the experts. If you could answer my questions, I would greatly appreciate
it.

THE PROBLEM

1. The app takes 1 GB of RAM and 256 MB of Java PermGen space to boot
(tomcat), and it grows daily. Even though only a very small sub-set of the
Web Services are ever used at the same time, and often its the same small
set of them are used at all, the system seems to load all of them at boot
time ( or at least allocate the max memory needed). This is cumbersome and
unwieldy, and I think the problem is going to hit some practical limit in
the not too distant future.

2. The second problem is that the smallest bug in any single module
basically causes us to re-deply the entire application (after fixing the
bug), and rebooting tomcat. I'd like to be able to fix the bad .class file
and just copy it over to the server and have the server just start using the
new file rather than rebooting the entire server.

3. Adding web services or making significant changes to existing web
services is a major event i.e. a lot of files change and we have to reboot
tomcat. I'd like to be able to install new web services or make significant
changes to existing web services without rebooting tomcat (or glassfish).

SOLUTION QUESTIONS

I don't currently use EJB's. My associate suggested that EJB's under
Glassfish might solve my problems. I know with EJB's I can spread my web
services over several machines. I do not want to do that. I want all the
services to run on one machine (and probably one instance of glassfish).

1. With respect to the RAM & PermGen space, I am hoping Glassfish / EJB's
will only load the EJB's as needed AND will be able to completely unload
them when not in use. So the RAM & PermGen requirements would only relate
to what is current;y running and unrelated to the number of EJB's available
or what has run previously.

2. I am hoping EJB's / Glassfish will allow me to install new or
arbitrarily modified web services or other EJB's while the system remains
running.

I really appreciate your input.

Thanks.

Blake McBride