String ejbName = ejbNames.get(ejbIndex);
JBossConsumerBeanMetaData consumer = (JBossConsumerBeanMetaData) ejbs.get(ejbIndex);
ConsumerContainer container = super.getConsumerContainer(ejbIndex);
ConsumerImpl annotation = new ConsumerImpl((Consumer) container
.resolveAnnotation(Consumer.class));
container.setAssemblyDescriptor(dd.getAssemblyDescriptor());
if (consumer != null && !isAnnotatedBean())
{
if (consumer.getMessageDestination() != null)
{
ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
"destination", consumer.getMessageDestination());
annotation.addActivationConfig(property);
}
if (consumer.getMessageDestinationType() != null)
{
ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
"destinationType", consumer.getMessageDestinationType());
annotation.addActivationConfig(property);
}
addClassAnnotation(container, Consumer.class, annotation);
}