Skip to content

Commit 7957aba

Browse files
rocher50bstansberry
authored andcommittedNov 9, 2010
JBAS-8616
1 parent da49d89 commit 7957aba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎managedbeans/src/main/java/org/jboss/as/deployment/managedbean/processors/ManagedBeanAnnotationProcessor.java

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ public void processDeployment(DeploymentUnitContext context) throws DeploymentUn
117117
// Get the managed bean name from the annotation
118118
final ManagedBean managedBeanAnnotation = beanClass.getAnnotation(ManagedBean.class);
119119
final String beanName = managedBeanAnnotation.value().isEmpty() ? beanClassName : managedBeanAnnotation.value();
120+
if(managedBeanConfigurations.containsName(beanName)) {
121+
ManagedBeanConfiguration first = managedBeanConfigurations.getConfigurations().get(beanName);
122+
throw new DeploymentUnitProcessingException("Duplicate managed bean name '" + beanName + "': " + beanClassName + ", " + first.getType().getName());
123+
}
120124
final ManagedBeanConfiguration managedBeanConfiguration = new ManagedBeanConfiguration(beanName, beanClass);
121125

122126
processLifecycleMethods(managedBeanConfiguration, beanClass, index);

0 commit comments

Comments
 (0)
Please sign in to comment.