I want to add all the data from the database to the List when the server is being raised with the application in order to work with them in the future b requests to the database when the page is updated. When placing a query in the database in the constructor or static{} displays NPE, the List in which I request the data from the database is empty.
As I understand it, the request comes before the connection to the database is established. How do I implement this? And is it worth doing this if we assume that a million data lines can be placed in the database?
Thanks in advance.
ehcache. - sanluck