// Get JMS Component
JMSComponent jmsComponent = null;
jmsComponent = getEmbedded().getComponent(JMSComponent.class);
// Create factory
MDBMessageEndPointFactory mdbMessageEndPointFactory = null;
try {
mdbMessageEndPointFactory = new MDBMessageEndPointFactory(className, this, activationSpec, resourceAdapter,
jmsComponent);
} catch (FactoryException e) {
throw new EZBContainerException("Cannot build the MDB MessageEndPoint factory", e);
}
// build runtime information
MessageDrivenInfo messageDrivenInfo = new MessageDrivenInfo();
messageDrivenInfo.setApplicationExceptions(messageDrivenBean.getEjbJarDeployableMetadata().getApplicationExceptions());
messageDrivenInfo.setTransactionManagementType(messageDrivenBean.getTransactionManagementType());
messageDrivenInfo.setMessageListenerInterface(messageDrivenBean.getJMessageDriven()
.getMessageListenerInterface());
messageDrivenInfo.setMessageDestinationLink(messageDrivenBean.getJMessageDriven()
.getMessageDestinationLink());
// MappedName ? use it as destination
String mappedName = messageDrivenBean.getJCommonBean().getMappedName();
if (mappedName != null && !"".equals(mappedName)) {
messageDrivenBean.getJMessageDriven().getActivationConfigProperties().add(
new JActivationConfigProperty("destination", mappedName));
}
messageDrivenInfo.setActivationConfigProperties(messageDrivenBean.getJMessageDriven()
.getActivationConfigProperties());
mdbMessageEndPointFactory.setMessageDrivenInfo(messageDrivenInfo);
return mdbMessageEndPointFactory;