2 Replies Latest reply on Sep 12, 2014 8:38 AM by jorgen.ringen

    Call remote ejb on wildfly 8.0 without jboss dependencies in classpath

    jorgen.ringen

      I'm running a very simple remote ejb on a Wildfly 8.0 server. I'm trying to call the ejb from a standalone client.

      I've downloaded the wildly quickstart from https://github.com/wildfly/quickstart/tree/master/ejb-remote and it runs fine.

      However, I don't want any dependencies to jboss in my client.

      The only examples I've found for calling a remote ejb running on wildfly has dependencies to jboss. You need jboss-ejb-client.properties or EJBClientConfiguration, a dependency to jboss-ejb-client and a dependency to jboss-ejb-api_3.2_spec.

      I thought it was possible to do this with the standard JavaEE API without any specific appserver dependencies in my client.

      Am I wrong?

        • 1. Re: Call remote ejb on wildfly 8.0 without jboss dependencies in classpath
          jaysensharma

          Container specific client jars are needed on the client side.

          You can add the *"$JBOSS_HOME/bin/client/jboss-client.jar"* in your client classpath.  Without this how your EJB client will find the reference of the Context.INITIAL_CONTEXT_FACTORY implementation like "org.jboss.naming.remote.client.InitialContextFactory" and other container specific jars which contains the remote invocation protocol implementation like "http-remoting://"


          Also if you are using the "ejb:/" ejb namespace in that case as well as the ejb: namespace implementation is provided by the jboss-ejb-client library, and allows the lookup of EJB's using their application name, module name, ejb name and interface type, You  must use it, you must have the appropriate jars on the class path.


          Remote JNDI Reference Update Draft - WildFly 8 - Project Documentation Editor

          1 of 1 people found this helpful
          • 2. Re: Call remote ejb on wildfly 8.0 without jboss dependencies in classpath
            jorgen.ringen

            Thank you for answer!

             

            I'm kind of new to remote EJB's, and I was under the impression that there was a unified way to call them through the jee-api for all the different application servers.

             

            So basically each appserver has it's own invocation-protocol and InitialContext-factory and in order to invoke remote EJB's you need different client-api's for every different appserver you want to call? I guess this applies to remote spring-beans as well?