5152535455565758
{ InitialContext ctx = getInitialContext(); String jndiName = "ejb3/basic/SimpleSessionBean"; Object ref = ctx.lookup(jndiName); SimpleSession test = (SimpleSession) ref; test.ping(); } }