// EjbApplication got this ContainerFactory by ejbDescriptor type
// hence we can always cast
assert ejbDescriptor instanceof EjbSessionDescriptor;
EjbSessionDescriptor sd = (EjbSessionDescriptor) ejbDescriptor;
AbstractSingletonContainer container;
SecurityManager sm = getSecurityManager(ejbDescriptor);
if (sd.hasContainerManagedConcurrency()) {
container = new CMCSingletonContainer(ejbDescriptor, loader, sm);
} else {
container = new BMCSingletonContainer(ejbDescriptor, loader, sm);
}