almondtools / testrecorder

Create Test Fixtures from Runnable Java Code
http://testrecorder.amygdalum.net/
GNU Lesser General Public License v3.0
51 stars 5 forks source link

Configuration for class loader intensive applications #66

Closed almondtools closed 6 years ago

almondtools commented 6 years ago

The current Configuration (AgentConfig) is an argument of the agent command line. This configuration is propagated to the locations where it is needed, e.g. to the static filed SnapshotManager.MANAGER.

Generating Tests for Spring Applications made obvious that modern applications use their own byte code modification and their own class loaders. Consequently there are situations where SnapshotManager.MANAGER is null. This could be avoided if each class loading of SnapshotManager also initializes MANAGER and this makes it necessary to have a convention where to load the configuration from.

So this issue could be solved by:

almondtools commented 6 years ago

I decided to replace the service loader completely because of two limitations:

The new Agentconfig ist not limited in this way.