false
);
if ( isMetadataUsed ) {
MetadataImplementor metadataImplementor = buildMetadata( bootRegistry, serviceRegistry );
afterConstructAndConfigureMetadata( metadataImplementor );
sessionFactory = ( SessionFactoryImplementor ) metadataImplementor.buildSessionFactory();
}
else {
// this is done here because Configuration does not currently support 4.0 xsd
afterConstructAndConfigureConfiguration( configuration );
sessionFactory = ( SessionFactoryImplementor ) configuration.buildSessionFactory( serviceRegistry );