To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I have a Jetty server embedded in an application. The application has a data structure instance (singleton) that exists while the application is running. I want to provide a UI via Vaadin for viewing and modifying the data structure. It seems like the only way to achieve this easily is to store a reference to the data structure in a static field so that I can access it from my UI class.
Is there any alternative way to achieve this? I would rather each UI instance receives a reference to the (same) data structure instance instead of using a static field.