InitialContext jndiContext = new InitialContext();
try
{
HasXmlMBeanDependency dependency = (HasXmlMBeanDependency)jndiContext.lookup("HasXmlMBeanDependencyBean/remote");
dependency.noop();
System.out.println("Lookup and bean access succeeded");
}
catch (Exception e)
{
System.out.println("Caught unsatisfied dependency exception " + e);
}