dynamic wsresource creation and destruction -------------------------------------------
Key: MUSE-178 URL: https://issues.apache.org/jira/browse/MUSE-178 Project: Muse Issue Type: Bug Components: Core Engine - Resource and Capability APIs Affects Versions: 2.0.0 Environment: Windows XP Pro (SP2) Eclipse 3.2 Tomcat 5.0.30 Java SDK 1.5_07 Reporter: Lenni Madsen Assigned To: Dan Jemiolo We're currently trying out the muse frameworks ability to create and destroy WDSM enabled WsResources, but we seem to have run into a slight problem with the correct way to destroy these resources. A fast overview goes as follows: 1) We've a factory to create resources on the fly. 2) We change a couple of the values held by the resource (to get the on-change WS-N sent out) 3) Next we attempt to clean up, by destroying the WsResources 4) We run the whole thing again from 1) without restarting the Tomcat server Notes regarding software usage: MUSE 2.0.0 Java SDK 1.5_07 Axis 2.0 The printout from the shutdown (destruction) process is: 11-Jan-2007 14:21:27 org.apache.muse.core.SimpleResource shutdown INFO: [ID = 'ResourceDestroyed'] The resource at 'WsResource' has been destroyed. Though it seems as if, even though the prepareShutdown() function has been overridden, that our override doesn't run. ** overridden initializeComplete() public void initializeCompleted() throws SoapFault { super.initializeCompleted(); publishMessage("we have been created"); } ** overridden prepareShutdown() public void prepareShutdown() throws SoapFault { super.prepareShutdown(); getLog().info("calling shutdown"); } Our problem is that upon the 2nd run of the process (without shutting down the server) we get the following error message from the SimpleAdvertisement: INFO: [ID = 'ResourceInitialized'] The resource at 'SubscriptionManager' has been initialized. java.lang.NullPointerException at org.apache.muse.ws.dm.muws.adv.impl.SimpleAdvertisement.isAdvertised(SimpleAdvertisement.java:32) at org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement.resourceAdded(AbstractAdvertisement.java:96) at org.apache.muse.core.SimpleResourceManager.addResource(SimpleResourceManager.java:108) at org.apache.muse.ws.notification.impl.SimpleNotificationProducer.subscribe(SimpleNotificationProducer.java:575) at org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement.subscribeInitialConsumer(AbstractAdvertisement.java:175) ... and a lot more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]