//Register our session beans
for (BeanContext beanContext : ctx.getDeployments()) {
String ejbName = beanContext.getEjbName();
//Skip if not a Singleton or stateless bean
ContainerType type = beanContext.getContainer().getContainerType();
boolean register = type == ContainerType.SINGLETON || type == ContainerType.STATELESS;
//Skip if not allowed name
register &= names.contains(ejbName);