0 Replies Latest reply on Apr 28, 2018 8:45 AM by Roberto P

    problem injecting remote ejb with @ejb in wildfly 10

    Roberto P Newbie



      I have got two wildfy (version 10, running both not in clustered mode,  but in standalone mode):

      In the first server, i have deploied an ejb module (jar) that contains a remote Ejb interface (EmailCheckRemote) with the implementation class (EmailCheckSecurity) .




      class EmailCheckSecurity implements EmailCheckRemote{

        remote method()..



      public interface EmailCheckRemote{

        remote method1()..


      In the second wildfly i install a web application (war) and try to inject (in another ejb singleton) the interface of the remote ejb  with @EJB annotation (web app act as client).



      EmailCheckRemote emailcheker;


      Both module share the same interface of remoting ejb but the implemetation are only in the ejb deployed on first app server.


      It works if i use lookup properties like this:

       @EJB(lookup="ejb://scope-examples-ejb-3-server//EmailCheckSecurity!com.bluelotussoftware.example.boundary. EmailCheckRemote") EmailCheckRemote emailCheckRemote;

      but it doesn't work with ejb only:

      @EJB EmailCheckRemote emailCheckRemote;

      When I deploy it the deployed failed.

      Because i need a portable syntax  (i also need to call remote ejb from another app server..) i don't want to use property lookup with ejb://.. but only @EJB.

      Could be possible in wildfly?

      I have tried these settings in standalone.xml (wildfly started again), but it doesn'twork:

       <subsystem xmlns="urn:jboss:domain:naming:2.0"> 
      <lookup name="java:global/EmailCheckRemote"

      Why not? What is wrong?


      Thank you very much