Skip to content

Commit 40a356a

Browse files
DOCS-16093 - JNDI documentation update (#489)
(cherry picked from commit 150b286)
1 parent 9e15486 commit 40a356a

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

source/fundamentals/connection/jndi.txt

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Connect to MongoDB Using a JNDI Datasource
1010
:depth: 2
1111
:class: singlecol
1212

13+
.. facet::
14+
:name: genre
15+
:values: tutorial
16+
17+
.. meta::
18+
:keywords: code example, wildfly, tomcat
1319

1420
Overview
1521
--------
@@ -31,9 +37,15 @@ JNDI Datasource.
3137
:tabid: wildfly
3238

3339
1. In a `Wildfly <https://wildfly.org/>`__ installation, create a new module
34-
for MongoDB at ``modules/system/layers/base/org/mongodb/main``. Copy the
35-
``mongo-java-driver.jar`` jar file into the module. Add the following
36-
``module.xml`` file into the module:
40+
for MongoDB at ``modules/system/layers/base/org/mongodb/main``. Copy
41+
the following jar files into the module:
42+
43+
- ``mongodb-driver-sync-{+full-version+}.jar``
44+
- ``mongodb-driver-core-{+full-version+}.jar``
45+
- ``bson-{+full-version+}.jar``
46+
- ``bson-record-codec-{+full-version+}.jar``
47+
48+
Add the following ``module.xml`` file into the module:
3749

3850
.. literalinclude:: /includes/fundamentals/code-snippets/wildfly-module-with-version.xml
3951
:language: xml
@@ -67,8 +79,13 @@ JNDI Datasource.
6779
.. tab:: Tomcat
6880
:tabid: tomcat
6981

70-
1. Copy the ``mongo-java-driver.jar`` jar file into the ``lib`` directory
71-
of your `Tomcat <https://tomcat.apache.org/>`__ installation.
82+
1. Copy the following jar files into the ``lib`` directory
83+
of your `Tomcat <https://tomcat.apache.org/>`__ installation:
84+
85+
- ``mongodb-driver-sync-{+full-version+}.jar``
86+
- ``mongodb-driver-core-{+full-version+}.jar``
87+
- ``bson-{+full-version+}.jar``
88+
- ``bson-record-codec-{+full-version+}.jar``
7289

7390
#. In the ``context.xml`` file of your application, add a resource that references
7491
the ``MongoClientFactory`` class and the :ref:`connection string
@@ -78,7 +95,7 @@ JNDI Datasource.
7895

7996
<Resource name="mongodb/MyMongoClient"
8097
auth="Container"
81-
type="com.mongodb.MongoClient"
98+
type="com.mongodb.client.MongoClient"
8299
closeMethod="close"
83100
factory="com.mongodb.client.MongoClientFactory"
84101
singleton="true"

0 commit comments

Comments
 (0)