go = new MongoClient(uri);
> }
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/mongoDB-uri-tp5755565p5755704.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
the getUri() method will return a custom URI that is passed to the
MongoClient.
> public void setConnectionBean(MongoStep step) throws
> UnknownHostException{
>
> MongoClientURI uri = new MongoClientURI(getUri());
> mongo = new MongoClient(uri);
> }
>
> Now I can specify the uri in the runtime.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/mongoDB-uri-tp5755565p5755704.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
MongoClientURI uri = new MongoClientURI(getUri());
mongo = new MongoClient(uri);
}
Now I can specify the uri in the runtime.
--
View this message in context:
http://camel.465427.n5.nabble.com/mongoDB-uri-tp5755565p5755704.html
Sent from the Camel - Users mailing list archive at Nabble.com.
using the bean added above
>
> When I run the code I get a warning that the bean is not found in the
> Registry.
>
> Am I doing it right? Should I add the bean to the registry somewhere else?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/mongoDB-uri-tp5755565p5755694.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
// in the MongoConnection
class I am using the bean added above
When I run the code I get a warning that the bean is not found in the
Registry.
Am I doing it right? Should I add the bean to the registry somewhere else?
--
View this message in context:
http://camel.465427.n5.nabble.com/mongoDB-uri-tp57555
this error:
Failed to resolve endpoint:
mongodb://myDb?collection=none&database=none&dynamicity=true&operation=findOneByQuery
due to: No bean could be found in the registry for: myDb of type:
com.mongodb.Mongo
--
View this message in context:
http://camel.465427.n5.
> View this message in context:
> http://camel.465427.n5.nabble.com/mongoDB-uri-tp5755565p5755625.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
do that?
--
View this message in context:
http://camel.465427.n5.nabble.com/mongoDB-uri-tp5755565p5755625.html
Sent from the Camel - Users mailing list archive at Nabble.com.
You can use a property. Check this out:
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
On 22 August 2014 08:41, Andrei Stoica
wrote:
> Hello,
>
> I have a question regarding the mongoDB connection.
>
> In the CamelContext.xml I have the followin
Hello,
I have a question regarding the mongoDB connection.
In the CamelContext.xml I have the following declaration:
When I run using this configuration all works ok. My problem is that I will
not know the mongo uri until the runtim
10 matches
Mail list logo