0 Replies Latest reply on Dec 13, 2018 8:54 AM by anto_c

    jndi-lookup fails with a NameNotFoundException in run()

    anto_c

      If i try to  lookup an ejb in method Run()(implements Runnable), it fails return me a NameNotFoundException.

       

      If i try in a normal method, it is instantiated correctly.

       

      I use the annotation:

      @LocalBinding(jndiBinding = "java:app/Kernel_ejb/MyEjbBean!com.test.MyEjbLocal")

       

      //Lookup:

      MyEjbLocal home = (MyEjbLocal) EJBHomeFactory.getFactory().getContext().lookup(MyEjbBean.class.getAnnotation(LocalBinding.class).jndiBinding());

       

      Can someone help me?