You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Bernd Fondermann (JIRA)" <ji...@apache.org> on 2009/07/17 09:48:14 UTC
[jira] Created: (VYSPER-149) Pubsub Handlers hold state
Pubsub Handlers hold state
--------------------------
Key: VYSPER-149
URL: https://issues.apache.org/jira/browse/VYSPER-149
Project: VYSPER
Issue Type: Bug
Components: XEP0060 PubSub
Reporter: Bernd Fondermann
Assignee: Michael Jakl
In r791956, sender and receiver where introduced as fields in AbstractPublishSubscribeIQHandler. Since Handlers must be stateless to work correctly, these fields should be removed
Furthermore, as recommended some time ago, I'd suggest to remove any non-static fields from handlers to prevent side-effects, for example if we cluster handlers in the future or something similar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (VYSPER-149) Pubsub Handlers hold state
Posted by "Michael Jakl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Jakl closed VYSPER-149.
-------------------------------
> Pubsub Handlers hold state
> --------------------------
>
> Key: VYSPER-149
> URL: https://issues.apache.org/jira/browse/VYSPER-149
> Project: VYSPER
> Issue Type: Bug
> Components: XEP0060 PubSub
> Reporter: Bernd Fondermann
> Assignee: Michael Jakl
>
> In r791956, sender and receiver where introduced as fields in AbstractPublishSubscribeIQHandler. Since Handlers must be stateless to work correctly, these fields should be removed
> Furthermore, as recommended some time ago, I'd suggest to remove any non-static fields from handlers to prevent side-effects, for example if we cluster handlers in the future or something similar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VYSPER-149) Pubsub Handlers hold state
Posted by "Michael Jakl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736539#action_12736539 ]
Michael Jakl commented on VYSPER-149:
-------------------------------------
Good point, I'll dig into it.
> Pubsub Handlers hold state
> --------------------------
>
> Key: VYSPER-149
> URL: https://issues.apache.org/jira/browse/VYSPER-149
> Project: VYSPER
> Issue Type: Bug
> Components: XEP0060 PubSub
> Reporter: Bernd Fondermann
> Assignee: Michael Jakl
>
> In r791956, sender and receiver where introduced as fields in AbstractPublishSubscribeIQHandler. Since Handlers must be stateless to work correctly, these fields should be removed
> Furthermore, as recommended some time ago, I'd suggest to remove any non-static fields from handlers to prevent side-effects, for example if we cluster handlers in the future or something similar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VYSPER-149) Pubsub Handlers hold state
Posted by "Bernd Fondermann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735996#action_12735996 ]
Bernd Fondermann commented on VYSPER-149:
-----------------------------------------
I agree that they mustn't be static. In times of unit testing and spring beans, this is better avoided.
The preferred way (in line with the other parts of Vysper) to handle this would be to provide these as services, e.g. implementing ServerRuntimeContextService. The ServerRuntimeContext is the equivalent to the "application" context in a web app. It would improve the reachability of the node tree for server management, too.
> Pubsub Handlers hold state
> --------------------------
>
> Key: VYSPER-149
> URL: https://issues.apache.org/jira/browse/VYSPER-149
> Project: VYSPER
> Issue Type: Bug
> Components: XEP0060 PubSub
> Reporter: Bernd Fondermann
> Assignee: Michael Jakl
>
> In r791956, sender and receiver where introduced as fields in AbstractPublishSubscribeIQHandler. Since Handlers must be stateless to work correctly, these fields should be removed
> Furthermore, as recommended some time ago, I'd suggest to remove any non-static fields from handlers to prevent side-effects, for example if we cluster handlers in the future or something similar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (VYSPER-149) Pubsub Handlers hold state
Posted by "Michael Jakl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Jakl resolved VYSPER-149.
---------------------------------
Resolution: Fixed
Removed the sender and receiver variables. I'm not happy with declaring the other variables (errorStanzaGenerator, root, idGenerator) static, keeping them dynamic is more flexible (for example for defining a handler for a different root).
> Pubsub Handlers hold state
> --------------------------
>
> Key: VYSPER-149
> URL: https://issues.apache.org/jira/browse/VYSPER-149
> Project: VYSPER
> Issue Type: Bug
> Components: XEP0060 PubSub
> Reporter: Bernd Fondermann
> Assignee: Michael Jakl
>
> In r791956, sender and receiver where introduced as fields in AbstractPublishSubscribeIQHandler. Since Handlers must be stateless to work correctly, these fields should be removed
> Furthermore, as recommended some time ago, I'd suggest to remove any non-static fields from handlers to prevent side-effects, for example if we cluster handlers in the future or something similar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.