[ 
https://issues.apache.org/jira/browse/CAMEL-10554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15719681#comment-15719681
 ] 

Terrien Jean-Yves commented on CAMEL-10554:
-------------------------------------------

this parameters are déprecated and  are no effect on driver v3

void    setOptions(int options)
Deprecated. 
Set options on instances of DBCursor
void    setReadPreference(ReadPreference readPreference)
Deprecated. 
Set the default read preference with either MongoClientURI or MongoClientOptions
void    setWriteConcern(WriteConcern writeConcern)
Deprecated. 
Set the default write concern with either MongoClientURI or MongoClientOptions
void    slaveOk()
Deprecated. 
Replaced with ReadPreference.secondaryPreferred()

I'm working to solve this problem.
In the new version you should put these options on the mongoClient bean and not 
put them on the camel url.
    <bean id="mongoBean" class="com.mongodb.MongoClient">
        <constructor-arg name="host" value="${mongodb.host}" />
        <constructor-arg name="port" value="${mongodb.port}" />
    </bean>

Bye.

> camel-mongodb evolution to driver 3
> -----------------------------------
>
>                 Key: CAMEL-10554
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10554
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.19.0
>            Reporter: Terrien Jean-Yves
>            Assignee: Andrea Cosentino
>            Priority: Minor
>         Attachments: mongo3.patch
>
>
> Hi, 
> The mongodb driver has changed in its foundation. 
> It is recommended not to use many classes of the verion 2 still present in 
> the driver. 
> This is the case with DBObject, which is the basis for the configuration of 
> the camel component. 
> I'm working on the evolution of this component to use the new classes of 
> version 3, like "Document". 
> I've created à patch (no completed)
> A+JYT
> Ps: how I can post the patch ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to