Code example for SessionException

0
	} 
 
	public void initializeCollection( 
			PersistentCollection collection, 
	        boolean writing) throws HibernateException { 
		throw new SessionException("collections cannot be fetched by a stateless session"); 
	} 
 
	public Object instantiate( 
			String entityName, 
	        Serializable id) throws HibernateException { 
		errorIfClosed(); 
		return getFactory().getEntityPersister( entityName ) 
				.instantiate( id, this ); 
	} 
 
	public Object internalLoad( 
			String entityName, 
	        Serializable id, 
	        boolean eager, 
Contextual code suggestions in your IDE  Get Codota for Java