<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:53 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-2707] Add new MongoClient interface that doesn&apos;t include the legacy API</title>
                <link>https://jira.mongodb.org/browse/JAVA-2707</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The current &lt;tt&gt;MongoClient&lt;/tt&gt; API for the synchronous driver is a class that resides in the &lt;tt&gt;com.mongodb&lt;/tt&gt; package in the driver module.  It includes entry points to both the standard CRUD API via the &lt;tt&gt;getDatabase&lt;/tt&gt; method as well as the legacy CRUD API via the deprecated &lt;tt&gt;getDB&lt;/tt&gt; method.  This was a reasonable approach when the 3.0 driver was released because we imagined that applications would slowly shift from the legacy API to the standard API, DAO by DAO, and it made sense for all of them to share a single MongoClient instance in order to avoid the overhead of two connection pools, two SDAM monitors, etc.&lt;/p&gt;

&lt;p&gt;While this is still a valid use case, most new applications never touch the legacy API, and we don&apos;t even refer to it in the reference documentation.  Furthermore, including both APIs in a single module means that we will be unable to create modular JAR files that work properly as Java 9 modules.  That&apos;s because the Java 9 module system prohibits the same package from being included in multiple modules, and currently the Java driver has such a split of the &lt;tt&gt;com.mongodb&lt;/tt&gt; package.  The mongodb-driver-core JAR file contains foundational classes used within core, as well as the sync and async drivers, including&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;ReadPreference&lt;/li&gt;
	&lt;li&gt;ReadConcern&lt;/li&gt;
	&lt;li&gt;WriteConcern&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;while the mongodb-driver JAR file contains core classes for the high-level synchronous driver API, including&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;MongoClient&lt;/li&gt;
	&lt;li&gt;DB&lt;/li&gt;
	&lt;li&gt;DBCollection&lt;/li&gt;
	&lt;li&gt;DBObject&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;However, the standard CRUD API is defined in the &lt;tt&gt;com.mongodb.client&lt;/tt&gt; package, and includes interfaces such as:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;MongoDatabase&lt;/li&gt;
	&lt;li&gt;MongoCollection&lt;/li&gt;
	&lt;li&gt;FindIterable&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The only thing missing is an entry point.  To that end, I propose adding a new &lt;tt&gt;MongoClient&lt;/tt&gt; interface to the &lt;tt&gt;com.mongodb.client&lt;/tt&gt; package as an additional entry point to the standard CRUD&lt;br/&gt;
API, which specifically does not include the legacy API.  Additionally, there will be a &lt;tt&gt;MongoClients&lt;/tt&gt; factory class for &lt;tt&gt;MongoClient&lt;/tt&gt; instances, modelled after the corresponding class in the mongodb-driver-async module.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="472650">JAVA-2707</key>
            <summary>Add new MongoClient interface that doesn&apos;t include the legacy API</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Dec 2017 22:36:34 +0000</created>
                <updated>Sat, 28 Oct 2023 11:23:03 +0000</updated>
                            <resolved>Wed, 17 Jan 2018 16:20:03 +0000</resolved>
                                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1776635" author="xgen-internal-githook" created="Wed, 17 Jan 2018 16:19:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2707&quot; title=&quot;Add new MongoClient interface that doesn&amp;#39;t include the legacy API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2707&quot;&gt;&lt;del&gt;JAVA-2707&lt;/del&gt;&lt;/a&gt;: Add MongoClients factory and MongoClient interface to the driver module&lt;/p&gt;

&lt;p&gt;   This will allow new applications to have no dependencies on the legacy API.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/395406cea6c852c6c97d89564e52ec0f037ff2f4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/395406cea6c852c6c97d89564e52ec0f037ff2f4&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>JAVA-2508</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8zq7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>