Changeset 6424957483d23860b95cf0187b855eb506111efc

Show
Ignore:
Timestamp:
08/13/07 18:01:23 (1 year ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1187020883 +0200
git-parent:

[d95781aec2dc06ce9cdc85dff7e630bab6b21e4d]

git-author:
Christopher Jung <bktheg@web.de> 1187020883 +0200
Message:

Die Datenbankverbindungsdaten stehen nun nur noch in der config.xml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/framework/db/HibernateFacade.java

    r580809c r6424957  
    4949                conf = new AnnotationConfiguration(); 
    5050                conf.configure(new File(Configuration.getSetting("configdir")+"hibernate.xml")); 
     51                 
     52                // Datenbankverbindung eintragen 
     53                conf.setProperty("connection.url", "jdbc:mysql://"+Configuration.getSetting("db_server")+"/"+Configuration.getSetting("db_database")); 
     54                conf.setProperty("connection.username", Configuration.getSetting("db_user")); 
     55                conf.setProperty("connection.password", Configuration.getSetting("db_password")); 
     56                 
     57                // Einige Funktionen hinzufuegen 
    5158                conf.addSqlFunction("pow", new StandardSQLFunction("pow", Hibernate.DOUBLE)); 
    5259                conf.addSqlFunction("floor", new StandardSQLFunction("floor", Hibernate.LONG)); 
     
    5562                conf.addSqlFunction("bit_or", new SQLFunctionTemplate(Hibernate.INTEGER, "?1 | ?2")); 
    5663                 
     64                // Mappings lesen 
    5765                try { 
    5866                        Document doc = XMLUtils.readFile(Configuration.getSetting("configdir")+"hibernatemappings.xml"); 
  • web/WEB-INF/cfg/hibernate.xml

    r3924571 r6424957  
    66        <session-factory> 
    77                <property name="connection.driver_class">com.mysql.jdbc.Driver</property> 
    8                 <property name="connection.url">jdbc:mysql://localhost/ds2</property> 
    9                 <property name="connection.username">root</property> 
    10                 <property name="connection.password"></property> 
    118 
    129                <!-- C3P0 connection pool -->