JNDIService service = webBeansContext.getService(JNDIService.class);
//Default jndi is just a map
if(service instanceof DefaultJndiService)
{
service.bind(WebBeansConstants.WEB_BEANS_MANAGER_JNDI_NAME, new InjectableBeanManager(webBeansContext.getBeanManagerImpl()));
}
//Assume, actual JNDI implementation
else
{
service.bind(WebBeansConstants.WEB_BEANS_MANAGER_JNDI_NAME, webBeansContext.getBeanManagerImpl().getReference());