Connexion management with Tomcat and couchbase client JAVA SDK 2.3

java

#1

Hi,

I work with couchbase server 4.5 as database and Tomcat 8.

What is Bucket Instance (SDK 2.3) " instance = cluster.openBucket(“default”);", it’s thread safe ?

Can i provided a pool of instances or one share instance ?

Thank for your Time

Best regards
Eric


#2

The SDK is thread safe and you should definitely share and reuse instances like Cluster and Bucket


#3

Thank’s for your reply.

I create a Singleton as Provider Bucket Service in Tomcat.

Best regards
Eric