Hibernate ORM SessionFactoryRegistry - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM SessionFactoryRegistry class.

This code example shows how to use the following methods:getSessionFactory
	@Override 
	public Object getObjectInstance(Object reference, Name name, Context nameCtx, Hashtable<?, ?> environment)
			throws Exception {
		final String uuid = (String) ( (Reference) reference ).get( 0 ).getContent();
		//OgmSessionFactory does not have state so we can create a new instance each time instead of keeping a registry 
		return new OgmSessionFactoryImpl( (SessionFactoryImplementor) SessionFactoryRegistry.INSTANCE.getSessionFactory( uuid ) );
	} 
 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java