if (bean instanceof MessageDrivenBean) {
MessageDrivenBean mdb = (MessageDrivenBean) bean;
MessageDriven messageDriven = clazz.getAnnotation(MessageDriven.class);
if (messageDriven != null) {
javax.ejb.ActivationConfigProperty[] configProperties = messageDriven.activationConfig();
if (configProperties != null) {
ActivationConfig activationConfig = mdb.getActivationConfig();
if (activationConfig == null) {
activationConfig = new ActivationConfig();
mdb.setActivationConfig(activationConfig);