?
Solved

How to cancel an EJB transaction?

Posted on 2003-03-26
5
Medium Priority
?
258 Views
Last Modified: 2013-11-24
Can I cancel an EJB transaction without waiting for it to timeout and throw a timeout exception?
Let's say I am performing a database search that takes too long.
Let's say I can get an access to the session bean's handle (I store it on the session).
How can I stop the transaction?

Thanks in advance
0
Comment
Question by:gopnik5
4 Comments
 
LVL 1

Expert Comment

by:Jitu
ID: 8215819
Is this possible even without EJB, using normal java classes (except by killing the thread in question) ?



0
 
LVL 4

Accepted Solution

by:
antons061400 earned 300 total points
ID: 8217377
I think you have no chance. The DB timeout is out of your code. Ussually it is also out of Java code (some native libraries). Even it is not there is no clear way how to stop other thread code. (If that code didn;t count with termination.)
I think you can only search DB documentation if there is possibility to decrease the timeout interval in general.
0
 

Expert Comment

by:CleanupPing
ID: 9058465
gopnik5:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9732886
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept antons' comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question