Sam wrote:
>>No, but threads are more work, and you have to worry about terminating
>>them. I was just wondering if there was "resin" way to do it.
>
>
> It is wise to recognize that launching a new thread is something
> that is a bit more complicated, and would require more careful
> consideration, more code review, etc.
I agree. One of the developers implemented a thread, but he didn't
handle the error conditions correctly, which caused a race condition to
occur. We found it and fixed it, but the job took much more time than
what it would have taken to just write a servlet that runs once and the
container handled the starting.
>
> You could use Resin's support for JCA's work management api for this:
> http://www.caucho.com/resin-3.0/resource/tutorial/jca-work/index.xtp
>
I will check this out.
> I have also added an entry to the bugtrack for added
> functionality that would simplify this a little bit:
>
> http://www.caucho.com/bugtrack/browse/RSN-148
Excellent. Thanks,
>
>
>>Someday, we will have to refactor this entire area when our catalog gets
>>too big, but for now, I just have to up the max memory on the JVM.
>
>
> Since you are looking for an asynchronous way to load the cache,
> it sounds like your application is still functional if there is a
> cache miss, just slower. To minimize the memory footprint, an
> LruCache may be useful. You may (depending on the application)
> find that a large percentage of the accesses are for a small
> percentage of the items, and a tuned LruCache could dramatically
> reduce your memory requirement with very little impact on
> performance.
>
>
> -- Sam
-- ----------------------------------------------------------------- Keith Fetterman 206-780-5670 Mariner Supply, Inc. kfetterman@xxx.com http://www.go2marine.comReceived on Tue 10 May 2005 09:42:24 -0700
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:18:42 PDT