[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7319) ServiceContributingIntegrator do not have access to the configuration and cannot adjust service registration accordingly

Steve Ebersole (JIRA) noreply at atlassian.com
Mon May 14 11:56:09 EDT 2012


    [ https://hibernate.onjira.com/browse/HHH-7319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46652#comment-46652 ] 

Steve Ebersole commented on HHH-7319:
-------------------------------------

Not really sure what you are saying with your last sentence there...

There really are not complex cases here.  At least that I do not see.  If there, lets document them.  To me, the only real complicated cases are things like validation and envers where the integration maybe be enabled, but we find no specific annotations.  Ideally it would be great to disable the integrations completely in those cases.  However something you have to watch out for is thinking that you can dynamically change services after the registry is built.  My initial proxy-based approach was developed exactly for this case of allowing dynamic remapping of the role (interface) to service instance.  But that introduced quite a bit of concurrent contention so we ripped that out.  The end game being that once services are defined, they are set.

My concern is specifically having multiple implicit notions of whether the integrator is enabled/disabled.  So in {{OgmIntegrator}} you'd have 3 such implicit enabled/disabled checks: once for integrate, once for disintegrate, and once for prepareServices.  So how does the Integrator implementation keep enabled/disabled consistent across all 3 of those calls?

> ServiceContributingIntegrator do not have access to the configuration and cannot adjust service registration accordingly
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-7319
>                 URL: https://hibernate.onjira.com/browse/HHH-7319
>             Project: Hibernate ORM
>          Issue Type: Improvement
>            Reporter: Emmanuel Bernard
>
> In Hibernate OGM, I don't want to set my custom service initiators unless I know it is explicitly being used.
> I cannot do that today because ServiceContributingIntegrator does not have access to the configuration. 
> I had to write all my service initiators so that they look at the configuration and delegate to the "default" service initiator. That's a lot of redundant code. I wonder if we can do better.
> See https://github.com/hibernate/hibernate-ogm/blob/master/hibernate-ogm-core/src/main/java/org/hibernate/ogm/service/impl/OgmIntegrator.java

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list