简体   繁体   中英

What is the best way to store Data as long as Tomcat works

I have to decide how and where I want to save a list of Server information. What I want to achieve is to init an application which is working with Hibernate . Every time it maps a database it has to save the database-name, the Url and some other data.

Can anyone suggest a fast way how to save, update and read data in this case? And what kind of data structure I should use?

I am free to choose any design or third party library I want (eg Properties, Spring Beans etc.). My main task is to decide which of those to us and to motivate why.

I'm currently working with Spring , Hibernate and Java 7 .

The Solution is to create a Singleton class that stores my Data and get cleared by a restart. Thank you all very much for your answers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM