This should be as simple as doing something like this:
Code:
Configuration configuration = new Configuration();
configuration.setProperty("hibernate.connection.driver_class", org.hsqldb.jdbcDriver.class.getName());
configuration.setProperty("hibernate.connection.url", "jdbc:hsqldb:abc:123");
configuration.setProperty("hibernate.connection.username", "sa");
configuration.setProperty("hibernate.connection.password", "");
configuration.setProperty("hibernate.dialect", "net.sf.hibernate.dialect.HSQLDialect");
Session session = configuration.buildSessionFactory().openSession();
However, you must not call configure on the configuration object before setting the properties. You do it after. This works equally well with the annotationconfiguration object.