Grazie mille per avermi risposto....
ecco il file hibernata.cfg.xml
Cosa dovrei fare? Io ad ogni ciclo apro la connessione leggo i dati dal db,e infine la chiudo...codice:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://xxxxtest.xxxxcloud.prv:3306/xxxxfoneta?zeroDateTimeBehavior=convertToNull</property> <property name="hibernate.connection.username">xxxx</property> <property name="hibernate.connection.password">xxxx</property> <mapping resource="POJO/Device.hbm.xml"/> <mapping resource="POJO/Test.hbm.xml"/> <mapping resource="POJO/Setting.hbm.xml"/> <mapping resource="POJO/User.hbm.xml"/> <mapping resource="POJO/Ciclotest.hbm.xml"/> <mapping resource="POJO/Computer.hbm.xml"/> <mapping resource="POJO/Sendreport.hbm.xml"/> <mapping resource="POJO/Scheduler.hbm.xml"/> <mapping resource="POJO/Computerdevice.hbm.xml"/> <mapping resource="POJO/Esecuzione.hbm.xml"/> <mapping resource="POJO/Grant.hbm.xml"/> <mapping resource="POJO/Ciclo.hbm.xml"/> <mapping resource="POJO/Invalidcode.hbm.xml"/> <mapping resource="POJO/Failcode.hbm.xml"/> </session-factory> </hibernate-configuration>
Per favore dammi qualche input... grazie


Rispondi quotando