[EJB/JBoss] - Help with Transaction Timeouts on Container Manager Transact
by jmihalich1
Hi,
I'm looking for guidance on how we are supposed to be handling this case, because the behavior we are seeing is not what we want.
Components in use: Jboss 4.2.2-GA, Windows Server 2003 , Jboss-Messaging 1.4.2.
Here is the issue:
We have a stateless session bean that is marked as using container managed transactions. We're have the default transaction timeout set as specified in jboss-service.xml of 180 seconds.
When one of our EJB methods is entered (marked as 'required' for the transaction), we get a JDBC connection from the data-source that we have created via a *-ds.xml file in the jboss deploy directory. When we get the connection, the auto-commit flag is set to false, which is expected.
We then run a bunch of sql commands (inserts, updates). Let's say the transaction timeout hits for some reason like the queries we're running are taking too long. When the timeout occurs I see the following entries in our log4j log:
2009-04-17 17:32:30,075 [ Thread-3] WARN com.arjuna.ats.arjuna.logging.arjLoggerI18N : [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -53ef9ed4:e28:49e91dfb:1de invoked while multiple threads active within it.
2009-04-17 17:32:30,075 [ Thread-3] WARN com.arjuna.ats.arjuna.logging.arjLoggerI18N : [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -53ef9ed4:e28:49e91dfb:1de aborting with 1 threads active!
At that exact time when the transaction times out, the container is rolling back the transaction, and that's fine. The problem here is that our thread keeps running, AND the connection's auto-commit flag got set back to true. The end result is that any inserts/updates we did after the timeout, get committed immediately leaving the database in a bogus state.
So here are my questions:
1) Is this expected behavior to have the rollback occurring in parallel to the ejb thread continuing to run?
2) Why is the auto-commit getting set to true when the timeout occurs?
3) Shouldn't the rollback occur synchronously after our EJB method returns into the jboss ejb stub code?
4) What is the correct way we're supposed to be handling the transaction timeout so the database doesn't wind up hosed? We see this exact same behavior with jboss and mysql, and jboss and sql server.
5) The old jboss transaction manager configuration used to allow you to interrupt the thread, instead of continuing to let it run. I understand this feature has been removed for legitimate reasons as explained by this thread: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=125962 . This would have been our preferred approach to fix this problem if it were still supported.
Thanks for the help,
Joe
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227656#4227656
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227656
15 years, 7 months
[Beginners Corner] - Re: How do I add the richfaces library to eclipse? (experien
by Meghiddo
I am obviously missing something here. I thought I could just download the richfaces binary zip file, and create a new library that had the richfaces components, and leave everything else as is.
So I need to use JBoss as my target runtime? I have been using Apache Tomcat v6.0. I didn't even have the JBoss server downloaded, so I had to go ahead and do that. Got that done, and I was able to choose JBoss v5.0 for my target runtime. I then left it to server side implementation. I put those three jar files in the WEB-INF/lib file for the greeter project, refreshed the project amd restarted my servers (the JBoss and Tomcat server).
I tried to open the project through both servers and still have the same problems. WHen I try to run it on the JBoss server I get
HTTP Status 404 - /greeter/index.jsp
--------------------------------------------------------------------------------
type Status report
message /greeter/index.jsp
description The requested resource (/greeter/index.jsp) is not available.
--------------------------------------------------------------------------------
JBoss Web/2.1.2.GA
and when I rn it on the tomcat server I get a slightly different version:
HTTP Status 404 -
--------------------------------------------------------------------------------
type Status report
message
description The requested resource () is not available.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.18
either way, its not working for me!!!! what am I missing????
I am losing it here, this is killing me
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227642#4227642
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227642
15 years, 7 months
[JBoss jBPM] - Re: Design Patterns
by rwallis
1) The log file could be a problem... thanks
2) the token does reach the join and continues on through (we though the same thing but upon testing and looking at what the database did, it worked)
3) there are two functional requirements:
a) I'll skip the batch processing functional requirements because at this point they are vague. (Basically processing as files are uploaded into a directory or when a record in an external database is updated, etc. and probably the challenge here is more in deciding to write a custom action or a custom node... or because logging could get out of control don't do it in jBPM.
b) User has a task but supervisor should also get a task every day task sits in processors list of tasks. All tasks as related to the initial task from a reporting standpoint.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227639#4227639
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227639
15 years, 7 months