Zaad -9 Junior Poster in Training

Hi;
Im on the way of doing a concurrent application in java command line. I want is a way to stop a transaction in the middle of it when the transaction is happening in the application. In the GUI there is the KeyListener to handle the key inputs and invoke the methods to cancel the transaction. Is there any way that i can do it using the command line..... PLease HElp urgent....