int numEjbLocalRefs = data.getEjbLocalRefs().size();
if (numEjbLocalRefs > 0) {
EjbLocalRef[] ejbLocalRefs = new EjbLocalRef[numEjbLocalRefs];
for (int i = 0; i < numEjbLocalRefs; i++) {
ejbLocalRefs[i] = new EjbLocalRef();
}
webApp.setEjbLocalRefs(ejbLocalRefs);
for (int i = 0; i < numEjbLocalRefs; i++) {
EjbLocalRef ejbLocalRef = ejbLocalRefs[i];
ReferenceData referenceData = (ReferenceData) data.getEjbLocalRefs().get(i);
ejbLocalRef.setRefName(referenceData.getRefName());
ejbLocalRef.setPattern(createPattern(referenceData.getRefLink()));
}
}
int numResourceRefs = data.getJdbcPoolRefs().size() + data.getJmsConnectionFactoryRefs().size()
+ data.getJavaMailSessionRefs().size();