protected ManagedThreadFactoryRemote getBean(String username, String password) throws Exception {
InitialContext ctx = getInitialContext(username, password);
String beanName = getRemoteBeanName();
System.out.println("Using: " + beanName);
ManagedThreadFactoryRemote bean = (ManagedThreadFactoryRemote)ctx.lookup(beanName);
return bean;
}