Joined: Fri Dec 17, 2004 12:55 pm Posts: 1 Location: Rhode Island,US
|
Hi,
I have the sessionFactory bound to the JNDI as shown below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory name="hibernate/SessionFactory">
<property name="connection.datasource">java:comp/env/jdbc/esdb</property>
<property name="dialect">net.sf.hibernate.dialect.DB2Dialect</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
<mapping resource="mapping.hbm.xml"/>
</session-factory>
</hibernate-configuration>
In my code i need to get some mapping information which is stored in the configuration object. (e.g. the primaryKey of the table of a class), so I would call "(configure.getClassMapping(testClass)).getTable().getPrimaryKey()"
But for invoking this I need to have the Configuration object. So is there a way to get the configuration object to which the sessionFactory object is bound to?
_________________ Thanks and Regards,
Nagarajan B N
|
|