Skip to content

Rework custom ClassLoader support (based on #4159)#4174

Closed
evanchooly wants to merge 6 commits into2.6.xfrom
pr-4159-classloader
Closed

Rework custom ClassLoader support (based on #4159)#4174
evanchooly wants to merge 6 commits into2.6.xfrom
pr-4159-classloader

Conversation

@evanchooly
Copy link
Member

Summary

  • Reworks the custom ClassLoader approach from Added class loader option to the project #4159 to properly thread Conversions through the codec chain
  • Moves Conversions ownership from Mapper to DatastoreImpl, passing it explicitly to MorphiaCodec, PropertyModel, and InstanceCreatorFactory
  • Adds classLoader config property to MorphiaConfig with ManualMorphiaConfig support
  • Removes unnecessary getClassLoader() from Datastore interface and extra Morphia.createDatastore() overloads in favor of config-based approach

Test plan

  • Verify all 965 core tests pass
  • Verify custom ClassLoader is properly used for class resolution throughout the codec pipeline
  • Verify backward compatibility (default ClassLoader = thread context ClassLoader)

Supersedes #4159

🤖 Generated with Claude Code

ThomasWega and others added 6 commits February 12, 2026 15:35
…sed through codec chain

Move Conversions ownership from Mapper to DatastoreImpl to properly thread the
custom ClassLoader through the entire codec pipeline. Conversions is now explicitly
passed to MorphiaCodec, PropertyModel, and InstanceCreatorFactory rather than being
accessed via Mapper. Also adds classLoader config property to MorphiaConfig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@evanchooly evanchooly changed the base branch from 2.5.x to 2.6.x March 7, 2026 20:30
@evanchooly evanchooly deleted the branch 2.6.x March 7, 2026 21:26
@evanchooly evanchooly closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants