-
1. Re: destroying a @Startup application-scoped component
kragoth Mar 30, 2010 1:01 AM (in response to asookazian)The size of a single Seam bean on the heap is going to be extremely small. Removing it from the App will probably not make any measurable increase in performance. (Other then maybe a few mili seconds at startup)
So, unless you have completely finished your app and are trying to squeeze every little bit out of it then I honestly wouldn't worry about it. And even if you are in performance mode worrying about a single object on the heap is not going to help.
However, if you are absolutely set on getting rid of it from the heap then let's see.
So far in most of the apps I've written (which isn't many but, I'm working on that :P) there's always been a need for at least 1 Application scoped bean. So, just get that Application scoped bean to call this process rather then making it a seperate application scoped bean.
Or, what about a context listener and just do your purgeTempFiles inside the contextInitialized event? Is there any reason why it has to be a Seam bean?
-
2. Re: destroying a @Startup application-scoped component
asookazian Mar 30, 2010 1:19 AM (in response to asookazian)The solution for this problem has changed and the new code will be placed inside an existing MBean (the files need to be flushed every time a method is invoked from jmx-console, rather than once per deployment). But thx for the reply.