title: glassfish: remotely invoke EJB module with Application Client Container
body: <p>After <a href="https://java.net/projects/glassfish/lists/docs/archive/2014-09/message/5" rel="nofollow noreferrer">fighting passwords</a> on Glassfish 4.x remotely on Ubuntu 14.04 Tahr, I'm ready to proceed to installing my first remote EJB module -- just want make sure I'm on the right path.  Going from the Netbeans example <a href="https://stackoverflow.com/a/25829907/262852">Creating and Running an Application Client on the GlassFish Server</a>, How would I make a client for the EJB module which is deployed <strong>remotely</strong>?</p>
  
  <p>The Netbeans example assumes that Glassfish is running on the localhost.  The exact mechanics are unclear to me, as it's not explicitly configured for localhost.  Presumably it's implicitly configured for localhost...</p>
  
  <p>I would like to use the ACC to connect to, not a <em>local</em>, but rather a <em>remote</em> Glassfish server.  For context, the ACC is:</p>
  
  <blockquote>
    <p>Introducing the Application Client Container</p>
    
    <p>The Application Client Container (ACC) includes a set of Java classes,
    libraries, and other files that are required for and distributed with
    Java client programs that execute in their own Java Virtual Machine
    (JVM). The ACC manages the execution of Java EE application client
    components (application clients), which are used to access a variety
    of Java EE services (such as JMS resources, EJB components, web
    services, security, and so on.) from a JVM outside the Oracle
    GlassFish Server. The ACC communicates with the GlassFish Server using
    RMI-IIOP protocol and manages the details of RMI-IIOP communication
    using the client ORB that is bundled with it. Compared to other Java
    EE containers, the ACC is lightweight. For information about debugging
    application clients, see Application Client Debugging.</p>
  </blockquote>
  
  <p>GlassFish Server Open Source Edition Application Development Guide Release 4.0</p>
  
  <p>see also:</p>
  
  <p><a href="https://stackoverflow.com/questions/25830149/how-to-package-a-stand-alone-remote-ejb-application-client">https://stackoverflow.com/questions/25830149/how-to-package-a-stand-alone-remote-ejb-application-client</a></p>
  
  <p>From a <strong>client</strong> application, how does the ACC <em>remotely</em> invoke the EJB module?</p>
  
  <p>There must be a configuration.  Does the ACC pick this up from <code>jndi.properties</code>?  I can't find much documentation or examples on ACC usage.  If the ACC is unsuitable, then, of course, I'll use a different approach.  Presumably there's a way to specify a remote Glassfish server for the ACC.</p>