Bonjour tout le monde.
J ai un hibernate.config (fichier xml)et un config.propriete(.properties)
que je dois aller chercher des valeurs a l'exterieurs sur le c.

ex code de mon hibernate.config
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
<?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>
 
		<!-- local connection properties -->
		<property name="hibernate.connection.url">
			jdbc:oracle:thin:@s1ora01s:1521:s1ora01i
		</property>
		<property name="hibernate.connection.driver_class">
			oracle.jdbc.OracleDriver
		</property>
		<property name="hibernate.connection.username">
			factcan
		</property>
		<property name="hibernate.connection.password">
			factcan
		</property>
		<!-- property name="hibernate.connection.pool_size"></property -->
 
		<!-- dialect for Oracle (any version) -->
		<property name="dialect">
			org.hibernate.dialect.Oracle10gDialect
		</property>
 
		<property name="hibernate.show_sql">false</property>
		<property name="hibernate.transaction.factory_class">
			org.hibernate.transaction.JDBCTransactionFactory
		</property>
		<property name="hibernate.current_session_context_class">
			org.hibernate.context.ThreadLocalSessionContext
		</property>
		<property name="hibernate.jdbc.batch_size">20</property>
 
		<mapping resource="Infogene.hbm.xml" />
		<mapping resource="TauxChange.hbm.xml" />
		<mapping resource="DomainesDeValeurs.hbm.xml" />
		<mapping resource="Xc4dvoy.hbm.xml" />
		<mapping resource="GroupesReclamations.hbm.xml" />
		<mapping resource="CodeFinancement.hbm.xml" />
		<mapping resource="Xc4dsav.hbm.xml" />
		<mapping resource="Xc4dtav.hbm.xml" />
		<mapping resource="EntenteReseau.hbm.xml" />
		<mapping resource="DateTraitement.hbm.xml" />
		<mapping resource="TauxFacturation.hbm.xml" />
		<mapping resource="Nasco.hbm.xml" />
		<mapping resource="RejetPpc.hbm.xml" />
	</session-factory>
 
 
 
</hibernate-configuration>
donc pour les declarations des varable de session-factory
j aurai
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
<!-- Injection de la datasource utilisée -->
		<property name="dataSource" ref="${datasource}" />
mais je connais pas le mecanisme.
où je pourrais trouve un tutorial ou un exemple.

je devrais faire le meme mecanisme avec mon fichier config.properties.
Est ce qu il y a une difference avec la facon de faire pour un fichier xml et properties.
Mes deux fichiers sont visibles dans le classpath