I believe that’s likely safe to ignore. You’re likely seeing it because you have three clusters and the intent of the message is to warn people who might accidentally not be reusing the CouchbaseCluster against the same cluster. I’m sure @daschl or @avsej or @simonbasle can confirm.
We may be able to make that smarter by triggering the warning only if the arguments match or something.
my spring-with-xml days are way past me, I’m not sure this can easily be done since the method for creation is neither a constructor nor a factory method on the Bucket class…
you’d have to look up if invoking another bean’s method + passing in bucket name and password is feasible in Spring (especially with xml configuration)…
i already did that.
I am facing another issue now. I have defined these beans in file named “applicationContext.xml” and when i am using
Bucket bucket = (Bucket) ( new ClassPathXmlApplicationContext(“applicationContext.xml”).getBean(“bucket”) );
in different classes.And it is creating different environments each time instead of reusing the same environment and giving the same “more than one couchbase environments found” warning.
What wrong am i doing ??
I’ve run into this as well… Basically we manage our own configuration and I’ve been able to track and re-use the duplicated cluster info. But… If the client itself detects a duplicate, why would it throw this warning out and not just mitigate the duplicate automagically? Or, is there a reason why one would want to have this behavior?