Joined: Mon Aug 28, 2006 10:59 am Posts: 2
|
Hi there, i configured my datasource properly in TOMCAT and here is my hibernate.cfg.xml file:
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/jdbc/inouk</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!--### Apache DBCP Connection Pool ###-->
<!--connection pool-->
<property name="hibernate.dbcp.maxActive">10</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.maxWait">180</property>
<property name="hibernate.dbcp.maxIdle">10</property>
<mapping resource="mapping/Departement.hbm.xml" />
<mapping resource="mapping/Poste.hbm.xml" />
<mapping resource="mapping/Staff.hbm.xml" />
<mapping resource="mapping/Menu.hbm.xml" />
<mapping resource="mapping/Login.hbm.xml" />
<mapping resource="mapping/Nouvelles.hbm.xml" />
<mapping resource="mapping/Promotion.hbm.xml" />
<mapping resource="mapping/Equipe.hbm.xml" />
<mapping resource="mapping/Joueur.hbm.xml" />
<mapping resource="mapping/Equipejoueur.hbm.xml" />
<mapping resource="mapping/Equipestaff.hbm.xml" />
<mapping resource="mapping/Fan.hbm.xml" />
<mapping resource="mapping/Partie.hbm.xml" />
<mapping resource="mapping/Partenaire.hbm.xml" />
</session-factory>
</hibernate-configuration>
All this configurations works for me...but now i wonder if i must change my hibernate code to acess the session and do my stuff...do i need to call explicitly my datasource are all is done behind the scene with the hibernate.cfg.xml?
|
|