How to stop processRequest method execution second time in CO

Hi all,
I have a Requirment like to stop ProcessRequest method execution In my controler when i click the button on my page
Regards,
Shiva

Hi Shiva,
You can make use of session parameters..
When you click on a button ?? why will the page go to PR method ??
By default it goes in PFR method.
Anyways if you are redirecting it to the same page : u can make use of below methods for the same to control the execution of methods in PR.
While coming back to PR method : check the parameter value.. & make sure that..no methods are executed in it.
PR Method
String dieFromUpdate = pageContext.getParameter("DieValue");
if(dieFromUpdate!=null)
make use of this condition and execute the statements..
PF Method
String Die ='IN PF Method " ;
pageContext.putParameter("DieValue", Die);
Regards
Sridhar

Similar Messages

  • Stop the method Execution.

    Hi..
    I have a method call to make a credit card payment.sometimes it takes so much times.If that process takes more than 10 minutes,
    I want to stop that method execution.I have implemented the TimerTask to check the execution time and stop..but I don't have a idea to stop that processing method...
    can anyone give me a suggetion.
    Regards
    Amila

    Hi,
    You may have a look at this thread [http://forums.sun.com/thread.jspa?threadID=5347956&tstart=0]
    I changed the suggested code a little to make it (hopefully) suitable for your use case. Note that the long running task communicates to its invoker via System.out.
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextPane;
    import javax.swing.JToolBar;
    import javax.swing.SwingUtilities;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    public class TaskDispatcher {
        private static long lengthy = 10000;
        public static void main(String[] args) {
         SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
              new TaskDispatcher().createGUI();
        private JTextPane textPane;
        private JLabel message;
        private Process process;
        private Action kill = new AbstractAction("Kill") {
         private static final long serialVersionUID = 1L;
             this.setEnabled(false);
         @Override
         public void actionPerformed(ActionEvent event) {
             destroy();
        private Action dispatch = new AbstractAction("Dispatch") {
         private static final long serialVersionUID = 1L;
         @Override
         public void actionPerformed(ActionEvent event) {
             dispatch();
        public void createGUI() {
         JFrame frame = new JFrame();
         textPane = new JTextPane();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         message = new JLabel("Status", JLabel.CENTER);
         JToolBar toolBar = new JToolBar();
         frame.add(toolBar, BorderLayout.PAGE_START);
         frame.add(new JScrollPane(textPane), BorderLayout.CENTER);
         frame.add(message, BorderLayout.PAGE_END);
         toolBar.add(dispatch);
         toolBar.add(kill);
         frame.setSize(400, 400);
         frame.setLocationRelativeTo(null);
         frame.setVisible(true);
        private void appendLine(String line) {
         Document doc = textPane.getDocument();
         try {
             doc.insertString(doc.getLength(), line + "\n", null);
         } catch (BadLocationException e) {
             e.printStackTrace();
        private void destroy() {
         kill.setEnabled(false);
         process.destroy();
         dispatch.setEnabled(true);
        private void dispatch() {
         dispatch.setEnabled(false);
         try {
             textPane.setText("");
             launch();
             kill.setEnabled(true);
         } catch (IOException e) {
             e.printStackTrace();
             dispatch.setEnabled(true);
        private void handleErr(final Process process) {
         new Thread(new Runnable() {
             final BufferedReader errReader;
              errReader = new BufferedReader(new InputStreamReader(process
                   .getErrorStream()));
             @Override
             public void run() {
              try {
                  String line = null;
                  while ((line = errReader.readLine()) != null) {
                   System.err.println("Other JVM: " + line);
              } catch (Throwable t) {
                  t.printStackTrace();
              } finally {
                  try {
                   errReader.close();
                  } catch (IOException e) {
                   e.printStackTrace();
         }).start();
        private void handleOut(final Process process) {
         new Thread(new Runnable() {
             final BufferedReader outReader;
              outReader = new BufferedReader(new InputStreamReader(process
                   .getInputStream()));
             @Override
             public void run() {
              try {
                  String line = null;
                  while ((line = outReader.readLine()) != null) {
                   appendLine(line);
              } catch (Throwable t) {
                  t.printStackTrace();
              } finally {
                  try {
                   outReader.close();
                  } catch (Throwable t) {
                   t.printStackTrace();
         }).start();
        private void launch() throws IOException {
         final String command;
         command = "java -cp \"" + System.getProperty("java.class.path") + "\" "
              + LengthyTask.class.getCanonicalName() + " \"" + lengthy + "\"";
         process = Runtime.getRuntime().exec(command);
         message.setText("Process is running");
         handleOut(process);
         handleErr(process);
         new Thread(new Runnable() {
             @Override
             public void run() {
              try {
                  int rc = process.waitFor();
                  kill.setEnabled(false);
                  if (rc != 0) {
                   appendLine("Exit code " + rc);
                  dispatch.setEnabled(true);
                  message.setText(rc == 0 ? "Completed successfully"
                       : "Problem exit code: " + rc);
              } catch (InterruptedException e) {
                  e.printStackTrace();
         }).start();
    }Piet

  • How to Stop the method Action When an Exception Occur in other Method

    Hi All ,
    public void action( Event clientEvent) {
    startAction();
    JOptionPane.showMessageDialog(null, getDocumnetId());
    how to Stop the method action ( "action" ) if an exception occur in the method ("startAction")
    ( if the exception occur we doesn't need to show the JOption Message )

    Hi,
    try FacesContext.getCurrentInstance().renderResponse();
    Frank

  • How to stop iPhoto from opening each time I add a photo using Yosemite

    How to stop iPhoto from opening each time I add a photo using Yosemite

    Add image to iPhoto Library
    From where.  I don't think you can keep it mininmized when importing because if it runs into a duplicate it will present a warning window for you to make a decision in. Therefore, it will always be open when importing.
    You can send a feature request to Apple via http://www.apple.com/feedback/iphoto.html.

  • How to run a thread for second time ?

    I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
    class NewThread implements Runnable {
    String name;
    NewThread(String a) {
    name=a;
    public void run() {
    try{
    for(int i=0;i<5;i++) {
    System.out.println("Thread :" + name + " #" +i);
    Thread.sleep(5);
    catch (Exception e) {
    e.printStackTrace();
    class threadRunnableTest {
    public static void main (String args[]) {
    Runnable runnable=new NewThread("BaSkAr");
    Thread thread = new Thread(runnable);
    try{
    System.out.println("First Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("First Thread it to be stopped!!");
    thread.stop();
    System.out.println("Second Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("Second Thread it to be stopped!!");
    thread.stop();
    catch (Exception e) {
    e.printStackTrace();

    baskark wrote:
    I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
    class NewThread implements Runnable {
    String name;
    NewThread(String a) {
    name=a;
    public void run() {
    try{
    for(int i=0;i<5;i++) {
    System.out.println("Thread :" + name + " #" +i);
    Thread.sleep(5);
    catch (Exception e) {
    e.printStackTrace();
    class threadRunnableTest {
    public static void main (String args[]) {
    Runnable runnable=new NewThread("BaSkAr");
    Thread thread = new Thread(runnable);
    try{
    System.out.println("First Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("First Thread it to be stopped!!");
    thread.stop();
    System.out.println("Second Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("Second Thread it to be stopped!!");
    thread.stop();
    catch (Exception e) {
    e.printStackTrace();
    It's usually helpful to check the documentation:
    [http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()|http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()]
    start
    public void start()Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
    The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
    It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.
    So, make a new java.lang.Thread

  • Stopping invoice Parking for Second time Parking for a frame work PO...

    Hi SAP Guru's..
    there is a Requirement from Client site that ..
    for a Frame work PO which comes with a Invoice plan ..
    we should be able to Stop Second time invoicing Maintained in Invoice Plan...
    How to Go for this ...
    Any workable suggestion would be Rewarded with Points ...
    Thanks and warm Regards..
    Adarsh Srivastava..

    You can control the changing of PO in the enhancement which name you can search here. There are three kinds of enhancement: check, change and save. You need select the kind of 'change'.

  • How do I make a sixty second timer which resets at 60 and goes to 00?

    I am trying to create a 60 second timer (file attached) which will reset at 60 and go to 00.
    Currently, the two seven segment displays displaying the digits will go from 60 to 01. If I replace the output of U14D with that of U14C, it will reset from 59 to 00.
    Any help is appreciated, thanks!
    Attachments:
    60 Second Timer.ms12 ‏314 KB

    Hi JarJariggs
    There is probably a small logic error somewhere in the reset. Your 0-9 counter works fine, so, when reseted, whocul go back to 0, not 1. Your design is similar to the one in the next page, maybe you can compare the logic in both circuits to help you find the error.
    Page:    60 Second Timer
    WenR

  • How to stop the process for some time

    I want to stop the process for some time can any one give the package or keyword or example for the same
    For suppose two programs A and B.. .B will run based on output of A. What i need is... When A is executed the process will stop for 5mins then B has to execute...

    You can use signals with DBMS_ALERT to "wake up" a procedure.
    Procedure A is something like this:
    DBMS_ALERT.REGISTER('B_FINISHED');
    do logic...
    when finished - send a signal
    DBMS_ALERT.SIGNAL('A_FINISHED','B you can start');
    now wait until B is finished
    DBMS_ALERT.WAITANY(...)
    continue logic hereAnd Procedure B is
    DBMS_ALERT.REGISTER('A_FINISHED');
    wait for a to finish
    DBMS_ALERT.WAITANY(...);
    do logic...
    when finished, signal A it can continue
    DBMS_ALERT.SIGNAL('B_FINISHED','A can continue');This is useful if u they need to wait for each other within the code. if they just need to wait - call B from A.
    Hope this helps.
    Edited by: Pyrocks on Nov 8, 2010 8:50 AM

  • My camera on my iPad 2 has stopped working for the second time.

    My camera on my iPad.2 has stopped working for the 2nd time. Last time it just started working again after a couple of months.
    I have tried closing the camera app completely &amp; also re-booting the iPad completely but to no avail.
    Any ideas anyone?

    You'll first need to have iTunes on your computer - from the summary page (the one that opens when you select the iPad in iTunes) it'll give you options for backing up and restoring it. On that page just select 'restore iPad' and that'll get it started.
    Hope it's just software then, those out-of-warranty replacements can get pricey.

  • How to make a method run 25 times in 1 second?

    I have a JPanel that implements Runnable and that has animation on it. I need to update the screen 25 times per second. I have a vague idea that I need to call function run() 25 times a second, but how do I do that? Thank you!!!

    Hi how are you ?
    I noticed that you have some duke dollars for this questions:)
    Here is the answer.
    You won't want to call the run method 25 times by the way. Within your run method you can call a method that is going to do the animation 25 times .
    Example:
    void doAnimation(Graphics g){
    for(int i = 0 ; i < 25 ; i++){
    g.drawImage(yourimages,x,x);
    try{
    Thread.sleep(250);//or whatever the interval is
    }catch(InterruptedException e){}
    g.drawImage(clearscreenimage,x,x);
    let me know how that works for you ?
    however, the exact timing depends on the monitor being used and the OS being used. it's a bit more involved. but the answer above is a basic one.
    stephen

  • How to stop while loop for particular time

                    public void test()
                   new Thread(new Runnable()
                        public void run()
                             //Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                             System.out.println("test");
                             //System.out.println("test ..."+i);
                             try
                                  Thread.sleep(3000);
                             catch (InterruptedException e)
                   }).start();
            public void startTest()
                    while(i < marquee_Str1.length)
                   marLbl1.setValue(marquee_Str1); //set value to textbox for perticular id
                   marLbl2.setValue(marquee_Str2[i]);
                   marLbl3.setValue(marquee_Str3[i]);
                   test(); // call thread function
                   i++;
    in this code while loop don't stop
    plz help me to stop while loop for certain period by using thread or other technique                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Yes.. the original problem would be your test() method put the sleep in an entirely separate thread of execution. So the thread is created then the method just keeps waiting. The while loop should directly call Thread.sleep... which you have apparently figured out!

  • Need to Know How to Group Report in 30-Second Time Intervals

    I am trying to group records in the report based on a date/time field in a table.  The user enters a date/time range to report on, and I want the the records from the table that fall within the date/time range entered to be grouped in 30-second intervals on the report.  I've tried a number of different things and can't seem to get anything to work.  Can anyone provide some insight into how this can be done?  Thank you in advance!!

    Hi Joy,
    Sorry for the late reply.
    What you want to do is create a formula something like this (Syntax hasn't been verified... at all)
    whilereadingrecords;
    //I'm assuming your datetime field is a string. It probably isn't but you can do the same op with another
    //data type. I've also assumed (likely wrongfully) that the time in seconds is the last two digits
    //for sake of argument, your date time field has this format: YYYYMMDD-HH:MM:SS
    stringvar strSecondsOfCall;
    stringvar strYourGroupString; //or something
    strSecondsOfCall := right(<yourfield>, 2);
    if(strSecondsOfCall > "30") then strYourGroupString := left( (<yourfield>,15) & "30"
    else strYourGroupString := left( (<yourfield>,15) & "00"
    So, what the formula does is determine if the seconds portion of the date time occured in the former or the ladder half of the minue, and assigns it the floor value (arbitrary implementation on my part, you can call it whatever you like).
    Now, in your report, use the group exppert to group based on this formula field, and you should get the data the come out grouped in 30 second intervals.
    ie: You'll have groups like:
    20081231-12:59:00
       -all of the calls that happened from 59:00 - 59:30
    20081231-12:59:30
       -all of the calls that happened from 59:30 - 00:00
    Happy new year!!!

  • How to save password and username second time after pressing by mistake "never for this site" option when firefox asked to remember passwords for gmail for first time?

    By mistake i pressed "Never for this site" when firefox first offered to remember my login details first time on gmail.com. Now how can i save my username and password for gmail.com. firefox no longer asks me to save any new login details... How can i re enable that notification to save passwords.

    * Make sure that you not run Firefox in [[Private Browsing]] mode. In Private Browsing mode some menu items are disabled (grayed) and features like visited links and disabled and not available.
    * You are in Private Browsing mode if you see "Tools > Stop Private Browsing", possibly grayed.
    * You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    * To see all History settings, choose: Tools > Options > Privacy, choose the setting '''Firefox will: Use custom settings for history'''
    * Uncheck: [[ ] "Automatically start Firefox in a private browsing session"
    See also [[Private Browsing|#Always_start_Firefox_in_a_private_browsing_session|Always start Firefox in a private browsing session]]

  • How to stop texts from sending 3 times after being sent once

    How do you stop your texts from being sent 3 times? iOS 7.
    not sure what is causing it.

    Dear  chakrapani
    No we are not maintaining the release strategy.
    How can we maintain that and how would that help me out in the requirement what i have stated earlier.
    Regards
    Farhan

  • How can I install Mavericks a second time?

    I tried installing mavericks and got the disk corrupted error. I found I couldn't fix it, so I tried installing again this time onto an attached hard drive. This sort of worked, and allowed me to run diagnostics on internal hard drive ( it's fine ). Now I want to install Mavericks again on the internal hard drive but when I boot from the internal drive ( again, it's fine ) Software Update ( App Store ) tells me that Mavericks is installed on my 10.8.5 OS computer and won't let me do anything to fix that.
    What I want to do is update my internal drive and use that to boot from. It's not apparent how I can do that. Any help would be appreciated. Thanks!

    The Mavericks installer should be located in your Applications folder. If it's not there anymore open App Store. Go to "Purchases" and click on the "Download" button next to Mavericks.
    Disconnet the external drive. That's why you're getting the message that Mavericks is already installed.

Maybe you are looking for

  • Painfully slow system all of a sudden

    Hi there, Today my system slowed to the pace of a snail, and I'd love some help from you guys to work out why. Here are the facts: - EVERYthing was running slow, all applications, rather than just one. What I had open was: Mori, Appleworks, iTunes, S

  • Ipod Nano 8GB with Bose SoundDock

    Hi all, My new Nano 8GB won't fit into the Bose SoundDock using any of the supplied plastic adaptors. It fits without an adaptor and works fine but the supplied Nano adaptor won't allow it to fit. Does anyone know where to get an adaptor that fits? T

  • Help needed in extracting pipe delimited fields in a CLOB data type

    hi i Had a table with clob field as shown below. CREATE TABLE TRANSACTION_INFO   TRASACTION_ID  CLOB,   LOG_ID  NUMBER Insert into TRANSACTION_INFO    (TRASACTION_ID, LOG_ID) Values    ('354502002020910|000000610214609663||09/27/09 08:02:37|RNEW|DC25

  • Mac Mini, Cinema Display & a 12 wx Cintiq - is it possible?

    I currently have a G4 Mac (mirrored doors) with a Cinema Display and Wacom 12 wx Cintiq (on screen drawing tablet) hooked up.  Everything works fine, but since the G4 is a PowerMac, I'm finding less and less software compatibility.  I'm considering a

  • Movies in iphoto

    in my old iphoto there was a folder specifically for movies, which I cannot find now. My home-made Quicktime movies are in the library but where are the movies I have downloaded from youtube?