IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Hibernate Java Discussion :

probleme avec hibernate.properties


Sujet :

Hibernate Java

  1. #1
    Membre régulier
    Inscrit en
    Mai 2002
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Mai 2002
    Messages : 219
    Points : 74
    Points
    74
    Par défaut probleme avec hibernate.properties
    bonjour j ai une application qui utilise hibernate 3.3
    avec un fichier hibernate.conf en xml.
    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>
    On me demande de remplace le fichier hibernate.conf par un fichier.properties.
    Mais je vois pas ou mettre les fichiers hml dans mon fichier hibernate.properties.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    hibernate.connection.driver_class =oracle.jdbc.OracleDriver
    hibernate.connection.url = jdbc:oracle:thin:@s1ora01s:1521:s1ora01i
    hibernate.connection.username = factcan
    hibernate.connection.password = factcan
    hibernate.jdbc.batch_size = 20
    hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
    hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
    hibernate.current_session_context_class = org.hibernate.context.ThreadLocalSessionContext
    Ps. est ce que je suis oblige de l appeler hibernate.proprietes.
    Sinon comment l application va faire pour le reconnaissance merci a d avance

  2. #2
    Membre confirmé Avatar de ruscov
    Homme Profil pro
    Architecte de système d'information
    Inscrit en
    Mars 2007
    Messages
    347
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Belgique

    Informations professionnelles :
    Activité : Architecte de système d'information

    Informations forums :
    Inscription : Mars 2007
    Messages : 347
    Points : 500
    Points
    500
    Par défaut
    T'es obligé de l'appeler hibernate.properties.
    Par contre tes hbm, tu les définis là où tu définis ta session factory.
    Mes logiciels n’ont jamais de bug. Ils développent juste certaines fonctions aléatoires.

Discussions similaires

  1. Probleme avec hibernate sync
    Par fabiolerusse dans le forum Hibernate
    Réponses: 2
    Dernier message: 20/03/2008, 16h36
  2. probleme avec fichier properties
    Par alexorcet dans le forum Langage
    Réponses: 7
    Dernier message: 26/11/2007, 08h41
  3. Probleme avec Hibernate
    Par dominou73 dans le forum Hibernate
    Réponses: 5
    Dernier message: 27/07/2007, 12h53
  4. Probleme avec hibernate
    Par ouedmouss dans le forum Hibernate
    Réponses: 6
    Dernier message: 06/06/2006, 20h42
  5. Problèmes avec Hibernate (sous Eclipse)
    Par Pierric dans le forum Hibernate
    Réponses: 2
    Dernier message: 07/04/2005, 14h35

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo