1 Reply Latest reply on Jan 31, 2015 11:39 AM by wdfink

    EJB invocation from remote server instance

    rodrigo.uchoa

      Hi everyone,

       

      Let me start by saying that I've already read the docs regarding this topic, at EJB invocations from a remote server instance - WildFly 8 - Project Documentation Editor.

       

      My question is regarding the authentication mechanism between the two server instances. In the link above, an "outbound-socket-binding" and "remote-outbound-connection" are created in the client instance in order to communicate with the remote instance. Obviously, this configuration is done in the "standalone-full.xml" file.

       

      For a development environment, I want to avoid the need for developers to change Wildfly default configs. They should be able to just get a clean Wildfly install without all this configuration hassle.

       

      So for this to work, I was wondering if the same credential config can be done in the "jboss-ejb-client.xml" file, just like its done in "jboss-ejb-client.properties" when dealing with standalone clients. The "jboss-ejb-client.xml" looks like this:

       

      <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">

          <client-context>

              <ejb-receivers>

                  <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>

              </ejb-receivers>

          </client-context>

      </jboss-ejb-client>

       

      It points to the "remote-outbound-connection" config done in the server. Could it just provide all the configs itself? Something like:

       

      <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">

          <client-context>

              <ejb-receivers>

                  <config>

                     <name>remote.connection.default.host</name>

                     <value>10.0.120.10</value>

                  </config>

                 

                  <config>

                     <name>remote.connection.default.username</name>

                     <value>myUser</value>

                  </config>

                   //etc etc etc

              </ejb-receivers>

          </client-context>

      </jboss-ejb-client>

       

      There are 3 xsd for the "jboss-ejb-client.xml" file. Newer ones have additional configuration options, but for me it's unclear whether it works or not.

        • 1. Re: EJB invocation from remote server instance
          wdfink

          You might use the remote-naming or scoped context approach if you run in a EE application, both have some restrictions. In my opinion the outbound connection is the better approach. To make it simple you can create a cli-script which can be used with jboss-cli.sh to configure the server. See for example the install-domain.cli of the ejb-multi-server quickstart.