title: Load forms without reloading forms services each time
body: <p>we are migrating our <strong>Oracle Forms 10g</strong> application to <strong>APEX 4.1</strong>.</p>
  
  <p>We need to include some Forms into APEX.</p>
  
  <p>We have a PL/SQL function <code>call_form</code> (see below), called from an APEX region, that simply writes the applet to load the form, passing the form name as parameter.</p>
  
  <p>It works, but <strong>it always reload Forms services</strong> and it takes arround <strong>10s</strong> each time, the Oracle Application Server Forms Services logo appears each time :</p>
  
  <p><img src="https://i.stack.imgur.com/l6T8S.png" alt=""></p>
  
  <p>It is really a pain for users...</p>
  
  <p>I thought it was because it was reloading jar files each time, so I have tried to use <strong>cache options</strong> when writting the applet (<em>cache_option</em>, <em>cache_archive</em>, ...) to cache the files in the <strong>JVM</strong>, without success.</p>
  
  <p>I don't get the <strong>applet security warning</strong> each time, in the <strong>java cache viewer</strong> I can see the 4 jar files <em>frmall.jar</em>, <em>frmwebutil.jar</em>, <em>FDialogPJC.jar</em> and <em>jacob.jar</em>.</p>
  
  <p>Here is the <strong>content of the Java console</strong> when calling a form, and then reloading the page, it seems it loads <strong>webutil</strong> 2 times :</p>
  
  <pre><code> RegisterWebUtil - Loading WebUtil Version 10.1.2.3
   proxyHost=null
   proxyPort=0
   connectMode=HTTP, native.
   Forms Applet version is : 10.1.2.3
   RegisterWebUtil - Loading WebUtil Version 10.1.2.3
   proxyHost=null
   proxyPort=0
   connectMode=HTTP, native.
   Forms Applet version is : 10.1.2.3
  </code></pre>
  
  <p><strong>My JVM is 1.6.0_31</strong>.</p>
  
  <p>The <code>call_form</code> procedure :</p>
  
  <pre><code> procedure call_form(in_form_name in varchar2) is
   begin
     htp.p(' 
   &lt;object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://javadl-esd.sun.com/update/1.6.0/jinstall-6-windows-i586.cab" width="0" height="0" hspace="0" vspace="0"&gt;
     &lt;param name="type" value="application/x-java-applet"&gt;
     &lt;param name="codebase" value="http://myhost.ch/forms/java"&gt;
     &lt;param name="code" value="oracle.forms.webutil.common.RegisterWebUtil"&gt;
     &lt;param name="cache_option" value="Plugin"&gt;
     &lt;param name="cache_archive" value="frmwebutil.jar,jacob.jar"&gt;
     &lt;param name="cache_version" value=""&gt;
     &lt;comment&gt;
       &lt;embed src="" pluginspage="https://java.sun.com/javase/downloads/index.jsp"
         type="application/x-java-applet"
         java_codebase="http://myhost.ch/forms/java"
         java_code="oracle.forms.webutil.common.RegisterWebUtil"
         cache_option="Plugin"
         cache_archive="frmwebutil.jar,jacob.jar"
         cache_version=""
         width="0"
         height="0"
         hspace="0"
         vspace="0"&gt;
       &lt;/embed&gt;
       &lt;noembed&gt;Registration applet definition&lt;/noembed&gt;
     &lt;/comment&gt;
   &lt;/object&gt;
  
   &lt;object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://javadl-esd.sun.com/update/1.6.0/jinstall-6-windows-i586.cab" width="1015" height="745" hspace="0" vspace="0"&gt;
     &lt;param name="type" value="application/x-java-applet"&gt;
     &lt;param name="codebase" value="http://myhost.ch/forms/java"&gt;
     &lt;param name="code" value="oracle.forms.engine.Main"&gt;
     &lt;param name="cache_option" value="Plugin"&gt;
     &lt;param name="cache_archive" value="frmall.jar,FDialogPJC.jar,frmwebutil.jar,jacob.jar"&gt;
     &lt;param name="cache_version" value=""&gt; 
     &lt;param name="serverURL" value="http://myhost.ch/forms/lservlet?ifcfs=http://myhost.ch/forms/frmservlet?config=myconfig&amp;#38;form='||in_form_name||'.fmx&amp;#38;acceptLanguage=fr"&gt;
     &lt;param name="networkRetries" value="0"&gt;
     &lt;param name="serverArgs" value="escapeParams=true module='||in_form_name||'.fmx userid= sso_userid=%20 sso_formsid=%25OID_FORMSID%25 sso_subDN= sso_usrDN= debug=no host= port= buffer_records=no debug_messages=no array=no obr=no query_only=no quiet=yes render=no record= tracegroup= log= term="&gt;
     &lt;param name="separateFrame" value="False"&gt;
     &lt;param name="splashScreen" value=""&gt;
     &lt;param name="background" value=""&gt;
     &lt;param name="lookAndFeel" value="Oracle"&gt;
     &lt;param name="colorScheme" value="teal"&gt;
     &lt;param name="serverApp" value="default"&gt;
     &lt;param name="logo" value=""&gt;
     &lt;param name="imageBase" value="DocumentBase"&gt;
     &lt;param name="formsMessageListener" value=""&gt;
     &lt;param name="recordFileName" value=""&gt;
     &lt;param name="EndUserMonitoringEnabled" value=""&gt;
     &lt;param name="EndUserMonitoringURL" value=""&gt;
     &lt;param name="heartBeat" value=""&gt;
     &lt;param name="WebUtilLogging" value="off"&gt;
     &lt;param name="WebUtilLoggingDetail" value="normal"&gt;
     &lt;param name="WebUtilErrorMode" value="Alert"&gt;
     &lt;param name="WebUtilDispatchMonitorInterval" value="5"&gt;
     &lt;param name="WebUtilTrustInternal" value="true"&gt;
     &lt;param name="WebUtilMaxTransferSize" value="16384"&gt;
     &lt;comment&gt;
       &lt;embed src="" pluginspage="https://java.sun.com/javase/downloads/index.jsp"
         type="application/x-java-applet"
         java_codebase="http://myhost.ch/forms/java"
         java_code="oracle.forms.engine.Main"
         cache_option="Plugin"
         cache_archive="frmall.jar,FDialogPJC.jar,frmwebutil.jar,jacob.jar"
         cache_version=""
         width="1015"
         height="745"
         hspace="0"
         vspace=""
         serverURL="http://myhost.ch/forms/lservlet?ifcfs=http://myhost.ch/forms/frmservlet?config=myconfig&amp;#38;form='||in_form_name||'.fmx&amp;#38;acceptLanguage=fr"
         networkRetries="0"
         serverArgs="escapeParams=true module='||in_form_name||'.fmx userid= sso_userid=%20 sso_formsid=%25OID_FORMSID%25 sso_subDN= sso_usrDN= debug=no host= port= buffer_records=no debug_messages=no array=no obr=no query_only=no quiet=yes render=no record= tracegroup= log= term="
         separateFrame="False"
         splashScreen=""
         background=""
         lookAndFeel="Oracle"
         colorScheme="teal"
         serverApp="default"
         logo=""
         imageBase="DocumentBase"
         recordFileName=""
         EndUserMonitoringEnabled=""
         EndUserMonitoringURL=""
         heartBeat=""
         WebUtilLogging="off"
         WebUtilLoggingDetail="normal"
         WebUtilErrormode="Alert"
         WebUtilDispatchMonitorInterval="5"
         WebUtilTrustInternal="true"
         WebUtilMaxTransferSize="16384"&gt;
       &lt;/embed&gt;
       &lt;noembed&gt;Forms applet definition&lt;/noembed&gt;
     &lt;/comment&gt;
   &lt;/object&gt;
   ');
   end;
  </code></pre>
  
  <p>Have you any idea on <strong>how I can prevent that</strong> ? Or do you think there is a better way to include Oracle Forms into APEX ?</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks.</p>