How to set "jvm option" or "system properties" in GlassFish or Sun Java System Application Server?


  You could either use asadmin command "create-jvm-option" or "create-system-properties" .

For example:

    i) If you want to set environment variables "ORACLE_HOME=/export/oracle" for the appserver instance to refer. In appserver, it would use "create-system-properties" command..

        Sample syntax for the command to add system property:
        /opt/SUNWappserver/appserver/bin/asadmin create-system-properties --user admin --passwordfile /tmp/adminpasswordfile --host localhost --port 4849 --target your_server ORACLE_HOME=/export/oracle

    ii) If you want to set JVM option.

        Sample syntax for the command to add jvm option:
        /opt/SUNWappserver/appserver/bin/asadmin create-jvm-options --user admin --passwordfile /tmp/adminpasswordfile --host localhost --port 4849 --target your-server \\\\-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"

a) create-jvm-option sets the variable for the jvm.   User would use this command to change the heap size, profiler and other VM related options see: http://java.sun.com/docs/hotspot/VMOptions.html

b) create-system-properties sets the <system-property> element in the domain.xml.  The variable is also set in the vm but at a lower priority.   User can also set this to overwrite default values set in the config or domain level.


If you need more detail on the variable on Glassfish or Application Server please see the following URL:
http://docs.sun.com/app/docs/doc/819-2557/6n4rbnpba?a=view#abhau  for a more detailed descriptions between jvm-option and system-properties.
Comments:

Post a Comment:
Comments are closed for this entry.
About

Some information, writeup and thoughts about Java, JavaEE JavaSE, GlassFish, Open Source, Exalogic, Xen, xen hypervisor, Cloud, Elastic, OVM , OEL, OVS, Virtualization, Platform as a service (PaaS), Infrastructure as a service (IaaS), Software as a Service (SaaS), Cloud Applications, Cloud computing, and even free software .....

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today