1 Reply Latest reply: Oct 30, 2012 8:31 AM by Udo RSS

    How to modify the temp dir for the OC4J as a service???????

    n_shah18
      We have OC4j running as an automatic service in Windows 2008 server. Now we have installed Apex listener but whenever the server is restarted it loses its config. I have researched and found that if we setup a temp dir {C:\myconfig} and set OC4J service settings to this folder then Apex will look for this folder on its startup.

      Is there a way that we can modify the parameters for OC4J ,
      can somebody help me the syntax of service creation and also setting up that temp dir
        -Djava.io.tmpdir=c:\somedirectory
      javaservice -install “Oracle OC4J” “C:\Program Files\Java\jdk1.5.0_11\jre\bin\client\jvm.dll” -XX:MaxPermSize=128m "-Djava.io.tmpdir=c:\OC4J\apex_lsnr_config"
       “-Djava.class.path=D:\OC4J\j2ee\home\oc4j.jar” -start oracle.oc4j.loader.boot.BootStrap -description “oc4j 10.1.3”
      thank you
      NS
        • 1. Re: How to modify the temp dir for the OC4J as a service???????
          Udo
          Hi NS,

          what's your actual target?
          -Djava.io.tmpdir=c:\somedirectory
          basically looks good. However, I'm not sure why you want to use it to store your APEX Listener's configuration. Using
          javaservice -install “Oracle OC4J” “C:\Program Files\Java\jdk1.5.0_11\jre\bin\client\jvm.dll” -XX:MaxPermSize=128m "-Djava.io.tmpdir=c:\OC4J\apex_lsnr_config"
          “-Djava.class.path=D:\OC4J\j2ee\home\oc4j.jar” -start oracle.oc4j.loader.boot.BootStrap -description “oc4j 10.1.3”
          I see two possible issues: One with your tmpdir, the other one with your JDK version.
          Let's start with the latter:
          As documented in APEX Listener's Installation Guide, a JDK 1.6.0 Update 20 or higher is required. It seems your OC4J is using 1.5.0 Update 11. You'll very likely encounter other issues than just losing your configuration upon restart.
          Concerning your tmpdir
          The option you set affects the whole OC4J. I'm not sure you acutally want all temp stuff to be processed in there. Despite that, it stays a temporary location and is due to be erased by OC4J upon each start.
          The recommended way to store your APEX Listener's configuration would be to set the parameter config.dir in the web.xml of your apex.war . I really recommend to edit the web.xml before deploying the war file instead of modifying the web.xml after depoyment, so you'll be sure that even after a redeployment the proper configuration will be used.

          -Udo