// Deploy MC Beans
ProxyStatelessSession2xOnlyExplicitJndiNameTestCase.bootstrap.deploy(ProxyStatelessSessionTestCase.class);
// Create a SLSB
StatelessContainer container = Utils.createSlsb(MyStateless2xOnlyBean.class);
// Manually set the JNDI name (override to mock XML)
/*
* This is the test condition!
*/
container.getMetaData().setHomeJndiName(OVERRIDE_JNDI_NAME_REMOTE);
container.getMetaData().setJndiName(OVERRIDE_JNDI_NAME_REMOTE);
container.getMetaData().setLocalHomeJndiName(OVERRIDE_JNDI_NAME_LOCAL);
container.getMetaData().setLocalJndiName(OVERRIDE_JNDI_NAME_LOCAL);
// Install
Ejb3RegistrarLocator.locateRegistrar().bind(container.getName(), container);
// Create JNDI Context
context = new InitialContext(); // Props from CP jndi.properties
}