|
Home > Archive > WebSphere Application Server > July 2007 > StringNameSpaceBinding with JMX ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
StringNameSpaceBinding with JMX ?
|
|
|
| Hello,
Is there any way to create / modify / remove a String Name Space Binding ?
I saw that is it possible with Jacl and Jython but I would like to do it from a Java application.
With a little bit of imagination (and by looking at http://publib.boulder.ibm.com/infoc...acebinding.html), I've found out how to get all the String Name Space Bindings
but i can't found a way to add a new one.
// Code used to get all the String Name Space Bindings
ObjectName node1 = ConfigServiceHelper.createObjectName(null, "StringNameSpaceBinding", null);
ObjectName[] matches = configService.queryConfigObjects(session, null, node1, null);
for (int i=0; i<matches.length; i++) {
System.out.println(matches[i].toString());
}
I've tried many times configService.createConfigData() and configService.addElement but it always throws a NullPointerException.
Can anybody help me ?
Thanks a lot,
Ludovic.
| |
|
| Hello,
Is there no answer to my question or I didn't explain it correctly ?
Thanks,
Ludovic.
| |
| Ken Hygh 2007-07-24, 7:21 am |
| ludovic.cabre@infotel.com wrote:
> Hello,
>
> Is there no answer to my question or I didn't explain it correctly ?
>
> Thanks,
> Ludovic.
Generally speaking, the people here will respond if they have an idea
what the answer might be. I certainly don't.
Ken
| |
| Yuriy Petrov 2007-07-24, 1:26 pm |
| ludovic.cabre@infotel.com wrote:
> Hello,
>
> Is there any way to create / modify / remove a String Name Space Binding ?
> I saw that is it possible with Jacl and Jython but I would like to do it from a Java application.
The basic idea is: to do something, Jacl/Jython wsadmin's scripts do use the same MBeans and methods
of these mbeans that you would use in Java. So if you know how to do something with Jacl/Jython, it
shouldn't be a problem to "convert" Jacl/Jython to Java.
Right now I don't have a time to dig in the docs for this particular task, but if you post (a) the
script that does what you need and (b) the Java code that throws NPE, it should be easier to [try
to] find how to update your Java. Though please - no kilo-/megabytes of code 
|
|
|
|
|