I am assuming that setPreference() adds the users preference for the given
item to the datamodel w/o having to reread the file(s)?
It just updates the DataModel contained in memory?

If that is the case, then that is all I need to do.  However, I need to get
a working demo of this by next week and do not want to put you out to
include this functionality.

On Mon, Apr 20, 2009 at 11:14 PM, Sean Owen <[email protected]> wrote:

> OK you have two options in the short term then:
>
> 1) Copy and pate FileDataModel and do whatever you like with the copy
> 2) Update your file on each request, and, call setPreference() on
> FileDataModel -- after I change it to allow this. If you want to go
> this way let me know.
>
> BTW if you are interested in a different database -- for example,
> perhaps a light in-memory database like Derby to start -- we can work
> on that. There should be little or no work to make it function for DBs
> besides MySQL.
>
> On Tue, Apr 21, 2009 at 7:04 AM, Matthew Roberson <[email protected]>
> wrote:
> > Yes,  I am planning on implementing something along the lines of (3).
> >
> > As of now, the data will be persisting in a .txt file, but will prob move
> to
> > mySQL in the near future.
> >
> > Essentially, I would like to update/refresh the datamodel contained in
> > memory during each successive HTTP request and only upload/refresh from
> the
> > file periodically, e.g. rebooting the web service.
>

Reply via email to