Hi All,
I am trying a small sample,
My Job.xml is
<code>
<job id="Batch_ControllerJob" restartable="true"
xmlns="http://www.springframework.org/schema/batch">
<step id="TestWithIdentity">
<tasklet ref="testWithIdentity" />
</job>
<bean id="testWithIdentity"
class="batch.core.tasklet.TestWithIdentity">
<property name="batchDao">
<ref bean="batchDao" />
</property>
</bean>
</code>
BatchRun.hbm :
<code>
<hibernate-mapping>
<class name="commoncomponent.domain.BatchRunDo"
table="BatchRun">
<id name="runNumber" type="long" column="runId">
<generator class="identity" />
</id>
<property name="runType">
<column name="runType" />
</property>
</class>
</hibernate-mapping>
</code>
In the TestWithIdentity classs, I am recording BatchRunDo object to the database. BatchRunDo have an identity column. When i reach the
Session.saveOrUpdate(BatchRunDo), I am unable to query the BatchRun table.
Once my step is completed, then i am able to query the table.
This is not happening for the table, which doesn't contain identity column.
[I am Using Hibernate3.jar and got the Session from the sessionFactoryUtils.]
Any Table level locking is happenning?
can u please clarify this?


Reply With Quote

