New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB mongouri #79

Open
mgrandb opened this Issue Aug 2, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@mgrandb

mgrandb commented Aug 2, 2018

Something that has confused me for over two years, say I make a standard connection to mongodb

MongoRegister( name="mongo", server="127.0.0.1", db="testdb" );

everything works fine, the pool closes after five mins of no activity and reconnects with a new call like it should, but if I add a mongouri

MongoRegister( name="mongo", server="127.0.0.1", db="testdb", mongouri="mongodb://127.0.0.1:27017/testdb" );

when the pool closes after five mins of no activity it will not reconnect! throwing an error

java.lang.IllegalStateException: state should be: open.

OpenBD nightly, ready to run on windows, latest Java 1.8

Does anyone else have this problem or am I doing something wrong?
Any help figuring this out would be greatly appreciated.

Mark.

@a1anw2

This comment has been minimized.

Contributor

a1anw2 commented Aug 8, 2018

Looks like you have found a bug with the mongouri way.

@a1anw2 a1anw2 added the bug label Aug 8, 2018

@mgrandb

This comment has been minimized.

mgrandb commented Aug 8, 2018

Thanks for taking notice Alan.
a couple other points is that if you call MongoDeregister() before OpenBD closes the connection then it does reconnect fine, also OpenBD 3.1 with mongo java driver 2.14.3 and mongodb 3.0 works with no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment