i using hibernate 3.6.0 jboss 6.0-final release , database ms-sql server 2008. have fetch employee data ldap server , insert database - count of ldap entries 180,000 or more. using bean managed transaction because using cmt transaction never gets committed (because of high volumn of insert).
the logic is: in while-loop keep on fetching & creating entries in database using jpa (hibernate). having long series of fetch-create activities part of stateless ejb api. invoking entitymanager.flush()/clear() , commiting transaction after processing every 20 records.
i getting following warn message in jboss serevr.log after have inserted 40,000 records. not sure if warning or error?
though error, server still runs , continues inserting new records in db.
can suggest if doing wrong? or causes error?
is there way increase ejb timeout?
16:52:49,690 warn [com.arjuna.ats.arjuna] arjuna-12117 transactionreaper::check timeout tx 0:ffff105966b8:126a:4db9fc0a:a4 in state run 16:52:49,691 warn [com.arjuna.ats.arjuna] arjuna-12121 transactionreaper::docancellations worker thread[transaction reaper worker 0,5,jboss] canceled tx 0:ffff105966b8:126a:4db9fc0a:a4
any appreciated.
as per own comment (but give actual example), if need increase transaction time-out can use annotation on method of whichever class defines transactional boundary (usually "facade" implmentation).
for example, using org.springframework.transaction.annotation.transactional
@transactional(timeout = 600) // value in seconds
it sounds need one-off data conversion task rather day-to-day production code increasing time-out justifiable. otherwise worth considering batching processing smaller chunks , making each 1 unique transaction expected complete within default time-out system.
Comments
Post a Comment