I'm not entirely sure of what you are asking.. But I can say as much as MBeans in weblogic that contain RuntimeMBean in their ObjectNames are generated by the weblogic server. Many of them are generated on the basis of what you deploy.
Sp just gto clarify:
Do you want to deploy an .ear/.war./.jar file in weblogic via some MBean trick? (I don't know how to do this if it is even possible)
Or do you want to deploy your own home-grown MBeans on a weblogic server?
Or something entirely else?
Regards,
Eske
Hii,
actually i making general console so which will be used to monitor different application server like jboss or weblogic.
from my general console i shud be able to deploy or undeploy application on application server and for that i need to know which Mbean is used for deployment so i can invoke operations on that specific Mbean.
and another thing is also there...how to invoke operations with parameters? can u give example? if u know?
Hi,
To invoke an operation with parameters on an MBean, using an
MBeanServerConnection (or an MBeanServer):
Assuming your MBean has a method
public int foo(MyClass something, boolean flag, long[] longTab);
then you would invoke it like that (syntax for Java 5.0 or higher):
MBeanServerConnection server = ....;
ObjectName mbeanName = ....;
Object result = server.invoke(
mbeanName,// MBean name
"foo",// method name
new Object[] { // params
new MyClass(),
true,
new long[] {0, 100, 1000}
},
new String[] { // signature
MyClass.class.getName(),
boolean.class.getName(),
long[].class.getName()
});
Be careful with the signature:
boolean.class.getName() is not the same than Boolean.class.getName() !
long[].class.getName() is not the same than Long[].class.getName() !
You have to use the exact class that appears in the method declaration!
Hope this helps,
-- daniel
JMX, SNMP, Java, etc...
http://blogs.sun.com/jmxetc/
I think this might be different on weblogic 8.1 and 9.x/10.x.
My guess is (but I don't know for sure) that there is a deployer MBean on the weblogic admin server that is used to do the deployments. I suggest you use an MBean console such as MC4J to browse the MBeans in the weblogic admin server. Mot likely you'll stumble across an MBean woth an object name that has to do with deployments.
I think you can safely ignore the RuntimeMBeans as they are only for runtime representations of configuration.
Happey hunting! :-)
Eske
hello,
I want the specific mbean name required to deploy the applications on weblogic.
in earlier version of weblogic DeployerRuntimeMBean was used but in latest version it is deprecated. and i need to know that specific mbean name urgently.
all mbeans are listed in the below link but which mbean is used that i cannot identify.
and suppose i want to invoke any operation with parameters on mbeans already exist on weblogic like getURL() method of serverRuntimes Mbean the how to do it?(Give me the code if possible)
http://edocs.bea.com/wls/docs92/wlsmbeanref/core/index.html