MongoDB released the long awaited V4.0 just recently. And of course there are a lot of new features, but the most exiting one was probably the support for multi document ACID transactions!
The mongo driver does support all those features since V3.8.0 - and morphium supports all of that with V4.0.0 - to match the mongodb version. The current BETA1 should be available via maven central or from github.com.
of course, this had to be added. But it is quite simple to use:
Attention: if your mongodb does not support transactions, this will cause an exception
We put a lot of effort into messaging, simplified the API at some places and added some new features. Messaging now supports kind of "push" notifications, if connected to a replicaset.
using the new
watch functionality of mongod, which is nothing but another way to access the oplog, we could implement a feature to synchronize the cache via database push.
It works similar as with the messaging, just that the messaging is not used. The notification about changes comes directly from database. the
@Cache annotation is used to determine how to delete / update the cache.
we introduced a new cache synchronizer for that:
We re-included and improved the In-Memory-Driver into morphium. So you can more easy Mock access to mongo, which is very important when testing.
Transactions are not working (yet) and aggregation might come in some later version of the driver. All other, more basic functionality is working.
created Stephan Bösebeck (stephan)