Hibernate docs show very clearly [how to configure Hibernate with XML](http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/session-configuration.html#configuration-xmlconfig).

This is the snippet of code to do so:

```
new Configuration().configure("catdb.cfg.xml")

```

Now how do you configure Hibernate when instead of a hibernate configuration file, you have a JPA 2.0 config file ?

* How to do it for META-INF/persistence.xml ?
* What if my file is called META-INF/jpa.xml instead ?

This is for Hibernate 3.6 and JPA 2.0. My ultimate goal is to be able to export a schema DDL for the classes described in file persistence.xml, so I don't want to build a SessionFactory.

```
    Configuration cfg = /* ??? */

    SchemaExport schemaExport = new SchemaExport(cfg);
    schemaExport.setDelimiter(";");
    schemaExport.setOutputFile("ddl.sql");
    boolean script = true, export = false, justDrop = false, justCreate = false;
    schemaExport.execute(script, export, justDrop, justCreate);

```