Bonsoir a tous , comme le titre l'indique , tel est mon problème, je butais y'a quelque jours sur la configuration a adopter afin que mes EJB entity persiste dans MYSQL , une fois ceci fait je remarque comme par magie que mes données disparaissent a l’arrêt du serveur( JBOSS 4.2.0GA)
voici la configuration de mon fichier persistance .xml:
mes classe sont en fichier joints.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="test"> <jta-data-source>java:/bdd_wfDS</jta-data-source> <class>com.ejb.conge.Conge</class> <properties> <property name="hibernate.hbm2ddl.auto" value="create"/> <property name="hibernate.archive.autodetection" value="class, hbm"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/> <property name="hibernate.connection.password" value="feri"/> <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/bdd_wf"/> <property name="hibernate.connection.username" value="feri"/> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> <property name="hibernate.c3p0.min_size" value="5"/> <property name="hibernate.c3p0.max_size" value="20"/> <property name="hibernate.c3p0.timeout" value="300"/> <property name="hibernate.c3p0.max_statements" value="50"/> <property name="hibernate.c3p0.idle_test_period" value="3000"/> </properties> </persistence-unit> </persistence>
je pense que ceci est du a mon fichier de persistence , mais comment le regler je n'en ai aucune idée. si quelqu'un pourrait bien m'aider
Partager