From de06b636afbf5dcf952eb9bd05b0d1aac843a227 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 16 Feb 2017 10:55:31 +0100 Subject: [PATCH] Remove Mongo from documentation --- server_installation/SUMMARY.adoc | 3 - .../topics/clustering/serialized.adoc | 7 +- .../topics/config-subsystem/cli-recipes.adoc | 7 +- .../configure-spi-providers.adoc | 19 ++- server_installation/topics/mongo.adoc | 121 ------------------ 5 files changed, 13 insertions(+), 144 deletions(-) delete mode 100644 server_installation/topics/mongo.adoc diff --git a/server_installation/SUMMARY.adoc b/server_installation/SUMMARY.adoc index 25e759b1fd..a28d260982 100755 --- a/server_installation/SUMMARY.adoc +++ b/server_installation/SUMMARY.adoc @@ -26,9 +26,6 @@ ... link:server_installation/topics/database/datasource.adoc[Datasource Setup] ... link:server_installation/topics/database/hibernate.adoc[Database Configuration] ... link:server_installation/topics/database/unicode-considerations.adoc[Unicode considerations] -{% if book.community %} -.. link:server_installation/topics/mongo.adoc[Mongo DB Setup] -{% endif %} .. link:server_installation/topics/network.adoc[Network Setup] ... link:server_installation/topics/network/bind-address.adoc[Bind Addresses] ... link:server_installation/topics/network/ports.adoc[Socket Port Bindings] diff --git a/server_installation/topics/clustering/serialized.adoc b/server_installation/topics/clustering/serialized.adoc index aa67aaf292..5e5453af3c 100755 --- a/server_installation/topics/clustering/serialized.adoc +++ b/server_installation/topics/clustering/serialized.adoc @@ -21,9 +21,4 @@ depends on your < ----- - -{% if book.community %} -If you are using Mongo DB replace `jpa` with `mongo`. -{% endif %} - +---- \ No newline at end of file diff --git a/server_installation/topics/config-subsystem/cli-recipes.adoc b/server_installation/topics/config-subsystem/cli-recipes.adoc index 577bf6ede7..f77b677c4c 100644 --- a/server_installation/topics/config-subsystem/cli-recipes.adoc +++ b/server_installation/topics/config-subsystem/cli-recipes.adoc @@ -39,22 +39,21 @@ For domain mode, this would mean something like: ---- **/spi=mySPI/:write-attribute(name=default-provider,value=myProvider) ---- -==== Configure the dblock SPI with both jpa and mango providers +==== Configure the dblock SPI [source] ---- **/spi=dblock/:add(default-provider=jpa) **/spi=dblock/provider=jpa/:add(properties={lockWaitTimeout => "900"},enabled=true) -**/spi=dblock/provider=mongo/:add(properties={lockRecheckTime => "2",lockWaitTimeout => "800"},enabled=true) ---- ==== Add or change a single property value for a provider [source] ---- -**/spi=dblock/provider=mongo/:map-put(name=properties,key=lockRecheckTime,value=3) +**/spi=dblock/provider=jpa/:map-put(name=properties,key=lockWaitTimeout,value=3) ---- ==== Remove a single property from a provider [source] ---- -**/spi=dblock/provider=mongo/:map-remove(name=properties,key=lockRecheckTime) +**/spi=dblock/provider=jpa/:map-remove(name=properties,key=lockRecheckTime) ---- ==== Set values on a provider property of type `List` [source] diff --git a/server_installation/topics/config-subsystem/configure-spi-providers.adoc b/server_installation/topics/config-subsystem/configure-spi-providers.adoc index f9c1032db0..f91a48489a 100644 --- a/server_installation/topics/config-subsystem/configure-spi-providers.adoc +++ b/server_installation/topics/config-subsystem/configure-spi-providers.adoc @@ -15,28 +15,27 @@ All elements in an SPI declaration are optional, but a full SPI declaration looks like this: [source,xml] ---- - - mongo - + + myprovider + - + - + - - + ---- -Here we have two providers defined for the SPI `dblock`. The `default-provider` -is listed as `mongo`. However it is up to the SPI to decide how it will treat +Here we have two providers defined for the SPI `myspi`. The `default-provider` +is listed as `myprovider`. However it is up to the SPI to decide how it will treat this setting. Some SPIs allow more than one provider and some do not. So `default-provider` can help the SPI to choose. Also notice that each provider defines its own set of configuration properties. -The fact that both providers above have a property called `lockWaitTimeout` is just a +The fact that both providers above have a property called `foo` is just a coincidence. The type of each property value is interpreted by the provider. However, there diff --git a/server_installation/topics/mongo.adoc b/server_installation/topics/mongo.adoc deleted file mode 100644 index 60f61726c4..0000000000 --- a/server_installation/topics/mongo.adoc +++ /dev/null @@ -1,121 +0,0 @@ - -[[_mongo]] - -== Mongo DB Setup - -You are not stuck with using a RDBMS for persisting data. {{book.project.name}} -provides a http://www.mongodb.com[MongoDB] based model implementation. -To configure {{book.project.name}} to use Mongo, you need to edit the `standalone.xml`, -`standalone-ha.xml`, or `domain.xml` file in your distribution. The location of this file -depends on your <>. - -Open the `standalone.xml`, `standalone-ha.xml`, or `domain.xml` file. Look for the following XML snippets and replace all the _jpa_ providers with _mongo_ . This is the area you will be modifying -to use Mongo. - -[source,xml] ----- - - jpa - - - - - - - - jpa - - - jpa - - - jpa - - - - jpa - - - jpa - - ----- - -Change that XML snippet to use Mongo: - -[source,xml] ----- - - mongo - - - - - - - - mongo - - - mongo - - - mongo--> - - - - mongo - - - mongo - ----- -After that, add the snippet like this where you can configure details about your Mongo database: - -[source,xml] ----- - - - - - - - - - - - ----- -All configuration options are optional. -Default values for host and port are localhost and 27017. -Default name of database is `keycloak` . You can also specify properties `user` and `password` if you want authenticate against your MongoDB. -If user and password are not specified, {{book.project.name}} will connect unauthenticated to your MongoDB. - -Finally there is set of optional configuration options, which can be used to specify connection-pooling capabilities of Mongo client. -Supported int options are: `connectionsPerHost`, `threadsAllowedToBlockForConnectionMultiplier`, `maxWaitTime`, `connectTimeout` `socketTimeout`. -Supported boolean options are: `socketKeepAlive`, `autoConnectRetry`. -Supported long option is `maxAutoConnectRetryTime`. -See http://api.mongodb.org/java/2.11.4/com/mongodb/MongoClientOptions.html[Mongo documentation] for details about those options and their default values. - -Alternatively, you can configure MongoDB using a MongoDB http://docs.mongodb.org/manual/reference/connection-string/[connection URI]. -In this case, you define all information concerning the connection and authentication within the URI, as described in the MongoDB documentation. -Please note that the database specified within the URI is only used for authentication. -To change the database used by {{book.project.name}} you have to set `db` property as before. -Therefore, a configuration like the following - -[source,xml] ----- - - - - - - - - ----- -will authenticate the user against the authentication database, but store all {{book.project.name}} related data in the keycloak database. - -=== MongoDB Replica Sets - -In order to use a mongo replica set for {{book.project.name}}, one has to use URI based configuration, which supports the definition of replica sets out of the box: `mongodb://host1:27017,host2:27017,host3:27017/`.