[hibernate-dev] Getting notified when session factory is completely set up

Gunnar Morling gunnar at hibernate.org
Thu Feb 13 04:51:18 EST 2014


2014/2/11 Davide D'Alto <daltodavide at gmail.com>

> > I can "inject" the SF into a DatastoreProvider by having it implement
> said StartStoppable contract. But as pointed out before the SF is not yet
> completely initialized at this point. So I e.g. can't access the entity
> persisters.
>
> Isn't the SessionFactory already created by the time
> StartStoppable#startService is called?
>

Created https://hibernate.atlassian.net/browse/OGM-445 to make sure
StartStoppables see a completely initialized factory by implementing this
on top of a session factory observer.

For the specific issue in CouchDB I've used a custom observer for the time
being. This can be refactored once OGM-445 has been addressed.

--Gunnar


More information about the hibernate-dev mailing list