[hibernate-dev] [OGM] GridDialect facets

Emmanuel Bernard emmanuel at hibernate.org
Fri Jul 24 03:56:24 EDT 2015


I have been adding a facet to GridDialect and found it surprisingly hard:

* I was not sure which non datastore dialects was supposed to implement the facet nor really how to find these non datastore dialects. I am talking about GridDialectLogger, ForwardingGridDialect and InvokedOperationsLoggingDialect. I am sure there are more of these non datastore dialects but I haven’t found them.
* Adding one method, to a facet means having to go to a lot of places to write all these logging and delegating logics. Changing a method sig a least gives you the help of the compiler but not for adding them.
* Find how consumers of the facet are supposed to use them was not obvious to me. It seems a given consumer stores all the possible facets as class field and do a null check before using them.
* when I finally ran my tests everything exploded because each facet must have a MyFacetInitiator
* when I added the initiator, it still blew up at my face because each Initiator must be listed in the OgmIntegrator
* I’m also concerned about facet discoverability, I don’t think it’s trivial for a dialect implementor to get the list of facets easily, which will tend to bring minimal dialects without the advanced features.

I wonder if and / or how we should improve that state of affairs.

Emmanuel


More information about the hibernate-dev mailing list