Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

mongoDB uri

$
0
0
Hello,

I have a question regarding the mongoDB connection.

In the CamelContext.xml I have the following declaration:

<bean id="myDb" class="com.mongodb.Mongo">
<constructor-arg index="0">
<bean class="com.mongodb.MongoURI">
<constructor-arg index="0"
value="mongodb://user:pass [ at ] localhost:1111/db"
/>
</bean>
</constructor-arg>
</bean>

When I run using this configuration all works ok. My problem is that I will
not know the mongo uri until the runtime. Is there a way I can change the
mongo DB uri at runtime?

Best regards!

Viewing all articles
Browse latest Browse all 5648