Hmmm, maybe my topic start wasn't entirely clear. Let me explain by giving an example.
I have a configuration specified in a hibernate.cfg.xml as follows:
Code:
<hibernate-configuration>
<session-factory>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.isolation">2</property>
<property name="connection.url">jdbc:oracle:thin:@my_host:1521:my_db</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.username">my_user</property>
<property name="connection.password">my_pwd</property>
<property name="maxActive">30</property>
<property name="maxIdle">10</property>
<property name="maxWait">-1</property>
several mappings ...
</session-factory>
</hibernate-configuration>
This file is used to make the configuration by constructing a instance of Configuration using the properties from above.
Now having a Configuration instance myConfig I make the method call myConfig.getProperties() and log its contents by iterating through all properties. The output I get consists of every property as I defined it together with a second variant where the name is prefixed with 'hibernate.':
(<property name> = <value>)
show_sql = false
hibernate.show_sql = false
dialect = net.sf.hibernate.dialect.Oracle9Dialect
hibernate.dialect = net.sf.hibernate.dialect.Oracle9Dialect
et cetera.
In addition, all my environment properties are listed as well:
java.vendor = Sun Microsystems Inc.
hibernate.java.vendor = Sun Microsystems Inc.
et cetera.
All this awoke my curiosity about which property is used to which purpose.
The Hibernate properties are used when building the SessionFactory. In the Environment class all property names are defined as String constants, where every constant is of the form "hibernate.<property>", among which the properties defined in my hibernate.config.xml as for example the constant DIALECT = "hibernate.dialect".
Now I'm curious for which purpose the properties that are not prefixed by 'hibernate.' are used as well as the purpose the system properties serve (including their 'hibernate.<system_property>' equivalent.
I hope this post makes some more sense than the first :)