[jboss-user] [Beginner's Corner] - Working around transaction timeouts
dfisher
do-not-reply at jboss.com
Thu Sep 9 07:28:22 EDT 2010
dfisher [http://community.jboss.org/people/dfisher] created the discussion
"Working around transaction timeouts"
To view the discussion, visit: http://community.jboss.org/message/560919#560919
--------------------------------------------------------------
+Using JBoss 5.1.0+
I've got a long running clean up task that repeatedly invokes a stateless session bean.
The problem I'm having is that the task takes longer than 5 minutes to run, which is the default transaction timeout.
Rather than change the default value or define a custom value on the SSB, I'm trying to wire things up so each SSB call uses it's own transaction.
My current design looks like:
MBean
invoke Task [SSB with @TransactionAttribute(NEVER)]
invoke Search [SSB with @TransactionAttribute(REQUIRED)], look up entities to operate on
for each entity
invoke Operation [SSB with @TransactionAttribute(REQUIRED)], perform operation
My expectation is that Task does not have a transaction.
The Search transaction will commit when all entities are found.
A new transaction will run and commit for each invocation on Operation.
However, what occurs is that all operations rollback after 5 minutes.
Can anyone explain the correct way to do this?
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560919#560919]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100909/6b643891/attachment-0001.html
More information about the jboss-user
mailing list