Could you be a little more careful (or just buy some JBoss support)? Your
configuration file tries to load mx4j classes. If you comment that out, it
works.
| Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
mx4j.too
| ls.adaptor.http.HttpAdaptor
| at
Thanks a lot!
The above MX4J stuff got in by accident, but the bigger issue was that I left a
older sar under /lib
so, I kept trying and trying not realizing that JBoss
was actually running my older code!
I appreciate your help
Thanks,
-Vitaly
View the original post :
The example code I showed you, works for at least one component I know. From
which line exactly the exception comes from? (fromName(), newInstance()?)
Try calling the default CTOR.
Also from the 3 methods getXXX() it seems as if you try to replicate the same
running MBean, e.g. getObjectName()
Dimitris,
I sent you my sources, see if something jumps out
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=3855495#3855495
Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855495
1. JBoss loads us PSJmxJBossService
that one creates another MBean
PSJmxConfigurationLoader
2. PSJmxConfigurationLoader fetches my xml
file with all the beans definitions in it and
uses PSJmxDefaultConfigurationBuilder
to load all those beans up
3. The PSJmxDefaultConfigurationBuilder
has
You need to use the classloader that loaded the 1st MBean, e.g:
| Object mybean = Class.forName(com.percussion.jmx.test.SimpleListener,
true, this.getClass().getClassLoader()).newInstance();
|
| server.registerMBean(mybean, mydomain:name=myname);
|
There is also the createMBean()
Wonder if this will work too?
trying it now..
ClassLoader cl = this.getClass().getClassLoader();
obj = server.createMBean(className,
getObjectName(),
cl,
getMethodArguments(this, server),
oops, it actually expects ObjectName loaderName
how do I get ObjectName of the loader?
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=3855435#3855435
Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855435
So, I ended up with this code:
The trouble is it not working just like before - ClassNotFoundException :(
eflectionException: Class not found: com.percussion.jmx.test.SimpleListener
Cause: java.lang.ClassNotFoundException: com.percussion.jmx.test.SimpleListener
ClassLoader cl =
out of curiocity, what are those:
getMethodSignature(this)
getMethodArguments(this, server)
getObjectName()
Isn't you 1st mbean loaded using a -service.xml or .sar archive?
What is the use case you are trying to implement?
View the original post :
Hi !
those are my methods :) (derived from MX4J) one gets signature Class[]
another actual values and getObject gives ObjectName instance
The use case is like this:
1. I want to be able to load the same JMX beans on JBoss, Bea, etc.
2. To do the above I defined my own xml config file (enhaced MX4J
11 matches
Mail list logo