A modification context creates a private area in the cache for a given context, so that multiple copies or versions of the same class from the same location can be stored using different modification contexts. You choose the name for a context, but it must be consistent with other JVMs using the same modifications.
For example, one JVM uses a JVMTI agent "agent1", a second JVM uses no bytecode modification, a third JVM also uses "agent1", and a fourth JVM uses a different agent, "agent2". If the JVMs are started using the following command lines (assuming that the modifications are predictable as described above), they should all be able to share the same cache:
java -agentlib:agent1 -Xshareclasses:name=cache1,modified=myAgent1 myApp.ClassName java -Xshareclasses:name=cache1 myApp.ClassName java -agentlib:agent1 -Xshareclasses:name=cache1,modified=myAgent1 myApp.ClassName java -agentlib:agent2 -Xshareclasses:name=cache1,modified=myAgent2 myApp.ClassName