Object ejbRef = ic.lookup(globalJndiName);
EjbContainerServices containerServices = habitat.getByContract(EjbContainerServices.class);
sessionObj = new SessionObjectReferenceImpl(containerServices, ejbRef);
} catch(NamingException ne) {
throw new IllegalStateException("Error resolving session object reference for ejb name " +
ejbDescriptor.getBeanClass() + " and jndi name " + globalJndiName, ne);
}