2 Replies Latest reply: Feb 26, 2013 8:17 AM by Tuelho RSS

    Starting a specific managed server with a different JVM.

    Tuelho
      Hello!

      We have a Weblogic (11g 10.3.6.0) Domain created using the Configuration Wizard (WL_HOME/common/bin/config.sh). This domain was configured to use Oracle JRockit JVM. So, all managed servers in this domain uses JRockit. But for some test/P.O.C reasons we want to configure a specific managed server (in this same domain) to run on top of Sun HotSpot. We need do this without change the domain's default JVM (Oracle JRockit).

      Is it possible?

      I tried many ways but now I'm a bit confused. Reading the DOC [1] I tried to change the setDomainEnv.sh to set the JAVA_VENDOR ('Sun') and JAVA_HOME (/path/to/sun/jdk). But in this way you change the JVM for whole Domain.

      If I change the Server's configuration using AdminConsole (ServerX>Configuration>Server Start page) and them start it using AdminConsole or NodeManager, it (partially) works. I mean, the server starts using Sun Hotspot JVM, but if you look at the command process used to statrt it, you can see something strange.

      "/opt/Oracle/java/ *jdk1.7.0_07* /bin/java -Dweblogic.Name=server-2 -Dbea.home=/opt/Oracle/Middleware11g -Djava.security.policy=/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.management.server=http://192.168.56.101:7001 -D *java.library.path* = */opt/Oracle/java/jrmc-4.0.1-1.6.0/jre/lib/amd64/jrockit:/opt/Oracle/java/jrmc-4.0.1-1.6.0/jre/lib/amd64:/opt/Oracle/java/jrmc-4.0.1-1.6.0/jre/../lib/amd64* :/opt/Oracle/Middleware11g/patch_wls1036/profiles/default/native:/opt/Oracle/Middleware11g/patch_ocp371/profiles/default/native:/opt/Oracle/Middleware11g/wlserver_10.3/server/native/linux/x86_64:/opt/Oracle/Middleware11g/wlserver_10.3/server/native/linux/x86_64/oci920_8 -D *java.class.path* =/opt/Oracle/Middleware11g/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/Middleware11g/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:*/opt/Oracle/java/jrmc-4.0.1-1.6.0/lib/tools.jar*:/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/weblogic.jar:/opt/Oracle/Middleware11g/modules/features/weblogic.server.modules_10.3.6.0.jar:/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/webservices.jar:/opt/Oracle/Middleware11g/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/opt/Oracle/Middleware11g/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/Oracle/Middleware11g -Dweblogic.system.BootIdentityFile=/opt/Oracle/Middleware11g/user_projects/domains/base_domain/servers/server-2/data/nodemanager/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=false -Dweblogic.ReverseDNSAllowed=false -server -d64 -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m weblogic.Server"

      As you can see above, the server process are still using java.class.path and java.library.path with references to Oracle JRockit JVM.
      I've tested in x86_64 and Sun SPARC platform. On x86_64 the server starts with no problem. But on Solaris SPARC the server crashs during startup time.

      So, my question is: how can we solve this? Are the Node Manager using setDomainEnv.sh or commEnv.sh vars to set the java.class.path and java.library.path opitons?


      Thanks.
      ___
      [1] http://docs.oracle.com/cd/E23943_01/web.1111/e13708/overview.htm
        • 1. Re: Starting a specific managed server with a different JVM.
          Kishore Rout
          Hi,
          You can use a different JVM for specific managed server by editing parameters in server start tab from console. But if you want to change java.class.path and java.library.path with references from Oracle JRockit JVM to JDK hotspot, then you have to create separate commonenv.sh,setdomainenv.sh and startWeblogic.sh file for your managed server.

          java.class.path and java.library.path env variables generally generates from commonenv.sh file.

          Regards,
          Kishore
          • 2. Re: Starting a specific managed server with a different JVM.
            Tuelho
            Hi @Kishore.
            Thanks for your reply.

            I tried the both approaches you suggested.
            In the second one (creating specific scripts: commEnv.sh, setDomainEnv.sh, etc) I can't start my managed server using Node Manager, Right? In this case I have to start it using startManagedServer.sh.

            Thanks.