Skip to content

Commit e18d05c

Browse files
committed
Docs site: Reorganized upgrade guide
1 parent 137753e commit e18d05c

File tree

1 file changed

+49
-26
lines changed

1 file changed

+49
-26
lines changed

docs/reference/content/whats-new/upgrading.md

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,67 @@ Before upgrading to 3.0.0, compile against 2.13.0 with deprecation warnings enab
1818

1919
The minimum JVM is now Java 6: however, specific features require Java 7:
2020

21-
- SSL support requires Java 7 in order to perform host name verification, which is enabled by default. See
21+
- SSL support requires Java 7 in order to perform host name verification, which is enabled by default. See below and on
2222
[SSL]({{< relref "reference/connecting/ssl.md" >}}) for details on how to disable host name verification.
2323
- The asynchronous API requires Java 7, as by default it relies on
2424
[AsynchronousSocketChannel](http://docs.oracle.com/javase/7/docs/api/java/nio/channels/AsynchronousSocketChannel.html) for
2525
its implementation. See [Async]({{< ref "async" >}}) for details on configuring the driver to use [Netty](http://netty.io/) instead.
2626

27-
## Incompatiblities
27+
## Incompatibilities
2828

2929
The following lists the most significant backwards-breaking changes, along with the recommended solutions:
3030

31-
* SSL host name verification has been enabled by default: the driver now enables host name verification by default for SSL connections. If
32-
you are using an invalid certificate or are using Java 6 (with which the driver does not support host name verification), set the
31+
### General
32+
33+
The driver now enables host name verification by default for SSL connections. If you are knowingly using an invalid certificate, or are
34+
using Java 6 (see above), set the
3335
[sslInvalidHostNameAllowed](http://api.mongodb.org/java/3.0/com/mongodb/MongoClientOptions.html#isSslInvalidHostNameAllowed--)
3436
property to true.
35-
* The [requestStart](https://api.mongodb.org/java/2.13/com/mongodb/DB.html#requestStart--) and
36-
[requestDone](https://api.mongodb.org/java/2.13/com/mongodb/DB.html#requestDone--) methods in
37-
[DB](https://api.mongodb.org/java/2.13/com/mongodb/DB.html) have been removed: These methods have been removed in accordance with the
38-
[server selection specification](https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#what-happened-to-pinning).
39-
* [ServerAddress](http://api.mongodb.org/java/2.13/com/mongodb/ServerAddress.html) and
40-
[MongoClient](http://api.mongodb.org/java/2.13/com/mongodb/MongoClient.html) constructors no longer throw
37+
38+
### MongoClientOptions
39+
40+
Providing little practical value,
41+
the [autoConnectRetry](https://api.mongodb.org/java/2.13/com/mongodb/MongoClientOptions .html#isAutoConnectRetry--) and
42+
[maxAutoConnectRetryTime](https://api.mongodb.org/java/2.13/com/mongodb/MongoClientOptions.html#getMaxAutoConnectRetryTime--) properties in
43+
[MongoClientOptions]({{< apiref "com/mongodb/MongoClientOptions" >}}) have been removed from the Java driver to be consistent with other
44+
MongoDB-supported drivers .
45+
46+
#### MongoClient
47+
48+
The [MongoClient]({{< apiref "com/mongodb/MongoClient" >}}) (and
49+
[ServerAddress]({{< apiref "com/mongodb/ServerAddress" >}})) constructors no longer throw
4150
[UnknownHostException](http://docs.oracle.com/javase/8/docs/api/java/net/UnknownHostException.html): This breaks source but not binary
4251
compatibility, so re-compilation with 3.0 will only succeed after removing any reference to this exception in catch blocks or method
4352
throws declarations.
44-
* The [getLastError](http://api.mongodb.org/java/2.13/com/mongodb/WriteResult.html#getLastError--) method in
45-
[WriteResult](http://api.mongodb.org/java/2.13/com/mongodb/WriteResult.html) has been removed: this method does not work reliably in
46-
the 2.x series and there is no way to make work reliably, so it has been removed.
47-
* The [autoConnectRetry](https://api.mongodb.org/java/2.13/com/mongodb/MongoClientOptions.html#isAutoConnectRetry--) and
48-
[maxAutoConnectRetryTime](https://api.mongodb.org/java/2.13/com/mongodb/MongoClientOptions.html#getMaxAutoConnectRetryTime--) properties in
49-
[MongoClientOptions](http://api.mongodb.org/java/2.13/com/mongodb/MongoClientOptions.html) have been removed: these options turned out to
50-
have little practical value, and as no other MongoDB-support driver provides these options, they have been removed from the Java driver.
51-
* The [authenticate](https://api.mongodb.org/java/2.13/com/mongodb/DB.html#authenticate-java.lang.String-char:A-) method in the
52-
[DB](https://api.mongodb.org/java/2.13/com/mongodb/DB.html) class has been removed: replace with use of
53-
[MongoClient constructors](http://api.mongodb.org/java/2.13/com/mongodb/MongoClient.html#MongoClient-java.util.List-java.util.List-) that
54-
take [MongoCredential](https://api.mongodb.org/java/2.13/com/mongodb/MongoCredential.html) instances.
55-
* The [ensureIndex](https://api.mongodb.org/java/2.13/com/mongodb/DBCollection.html#ensureIndex-com.mongodb.DBObject-) methods in
56-
[DBCollection](https://api.mongodb.org/java/2.13/com/mongodb/DBCollection.html) have been removed:
53+
54+
### DB
55+
56+
The [requestStart](https://api.mongodb.org/java/2.13/com/mongodb/DB.html#requestStart--) and
57+
[requestDone](https://api.mongodb.org/java/2.13/com/mongodb/DB.html#requestDone--) methods in
58+
[DB]({{< apiref "com/mongodb/DB" >}}) have been removed: These methods have been removed in accordance with the
59+
[server selection specification](https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#what-happened-to-pinning).
60+
61+
The [authenticate](https://api.mongodb.org/java/2.13/com/mongodb/DB.html#authenticate-java.lang.String-char:A-) method in
62+
[DB]({{< apiref "com/mongodb/DB" >}}) has been replaced with
63+
[MongoClient constructors](http://api.mongodb.org/java/3.0/com/mongodb/MongoClient.html#MongoClient-java.util.List-java.util.List-) that
64+
take [MongoCredential]({{< apiref "com/mongodb/MongoCredential" >}}) instances.
65+
66+
### DBCollection
67+
68+
The [ensureIndex](https://api.mongodb.org/java/2.13/com/mongodb/DBCollection.html#ensureIndex-com.mongodb.DBObject-) methods in
69+
[DBCollection]({{< apiref "com/mongodb/DBCollection" >}}) have been removed:
5770
replace with the corresponding
5871
[createIndex](https://api.mongodb.org/java/2.13/com/mongodb/DBCollection.html#createIndex-com.mongodb.DBObject-) method.
59-
* The [fetch](https://api.mongodb.org/java/2.13/com/mongodb/DBRefBase.html#fetch--) method in
60-
[DBRef](https://api.mongodb.org/java/2.13/com/mongodb/DBRef.html) has been removed: use the
61-
[findOne](https://api.mongodb.org/java/2.13/com/mongodb/DBCollection.html#findOne-java.lang.Object-) method instead.
72+
73+
### WriteResult
74+
75+
The [getLastError](http://api.mongodb.org/java/2.13/com/mongodb/WriteResult.html#getLastError--) method in
76+
[WriteResult]({{< apiref "com/mongodb/WriteResult" >}}) has been removed: this method does not work reliably in
77+
the 2.x series and there is no way to make work reliably, so it has been removed. Replace with use of an acknowledged
78+
[WriteConcern]({{< apiref "com/mongodb/WriteConcern" >}}) when executing the write operation.
79+
80+
### DBRef
81+
82+
The [fetch](https://api.mongodb.org/java/2.13/com/mongodb/DBRefBase.html#fetch--) method in
83+
[DBRef]({{< apiref "com/mongodb/DBRef" >}}) has been removed: use the
84+
[findOne](https://api.mongodb.org/java/3.0/com/mongodb/DBCollection.html#findOne-java.lang.Object-) method instead.

0 commit comments

Comments
 (0)