throw JCAMessages.MESSAGES.couldnTAcquireTheResourceAdapter(raName, e);
}
}
}
OutboundInteractionModel outboundInteractionModel = jcaconfig.getOutboundInteraction();
if (outboundInteractionModel == null) {
throw JCAMessages.MESSAGES.noOutboundInteractionConfigured();
}
ProcessorModel processorModel = outboundInteractionModel.getProcessor();
if (processorModel == null) {
throw JCAMessages.MESSAGES.noProcessorConfigured();
}
Properties processorProps = processorModel.getProperties();
AbstractOutboundProcessor processor = null;
String processorClassName = processorModel.getProcessorClassName();
Class<?> processorClass = null;
try {
processorClass = (Class<?>)_appClassLoader.loadClass(processorClassName);
processor = (AbstractOutboundProcessor) processorClass.newInstance();
if (!processorProps.isEmpty()) {
PropertyEditors.mapJavaBeanProperties(processor, processorProps);
}
} catch (Exception e) {
throw JCAMessages.MESSAGES.outboundProcessorClass(processorClassName, e);
}
ConnectionModel connectionModel = outboundConnectionModel.getConnection();
if (connectionModel == null) {
throw JCAMessages.MESSAGES.noConnectionConfigured();
}
String cfJndiName = connectionModel.getConnectionFactoryJNDIName();
Properties connProps = connectionModel.getProperties();
processor.setApplicationClassLoader(_appClassLoader)
.setMCFProperties(connProps)
.setConnectionFactoryJNDIName(cfJndiName)
.setJCABindingModel(jcaconfig);
ConnectionSpecModel connectionSpecModel = outboundInteractionModel.getConnectionSpec();
if (connectionSpecModel != null) {
String connSpecClassName = connectionSpecModel.getConnectionSpecClassName();
Properties connSpecProps = connectionSpecModel.getProperties();
processor.setConnectionSpec(connSpecClassName, connSpecProps);
}
InteractionSpecModel interactionSpecModel = outboundInteractionModel.getInteractionSpec();
if (interactionSpecModel != null) {
String interactSpecClassName = interactionSpecModel.getInteractionSpecClassName();
Properties interactSpecProps = interactionSpecModel.getProperties();
processor.setInteractionSpec(interactSpecClassName, interactSpecProps);
}