How to properly start OC4J on a production server. html

How to properly start OC4J on a production server.

The proper way to start OC4J is sparsely documented by Oracle:

To start OC4J in a standalone environment, issue the following command from the j2ee/home/ directory:
    java -jar oc4j.jar options

This may
often be adequate for development or test purposes, but it never
is in a production environment.
Apparently Oracle’s documentation writers assume developers are
sufficiently familiar with the java command to know what extra options to use. But in my experience this is not always the case. What I suggest is this:

    java -Xmx128M -server -jar oc4j.jar

Notes:

  •  -Xmx128M: Sets
    maximum memory to 128MB (substitute a suitable amount). This defaults to a
    mere 64MB, which is almost never enough for a webapp that relies on
    bulk
    data from a database. Whithout this option, the applications
    performance is likely to be seriously degraded, or worse, because of lack of
    sufficient memory allocation. Use stress tests to establish an optimal setting.
  • -server: This
    flag activates server-mode optimization of the JVM. Server-mode
    optimizes JVM perfomance for typical server runtime conditions, i.e.
    longrunning processes and little or no use of graphical libraries of
    the host OS. Without this flag, the JVM usually starts in
    client-mode. In comparison, server-mode performance is slower at first,
    but faster after a while.

For more, see the java tools documentation at http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html, or similar for your JDK version.

7 Comments

  1. Dave Godbey February 16, 2006
  2. Brian Duff January 5, 2006
  3. Brian Duff January 5, 2006
  4. Jacco Landlust January 5, 2006
  5. Jacco Landlust January 5, 2006
  6. Rob van Maris January 5, 2006
  7. Gary Rogers January 5, 2006