} else if ( annotatedField.isAnnotationPresent( PersistenceUnit.class ) ) {
PersistenceUnit persistenceUnit = annotatedField.getAnnotation( PersistenceUnit.class );
lookupName = getJndiName( persistenceUnit.unitName(), null, persistenceUnit.name() );
} else if ( annotatedField.isAnnotationPresent( PersistenceContext.class ) ) {
PersistenceContext persistenceContext = annotatedField.getAnnotation( PersistenceContext.class );
lookupName = getJndiName( persistenceContext.unitName(), null, persistenceContext.name() );
}
if ( lookupName == null || lookupName.trim().length() == 0 ) {
lookupName = getComponentEnvName( annotatedClass,
annotatedField.getJavaMember().getName(),