-
1. Re: Custon MBean
twutort Jun 24, 2003 1:46 PM (in response to twutort)I figured this out but now I get an error when I try to add a custom attribute:
No Attribute found with name: test
Any ideas? -
2. Re: Custon MBean
shushu Jun 29, 2003 9:30 AM (in response to twutort)I have the same problem, how did u figured it out?
-
3. Re: Custon MBean
jonlee Jun 29, 2003 9:44 PM (in response to twutort)You should probably not use the JBoss configuration file for your custom MBeans, at least not in development. If you have a 3.x.x release, look at server/default/deploy/user-service.xml. It shows how to configure your custom MBean. Just name your MBean service configuration file *-service.xml and drop it in your deploy directory, and your MBean will register itself. This doesn't solve your problem but will make your life easier during development - we leave our MBeans configuration files in the deploy directory.
Now to your specific problem. Have you defined the attribute in your interface and the setter and getter in your implementation?
For example,
FilterPool
requires that your interface has this:
public interface ObjectPoolLoaderMBean extends ServiceMBean
{
public void setPoolName(String name);
public String getPoolName();
...
and your MBean implementation contains this:
public class ObjectPoolLoader extends ServiceMBeanSupport implements ObjectPoolLoaderMBean, ObjectFactory
{
private String poolName;
...
public void setPoolName(String poolName)
{
this.poolName = poolName.trim();
}
public String getPoolName()
{
return poolName;
}
This is case sensitive. So your MBean would need settest defined in the interface and implemented. This is most likely your issue. I believe TheServerSide has a good MBean tutorial.
Hope that helps. -
4. Re: Custon MBean
jonlee Jun 29, 2003 10:19 PM (in response to twutort)I forgot, my bad - for you to dynamically deploy this, your classes must be in a SAR so you must use a META-INF/jboss-service.xml. However, it does make things easier during development rather than stopping and starting JBoss all the time - which does get tedious.
-
5. Re: Custon MBean
shushu Jun 30, 2003 2:55 AM (in response to twutort)I built all in one sar file.
The attribute is defined in the implementation and has getter and setter, and has getter and setter in the interface.
Why do I get the no attribute error