You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Lenni Kuff (JIRA)" <ji...@apache.org> on 2014/05/20 20:24:39 UTC

[jira] [Created] (SENTRY-219) Sentry Cache Backend Provider initialization does not work as expected

Lenni Kuff created SENTRY-219:
---------------------------------

             Summary: Sentry Cache Backend Provider initialization does not work as expected
                 Key: SENTRY-219
                 URL: https://issues.apache.org/jira/browse/SENTRY-219
             Project: Sentry
          Issue Type: Bug
            Reporter: Lenni Kuff


Currently, the usage is meant to be:
# Create a ProviderBackend
# Create a ProviderBackendContext and call setHandle()
# Call providerBackend.initialize(providerContext);
# Create a SimpleDbPolicyEngine and pass the "initialized()" provider backend.

However, creating a SimpleDbPolicyEngine will creates a new ProviderBackendContext in the ctor and calls ProviderBackend.initialize() effectively wiping out the handle that was set previously. The workaround is to call initialize() on the ProviderBackend again, after creating the policy engine.
Perhaps, initialize() can be a no-op if it has already been called?




--
This message was sent by Atlassian JIRA
(v6.2#6252)