I actually have problem with the annotation @EJB both with local and remote use. But in this question I would like to focus on the local use.
In this experiment I use Jboss EAP 6.4.
In the image below I try to show my EAR-structure and where the problem occurs, the red arrow.
My code in LocalCallSessionBean that should be injected looks like:
@EJB(mappedName="StatelessBean")
private static BeanLocal beanLocal;
public static String returnAString(String parameter)
{
try
{
String string_2 = beanLocal.returnAString("LocalCallsBean-no-interface");
My problem is that beanLocal never get injected and I get a NullPointer at the last row above.
According to: https://docs.oracle.com/javaee/6/tutorial/doc/gipjf.html#girfl ...under section "Accessing Local Enterprise Beans That Implement Business Interfaces" I think this should work.
Do you guys see something that I have missed? Best regards Fredrik