Questions tagged [mongodb-java-3.8]

7 questions
7
votes
1 answer

difference between mongoclientoptions vs mongoclientsettings

what are the major differences between mongoclientoptions vs mongoclientsettings Can anyone please give an example and elaborate where to use what with example?
Pandit
  • 748
  • 1
  • 7
  • 22
1
vote
0 answers

Cannot find a public constructor for 'Optional' java mongodb driver

I have register codec registry for POJOs as below @Singleton public record Repository(MongodbConfiguration mongodbConfiguration) implements IRepository { @Override public MongoCollection getCollection(String collectionName, Class
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

How to connect to MongoDB Enabled with SSL and Auth using java

QUESTION: I have CA Certificate as cafile.pem, PEM Certificate as mongodb.pem. I am not sure how to use it in java to authentication and connect MongoDB. Any suggestion would be deeply appreciate. Let me know if you want more information to put…
Ankur Soni
  • 5,725
  • 5
  • 50
  • 81
0
votes
1 answer

How to Set the URI for the ClusterSettings with codec in mongodb java driver

I am using the codec for the serialization and deserialization of POJO using 4.3/driver-reactive http://mongodb.github.io/mongo-java-driver/4.3/driver-reactive/getting-started/quick-start-pojo/ @Singleton public record…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
0 answers

Java MongoDB driver version 3.8 -- how to set timeout?

I am maintaining a JSP/Servlet application that uses the MongoDB 3.8 Java driver. At this point, I cannot change versions to a newer one. I have occasionally experienced some timeouts when connecting from the application to the database. Based on…
Rafael Santos
  • 463
  • 5
  • 16
0
votes
0 answers

How to achieve document level locking functionality with MongoDB using mongo-java-driver?

We've an enhancement to use document level locking functionality with MongoDB like 'Select for Update' concept in oracle.Can any of you explain how it can be achieved using java driver?
0
votes
1 answer

How to implement mongo project stage compute in java driver?

I want to compute a new field using project stage in aggregation pipeline in Java driver. I want create new field by just multiplying value (that is coming from previous stages) with 100. Bson projectGroup= Aggregates.project( …