String beanName = jndiName.substring(0,jndiName.indexOf('!'));
beanName = beanName.substring(beanName.lastIndexOf('/') + 1);
String managerName = beanName.substring(0, beanName.length() - "Bean".length());
//we basically need to define a mock implementation of both the local and remote
//interface here - as if it were a proper SLSB.
RhqManager manager = Enum.valueOf(RhqManager.class, managerName);
Class<?> remoteIface = manager.remote();
String localIfaceName = remoteIface.getName().substring(0,
remoteIface.getName().length() - "Remote".length())
+ "Local";
Class<?> localIface = Class.forName(localIfaceName);