Oracle BI EE 10.1.3.3/2 – Creating Windows Service for BI EE OC4J

Update: Just realized Adrian has already blogged about this here. Thanks to Adrian for pointing it out.
Thanks to Matt Bedin and Dave Granholm(BI EE product management) for sharing this. This has been asked so many times before both in internal as well as external forums. So, i thought i would blog about it for the benefit of others. Just remember that, this method is not supported as yet by Oracle. As you would know, when you do a default install of BI EE, it would install OC4J which would act as a web server. This OC4J would start automatically when you start your OS and you can see the OC4J console in your system tray. Now, how do we go about converting this OC4J start/stop command script into a windows service? In order to do this, we would need an excellent Open Source Utility called JavaService-2.0.10. You can download this from here. Once you have downloaded this, unzip the utility to any folder.
      
Now, navigate to this folder from command line and enter the following command.
javaservice -install “Oracle BI EE OC4J” “C:\Program Files\Java\jdk1.5.0_11\jre\bin\client\jvm.dll” -XX:MaxPermSize=128m “-Djava.class.path=D:\Oracle\OracleBI\OC4J_BI\j2ee\home\oc4j.jar” -start oracle.oc4j.loader.boot.BootStrap -description “Oracle BI EE OC4J Service”
In the above command, C:\Program Files\Java\jdk1.5.0_11\jre\bin\client\jvm.dll points to the dll in your Java 1.5 JDK path. Also, D:\Oracle\OracleBI\OC4J_BI\j2ee\home\oc4j.jar points to the oc4j.jar within your BI EE instance.
      
Now, if you go to the Windows Services Manager, you would notice that a new service would have been created.
      
Now, you should be able to the control the start/stop of OC4J from the services console. Use this only on a test instance since this is not certified.