Client access to an enterprise bean that implements a remote business interface is accomplished using either dependency injection or JNDI lookup.
To obtain a reference to the remote business interface of an enterprise bean through dependency injection, use the javax.ejb.EJB annotation and specify the enterprise bean's remote business interface name.
@EJB Example example;
The obtain a reference to a remote business interface of an enterprise bean using JNDI lookup, use the javax.naming.InitialContext interface's lookup method.
ExampleRemote example = (ExampleRemote) InitialContext.lookup("java:global/myApp/ExampleRemote");