04 May 2011

Run embedded weblogic in 64 bits (run it with +2gigs)

Last update: 5/5/2011

Why
Assigning more memory to weblogic makes it run better and more deployments can be made before we need to restart the embedded Weblogic.
How
In a 32bit Windows systems -Xmx1024m is the more you can give in embedded weblogic (check Increase memory of embedded weblogic). But in a 64bit system the only limit is your machine RAM (you can give even 3000MB).
So if you have a 64bit system (and 64bit OS):

Install 64bit jdk

Go to your DefautDomain bin directory
eg. C:\JDeveloper\system11.1.1.4.37.59.23\DefaultDomain\bin
(in the above example the JDeveloper system dir is C:\JDeveloper\system11.1.1.4.37.59.23. More on this check this post )

Open setDomainEnv.cmd and add the following lines: 
set USER_MEM_ARGS=-Xms64m -Xmx3000m -XX:MaxPermSize=512m
set JAVA_64_HOME=C:\Program Files\Java\jdk1.6.0_23
right after the comments in (see my post for more)
Beware: DO not add "" (quotes) to the JAVA_64_HOME because they breaks it. (with set JAVA_64_HOME="C:\Program Files\Java\jdk1.6.0_23" the Weblogic will not start)
Also, add:
if NOT "%JAVA_64_HOME%"=="" (
    echo Setting 64 bits JAVA
    set JAVA_HOME=%JAVA_64_HOME%
)
after the JAVA_VENDOR check
 (see image below)


Start embedded weblogic to see if setting applied successfully.From command line:
From JDeveloper


Notes:
Although setDomainEnv.cmd is the file that sets the environment before running the server, setting JAVA_HOME there you not successful cos it seemed that it was overwritten somewhere in the process before reaching "@REM START WEBLOGIC"


No comments:

Post a Comment

You might also like:

Related Posts Plugin for WordPress, Blogger...
There was an error in this gadget