code: private static void setOpenJpaInstrumentation(Instrumentation instrumentation) {
          try {
              Class<?> instrumentationFactoryClass = Class.forName("org.apache.openjpa.enhance.InstrumentationFactory");
              Method getInstrumentation = instrumentationFactoryClass.getMethod("setInstrumentation",
                      Class.forName("java.lang.instrument.Instrumentation"));
              getInstrumentation.setAccessible(true);
              getInstrumentation.invoke(null, new Object[] { instrumentation });
          } catch (Exception ex) {
              // Nothing.
          }
      }
docs: This hack is needed probably in 0.00001% of cases when tests are run with
  OpenJpa javaagent. If we do not set our instrumentation object for
  OpenJpa InstrumentationFactory we would get: libattach.so already loaded
  in another classloader.
  
  This was needed (so far) only for Apache Camel project. I was running (in
  camel-jpa module) mvn clean install -fn.