Fixed
Details
Assignee
Gunnar MorlingGunnar MorlingReporter
Adrian NistorAdrian NistorLabels
Components
Fix versions
Priority
Blocker
Details
Details
Assignee
Gunnar Morling
Gunnar MorlingReporter
Adrian Nistor
Adrian NistorLabels
Components
Fix versions
Priority
Created August 30, 2013 at 10:13 AM
Updated September 18, 2013 at 8:05 PM
Resolved September 18, 2013 at 6:34 PM
A FieldBridge is currently specified by Class and HSearch controls the creation of FieldBridge instances. There is no way for the user to provide the actual instance and this creates problems when the field bridge needs to acquire non-String configuration objects or other heavy resources/services.
In infinispan we have a use-case where a custom FieldBridge needs access to a protobuf marshalling metadata registry, which is basically an infinsipan Cache. We cannot inject this into the FielBridge, so we resorted to a temporary hack that involves a static field (the distasteful static singleton pattern).
Here is a conversation on #infinispan-dev with Emmanuel which sheds some light on the potential solution: