Java Reference
In-Depth Information
Next, we look up the TheatreInfo SLSB [2] and the TheatreBooker SFSB [3]
using the JNDI definition rules that we just discussed.
The main application loop reads from the console from input [4] and performs the
corresponding actions: it books a ticket [5] , lists the theatre tickets [6] , and then
quits the application [7] .
Adding EJB client configuration
As you can see from the preceding code, there is no indication about the location of
the server where the EJBs are running. If you don't want to specify this by code, the
simplest thing you can do is add the jboss-ejb-client.properties file in the
client's classpath.
Note
By default, Maven's quickstart archetype does not include a resources folder
for your project's configuration files. You can just add one by right-clicking on
your project and choosing Add new Java Source folder under src/main/re-
sources . Once done, you need to add the jboss-ejb-client.properties
file.
The contents of the jboss-ejb-client.properties file are as follows:
endpoint.name=client-endpoint
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=localhost
remote.connection.default.port = 4447
And here's some explanation to this file—the optional endpoint.name property
represents the name that will be used to create the client side of the endpoint. If it is
not specified, it will default to config-based-ejb-client-endpoint .
Search WWH ::




Custom Search