--
Hi. Is it possible to pull in only JDBC parameters from a properties file and reference them dynamically in a hibernate config xml file? I am trying to do something like this, where I have the hibernate.* values in a .properties file on my classpath:
Code:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.url">${hibernate.connection.url}</property>
<property name="hibernate.connection.driver_class">${hibernate.connection.driver_class}</property>
<property name="hibernate.connection.username">${hibernate.connection.username}</property>
<property name="hibernate.connection.password">${hibernate.connection.password}</property>
<property name="hibernate.connection.pool_size">${hibernate.connection.pool_size}</property>
...
</session-factory>
</hibernate-configuration>
I am getting a message that says:
Code:
10:55:43,444 WARN UserSuppliedConnectionProvider:23 - No connection properties specified - the user must supply JDBC connections
I know that you can reference system properties in this manner, but I wanted to know if it's possible get them from a secondary properties file. If what I am trying to do is possible, could you please provide me with the correct syntax? Thanks.
--