Hi,
I need to get information about collections from mapping files.
Thus, I can make this with the following code:
Code:
//...
Configuration cfg = new Configuration().addClass(org.foo.beans.Pessoa.class);
//...
net.sf.hibernate.mapping.Collection col = c.getCollectionMapping("org.foo.beans.Pessoa.cursos");
However, this code only runs in a single standalone application.
How I can obtain the Configuration (or CollectionMappings) object in a J2EE environment?
The only object that I can access by JNDI is
Code:
net.sf.hibernate.impl.SessionFactoryImpl
and, from it, I can't navigate to Configuration object :-(
PS: The information that I need in mapping file is collectionTableName.
Sorry my bad english, this text was translated with babelfish.