code: public VersionHistoryImpl versionHistory(boolean pool) throws UnsupportedRepositoryOperationException,
        RepositoryException
     {
        if (!this.isNodeType(Constants.MIX_VERSIONABLE))
        {
           throw new UnsupportedRepositoryOperationException("Node is not mix:versionable " + getPath());
        }
  
        PropertyData vhProp =
           (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_VERSIONHISTORY, 1),
              ItemType.PROPERTY);
        if (vhProp == null)
        {
           throw new UnsupportedRepositoryOperationException("Node does not have jcr:versionHistory " + getPath());
        }
  
        return (VersionHistoryImpl)dataManager.getItemByIdentifier(ValueDataUtil.getString(vhProp.getValues().get(0)),
           pool, false);
     }
docs: For internal use. Doesn't check the InvalidItemStateException and may return unpooled
  VersionHistory object.
  
  @param pool
  boolean, true if result should be pooled in Session
  @return VersionHistoryImpl
  @throws UnsupportedRepositoryOperationException
  if versions is nopt supported
  @throws RepositoryException
  if error occurs