Joined: Thu Nov 17, 2005 4:25 pm Posts: 10
|
Do I can read some file.properties extract and hold key/values, later
read a hibernate.cfg.xml and substitute variables ${hibernate.connection.username} for example
per key/value?
file.properties:
connection.datasource=java:/jdbc/AmplisDS
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
hibernate.connection.username=xxx
hibernate.connection.password=yyy
hibernate.cfg.xml:
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">${connection.datasource}</property>
<property name="hibernate.transaction.manager_lookup_class">${hibernate.transaction.manager_lookup_class}</property>
<property name="hibernate.transaction.factory_class">${hibernate.transaction.factory_class}</property>
<property name="connection.pool_size">1</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="current_session_context_class">jta</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.connection.username">${hibernate.connection.username}</property>
<property name="hibernate.connection.password">${hibernate.connection.password}</property>
<property name="hibernate.transaction.flush_before_completion">true</property>
<property name="show_sql">true</property>
<property name=""></property>
....
Do I can do this?
|
|