Showing posts with label devx. Show all posts
Showing posts with label devx. Show all posts

04 June 2010

Running WLS on Mac OS X with Correct Memory Settings

The shell scripts that launch WLS on Mac OS X don't seem to set the JAVA_VENDOR to Apple, which means that the relevant USER_MEM_ARGS are not specified when the server is started.

To remedy this I've been setting JAVA_VENDOR="Apple" before starting my domain.

But occasionally I forget.  So to automate the setting, I udpated $DOMAIN_DIR/bin/setDomainEnv.sh as follows:

if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
    JAVA_HOME="${BEA_JAVA_HOME}"
    export JAVA_HOME
else
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
        JAVA_HOME="${SUN_JAVA_HOME}"
        export JAVA_HOME
    else
        if [ "`uname`" = "Darwin" ] ; then
            JAVA_VENDOR="Apple"
            export JAVA_VENDOR

            JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home"
            export JAVA_HOME
    fi
    fi
fi

This then results in the relevant MEM_ARGS for Apple being set later in the script:

if [ "${JAVA_VENDOR}" = "Apple" ] ; then
    MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"
    export MEM_ARGS
fi
Now starting the domain on Mac OS X, the necessary memory arguments are set on the JVM and the server runs as expected.

$ startWebLogic.sh
          ....
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
Starting WLS with line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -client   -Xms512m -Xmx512m -XX:MaxPermSize=128m -Dweblogic.Name=myserver ...

28 April 2010

Weblogic Server 10.3.3 available on OTN

News at hand! We've just released WebLogic Server 10.3.3 and it's now available for download on OTN:

http://www.oracle.com/technology/software/products/middleware/htdocs/fmw_11_download.html

You may also note the addition of a new zip file download for WLS itself:

http://download.oracle.com/otn/nt/middleware/11g/wls1033_dev.zip

This is a new smaller distribution of WLS that we are making available as a zip file, which can be simply extracted to a local directory, one script executed to specify some access control settings, and then launch WLS directly from the command line. A new domain will automatically created if none is found.

This is a really good step forward for WLS, making it more easily installed and incorporated into development and testing environments. Please read the README.txt embedded within the zip file for more details on how to start and use the server. Note that this is only supported for development use, not for use in production deployment environments.

By the way, this new WLS zip file distribution has been tested, and is supported on Mac OS X for development use. Enjoy!

Note: an issue was identified by a reader below showing that the upgrade utility was not launching successfully.  We have identified a workaround for this which involves adding two additional libraries to the PRE_CLASPATH environment variable before running the upgrade utility.

$ export PRE_CLASSPATH="${MW_HOME}/modules/features/com.bea.cie.common-plugin.launch_2.5.0.0.jar:${MW_HOME}/utils/config/10.3/config-launch.jar"
 

Then run upgrade command as usual.

$ ${MW_HOME}/wlserver/common/bin/upgrade.sh