title: Simple refresh of LIberty Websphere Sphere Application server 16, with enterpriseApplication
body: <p>I hear I can use the dropins directory to hot deploy code.  But let's say I want to use the apps directory and a preconfigured application.  For example, I downloaded the standard liberty jar version 16.  And using the 'apps' directory under my server.config directory, I was able to add a EAR to that directory.  Also, I added the following configuration my server.xml:</p>
  
  <p>Based on this, I am using a class loaded directory and a enterpriseApplication entry, this configuration will load when I start and stop the server, but I can't figure out how to ensure this configuration for hot deployment.  E.g. when I change the ear, I was hoping the server would restart automatically and/or reload the classes.</p>
  
  <p>I wish there were a 'scan' attribute for the enterpriseApplication.</p>
  
  <p>I used the 'applicationMonitor' setting but didn't recognize my enterpiseApplication directory and did not load.  That configuration seems to only recognize the dropins.</p>
  
  <p>I tried to use the dropins but it didn't work because I was using a shared library.  I can't put all of the jars in one EAR.</p>
  
  <pre><code>   &lt;library id="Alexandria"&gt;
                  &lt;fileset dir="/usr/local/pfs/dist/wlp/usr/servers/rest/mylib/Alexandria" includes="*.jar" scanInterval="20s" /&gt;
          &lt;/library&gt;
  
      &lt;!-- Automatically expand WAR files and EAR files --&gt;
      &lt;applicationManager autoExpand="true"/&gt;
  
      &lt;enterpriseApplication location="napolEA.ear" name="MyApp"&gt;
                  &lt;classloader privateLibraryRef="Alexandria" /&gt;
      &lt;/enterpriseApplication&gt;
  </code></pre>