Transaction timedout after 300s Websphere , Spring batch, DB2 -
i have need execute 5000 select statements on datasource , pull results , insert 5000 values table of different data source.
for 5000 select statements(all different sqls) exeuting 1 one (this taking more time)
for 5000 inserts doing jdbctemplate.batchupdate()
the above job needs executed every 30mins. have configured spring batch job triggered every 30 mins cron.
once method called complete 5000 select statements it's taking more 300s complete websphere throwing timeout exception. says global transaction time exceeded 300s.
i know can increase timeout in websphere can't since in production server profiles configured default.
can suggest me better way handle this.
you can increase transaction timeout on current thread using
transaction.settransactiontimeout(int seconds)
on usertransaction
before calling
transaction.begin()
http://docs.oracle.com/javaee/6/api/javax/transaction/usertransaction.html
Comments
Post a Comment