* Was @PersistenceUnit mistakenly used for something that isn't an EntityManagerFactory?
*/
fail(consumer.getJndiConsumerName(), "persistenceUnitAnnotation.onNonEntityManagerFactory", persistenceUnitRef.getName());
} else {
// Set the member name where this will be injected
InjectionTarget target = new InjectionTarget();
target.setInjectionTargetClass(member.getDeclaringClass().getName());
target.setInjectionTargetName(member.getName());
persistenceUnitRef.getInjectionTarget().add(target);
}
}
if (persistenceUnitRef.getPersistenceUnitName() == null && !persistenceUnit.unitName().equals("")) {