-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
The MongoClientDefinition definition is a good start but additional requirements for configuration will arise. We need to be able to allow a user to do the following
class DatabaseAccessProducer {
@MongoClientDefinition(name="retail") @Produces
@ApplicationScope //TODO can the scope be inferred?
public MongoClient buildMongoClient() {
return new MongoClient(...);
}
//TODO can this whole code be inferred?
public MongoClient disposeMongoClient(
@MongoClientDefinition(name="retail") @Disposes MongoClient mongoClient) {
mongoClient.close();
}
}