<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WebSphere Administration: Finding Cluster Members</title>
	<atom:link href="http://myarch.com/finding-cluster-members/feed" rel="self" type="application/rss+xml" />
	<link>http://myarch.com/finding-cluster-members</link>
	<description>Builds and bytes</description>
	<lastBuildDate>Sat, 28 Jan 2012 19:37:55 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bob Gibson</title>
		<link>http://myarch.com/finding-cluster-members/comment-page-1#comment-35099</link>
		<dc:creator>Bob Gibson</dc:creator>
		<pubDate>Wed, 18 Nov 2009 17:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://myarch.com/?p=225#comment-35099</guid>
		<description>Your call to AdminConfig.getid() is not well formed.  You are missing the trailing/closing &#039;/&#039;.  That is why I much prefer to use string formatting to build the string to be passed to the WSAS scripting API.  For example:

cluster_conf_id = AdminConfig.getid(&quot;/ServerCluster:%s/&quot; % cluster_name )

Be careful though, if the user happens to pass an empty string as the cluster name, e.g.,

wsadmin -scriptName clusterInfo.py &quot;&quot;

Then the call will be:


cluster_conf_id = AdminConfig.getid(&quot;/ServerCluster:/&quot;  )

which could result in a multi-line respose.

Next, you should be aware that splitting configuration IDs using whitespace, i.e.,

member_conf_ids.split()

will only work if none of the configuration IDs contain an embedded space.

This is &quot;legal&quot; as far as the WebSphere Application Server product is concerned.  We can leave the discussion about whether this is, or is not a best/bad practice to some other time.

I just wanted to bring it to your attention, since I have been bitten by this little &quot;feature&quot;... ;-)

Let me know if you want to see the code I use to handle this little feature.</description>
		<content:encoded><![CDATA[<p>Your call to AdminConfig.getid() is not well formed.  You are missing the trailing/closing &#8216;/&#8217;.  That is why I much prefer to use string formatting to build the string to be passed to the WSAS scripting API.  For example:</p>
<p>cluster_conf_id = AdminConfig.getid(&#8221;/ServerCluster:%s/&#8221; % cluster_name )</p>
<p>Be careful though, if the user happens to pass an empty string as the cluster name, e.g.,</p>
<p>wsadmin -scriptName clusterInfo.py &#8220;&#8221;</p>
<p>Then the call will be:</p>
<p>cluster_conf_id = AdminConfig.getid(&#8221;/ServerCluster:/&#8221;  )</p>
<p>which could result in a multi-line respose.</p>
<p>Next, you should be aware that splitting configuration IDs using whitespace, i.e.,</p>
<p>member_conf_ids.split()</p>
<p>will only work if none of the configuration IDs contain an embedded space.</p>
<p>This is &#8220;legal&#8221; as far as the WebSphere Application Server product is concerned.  We can leave the discussion about whether this is, or is not a best/bad practice to some other time.</p>
<p>I just wanted to bring it to your attention, since I have been bitten by this little &#8220;feature&#8221;&#8230; ;-)</p>
<p>Let me know if you want to see the code I use to handle this little feature.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

