Re: [hibernate-dev] Is there a way to have ServiceContributor per SessionFactory/EMF instead of per application classloader?

2018-09-19 Thread Gunnar Morling
Would SessionFactoryServiceContributor [1] be of use to you? It lets you
add services to the SF-scoped service registry; not sure whether that suits
your requirements or no.

--Gunnar

[1]
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/service/spi/SessionFactoryServiceContributor.java

Am Di., 18. Sep. 2018 um 21:00 Uhr schrieb Scott Marlow :
>
>
> On 9/14/18 6:14 PM, Steve Ebersole wrote:
> > Doing so would require a programatic call while bootstrapping
> > Hibernate.  The ServiceContributors are applied during
> > `org.hibernate.boot.registry.StandardServiceRegistryBuilder#build`
> > processing.  So we'd need a call to register a ServiceContributor with
> > the StandardServiceRegistryBuilder.
> >
> > Of course that also means you'd have to have access to the
> > StandardServiceRegistryBuilder
>
> I don't have a way to add a programatic call while bootstrapping "not
> JPA container".
>
> >
> > On Fri, Sep 14, 2018 at 9:27 PM Scott Marlow  > > wrote:
> >
> > I'm deploying an application with two persistence units however, the
> > ServiceContributor contribute(StandardServiceRegistryBuilder) [1] is
> > only being called once, instead of per SessionFactory/EMF (or so it
> > seems).
> >
> > Is there a way to have the
> > contribute(StandardServiceRegistryBuilder) be
> > called per SessionFactory/EMF instead?
> >
> > Scott
> >
> > [1]
> >
https://github.com/wildfly/wildfly/blob/master/jpa/hibernate5_3/src/main/java/org/jboss/as/jpa/hibernate5/service/ServiceContributorImpl.java#L28
> > ___
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org 
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Is there a way to have ServiceContributor per SessionFactory/EMF instead of per application classloader?

2018-09-19 Thread Scott Marlow


On 9/19/18 5:41 AM, Gunnar Morling wrote:
> Would SessionFactoryServiceContributor [1] be of use to you? It lets you 
> add services to the SF-scoped service registry; not sure whether that 
> suits your requirements or no.

Thanks, I will give that a try.  We currently use RegionFactoryInitiator 
and update the configuration settings passed via 
RegionFactoryInitiator#resolveRegionFactory(Map configurationValues, 
ServiceRegistryImplementor).  I wonder if that is possible with 
SessionFactoryServiceContributor?

> 
> --Gunnar
> 
> [1] 
> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/service/spi/SessionFactoryServiceContributor.java
> 
> Am Di., 18. Sep. 2018 um 21:00 Uhr schrieb Scott Marlow 
> mailto:smar...@redhat.com>>:
>  >
>  >
>  > On 9/14/18 6:14 PM, Steve Ebersole wrote:
>  > > Doing so would require a programatic call while bootstrapping
>  > > Hibernate.  The ServiceContributors are applied during
>  > > `org.hibernate.boot.registry.StandardServiceRegistryBuilder#build`
>  > > processing.  So we'd need a call to register a ServiceContributor with
>  > > the StandardServiceRegistryBuilder.
>  > >
>  > > Of course that also means you'd have to have access to the
>  > > StandardServiceRegistryBuilder
>  >
>  > I don't have a way to add a programatic call while bootstrapping "not
>  > JPA container".
>  >
>  > >
>  > > On Fri, Sep 14, 2018 at 9:27 PM Scott Marlow  
>  > > >> wrote:
>  > >
>  > >     I'm deploying an application with two persistence units 
> however, the
>  > >     ServiceContributor contribute(StandardServiceRegistryBuilder) 
> [1] is
>  > >     only being called once, instead of per SessionFactory/EMF (or so it
>  > >     seems).
>  > >
>  > >     Is there a way to have the
>  > >     contribute(StandardServiceRegistryBuilder) be
>  > >     called per SessionFactory/EMF instead?
>  > >
>  > >     Scott
>  > >
>  > >     [1]
>  > > 
> https://github.com/wildfly/wildfly/blob/master/jpa/hibernate5_3/src/main/java/org/jboss/as/jpa/hibernate5/service/ServiceContributorImpl.java#L28
>  > >     ___
>  > >     hibernate-dev mailing list
>  > > hibernate-dev@lists.jboss.org 
>  
>  >
>  > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>  > >
>  > ___
>  > hibernate-dev mailing list
>  > hibernate-dev@lists.jboss.org 
>  > https://lists.jboss.org/mailman/listinfo/hibernate-dev
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] Loggers

2018-09-19 Thread Steve Ebersole
Yes.  As I mentioned in my original, this would mean potential changes for
people configuring logging.  I've started doing this for new logging in 6
and it works great.

Mainly asking opinions about changing existing logging and whether the
benefits are worth the effort.

And keep in mind that the many many changes in 6 already would require such
logging config changes anyway for those configuring logging


On Wed, Sep 19, 2018, 12:50 AM Vlad Mihalcea 
wrote:

> I think it's a good idea.
>
> However, will this break all current applications that use the package
> name log appenders?
>
> Vlad
>
> On Fri, Sep 14, 2018 at 7:20 PM, Steve Ebersole 
> wrote:
>
>> Yes, I know no one likes talking about logging.  "Its not important",
>> until
>> it is ;)
>>
>> TLDR I am considering moving to using "module names" for logger names
>> instead of Class names even for DEBUG/TRACE logging and see if anyone had
>> strong arguments to not do this..
>>
>> Full version---
>>
>> For some time I have been moving to an approach of defining message
>> loggers[1] using a single contract per function or "module" - e.g.:
>>
>>1. the second level caching module uses the dedicated message logger
>>`ConnectionPoolingLogger`
>>2. the ManagedBeanRegistry module uses the dedicated message logger
>>`BeansMessageLogger`
>>3. etc
>
>
>>
>> Each of these define a dedicate instance instance they can use.  E.g.
>> ConnectionPoolingLogger is defined as:
>>
>> 
>> @MessageLogger( projectCode = "HHH" )
>> @ValidIdRange( min = 10001001, max = 10001500 )
>> public interface ConnectionPoolingLogger extends BasicLogger {
>>
>> ConnectionPoolingLogger CONNECTIONS_LOGGER = Logger.getMessageLogger(
>> ConnectionPoolingLogger.class,
>> "org.hibernate.orm.connections.pooling"
>> );
>>
>> ...
>> }
>> 
>>
>> I won't get into all the whys I do this unless someone cares ;)
>>
>> But I am contemplating doing the same for basic loggers so I wanted to ask
>> everyone else's opinion since this means a change in how you'd have to
>> configure logging for DEBUG/TRACE output.  Usually you'd use the Class
>> name
>> as the logger name and use that to control logging in the back-end (log4j,
>> etc).  If I do this, you'd have to instead use the module name.
>>
>> There are quite a few reasons I am considering  this, including all of the
>> reasons I did it for  message loggers in the first place.  If I am
>> debugging the loading of a collection or an entity, today I'd have to know
>> all the packages involved (there is no common root name) and list them in
>> my log4j.properties; that is because the process is ultimately handled by
>> delegates or helpers in many different packages (`org.hibernate.loader`,
>> `org.hibernate.persister`, `org.hibernate.type`, ...).  It sure would be
>> nice to just be able to say `org.hibernate.loading` or
>> `org.hibernate.loading.entity` or `org.hibernate.loading.collection` or
>> ...
>> for a number of reasons:
>>
>>1. When we need to see logging from someone it is a lot easier to tell
>>the module name(s) you need enabled as opposed a list of package and
>> class
>>names.
>>2. When running JPA TCK it is essentially impossible to attach debugger
>>to step through code when debugging a failure - you have to rely on
>>debugging through output.  *Well that used to be the case, but the
>>latest TCK broke logging to STDOUT somehow so we ended up having to
>> try and
>>reproduce the failure in our testsuite - so then it does not matter
>> either
>>way ;)*
>>3. Easier to document -
>>
>> http://docs.jboss.org/hibernate/orm/5.3/topical/html_single/logging/Logging.html
>>
>> Thoughts?
>>
>>
>> [1] JBoss Logging's `org.jboss.logging.annotations.MessageLogger` - which
>> we use for user-focused log messages.  Should always be logged at >= INFO
>> [2]
>> [3] JBoss Logging's `org.jboss.logging.BasicLogger` - which we use for
>> developer-focused log messages (for debugging).  Should always be logged
>> at
>> DEBUG or TRACE
>> ___
>> hibernate-dev mailing list
>> hibernate-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Is there a way to have ServiceContributor per SessionFactory/EMF instead of per application classloader?

2018-09-19 Thread Steve Ebersole
Ohhh... Sorry I misunderstood.  I thought you were asking about ways to
have the contributor only apply to one of the PUs...

I'm surprised it isn't applied to each actually.  I'd consider that a bug.
Can you put together a test?


On Wed, Sep 19, 2018, 8:12 AM Scott Marlow  wrote:

>
>
> On 9/19/18 5:41 AM, Gunnar Morling wrote:
> > Would SessionFactoryServiceContributor [1] be of use to you? It lets you
> > add services to the SF-scoped service registry; not sure whether that
> > suits your requirements or no.
>
> Thanks, I will give that a try.  We currently use RegionFactoryInitiator
> and update the configuration settings passed via
> RegionFactoryInitiator#resolveRegionFactory(Map configurationValues,
> ServiceRegistryImplementor).  I wonder if that is possible with
> SessionFactoryServiceContributor?
>
> >
> > --Gunnar
> >
> > [1]
> >
> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/service/spi/SessionFactoryServiceContributor.java
> >
> > Am Di., 18. Sep. 2018 um 21:00 Uhr schrieb Scott Marlow
> > mailto:smar...@redhat.com>>:
> >  >
> >  >
> >  > On 9/14/18 6:14 PM, Steve Ebersole wrote:
> >  > > Doing so would require a programatic call while bootstrapping
> >  > > Hibernate.  The ServiceContributors are applied during
> >  > > `org.hibernate.boot.registry.StandardServiceRegistryBuilder#build`
> >  > > processing.  So we'd need a call to register a ServiceContributor
> with
> >  > > the StandardServiceRegistryBuilder.
> >  > >
> >  > > Of course that also means you'd have to have access to the
> >  > > StandardServiceRegistryBuilder
> >  >
> >  > I don't have a way to add a programatic call while bootstrapping "not
> >  > JPA container".
> >  >
> >  > >
> >  > > On Fri, Sep 14, 2018 at 9:27 PM Scott Marlow  > 
> >  > > >> wrote:
> >  > >
> >  > > I'm deploying an application with two persistence units
> > however, the
> >  > > ServiceContributor contribute(StandardServiceRegistryBuilder)
> > [1] is
> >  > > only being called once, instead of per SessionFactory/EMF (or
> so it
> >  > > seems).
> >  > >
> >  > > Is there a way to have the
> >  > > contribute(StandardServiceRegistryBuilder) be
> >  > > called per SessionFactory/EMF instead?
> >  > >
> >  > > Scott
> >  > >
> >  > > [1]
> >  > >
> >
> https://github.com/wildfly/wildfly/blob/master/jpa/hibernate5_3/src/main/java/org/jboss/as/jpa/hibernate5/service/ServiceContributorImpl.java#L28
> >  > > ___
> >  > > hibernate-dev mailing list
> >  > > hibernate-dev@lists.jboss.org
> > 
> >  > >
> >  > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >  > >
> >  > ___
> >  > hibernate-dev mailing list
> >  > hibernate-dev@lists.jboss.org 
> >  > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Is there a way to have ServiceContributor per SessionFactory/EMF instead of per application classloader?

2018-09-19 Thread Scott Marlow


On 9/19/18 9:22 AM, Steve Ebersole wrote:
> Ohhh... Sorry I misunderstood.  I thought you were asking about ways to 
> have the contributor only apply to one of the PUs...
> 
> I'm surprised it isn't applied to each actually.  I'd consider that a 
> bug.  Can you put together a test?

Yes, I will work on a test.

> 
> 
> On Wed, Sep 19, 2018, 8:12 AM Scott Marlow  > wrote:
> 
> 
> 
> On 9/19/18 5:41 AM, Gunnar Morling wrote:
>  > Would SessionFactoryServiceContributor [1] be of use to you? It
> lets you
>  > add services to the SF-scoped service registry; not sure whether
> that
>  > suits your requirements or no.
> 
> Thanks, I will give that a try.  We currently use
> RegionFactoryInitiator
> and update the configuration settings passed via
> RegionFactoryInitiator#resolveRegionFactory(Map configurationValues,
> ServiceRegistryImplementor).  I wonder if that is possible with
> SessionFactoryServiceContributor?
> 
>  >
>  > --Gunnar
>  >
>  > [1]
>  >
> 
> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/service/spi/SessionFactoryServiceContributor.java
>  >
>  > Am Di., 18. Sep. 2018 um 21:00 Uhr schrieb Scott Marlow
>  > mailto:smar...@redhat.com>
> >>:
>  >  >
>  >  >
>  >  > On 9/14/18 6:14 PM, Steve Ebersole wrote:
>  >  > > Doing so would require a programatic call while bootstrapping
>  >  > > Hibernate.  The ServiceContributors are applied during
>  >  > >
> `org.hibernate.boot.registry.StandardServiceRegistryBuilder#build`
>  >  > > processing.  So we'd need a call to register a
> ServiceContributor with
>  >  > > the StandardServiceRegistryBuilder.
>  >  > >
>  >  > > Of course that also means you'd have to have access to the
>  >  > > StandardServiceRegistryBuilder
>  >  >
>  >  > I don't have a way to add a programatic call while
> bootstrapping "not
>  >  > JPA container".
>  >  >
>  >  > >
>  >  > > On Fri, Sep 14, 2018 at 9:27 PM Scott Marlow
> mailto:smar...@redhat.com>
>  > >
>  >  > > 
>   >  > >
>  >  > >     I'm deploying an application with two persistence units
>  > however, the
>  >  > >     ServiceContributor
> contribute(StandardServiceRegistryBuilder)
>  > [1] is
>  >  > >     only being called once, instead of per
> SessionFactory/EMF (or so it
>  >  > >     seems).
>  >  > >
>  >  > >     Is there a way to have the
>  >  > >     contribute(StandardServiceRegistryBuilder) be
>  >  > >     called per SessionFactory/EMF instead?
>  >  > >
>  >  > >     Scott
>  >  > >
>  >  > >     [1]
>  >  > >
>  >
> 
> https://github.com/wildfly/wildfly/blob/master/jpa/hibernate5_3/src/main/java/org/jboss/as/jpa/hibernate5/service/ServiceContributorImpl.java#L28
>  >  > >     ___
>  >  > >     hibernate-dev mailing list
>  >  > > hibernate-dev@lists.jboss.org
> 
>  >  >
>  >  
>  >  >>
>  >  > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>  >  > >
>  >  > ___
>  >  > hibernate-dev mailing list
>  >  > hibernate-dev@lists.jboss.org
> 
>  >
>  >  > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] Is there a way to have ServiceContributor per SessionFactory/EMF instead of per application classloader?

2018-09-19 Thread Scott Marlow
Please look at 
https://github.com/scottmarlow/hibernate-orm/tree/ServiceContributorTest 
and let me know if this is a valid test.  I added a test that calls 
registry.getService( RegionFactory.class ) twice and fails if the 
RegionFactoryInitiator doesn't get called twice.

Is that the same as creating two separate SFs and expecting the 
RegionFactoryInitiator to be called twice?


On 9/19/18 9:52 AM, Scott Marlow wrote:
> 
> 
> On 9/19/18 9:22 AM, Steve Ebersole wrote:
>> Ohhh... Sorry I misunderstood.  I thought you were asking about ways 
>> to have the contributor only apply to one of the PUs...
>>
>> I'm surprised it isn't applied to each actually.  I'd consider that a 
>> bug.  Can you put together a test?
> 
> Yes, I will work on a test.
> 
>>
>>
>> On Wed, Sep 19, 2018, 8:12 AM Scott Marlow > > wrote:
>>
>>
>>
>>     On 9/19/18 5:41 AM, Gunnar Morling wrote:
>>  > Would SessionFactoryServiceContributor [1] be of use to you? It
>>     lets you
>>  > add services to the SF-scoped service registry; not sure whether
>>     that
>>  > suits your requirements or no.
>>
>>     Thanks, I will give that a try.  We currently use
>>     RegionFactoryInitiator
>>     and update the configuration settings passed via
>>     RegionFactoryInitiator#resolveRegionFactory(Map configurationValues,
>>     ServiceRegistryImplementor).  I wonder if that is possible with
>>     SessionFactoryServiceContributor?
>>
>>  >
>>  > --Gunnar
>>  >
>>  > [1]
>>  >
>> 
>> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/service/spi/SessionFactoryServiceContributor.java
>>  
>>
>>  >
>>  > Am Di., 18. Sep. 2018 um 21:00 Uhr schrieb Scott Marlow
>>  > mailto:smar...@redhat.com>
>>     >>:
>>  >  >
>>  >  >
>>  >  > On 9/14/18 6:14 PM, Steve Ebersole wrote:
>>  >  > > Doing so would require a programatic call while bootstrapping
>>  >  > > Hibernate.  The ServiceContributors are applied during
>>  >  > >
>>     `org.hibernate.boot.registry.StandardServiceRegistryBuilder#build`
>>  >  > > processing.  So we'd need a call to register a
>>     ServiceContributor with
>>  >  > > the StandardServiceRegistryBuilder.
>>  >  > >
>>  >  > > Of course that also means you'd have to have access to the
>>  >  > > StandardServiceRegistryBuilder
>>  >  >
>>  >  > I don't have a way to add a programatic call while
>>     bootstrapping "not
>>  >  > JPA container".
>>  >  >
>>  >  > >
>>  >  > > On Fri, Sep 14, 2018 at 9:27 PM Scott Marlow
>>     mailto:smar...@redhat.com>
>>  > >
>>  >  > > 
>>     >  >  > >
>>  >  > >     I'm deploying an application with two persistence units
>>  > however, the
>>  >  > >     ServiceContributor
>>     contribute(StandardServiceRegistryBuilder)
>>  > [1] is
>>  >  > >     only being called once, instead of per
>>     SessionFactory/EMF (or so it
>>  >  > >     seems).
>>  >  > >
>>  >  > >     Is there a way to have the
>>  >  > >     contribute(StandardServiceRegistryBuilder) be
>>  >  > >     called per SessionFactory/EMF instead?
>>  >  > >
>>  >  > >     Scott
>>  >  > >
>>  >  > >     [1]
>>  >  > >
>>  >
>> 
>> https://github.com/wildfly/wildfly/blob/master/jpa/hibernate5_3/src/main/java/org/jboss/as/jpa/hibernate5/service/ServiceContributorImpl.java#L28
>>  
>>
>>  >  > >     ___
>>  >  > >     hibernate-dev mailing list
>>  >  > > hibernate-dev@lists.jboss.org
>>     
>>  > >     >
>>  > >     
>>  > >     >>
>>  >  > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>  >  > >
>>  >  > ___
>>  >  > hibernate-dev mailing list
>>  >  > hibernate-dev@lists.jboss.org
>>     
>>     >     >
>>  >  > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] Is there a way to have ServiceContributor per SessionFactory/EMF instead of per application classloader?

2018-09-19 Thread Steve Ebersole
StandardServiceRegistry`No, it's not.

Each call to `registry.getService( RegionFactory.class )` in your test
returns the same `RegionFactory` - by design.

By default each SF bootstrap uses a unique StandardServiceRegistry which is
what the ServiceContributor contributes services to.  In terms of your
test, it would be like creating a second `StandardServiceRegistry` and
asking that for the second RegionFactory



On Wed, Sep 19, 2018 at 11:12 AM Scott Marlow  wrote:

> Please look at
> https://github.com/scottmarlow/hibernate-orm/tree/ServiceContributorTest
> and let me know if this is a valid test.  I added a test that calls
> registry.getService( RegionFactory.class ) twice and fails if the
> RegionFactoryInitiator doesn't get called twice.
>
> Is that the same as creating two separate SFs and expecting the
> RegionFactoryInitiator to be called twice?
>
>
> On 9/19/18 9:52 AM, Scott Marlow wrote:
> >
> >
> > On 9/19/18 9:22 AM, Steve Ebersole wrote:
> >> Ohhh... Sorry I misunderstood.  I thought you were asking about ways
> >> to have the contributor only apply to one of the PUs...
> >>
> >> I'm surprised it isn't applied to each actually.  I'd consider that a
> >> bug.  Can you put together a test?
> >
> > Yes, I will work on a test.
> >
> >>
> >>
> >> On Wed, Sep 19, 2018, 8:12 AM Scott Marlow  >> > wrote:
> >>
> >>
> >>
> >> On 9/19/18 5:41 AM, Gunnar Morling wrote:
> >>  > Would SessionFactoryServiceContributor [1] be of use to you? It
> >> lets you
> >>  > add services to the SF-scoped service registry; not sure whether
> >> that
> >>  > suits your requirements or no.
> >>
> >> Thanks, I will give that a try.  We currently use
> >> RegionFactoryInitiator
> >> and update the configuration settings passed via
> >> RegionFactoryInitiator#resolveRegionFactory(Map configurationValues,
> >> ServiceRegistryImplementor).  I wonder if that is possible with
> >> SessionFactoryServiceContributor?
> >>
> >>  >
> >>  > --Gunnar
> >>  >
> >>  > [1]
> >>  >
> >>
> >>
> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/service/spi/SessionFactoryServiceContributor.java
> >>
> >>  >
> >>  > Am Di., 18. Sep. 2018 um 21:00 Uhr schrieb Scott Marlow
> >>  > mailto:smar...@redhat.com>
> >> >>:
> >>  >  >
> >>  >  >
> >>  >  > On 9/14/18 6:14 PM, Steve Ebersole wrote:
> >>  >  > > Doing so would require a programatic call while
> bootstrapping
> >>  >  > > Hibernate.  The ServiceContributors are applied during
> >>  >  > >
> >> `org.hibernate.boot.registry.StandardServiceRegistryBuilder#build`
> >>  >  > > processing.  So we'd need a call to register a
> >> ServiceContributor with
> >>  >  > > the StandardServiceRegistryBuilder.
> >>  >  > >
> >>  >  > > Of course that also means you'd have to have access to the
> >>  >  > > StandardServiceRegistryBuilder
> >>  >  >
> >>  >  > I don't have a way to add a programatic call while
> >> bootstrapping "not
> >>  >  > JPA container".
> >>  >  >
> >>  >  > >
> >>  >  > > On Fri, Sep 14, 2018 at 9:27 PM Scott Marlow
> >> mailto:smar...@redhat.com>
> >>  > >
> >>  >  > > 
> >>  >>  >  > >
> >>  >  > > I'm deploying an application with two persistence units
> >>  > however, the
> >>  >  > > ServiceContributor
> >> contribute(StandardServiceRegistryBuilder)
> >>  > [1] is
> >>  >  > > only being called once, instead of per
> >> SessionFactory/EMF (or so it
> >>  >  > > seems).
> >>  >  > >
> >>  >  > > Is there a way to have the
> >>  >  > > contribute(StandardServiceRegistryBuilder) be
> >>  >  > > called per SessionFactory/EMF instead?
> >>  >  > >
> >>  >  > > Scott
> >>  >  > >
> >>  >  > > [1]
> >>  >  > >
> >>  >
> >>
> >>
> https://github.com/wildfly/wildfly/blob/master/jpa/hibernate5_3/src/main/java/org/jboss/as/jpa/hibernate5/service/ServiceContributorImpl.java#L28
> >>
> >>  >  > > ___
> >>  >  > > hibernate-dev mailing list
> >>  >  > > hibernate-dev@lists.jboss.org
> >> 
> >>  >  >> >
> >>  >  >> 
> >>  >  >> >>
> >>  >  > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >>  >  > >
> >>  >  > ___