You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Lenni Madsen (JIRA)" <ji...@apache.org> on 2007/01/11 17:08:27 UTC
[jira] Created: (MUSE-178) dynamic wsresource creation and
destruction
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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org
[jira] Closed: (MUSE-178) dynamic wsresource creation and
destruction
Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MUSE-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Jemiolo closed MUSE-178.
----------------------------
Resolution: Fixed
Fix Version/s: 2.2.0
Fixed - the bug was related to where we mark the resource as "scheduled for destruction" so that code outside the capbility shutdown methods (like listener objects) know that a resource is being destroyed and drop references to it at the appropriate time. By setting this bit before capability shutdown methods are invoked, the problem is solved. This does not affect code in capability shutdown methods today because that code does not have the problem of knowing where in the shutdown cycle a resource is.
Fix will appear in tonight's build (you can get it on the Muse web site anytime after 3am Eastern US).
> 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
> Fix For: 2.2.0
>
>
> 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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org