Hi Robert
What is the best practice for connections in a JSF app?
For most purposes, the recommended method is to use connection pooling. This is to avoid expensive setup/teardown process of establishing a database connection, and to better regulate connections into the database (i.e. avoiding high connection churn, too many connections into the database, etc.)
The standard MongoClient() method in MongoDB Java driver connects using a connection pool by default. Please see the Connect to MongoDB page for more information. If you need more information regarding the Java driver in general, please see the Java MongoDB Driver page.
Best regards,
Kevin