Hi Guys,

I have written a general non-JBoss-specific MBean along the lines of Scott's 
HOWTO document with JBoss providing a development and testing environment for 
my activities. Having had some difficulty "deploying" my MBean I have reverted 
to the original example in the HOWTO as shown in figure 11.8.

I cut and pasted these files into java files, creating a package "mbeantest", 
and put the JAR into lib/ext. I had to remove the "log" object method calls as 
it was not found and I was just trying to replicate my error using a well 
known test case.

The jcml file update was exactly as provided in the HOWTO (at the bottom) with 
a change to prefix JNDIMap with "mbeantest." for the code (xml) attribute.

Running this program using jboss 2.2.1 I get:

...
[Service Control] Registered with server
java.lang.IllegalArgumentException: No object name specified
        at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.j
ava:528)
        at javax.management.loading.MLet.getMBeansFromURL(MLet.java:523)
        at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
        at org.jboss.Main.<init>(Main.java:173)
        at org.jboss.Main$1.run(Main.java:107)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.Main.main(Main.java:103)
[Service Control] Initializing 11 MBeans
...

As I couldn't find any jboss-user list entries or information on this kind of 
error, I thought I would search for a commentary, suggestions and/or otherwise 
as to the cause. Not being (what I would call) a Java or J2EE expert, I have 
spent much time on this. Have I made an error in my approach? Is more 
information required?

As a guess, I have noted that the other technique (figure 11.9) does override 
getName(). Are there further interface methods (possibly not defined in an 
actual interface) that should be applied to ensure jboss compatibility for a 
non-jboss-specific mbean?

I have another question in regard to the callback order for the defined 
methods, given that I believe that setJndiName() must be called before start() 
as there is no default JNDI name.

Kind Regards,

Matt


-- 
Matt Davies [mailto:[EMAIL PROTECTED]]
Research Scientist, DSTC [http://www.dstc.edu.au/]



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to