}
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 = messageDestinationRef.getMessageDestinationRefName().getStringValue();
String linkName = messageDestinationRef.getMessageDestinationLink().getStringValue();
String type = messageDestinationRef.getMessageDestinationType().getStringValue();
Class iface = null;
try {
iface = cl.loadClass(type);
} catch (ClassNotFoundException e) {
throw new DeploymentException("could not load class " + type, e);