notification:can not work!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   wu_qihua
Posted On:   Wednesday, August 21, 2002 04:38 AM

the registered bean created in the program can work well.when I change its property,the notification is sent.But when I use the admin command in the agent view to create a second MBean(I do not know how to describe it indepth,sorry),I means I set the key and class value in the admin page to create another MBean,for example ,set the context of key "HelloAgent:name=helloWorld2",then I change the propery of helloWorld2,and the notification does not work,although the helloWorld1 work well.But they both come from the same class,why this happen? HelloWorld hw = new HelloWorld(); ObjectName adapterName = null; ObjectName h   More>>
			
the registered bean created in the program can work
well.when I change its property,the notification is
sent.But when I use the admin command in the agent view to
create a second MBean(I do not know how to describe it
indepth,sorry),I means I set the key and class value in
the admin page to create another MBean,for example ,set the
context of key "HelloAgent:name=helloWorld2",then I change
the propery of helloWorld2,and the notification does not
work,although the helloWorld1 work well.But they both come
from the same class,why this happen?



			
HelloWorld hw = new HelloWorld();

ObjectName adapterName = null;
ObjectName helloWorldName = null;

try
{
adapterName = new ObjectName(
"HelloAgent:name=htmladapter,port=9092" );
mbs.registerMBean( adapter, adapterName );
adapter.start();

helloWorldName = new ObjectName(
"HelloAgent:name=helloWorld1" );
mbs.registerMBean( hw, helloWorldName );

hw.addNotificationListener( this, null, null );
}



   <<Less

Re: notification:can not work!

Posted By:   Juha_Lindfors  
Posted On:   Thursday, August 22, 2002 03:22 PM

Did you also add a notification listener to the HelloWorld2 that you created through the admin interface?


-- Juha

About | Sitemap | Contact