I am sorry. I think you ment that you wanted the code to be pasted in a more readable form. I am learning to use the tool bar. Repasting the code again.
Code:
AnnotationConfiguration cfg = new AnnotationConfiguration();
cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.InterbaseDialect");
cfg.setProperty("hibernate.connection.url", "jdbc:firebirdsql:localhost:D:\\FireBirdDB\\mydb.gdb");
cfg.setProperty("hibernate.connection.username", "sysdba");
cfg.setProperty("hibernate.connection.password", "masterkey");
cfg.setProperty("hibernate.connection.driver_class", "org.firebirdsql.jdbc.FBDriver");
cfg.setProperty("hibernate.c3p0.min_size", "5");
cfg.setProperty("hibernate.c3p0.max_size", "20");
cfg.setProperty("hibernate.c3p0.timeout", "1800");
cfg.setProperty("hibernate.c3p0.max_statements", "50");
cfg.setProperty(Environment.HBM2DDL_AUTO, "create-drop");
cfg.setProperty("hibernate.show_sql", "true");
cfg.addAnnotatedClass(Company.class);
SessionFactory sf = cfg.buildSessionFactory();
Session s = sf.openSession();
try {
Company TC = new Company();
TC.setName("aa");
s.save(TC);
Company TC1 = new Company();
TC1.setName("bb");
s.save(TC1);
} catch (Exception e) {
throw e;
} finally {
s.flush();
}