I'm rather new so forgive my ignorance. I've been using JNDI lookup code to get a stub to my SLSBs:
public static Foo getFoo()
{
IFoo foo = null;
try
{
//get EJB
InitialContext ctx = new InitialContext();
foo = (IFoo)ctx.lookup("earName/FooBean/local");
}
catch (NamingException exp)
{
exp.printStackTrace();
}
return foo.getFoo();
}
@EJB IFoo foo; ..... foo.getFoo();