Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.0
-
None
-
None
Description
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?