I'm using mongodb (driver 3.4.2) with spring framework (spring-data-mongodb:1.10.4) and I want to achieve funcionality to switch mongo data definition during runtime.
So far I've written classloader and I'm passing it to mongo. My problem is that after loading initial jar's from classloader, when I change jar, new classes definition aren't being loaded ( loadClass from classloader is not called for those classes).
My guess is that mongo caches initially loaded classes, so after loading new jar I was trying a bit blindly clearing different collections of classes in MongoTemplate using reflection, so far without success.
How I can force mongodb to load again classes with same name?
Aucun commentaire:
Enregistrer un commentaire