So, as I see it, I'm constrained to 'mirror' the database file internally in my program, e.g., in a Map, to conform to the findByCriteria method spec.
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
you can use a profiler to find out why you have memory problems. With the number of records we have, you should not have any heap problem.Grary Stimon wrote:Unfortunately, I am getting out-of-memory heap complaints in Eclipse (using preallocated 256MB.) I am not sure what to do next,
...
I had been warned by veteran programmers there would come a day when I would have to enlarge the heap, but I don't know if the SCJD is the place to do it.
SCJP, SCJD
I am surprised you got away with this approach. If your server works for a couple of weeks without stopping and then computer crashes, then you loose all the data for the whole month.Roel De Nijs wrote:
and in my opinion using a record cache simplifies your code a lot. reading/writing to the file is just in 2 methods (an initialize method to fill your cache, and a stop-method to write cache back to file). in all the other methods you are just accessing a map.
SCJP, SCJD
Vasya Pupkin wrote:I am surprised you got away with this approach. If your server works for a couple of weeks without stopping and then computer crashes, then you loose all the data for the whole month.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |