title: EJBs with main() - what is this all about?
body: <p>While doing the original training for EJBs from Sun I came across the rather strange concept of a enterprise application client which has the notion of dependecy injection and a main class:</p>
  
  <pre><code>@javax.ejb.EJB
  private static auctionsystem.ejb.AuctionManagerRemote auctionManager;
  
  public static void main (String[] args)
     {
     TestClient.logger.entering (TestClient.TAG, "main");
  
     final String message = "hello";
     TestClient.logger.log (Level.INFO, "Sending {0}", message);
     final String reply = auctionManager.communicationTest (message);
     TestClient.logger.log (Level.INFO, "Received {0}", reply);
  
     TestClient.logger.exiting (TestClient.TAG, "main");
     return;
     }
  </code></pre>
  
  <p>I just can't find any background info on this. Like:</p>
  
  <ol>
  <li>How is this supposed to work.</li>
  <li>How do you start such an application without NetBeans.</li>
  <li>How do you build this construct without NetBeans (i.E. with Maven).</li>
  </ol>
  
  <p>Yes I do use NetBeans - but I am not satisfied if I can not do the same operation on the command-line and/or Maven as well.</p>