?
Solved

How to cancel an EJB transaction?

Posted on 2003-03-26
5
Medium Priority
?
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

800 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