}
public static void addMessageDestinationRefs(EARContext earContext, URI uri, MessageDestinationRefType[] messageDestinationRefs, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
RefContext refContext = earContext.getRefContext();
for (int i = 0; i < messageDestinationRefs.length; i++) {
MessageDestinationRefType messageDestinationRef = messageDestinationRefs[i];
String name = getStringValue(messageDestinationRef.getMessageDestinationRefName());
String linkName = getStringValue(messageDestinationRef.getMessageDestinationLink());
String type = getStringValue(messageDestinationRef.getMessageDestinationType());
Class iface = null;
try {
iface = cl.loadClass(type);
} catch (ClassNotFoundException e) {
throw new DeploymentException("could not load class " + type, e);