int numResourceRefs = data.getJdbcPoolRefs().size() + data.getJmsConnectionFactoryRefs().size()
+ data.getJavaMailSessionRefs().size();
if (numResourceRefs > 0) {
ResourceRef[] resourceRefs = new ResourceRef[numResourceRefs];
for (int i = 0; i < numResourceRefs; i++) {
resourceRefs[i] = new ResourceRef();
}
webApp.setResourceRefs(resourceRefs);
int i = 0;
for (int l = 0; l < data.getJdbcPoolRefs().size(); l++, i++) {
ResourceRef resourceRef = resourceRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJdbcPoolRefs().get(l);
resourceRef.setRefName(referenceData.getRefName());
resourceRef.setPattern(createPattern(referenceData.getRefLink()));
}
for (int m = 0; m < data.getJmsConnectionFactoryRefs().size(); m++, i++) {
ResourceRef resourceRef = resourceRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJmsConnectionFactoryRefs().get(m);
resourceRef.setRefName(referenceData.getRefName());
resourceRef.setPattern(createPattern(referenceData.getRefLink()));
}
for (int n = 0; n < data.getJavaMailSessionRefs().size(); n++, i++) {
ResourceRef resourceRef = resourceRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJavaMailSessionRefs().get(n);
resourceRef.setRefName(referenceData.getRefName());
resourceRef.setPattern(createPattern(referenceData.getRefLink()));
}
}
int numMessageDestinations = data.getMessageDestinations().size();
if (numMessageDestinations > 0) {