title: Best practice to get Application Module for Online Web Service application
body: <p>I am building application using <code>Jdeveloper 11.1.1.7.0.</code> This application will run by a <code>scheduler</code> based on the time interval specified in the application. The main purpose of this application is to do online transaction using <code>Online Web Services</code>.</p>
  
  <p>In the application I am fetching data form Database. In order to do that I have to define application Module and use it to get the <code>view objects</code>. Previously, developer used the following way for creating application module when the application was in <code>10g</code> (before migrate to <code>11g</code>):</p>
  
  <pre><code>ApplicationModule appMod= Configuration.createRootApplicationModule("somePackge","someAppNameLocal"); 
  </code></pre>
  
  <p>and at the end he release it as follow:</p>
  
  <pre><code>Configuration.releaseRootApplicationModule(appMod, false);  
  </code></pre>
  
  <p><strong>Question is:</strong> <strong>What is the best practice to get the application module?</strong> </p>
  
  <p>This blog: <a href="http://ioracle-erp.blogspot.com/2012/08/different-ways-of-getting-handle-to-am.html" rel="nofollow">Oracle Apps (ADF/OAF/iModules): Different ways of getting Handle to AM from Backing Bean</a> suggests different ways to do that. <strong>But, Which one is the best for the type of application I am building? Also, Do I need some how to release the application module at the end of the application? Is it necessary?</strong></p>