Saturday, January 7, 2012

Fix for bug in method createUsingTemplate()


Here is a fix for a recently-discovered problem which has been hiding in wsadminlib for a long time.

Method createUsingTemplate() calls helper method _create() and passes-in a template.  When the template parameter is non-null, _create() calls AdminConfig.create() with the additional template parameter.  This doesn't work.  It should be calling AdminConfig.createUsingTemplate().

To fix it, edit your copy of wsadminlib, go to helper method _create() and find the section 'if template' (around line 8676, depending on your version).  Change AdminConfig.create() to AdminConfig.createUsingTemplate().  It should look like this:

        if template:
            sop(m, 'AdminConfig.create(%s, %s, %s, %s)' % (repr(type), repr(parent), repr(attrs), repr(template)))
            object=AdminConfig.createUsingTemplate(type, parent, attrs, template)

Many thanks to Yun-Shian Jiang in Canada who reported the problem, debugged it, and suggested the correct fix.

Monday, June 27, 2011

Saving large EAR files

Things have been quiet here at 'wsadminlib central' lately, since many contributors have been focused on getting WAS V8 out the door.  Now that WAS V8 has shipped, here is a brief update...

Frequent wsadminlib contributor Chris in Australia reported a problem saving a large EAR file, on the order of 300 Mb.  He had trouble starting the application immediately after doing a save and sync.  He also observed that the file system was still growing for a short time after the sync.

Now I always thought that an application was fully deployed and ready to start when wsadminlib's method saveAndSync() returned, but not true...

Sunday, June 26, 2011

WAS V8 and wsadminlib.py

The IBM WebSphere Application Server version 8.0 was released a few weeks ago, and wsadminlib helped deliver it.  Wsadminlib was used internally within IBM as part of many automated testcases.  This included the original prototypes, all the betas, and the final verifications.

So as you move forward migrating from prior versions of WAS to V8, you may continue using wsadminlib knowing it performed yeoman's service throughout the latest release's development and delivery.

Monday, April 18, 2011

How to enable memory-to-memory session replication for an existing server?

I received this interesting question last week from a wsadminlib user in Chicago.   Wsadminlib.py contains two methods which make the task easy:  createReplicationDomain() and setServerSessionReplication().

First, I connected my wsadmin client to the deployment manager and execfile'd wsadminlib.py:

root@ding6:/home/ding/tmp# /opt/WAS70/profiles/v7default/bin/wsadmin.sh -lang jython -host zwasxxxx.raleigh.ibm.com -port 8879 -user xxxxxx -password xxxxxx
WASX7209I: Connected to process "dmgr" on node WAS00Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7031I: For help, enter: "print Help.help()"
wsadmin>
wsadmin>execfile('wsadminlib.py')
$Id: wsadminlib.py 104 2010-02-15 19:06:18Z ding $
wsadmin>