I packaged the EJB into an EAR and got it to work. It seems the only way is to specify the full EAR name, module name, bean class and fully qualified remote interface name in the @EJB annotation lookup attribute as follows:
@EJB(lookup = "java:global/service-ear/service-ejb-impl/HelloServiceImpl!ee.mrts.service.HelloService")
Can I use configuration to avoid hardwiring this so that I can simply use the @EJB annotation without specifying the lookup attribute?
Is there a way to avoid packaging the EJB into an EAR?