Best code examples for Hibernate ORM SessionFactoryRegistry class (org.hibernate.internal.SessionFactoryRegistry)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM SessionFactoryRegistry class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM SessionFactoryRegistry examples from Open Source projects
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 ) );
	} 
 
} 
Full Snippet Info
3
CodeRank