Search the web
Sign In
New User? Sign Up
wlshell
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
patch for wlshell making it to handle mbeans with same name and dif   Message List  
Reply | Forward Message #589 of 675 |
Hi Paco!

My suggestion is to put the next code fragment into the method

wlshell.jmx.weblogic.queryMBeans(String server, String domain, String
type, String name)
(the additive lines are between comments) :

if(result != null && result.size() > 1 && parentValue !=
null)
{
String toMatch = "=" + parentValue;
TreeSet filtered = new TreeSet();
Iterator iter = result.iterator();
do
{
if(!iter.hasNext())
break;
ObjectName objectName = (ObjectName)iter.next();
if(objectName.toString().indexOf(toMatch) != -1)
filtered.add(objectName);
} while(true);
result = filtered;
}

//////// mod by ZsRezsek
if(result != null && result.size() > 1 && parentValue ==
null)
{
String toMatch = "Server=" + parentValue;
TreeSet filtered = new TreeSet();
Iterator iter = result.iterator();
do
{
if(!iter.hasNext())
break;
ObjectName objectName = (ObjectName)iter.next();
if(objectName.toString().indexOf(toMatch) == -1)
filtered.add(objectName);
} while(true);
result = filtered;
}
//////// mod by ZsRezsek

if(type == null)
{
TreeSet filteredResult = new TreeSet();
Iterator iter = result.iterator();
do
{
if(!iter.hasNext())
break;
ObjectName objectName = (ObjectName)iter.next();
String typeValue = objectName.getKeyProperty
("Type");
if(typeValue == null)
filteredResult.add(objectName);
} while(true);
result = filteredResult;
}


If several mbean types have different parent properties then you can
hardwire here with a case statement...

Please send me a compiled patch, because I could not recompile it
because of incorrect decompiling..

Thanx









Fri Sep 23, 2005 9:37 am

ommadawn_1975
Offline Offline
Send Email Send Email

Forward
Message #589 of 675 |
Expand Messages Author Sort by Date

Hi Paco! My suggestion is to put the next code fragment into the method wlshell.jmx.weblogic.queryMBeans(String server, String domain, String type, String...
ommadawn_1975
Offline Send Email
Oct 5, 2005
4:00 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help