[[EJB_over_HTTP]]
= EJB over HTTP

Beginning with Wildfly 11 it is now possible to use HTTP as the
transport (instead of remoting) for remote EJB and JNDI invocations.

Everything mentioned below is applicable for both JNDI and EJB
functionality.

[[server-configuration]]
== Server Configuration

In order to configure the server the http-invoker needs to be enabled on
each virtual host you wish to use in the Undertow subsystem. This is
enabled by default in standard configs, but if it has been removed it
can be added via:

....
/subsystem=undertow/server=default-server/host=default-host/setting=http-invoker:add(http-authentication-factory=myfactory, path='/wildfly-services')
....

The Hhttp-invoker takes two parameters, a path (which defaults to
/wildfly-services) and a http-authentication-factory which must be a
reference to an Elytron http-authentication-factory.

Note that any deployment that wishes to use this must use Elytron
security with the same security domain that corresponds to the HTTP
authentication factory.

[[performing-invocations]]
== Performing Invocations

The mechanism for performing invocations is exactly the same as for the
remoting based EJB client, the only difference is that instead of a
'remote+http' URI you use a 'http' URI (which must include the path that
was configured in the invoker). For example if you are currently using
'remote+ http://localhost:8080' as the target URI, you would change this
to 'http://localhost:8080/wildfly-services'.

[[implementation-details]]
== Implementation details

The wire protocol is detailed at
https://github.com/wildfly/wildfly-http-client/blob/master/docs/src/main/asciidoc/wire-spec-v1.asciidoc
