InitialContext jndiContext = new InitialContext();
System.out.println("Testing EJB3.0 references to EJB2.x");
Stateless3 test3 = (Stateless3)jndiContext.lookup("Stateless3");
test3.testAccess();
System.out.println("Testing EJB2.x references to EJB3.0");
Stateless2Home home = (Stateless2Home)jndiContext.lookup("Stateless2");
Stateless2 test2 = home.create();
test2.testAccess();
System.out.println("Succeeded");