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 am developing my first vaadin application and I am using MongoDB as the database store. I want to create a single MongoClient instance to use for all db requests. The MongoClient maintains a pool of connections.
I am unsure where I should create the MongoClient object and where I should store it so that I can get it later. Should I create it in my UI class? Where can I store it?