By "read only" I assume you mean immutable (aka,
Collections#immutableMap)? If so, sure, that is a decent solution...
On Wed, May 23, 2018 at 7:55 AM Scott Marlow <smarlow(a)redhat.com> wrote:
For the WildFly use of ServiceContributor [1], which registers for
each
SF/EMF, the 2lc RegionFactoryInitiator + JtaPlatform, I am worried that
we don't yet have a "per app deployment" way to disable the WF
ServiceContributorImpl.
I'm thinking that some applications (e.g. Spring) may not want to use
the WF 2lc RegionFactoryInitiator + JtaPlatform classes. To accomadate
that need, I'm thinking of introducing WF configuration properties for
controlling this:
* wildfly.jpa.jtaplatform will default to true but if set to false, [1]
will not call serviceRegistryBuilder.addInitiator(new
WildFlyCustomJtaPlatformInitiator()).
* wildfly.jpa.regionfactory will default to true but if set to false,
[1] will not call serviceRegistryBuilder.addInitiator(new
WildFlyCustomRegionFactoryInitiator()).
My request is that we keep the
StandardServiceRegistryBuilder.getSettings() call and document that in
the future, instead of removing it, we will change it to return a read
only copy of the configuration settings. Then, I can update [1] to
check for these new properties and know that I can depend on using
StandardServiceRegistryBuilder.getSettings().
An alternative could be to add a new method
StandardServiceRegistryBuilder.getReadOnlySettings().
I'd like to make the WF code change now for WF13, so a quick response is
appreciated! :)
Scott
[1]
https://github.com/scottmarlow/wildfly/blob/WFLY-10427/jpa/hibernate5_3/s...
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev