try {
emfWrapperClass = GlassfishV3NativeJpaExtractor.class.getClassLoader().loadClass(EMF_WRAPPER_CLASS);
emfGetDelegateMethod = emfWrapperClass.getDeclaredMethod("getDelegate");
emfGetDelegateMethod.setAccessible(true);
} catch (ClassNotFoundException e) {
throw new CompassException("Failed to find Glassfish EMF wrapper class [" + EMF_WRAPPER_CLASS + "]");
} catch (NoSuchMethodException e) {
throw new CompassException("Failed to find Glassfish getDelegate method within wrapper class [" + EMF_WRAPPER_CLASS + "]");
}
try {
emWrapperClass = GlassfishV3NativeJpaExtractor.class.getClassLoader().loadClass(EM_WRAPPER_CLASS);
emGetDelegateMethod = emWrapperClass.getDeclaredMethod("getDelegate");
emGetDelegateMethod.setAccessible(true);
} catch (ClassNotFoundException e) {
throw new CompassException("Failed to find Glassfish EM wrapper class [" + EM_WRAPPER_CLASS + "]");
} catch (NoSuchMethodException e) {
throw new CompassException("Failed to find Glassfish getDelegate method within wrapper class [" + EM_WRAPPER_CLASS + "]");
}
}