private SessionFactory newSessionFactory() throws IOException, ConfigurationException, DocumentException, InterruptedException { Metadata md = getMetadata(); try { newSessionSem.acquireUninterruptibly(); return md.buildSessionFactory(); } finally { newSessionSem.release(); } }
targetTypes.add(TargetType.DATABASE); if(targetTypes.size()>0) export.create(EnumSet.copyOf(targetTypes), getMetadata());