[
https://issues.apache.org/jira/browse/SHINDIG-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605334#action_12605334
]
Kevin Brown commented on SHINDIG-385:
-------------------------------------
Yep -- it looks like http://svn.apache.org/viewvc?view=rev&revision=655969
never marked these as singletons, which means there are multiple places where
they're being fetched.
To remedy this, I'll add @Singleton annotations to everything that should be a
singleton by default. This way if someone ever wants something that we
recommend being a singleton to *not* be one in their own bindings, they'll have
to do so explicitly.
> MessageBundle-Caching doesn't work in GadgetRenderingTask
> ---------------------------------------------------------
>
> Key: SHINDIG-385
> URL: https://issues.apache.org/jira/browse/SHINDIG-385
> Project: Shindig
> Issue Type: Bug
> Components: Gadget Rendering Server (Java)
> Environment: every
> Reporter: christof kaleschke
>
> As the BasicMessageBundleFactory is not configured to be a singleton in the
> DefaultGuiceModule, every GadgetRenderingTask (returned by the provider in
> the GadgetRenderingServlet) gets a new instance of an
> BasicMessageBundleFactory. That means that when the
> GadgetRenderingTask.outputHtmlGadget() method calls
> messageBundleFactory.getBundle() the MessageBundle-Cache of this
> messageBundleFactory instance is always empty and the message bundle is
> fetched via a HTTP request.
> As far as I can see the BasicMessageBundleFactory (and the BasicHttpFetcher)
> is multithreadable. So would it be a solution to configure
> BasicMessageBundleFactory as a singleton in DefaultGuiceModule?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.