Date Created: Tue 21-Dec-2010

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


    How to create JVM parameters for a WebSphere Application Server.

    In this case I am using WebSphere 8 for Windows and I want to create a snippet of Jython to add JVM properties as required by my EAR file. To test functionality I created this snippet to test the Jython, which was then added to my main deployment script.

    Path used to call wsadmin.bat with my jvm.py script as a command line argument

    C:\IBM\WebSphere\AppServer\bin>wsadmin -f c:\temp\wasscripts\jvm.py

    Contents of jvm.py ...

    server = AdminConfig.getid('/Server:server1/')
    print server
    jvm = AdminConfig.list('JavaVirtualMachine',server)
    print jvm
    attr = []
    attr.append([['name','profiles.root'],['value','C:/IBM/WebSphere/AppServer/profiles']])
    attr.append([['name','log.folder'],['value','logs']])
    print attr
    AdminConfig.modify(jvm,[['systemProperties',[]]])
    AdminConfig.modify(jvm,[['systemProperties',attr]])
    AdminConfig.save()

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories