I'd like to eliminate the singletons in Neethi. With CXF, our general use case is each application can have it's own set of policies and builders and such. The singleton pattern Neethi uses makes that impossible.
The main issue is the PolicyEngine itself. All methods on it are static. I'd like to make them regular methods. An instance will be required. A default instance will behave like the current behavior (grab the builders from META-INF/services, etc..) but would allow custom configuration and such. The major effect is that instead of calling: PolicyEngine.getPolicy(...) will need to be rewritten as: new PolicyEngine().getPolicy(...) We could also add a default instance and could do: PolicyEngine.getInstance().getPolicy(...) to avoid the construction overheads. Thoughts? -- Daniel Kulp [email protected] http://dankulp.com/blog --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
