Vector beanDescriptors = application.getEjbDescriptors();
// create EJB containers for each EJB
Enumeration e = beanDescriptors.elements();
ContainerFactory cf = Switch.getSwitch().getContainerFactory();
while (e.hasMoreElements()) {
EjbDescriptor nextDescriptor = (EjbDescriptor) e.nextElement();
// detects any unique id collisions
if ( !this.registry.isUnique( nextDescriptor.getUniqueId() ) ) {
_logger.log(Level.SEVERE, "loader.duplicate_unique_id",
new Object[] {
String.valueOf(nextDescriptor.getUniqueId()),
nextDescriptor.getName()
});
// unload all the ejbs
unloadEjbs(jsr77);
// abort loading
return false;
}
try {
EJBSecurityManager sm =
EJBSecurityManager.createManager(nextDescriptor,true);
// create the bean container
Container container = null;
try {
notifyEjbEvent(EjbContainerEvent.BEFORE_EJB_CONTAINER_LOAD,
nextDescriptor);
container = cf.createContainer(nextDescriptor, loader,
sm, dynamicConfigContext);
notifyEjbEvent(EjbContainerEvent.AFTER_EJB_CONTAINER_LOAD,
nextDescriptor);
} catch (NameAlreadyBoundException jndiEx) {