hi,
i am struggling with hibernate operations in spring environment
on a jboss 4 appserver.
my problem is that i would like to see hibernate save() results
immediately in the database, but i only see them if i shut down jboss.
i have already tried getHibernateTemplate().flush(),
setting flushmode to auto, etc.
please help me if you have any ideas. i have googled this problem,
but no appropriate information.
on startup i receive the following information:
Code:
[SettingsFactory] Automatic flush during beforeCompletion(): disabled
[SettingsFactory] Automatic session close at end of transaction: disabled
this is something i dont understand, but seems related to my problem.
my spring configuration is:
Code:
<bean id="bbSessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="bbDatasource" />
<property name="mappingDirectoryLocations"
value="classpath:com/rote/bb/" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.OracleDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<bean id="billbirdDatasource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:XAOracleDS" />
<property name="resourceRef" value="true" />
</bean>
<bean id="hibernateTemplate"
class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="bbSessionFactory" />
<property name="flushModeName" value="FLUSH_EAGER"/>
</bean>
<bean id="hibernateTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="bbSessionFactory"/>
</bean>
<bean id="hibernateTransactionTemplate"
class="org.springframework.transaction.support.TransactionTemplate">
<property name="transactionManager" ref="hibernateTransactionManager" />
</bean>