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/28 10:57:15 UTC

[jira] Commented: (VYSPER-149) Pubsub Handlers hold state

    [ 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.