On Thu, Aug 12, 2010 at 1:58 PM, jahid <[email protected]> wrote:
> Paul, I already mentioned this before I think. Yes I can, I can use
> "user.home" system variable for even OS independent use home
> directory. But the point I am making is, putting the db on user home
> will make the application really vulnarable. That's why you do not see
> any db/important files of any application in your home directory. All
> you see is user preferences. Which you can delete, but still the
> application will run. Of course we can put db/important app data on
> user home, but putting db on user home, or putting app installation
> location on a properties file on user home will make the application
> vulnarable.

I believe that the approach you are taking is flawed, which is why you
are having trouble implementing it.

On many system, users will not have permission to write anywhere
except their home directory, and the temporary directory. For
persistent data, the only place they will be guaranteed to have write
access will be their home directory (since the temp directory may be
flushed at any time). So if you want your application to write its own
database files from scratch, you really do need to use the user's home
directory to do it. Anything else just won't work on many different
types of systems.

If you really do need persistent data that is outside of the user's
directory, then you need a central service to handle this for you.
This is a common architecture, and it's why so many applications
require a database (like PostgreSQL or MySQL) to be set up prior to
running the program. I completely understand why you don't want to
force a user to do that, but if that is the case, then you're forced
to save your data into their home directory instead.

Your approach appears to be trying to avoid these two options, and go
for some kind of middle ground, but that just isn't a supported
paradigm (I just had to get that word into my email).  :-)

Regards,
Paul

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to