I currently use a SQLite database and the location of this one is hardcoded which is very bad practice and would force me to rebuild the war file every time I want to deploy it to a different server.
I've been thinking of using a relative path to the application directory by using servletContext.getRealPath()
but it seems to be a problem when I want to do it that way with a crontab job (Quartz) since I cannot get a FacesContext
.
Is it possible to somehow specify the location of the database during the deployment and store it somewhere or is there any other solution?