You're correct in assuming that you need two session factories. You will need two configuration files two. This is how I did it...
Code:
Properties properties = new Properties();
InputStream inputStream = new FileInputStream("/path/to/database.properties");
properties.load(inputStream);
Configuration configuration = new Configuration();
configuration.setProperties(properties)
configuration.addMappings(...)
sessionFactory = configuration.buildSessionFactory()
Your other session factory would read a different properties file.
HTH