resourceProperty.add(prop_resourceid);
org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = getTopicSpaceSet();
TopicSpace topicSpace = new TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
Topic manageabilityEndpointCreation = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME, false);
Topic manageabilityEndpointDestruction = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME, false);
XmlBeansAdvertisementTopicImpl manageableResourceCreation = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME);
XmlBeansAdvertisementTopicImpl manageableResourceDestruction = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME);
//todo associate these with all the homes....
InitialContext ctx = new InitialContext();
List homes = findHomes(ctx, new ArrayList(),"");
for (int i = 0; i < homes.size(); i++)
{
String home = (String) homes.get(i);
//do not register its own home
if( ! home.equals(ResourceAdvertiserHome.HOME_LOCATION))
{
AbstractResourceHome absHome = (AbstractResourceHome) ctx.lookup(home);
absHome.addResourceCreationListener(manageableResourceCreation);
absHome.addResourceDestructionListener(manageableResourceDestruction);
}
}
manageabilityEndpointCreation.addTopic(manageableResourceCreation);
manageabilityEndpointDestruction.addTopic(manageableResourceDestruction);
topicSpace.addTopic(manageabilityEndpointCreation);
topicSpace.addTopic(manageabilityEndpointDestruction);
topicSpaceSet.addTopicSpace(topicSpace);
}