adaptor.beforeCreateContainerEntityManagerFactory(pu);
try {
return provider.createContainerEntityManagerFactory(pu, properties.getValue());
} finally {
try {
adaptor.afterCreateContainerEntityManagerFactory(pu);
} finally {
pu.setAnnotationIndex(null); // close reference to Annotation Index (only needed during call to createContainerEntityManagerFactory)
pu.setTempClassloader(null); // close reference to temp classloader (only needed during call to createEntityManagerFactory)
}
}