Wednesday, February 13, 2008

OC4J as a Service

Following the last post on stopping oc4j from automatic running, you may want to run oc4j as a service, so that is can be added to a batch file that starts all the analytics services.


So, to Run OC4J as a windows service

If you want to run oc4j as a windows service download the open source tool named JavaService.exe from http://javaservice.objectweb.org/ which can create Windows Services for Java Programs, adjust and execute the following command:
javaservice -install "Oracle BI: OC4J Service" "D:\jdk1.5.0_09\jre\bin\client\jvm.dll" -XX:MaxPermSize=128m -Xmx512m "-Djava.class.path=d:\OracleBI\oc4j_bi\j2ee\home\oc4j.jar" -start oracle.oc4j.loader.boot.BootStrap -description "Oracle BI Oc4J Service"

Now you can add to your 'net start' commands batch file.

Credit to Andreass in the Majendi team for this.

UPDATE: Venkat has also blogged on this subject, including some screen shots.

6 comments:

Unknown said...

This is really helpful. Thanks a lot.

Unknown said...

Adrian - Such a small world :-). I have now updated my blog entry to reflect yours.

gerardnico said...

Thanks for this good information.

Just for information.

You have also a 64 bit version of javaservice which is available only with the release V2.0.7.

An other good way is to create a schedule task on startup.

Rakesh said...

Hi
I tried installing OC4J as windows service. for some reason, I am getting the error as

" The Oracle BI OC4J service service on local computer started and then stopped. some services stop automatically if they are not in use by other services or programs.

Ponzy said...

I'm trying to do the same thing but adding "-Dstdstream.filesize=2 -Dstdstream.filenumber=5", for limiting the log files' size. I don't know why, but these 2 paremeters seem to be ignored. If I don't find a solution I'm going to try with ServiceMill.

a said...

Hi
I tried installing OC4J as windows service. for some reason, I am getting the error as

" The Oracle BI OC4J service service on local computer started and then stopped. some services stop automatically if they are not in use by other services or programs.

The Cowes

The Cowes
Cowes Racing