hibernate/hibernate-search — pull request #483 by gunnarmorling (2013-09-16 17:46:12+00:00)
Title: ### PREVIEW ### HSEARCH-1396 Enhancing configuration API to pass class bridge instances

This is the PR for adding support for passing class bridge instances to the config API to be used by ISPN. I'm not yet completely done but would be very glad to get some early feedback on the overall direction.

Basically `EntityDescriptor` now also maintains a collection of CB _instances_, and `AnnotationMetadataProvider` uses these existing instances if present instead of instantiating the impl class. Analyzer, parameter configuration etc. is handled as it was before for the type based configuration of bridges. The CB configuration is represented by `@ClassBridge` instances (proxies) to re-use existing logic where feasible. The instances are passed to to `AnnotationMetadataProvider` via `ConfigContext`, I hope that's the right place.

Let me know what you think, I'll then hopefully be able to finalize the PR tomorrow. I've marked the new API methods as "experimental" for the time being.

@anistor Feel free to have a look or give it a try as well and let me know whether it does the right thing for you.