JOptionPane with Timeout

Hello All,
I am putting a new version of my application out tommorow where I have replaced all of the JOptionPane's with one's that timeout after a given time limit. I have tested it and it seems to work fine on my environment, does anyone see any problems with the code? The last thing I want is to find potential problems after I release it.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
* @author Malcolm F
public class TimeoutOptionPane {
    public static Object showTimeoutPane( final JOptionPane optionPane,
            final Frame frame, final String title, final int timeoutMillis ) {
        // Listen for property changes in the JOptionPane
        optionPane.addPropertyChangeListener( new PropertyChangeListener() {
            public void propertyChange( PropertyChangeEvent e ) {
                if ( e.getPropertyName().equals( JOptionPane.VALUE_PROPERTY ) ) {
                    synchronized ( e.getSource() ) {
                        e.getSource().notify();
        // Create dialog based on JOptionPane and set visible
        final JDialog timeoutDialog = optionPane.createDialog( frame, title );
        SwingUtilities.invokeLater( new Runnable() {
            public void run() {
                timeoutDialog.setVisible( true );
        // Wait for timeout, notified early if value property changes
        synchronized ( optionPane ) {
            try {
                optionPane.wait( timeoutMillis );
            } catch ( Exception e ) {
                e.printStackTrace();
        // Dispose of dialog
        SwingUtilities.invokeLater( new Runnable() {
            public void run() {
                timeoutDialog.dispose();
        return optionPane.getValue();
}

Here is the code I use :
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.Timer;
import javax.swing.WindowConstants;
* A message dialog that closes after a timeout.
* @author clap
public class TimedOptionPane {
     protected static int UPDATE_PERIOD = 1000;
      * Show a dialogBox.
      * @param f
      *            the owner
      * @param message
      *            the message to display
      * @param timeout
      *            in milliseconds
      * @param title
      *            title of the dialog box
      * @param timeoutMessage
      *            text showing remaining seconds
      * @return {@link JOptionPane#YES_OPTION}, when YEs is clicked, {@link JOptionPane#NO_OPTION}
      *         if NO is clicked, or {@link JOptionPane#CANCEL_OPTION} on timeout or window closed
      *         event.
     public final static int showTimedOptionPane(Frame f, String message, String title,
               String timeoutMessage, final long timeout) {
          final JDialog dialog = new JDialog(f, title, true);
          final Message messageComponent = new Message(message, timeout, timeoutMessage);
          final JOptionPane pane = new JOptionPane(messageComponent, JOptionPane.QUESTION_MESSAGE,
                    JOptionPane.YES_NO_OPTION);
          dialog.setContentPane(pane);
          dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
          Timer timer = new Timer(UPDATE_PERIOD, new ActionListener() {
               @Override
               public void actionPerformed(ActionEvent e) {
                    messageComponent.addEllapsedMilliseconds(UPDATE_PERIOD);
                    if (messageComponent.isOver()) {
                         dialog.dispose();
          timer.start();
          pane.addPropertyChangeListener(new PropertyChangeListener() {
               @Override
               public void propertyChange(PropertyChangeEvent e) {
                    String prop = e.getPropertyName();
                    if (dialog.isVisible() && (e.getSource() == pane)
                              && (JOptionPane.VALUE_PROPERTY.equals(prop))) {
                         dialog.setVisible(false);
          dialog.pack();
          dialog.setLocationRelativeTo(f);
          dialog.setVisible(true);
          String valueString = pane.getValue().toString();
          if (JOptionPane.UNINITIALIZED_VALUE.equals(valueString)) {
               return JOptionPane.CANCEL_OPTION;
          return ((Integer) pane.getValue()).intValue();
      * Test...
      * @param args
     public static void main(String args[]) {
          int response = showTimedOptionPane(null, "Did you choose ?", "Please Choose",
                    "Remaining : ", 4000);
          System.out.println("Choosen :" + response);
          System.exit(0);
      * Content of the {@link JOptionPane}.
      * @author clap
     static class Message extends JPanel {
          private final static String RS = "Remaining seconds : ";
          JLabel message;
          JLabel remaining;
          private long timeout;
          private long ellapsed = 0;
           * Build content panel.
           * @param message
           *            the message to show
           * @param milliseconds
           *            timeout in milliseconds
           * @param timeoutMessage
           *            text showing remaining seconds
          protected Message(String message, long milliseconds, String timeoutMessage) {
               super(new BorderLayout());
               this.timeout = milliseconds;
               this.message = new JLabel(message);
               add(this.message, BorderLayout.NORTH);
               this.remaining = new JLabel(formatRemainingSeconds(milliseconds));
               add(this.remaining, BorderLayout.SOUTH);
          private String formatRemainingSeconds(long ms) {
               return RS + (ms / 1000) + "s.";
           * @return true if the timeout has been reached.
          protected boolean isOver() {
               return ellapsed >= timeout;
           * Indicates that some milliseconds has occured.
           * @param milliseconds
          protected void addEllapsedMilliseconds(long milliseconds) {
               ellapsed += milliseconds;
               remaining.setText(formatRemainingSeconds(timeout - ellapsed));
               repaint();
}

Similar Messages

  • "with timeout" when sending Remote Events

    I have a script which accesses a dozen odd remote servers using "eppc://..." Finders and duplicates some files etc... as required by the script. The only problem with this is the script frequently hangs as if a server is not reachable it keeps on trying and fails to report it back as an error.
    I have tried putting "with timeout...." etc.. but nothing seems to work. I have developed a workaround to run a separate script pinging all the machines and if all the machines come back with suitable trip times I allow the script to continue but this is not an ideal workaround - any other suggestions or experience with this problem?

    Here's a copy/paste from a post some time back. Wish I could credit the original author, but I don't have the information.
    This was written for 10.3.9 but may apply in your case also... (easy enough to revert if it doesn't help)
    Jeff
    So there is an issue with OS X Server, where OS X tells SquirrelMail that SSL is enabled, even when its not. This causes some strange problems, like when you send an email, in Safari the mail will send but you won't be forwarded back to the inbox. In FireFox, the mail is sent but you get some strange error -12281. Well the solution (hack) to this problem is to make SquirrelMail always use non SSL. The other solution is to actually configure and USE SSL. But for the hack:
    Hack Away...
    1) Open up this file
/usr/share/squirrelmail/functions/strings.php
    2) Go to line 239 in the file. It should be a blank line, below it should be:
/* Get the hostname from the Host header or server config. */
    3) Add the following to the blank line:
$proto = 'http://';
    Thats it. That does it, just save and reload and SquirrelMail should now work properly. Alternativly, instead of adding that bit of code, you can instead comment out the block above line 239, so that line 216 is the last code before 239. That will also work.
    This hack is done with 10.3.9 and SM 1.4.4. Other versions might have differnet results.

  • How to create an YES/NO JOptionPane with the default focus on No?

    Hi,
    can somebody please show me how to display an JOptionPane with the options Yes and No that has the focus by default no the No button?
    By default it is on the Yes button which is rather problematic for confirm dialogs like "Do you really want to delete everything?".
    JPJava

    It would help if JPJava gave some sample code SSCCE to show they know how to construct a JOptionPane
    I use explorer to access the source files in the zip folder and JGrasp to view the source code
    this is copy modify from the API
    Object[] options = { "YES", "CANCEL" };//{"OK", "CANCEL"} shown in api
    JOptionPane.showOptionDialog(null, "Are you sure you want to delete", "Confirm Delete",
    JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
    null, options, options[1]);//options[1] selects CANCEL option as defaultthis method constructs
    showOptionDialog
    public static int showOptionDialog(Component parentComponent,
                                       Object message,
                                       String title,
                                       int optionType,
                                       int messageType,
                                       Icon icon,
                                       Object[] options,
                                       Object initialValue)
                                throws HeadlessExceptionBrings up a dialog with a specified icon, where the initial
    choice is determined by the initialValue parameter and the number of choices is determined by the optionType parameter.
    If optionType is YES_NO_OPTION, or YES_NO_CANCEL_OPTION and the options parameter is null,
    then the options are supplied by the look and feel.
    The messageType parameter is primarily used to supply a default icon from the look and feel.
    Parameters:
    parentComponent - determines the Frame in which the dialog is displayed; if null, or if the parentComponent
    has no Frame, a default Frame is used
    message - the Object to display
    title - the title string for the dialog
    optionType - an integer designating the options available on the dialog: YES_NO_OPTION, or
    YES_NO_CANCEL_OPTION
    messageType - an integer designating the kind of message this is, primarily used to determine the icon from
    the pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
    QUESTION_MESSAGE, or PLAIN_MESSAGE
    icon - the icon to display in the dialog
    options - an array of objects indicating the possible choices the user can make; if the objects are components,
    they are rendered properly; non-String objects are rendered using their toString methods; if this parameter is null,
    the options are determined by the Look and Feel
    initialValue - the object that represents the default selection for the dialog; only meaningful if options is used; can be null
    Returns:
    an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
    Throws:
    HeadlessException - if GraphicsEnvironment.isHeadless returns true
    See Also:
    GraphicsEnvironment.isHeadless()Edited by: Ross_M on Sep 22, 2008 9:19 AM

  • VSS snapshot of 1.1TB is ending after few hours with timeout. No errors in event log

    Hello,
    does someone have experienced issue where starting making snapshot (forum GUI or command line) is taking a lot of time and then it just ends with timeout?
    I have scenario on virtualised Windows Web Server 2008 R2 where backup is being made by Idera Backup Software but since it relies on VSS Snapshots then we can just skip this point because making snapshots from directly Windows command line or drive preferences/GUI
    is ending with timeout for this single drive after few hours. Affected system has 3 drives: C - 95GB, D-1.06TB and E-120GB. C and E can be backuped correctly and only drive D has problems. System is updated with latest drivers vssadmin for writers returns
    list without any errors and snapshot for drive D which ends with timeout is not generating any error in event log. I wanted to configure VSS trace like it is being instructed on this site:
    http://publib.boulder.ibm.com/infocenter/tsminfo/v6/index.jsp?topic=%2Fcom.ibm.itsm.tshoot.doc%2Ft_pdg_traceprfrm.html
    but I don't see any trace.txt file on given location. If I remove drive D from backup process it ends without errors. System was restarted many times. Only thing which is visible in windows Event log (application part) is that "The VSS service is shutting
    down due to idle timeout." about 4 hours after snapshot making proces is starting.
    I've contacted Idera backup about this but they can't help too much if Windows snapshot process is failing. They suggested that something can be wrong with this drive but since this is virtualised machine and all of my VM are being stored on RAID10 disk
    array connected to my server using fiber connections then I don't think that this is hardware issue (especially when other two drives are located on the same LUN on disk array).
    Any suggestions?
    Regards

    Hi,
    Do you create VMs on Hyper-V or VMWare? Based on research, possible causes could be:
    1. Files changes in the volume is very huge. So the shadow size may be big and the current shadow storage my not able to hold it. And that’s cause the shadow copy creation failure. 
    2. The I/O in D drive is heavy and make the shadow copy I/O failed. 
    3. Server is too busy to handle the request.
    4. The disk is heavily defragment.
    Please refer to the articles to troubleshoot the issue:
    Time-out errors occur in Volume Shadow Copy service writers, and shadow copies are lost during backup and during times when there are high levels of input/output
    http://support.microsoft.com/kb/826936/en-us
    VSS timeouts during backup? What could contribute to that?
    https://blogs.technet.com/b/askpfeplat/archive/2012/09/12/vss-timeouts-during-backup-check-fragmentation.aspx
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Planning Data Pull process failed with timeout error

    Hi Experts,
    Version: Oracle apps 11.5.10.2
    Issue: Planning Data Pull process failed with timeout error
    message in the log file as follows,
    The Request id : 90018907 has Phase : COMPLETE and Status: ERROR
    Concurrent Message : Timeout error.
    There is an Unknown error in the Worker.
    Planning Data Pull process failed.
    +-------------------------------------
    Please advice what could be the problem. I submitted, standard data collection programs with 900 mins and 8 workers.
    Refresh Collection Snapshot completed without any issue

    Please see these docs.
    Data Collection Fails Because Of Time Out Timeout error [ID 339968.1]
    OPM-ASCP: Data Collection Timeout Error [ID 601539.1]
    STD COLLECTION FAILING AT PLANNING DATA PULL WITH TIMEOUT ERROR [ID 978472.1]
    Data Collections is Failing - All Errors - First Diagnostic Steps [ID 207644.1]
    Troubleshooting Errors with ATP/Planning Data Collections [ID 1227255.1]
    MSCPDC PLANNING ODS LOAD ERRORS WITH TIMEOUT ERROR - POOR PERFORMANCE [ID 417633.1]
    Thanks,
    Hussein

  • AppleScript Ignoring "with timeout" Command

    Mac OS 10.4.11
    AppleScript 1.10.7
    Hi all. I'm experimenting with the idea of using my screensaver as my Desktop Background. In order to continue using a script in the macosxhints site that locks the screen via the keychain menubar item (so I'm not forced to have it require a password when it normally accesses the screensaver), I need to modify it so that it turns the said feature off and displays a dialog enabling me to turn it back on when I return.
    Here's the problem: By the time I do return, the script times out on me, preventing me from accessing its dialog. I've applied the "with timeout" command, but it doesn't seem to have any effect on the script at all. Even a "with timeout of 1 second" command does not change its behavior from the default timeout time. Any help here? Here's what I've been able to come up with thus far:
    with timeout of 86400 seconds
    tell application "System Events"
    if process "ScreenSaverEngine" exists then tell application "ScreenSaverEngine" to quit
    end tell
    activate application "SystemUIServer"
    tell application "System Events"
    tell process "SystemUIServer"
    repeat with i from 1 to number of menu bar items of menu bar 1
    tell menu bar item i of menu bar 1
    click
    try
    if name of menu item 1 of front menu is "Lock Screen" then
    click menu item "Lock Screen" of front menu
    exit repeat
    end if
    end try
    end tell
    end repeat
    end tell
    end tell
    display dialog "Select the desktop background type:" buttons {"Normal", "ScreenSaver"} default button 2
    if button returned of result = "ScreenSaver" then
    do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.a pp/Contents/MacOS/ScreenSaverEngine -background > /dev/null 2>&1 &"
    else
    tell application "System Events"
    if process "ScreenSaverEngine" exists then tell application "ScreenSaverEngine" to quit
    end tell
    end if
    end timeout
    Thanks in advanced!
    Message was edited by: Viewer07

    HI,
    Try posting in the AppleScript forum here: http://discussions.apple.com/forum.jspa?forumID=724
    Carolyn

  • GIT pull failling with timeout error.

    Hi all,
    I am new to tfs 2013 & GIT so I have one query. when I try to pull the repository using GIT pull I am getting error "Timeout".
    I am little bit in confusion why it is happening. Please help me with the troubleshooting steps and the probable reasons of this error.
    Thanks for help.

    Please see these docs.
    Data Collection Fails Because Of Time Out Timeout error [ID 339968.1]
    OPM-ASCP: Data Collection Timeout Error [ID 601539.1]
    STD COLLECTION FAILING AT PLANNING DATA PULL WITH TIMEOUT ERROR [ID 978472.1]
    Data Collections is Failing - All Errors - First Diagnostic Steps [ID 207644.1]
    Troubleshooting Errors with ATP/Planning Data Collections [ID 1227255.1]
    MSCPDC PLANNING ODS LOAD ERRORS WITH TIMEOUT ERROR - POOR PERFORMANCE [ID 417633.1]
    Thanks,
    Hussein

  • Production Portal hangs with timeouts

    Hi all,
    Several times during the day the Portal 10.1.4.0.0 hangs with timeouts.
    In order to recover, Portal needs to be re-started.
    (The timeout also occurred during the time they had a db corruption, but now that corruption has been resolved, the hangs still occur.
    After running the SVU in CLEANUP mode, the issue still occurs.
    Timeout has been set to well over the default. Stall has been increased also. Neither have helped to resolve the issue.
    The java portlets are from a specific OC4J Provider, and all of them are on pages under a Page Group.
    These portlets reads (also trough views) data on portal schema in order to create the "style" and css of the portal pages. All of the database statements are select, exception of rare insert operation on a table of their custom schema.
    User load:
    The access statistics indicates that about 800 users access this site in 1 hour.
    The more high user access in one hour was 1100 users.
    The concurrent user access are about 500.
    Thanks for any help.
    Edited by: hmannila on May 11, 2010 11:50 PM

    Hello Helenna,
    In this particular case, the PPE timeout settings are set to very high values causing exhaustion of fetcher threads in the PPE fetcher thread pool :
    <servlet>
       <servlet-name>page</servlet-name>
       <servlet-class>oracle.webdb.page.ParallelServlet</servlet-class>
       <init-param>
    <param-name>requesttime</param-name>
    <param-value>120</param-value>
       </init-param>
       <init-param>
           <param-name>minTimeout</param-name>
           <param-value>180</param-value>
       </init-param>
       <init-param>
           <param-name>stall</param-name>
           <param-value>200</param-value>
       </init-param> This should be the action plan for you :
    >
    As you already pointed out, the portal seems to become unresponsive because the Edison provider is not responding fast enough to requests from the Portal framework. Oracle Portal should be able to recover from thi in normal cases. Unfortunately the configuration settings in the Portal were changed from the default values making it almost impossible for the framework to recover from the error. To understand this, we will need to go through the theory :
    The Oracle Portal framework collects information from various sources and assembles these to web pages which are then sent to the end users internet browser. Providers are one source of information. To retrieve the information from providers, Oracle Portal allocates a so-called fetcher thread in OC4J_Portal. This fetcher thread will create a session with the (remote) provider and fetch the content, similar to how a web browser would contact a web server to retrieve an HTML page. It is important to note that Oracle Portal allocates a fetcher thread for each portlet on a page. For a page with five portlets, five fetcher threads are allocated as the content is fetched in parallel.
    In a default configuration with only one OC4J_Portal process, the number of fetcher threads is limited to 25. With five portlets on a page, the Portal will be able to serve up to five requests simultaneously before the pool of fetcher threads gets exhausted. This is normally not a problem because the fetcher threads are allocated for just a few seconds normally. Once they have received the response from the provider, they are returned to the pool and will be available to the Portal again.
    The problems start when the provider's response becomes sluggish. The fetcher thread is not returned to the pool immediately. The requests start to queue up until the system doesn't have any fetcher threads available anymore. Once there are no fetcher threads available, the Portal will wait for a new fetcher thread for a certain period of time (as specified by the queueTimeout). After expiration of this queue timeout, the Portal will return an error to the Oracle HTTP Server. This is when end users will start to experience errors in the pages.
    To keep the Portal alive and healthy, administrators should take care that the fetcher threads pool doesn't get exhausted. Obviously the best way to do this is to ensure that all providers respond in a reasonable amount of time. If there is no control on the response times of the providers, administrators can use the timeouts in the framework to assure that long running requests are killed off by the framework to assure that the fetcher threads are returned to the pool again. These parameters are configured in the web.xml from the application portal in the OC4J container called OC4J_Portal. Obviously users will see timeout errors for particular portlets on certain pages but the overall framework will be available. In addition, administrators can decide to increase the number of fetcher threads by starting more than one OC4J_Portal process. Each additional process will increase the amount of fetcher threads with 25. There is a memory penalty for this however as each process can consume between 256 - 512 Mb of memory. Administrators should only increase the amount of processes when they have checked that the Portal midtier system has enough free memory available to accommodate for these additional processes.
    Action plan :
    1. Change the timeout values for the Portal framework to the default values :
    a. Navigate to $ORACLE_HOME/j2ee/OC4J_Portal/applications/portal/portal/WEB-INF
    b. Copy the web.xml :
    % cp web.xml web.xml_23MAR2010
    c. Edit the web.xml :
    For both the RepositoryServlet and the PortalServlet, remove the STALL timeout
    For the page servlet, remove the requesttime, minTimeout, stall and queueTimeout parameters
    2. Increase the number of OC4J_Portal processes from 1 to 4 :
    a. Create a copy of the file $ORACLE_HOME/opmn/conf/opmn.xml :
    % cp opmn.xml opmn.xml_23MAR2010
    b. Open the file opmn.xml
    c. Locate the following section :
    <process-type id="OC4J_Portal" module-id="OC4J">
    d. Within the section for the process OC4J_Portal, change the following line :
    <process-set id="default_island" numprocs="1"/>
    to
    <process-set id="default_island" numprocs="4"/>
    3. Synchronize the DCM repository :
    % $ORACLE_HOME/dcm/bin/dcmctl updateconfig
    4. Restart the midtier processes
    % $ORACLE_HOME/opmn/bin/opmnctl stopall
    % $ORACLE_HOME/opmn/bin/opmnctl startall
    4. Check whether the changes have are in effect :
    a. Number of OC4J_Portal processes :
    Run opmnctl status and count the number of OC4J_Portal processes. You should see four of them.
    b. Timeout parameters in OC4J_Portal
    Open the file $ORACLE_HOME/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island_1/application.log and check for the following line at the end of the file :
    10/03/08 06:32:32 portal: PPE version : 10.1.2.0.2 (29022008)
    10/03/08 06:32:32 portal: Tuning parameter values : poolSize(Fetchers)=25[default=25] : minTimeout(MinTimeout)=5s[default=5s] : requesttime(DefaultTimeout)=15s[default=15s] : stall(MaxTimeout)=65s[default=65s] :
    queueTimeout(QueueTimeout)=10s[default=10s] maxParallelPortlets=20[default=20] maxParallelPagePortlets=10[default=10]

  • JOptionPane with CheckBox

    can anybody help me in creating a JOptionPane with a checkbox at the bottom.
    Actually I want to display a message with a checkbox at the bottom says "Dont display this message again".
    Something like Tip of the Day functionality. My application checks for the JRE version and informs the user if he is not using latest version, but I also want a check box at the bottom so that if user checks not to display again, so it wont.
    I dont want to create my own dialog box, but I m sure there is some way with JOptionPane input dialog, as I am not expert in JOptionPane.
    Thanks

    // parent  instanceof Component
    Object[] o = {"Text", new JCheckBox("Do not ...")};
    JOptionPane.showMessageDialog(parent,o);
    System.out.println(box.isSelected());What is box? How can I get the checkbox value??

  • Sometimes tests fail abruptly with timeout in CUITE

    Hi,
    we have a tests suite of codedui tests, and sometimes we noticed that tests fails with timeout :
    Test 'XXXX' exceeded execution timeout period.
    The problem with this is that when we get this failure, it seems that the tests doe not execute MyTestCleanup(), so  the following tests fail.
    the header of our functions looks like the following :
           [TestMethod, Timeout(5  60  1000)]
            [Description("Description")]
            [Owner("pm")]
            [TestCategory("C1"), TestCategory("Regression"), TestCategory("C2"), Priority(2)]
            public void VerifyFunctionality1()
    is there any wahy to make the tests execute the MytestCleanup() when they timeout ?? please note we use vstest.console.exe and visual studio 2012.
    Regards

    Hi kaki2000,
    >>is there any wahy to make the tests execute the MytestCleanup() when they timeout ?? please note we use vstest.console.exe and visual studio 2012.
    The real issue is that where you design the MytestCleanup(), do you use the cleanup method like ClassCleanup Attribute or the TestCleanup Attribute?
    If so, I think it would have a limitation for it, for example,
    the TestCleanup: Identifies a method that contains code that must be used after the test has run and to free resources obtained by all the tests in the test class.
    I think you could get useful information here "How Cleanup Methods Affect Test Run Time-Outs
    https://msdn.microsoft.com/en-us/library/ms243175.aspx?f=255&MSPPError=-2147217396 
    The test run might have a time-out value assigned. The amount of time that is used by the cleanup methods is added to the total amount of time that is used by the test run. In other words, the cleanup time counts toward the time limit that you have
    imposed on the test run as a whole, and therefore could cause the test run to time out.
    Best Regards,
    Jack 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Help needed to start HTTP Protocol with timeout

    I am looking for information to point me in the right direction. I would like to create a class that would implement the HTTP protocol and would allow the user to specify a timeout if unable to connect to the server. I have used the URL and HttpURLConnection classes before, but have not used any of the other classes in the java.net package. I am just trying to create an app that will download a file from a specified URL. Something that I could use in the future and something to get more programming experience using the java.net package.
    Could you tell me:
    1) Which classes I would need to use to help implement a timeout
    2) Where I can find an example or other information on how to implement the HTTP protocol with the class from question 1 above.
    TIA for any information

    That would definately reduce the coding time but would
    do little to help with my understanding of classes in
    the java.net package or to gather a better
    understanding of the HTTP protocol. :-)
    That said, I am currently downloading the 1.5 beta to
    see what they have done.If it's just an academic thing to re-invent the wheel (code) that deals with the HTTP protocol, then go right ahead (ok, you don't need my permission).

  • Problem with timeout exception on a block step

    Hi there, i have a BPM with a block step that has a 1 minute duration timeout,  when i see the steps on the sxmb_moni_bpe the block deadline is being reached after 2:50 more or less, on the block i have an infinite loop with a receive step, does anybody knows why is taking more than expected?, how can i fix it?, thanks for all the help on the matter,
    Regards,
    Robert.

    Hi ,
    This may be due to some missed runtime environment parameters.
    Go to trans - SWU3
    In Maintain Runtime Environment
    Execute the following activities :-
    1. Schedule background job for missed deadline
    2. Schedule background job for deadline Monitoring
    Also have a look at sap note 1117735, if you are not able to execute the above activities.
    Regards,
    Sunil Chandra
    Edited by: sunil chandra on Sep 29, 2009 8:18 PM

  • How can I add logic control with timeout in OSB?

    In the proxy service, when I try to call business service, the business service may timeout, how can I add logic with this? Like, I can set the timeout to 20 seconds, if more than 20 seconds, then do something else. But I just want this service can set to 20 seconds, others may different. Is that possible? Thanks.

    There is a Read Timeout and Connection Timeout setting in the Business service configuration.
    You can change the default values and test.Inside the error handler you can choose to do something else after you 20 seconds.
    Test and let us know if it works.

  • JOptionPane with multiple inputs

    Well, I want to know , if someone can help me with JOptionPane, I need a windows of JOptionPane.showInputDialog (), that reads
    3 inputs in the same window, I mean if I can have three Input Spaces in the same window.

    Zerokid wrote:
    by the way, is it easier to do it with JFrame or JOptionPane?I don't understand this question. You are wanting to create a dialog that allows the user to input into three fields, correct? You won't use a JFrame to create a dialog. You could do this with a JDialog, but a JOptionPane is somewhat easier to use here.

  • SOAP - XI - RFC / Problem with timeout-handle

    hi gurus
    B I G   U R G E N T problem. how can it be:
    - i've got an custom-bapi
    - in receiver-rfc-adapter 'commit-controller' is on
    when i force an time-out in sap ecc the soap-caller receives an system-error 'time-out...'.
    but: the custom-bapi becomes an commit and in ecc the document is booked!
    how can it be?
    thanks
    t

    hi Rajesh
    in sxmb_moni the message has the status 'log-version'.
    soap-adapter-log:
    2010-06-24 17:04:42 Erfolgreich calling the module processor for channel CC_SD01_WS_OUT
    2010-06-24 17:04:42 Erfolgreich MP: Tritt in den Modulprozessor ein
    2010-06-24 17:04:42 Erfolgreich MP: Lokales Modul localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean wird verarbeitet
    2010-06-24 17:04:42 Erfolgreich SOAP: request message entering the adapter with user KOMM
    2010-06-24 17:04:42 Erfolgreich SOAP: request message leaving the adapter (call)
    2010-06-24 17:04:42 Erfolgreich Die Anwendung versucht eine XI Message synchron zu senden über SOAP_http://sap.com/xi/XI/System
    2010-06-24 17:04:42 Erfolgreich Versuch die Message in die Call-Queue zu stellen
    2010-06-24 17:04:42 Erfolgreich Message erfolgreich in Queue gestellt
    2010-06-24 17:04:42 Erfolgreich Die Message wurde erfolgreich aus der Call-Queue abgerufen
    2010-06-24 17:04:42 Erfolgreich Der Status der Message wurde auf DLNG gesetzt
    2010-06-24 17:05:47 Fehler Rückgabe synchroner Fehlerbenachrichtigung an rufende Anwendung: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Timeout.
    2010-06-24 17:05:47 Fehler Die Übertragung der Message über http://szhm2179:8001/sap/xi/engine?type=entry ist fehlgeschlagen, weil: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout
    2010-06-24 17:05:47 Fehler Der Status der Message wurde auf FAIL gesetzt
    2010-06-24 17:05:47 Fehler Zurück zur Anwendung. Ausnahme: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout
    2010-06-24 17:05:47 Fehler SOAP: call failed: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout
    2010-06-24 17:05:47 Fehler SOAP: call failed: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout
    2010-06-24 17:05:47 Fehler MP: Ausnahme aufgetreten mit Grund com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Timeout: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout
    rfc-adapter-log:
    2010-06-24 17:04:43 Erfolgreich Message wurde erfolgreich vom Messaging-System empfangen. Profil: XI URL: http://szhm2179.stzh.ch:50100/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    2010-06-24 17:04:43 Erfolgreich Mit der Verbindung RFC_http://sap.com/xi/XI/System. Versuch die Message in die Request-Queue zu stellen
    2010-06-24 17:04:43 Erfolgreich Message erfolgreich in Queue gestellt
    2010-06-24 17:04:43 Erfolgreich Die Message wurde erfolgreich von der Request-Queue abgerufen
    2010-06-24 17:04:43 Erfolgreich Der Status der Message wurde auf DLNG gesetzt
    2010-06-24 17:04:43 Erfolgreich Liefert an Kanal: CC_SD01_RFC_IN
    2010-06-24 17:04:43 Erfolgreich MP: Tritt in den Modulprozessor ein
    2010-06-24 17:04:43 Erfolgreich MP: Lokales Modul localejbs/RfcAFBean wird verarbeitet
    2010-06-24 17:04:43 Erfolgreich RFC-Adapter hat synchrone Message erhalten. Versucht, sRFC für /STZH/SOZ_CD_F2_BELEG_CREATE zu senden
    2010-06-24 17:04:43 Erfolgreich RFC-Adapter hat synchrone Message erhalten. Versucht, sRFC für J2EE_GUEST zu senden
    2010-06-24 17:05:47 Fehler SOAP: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Timeout: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout
    2010-06-24 17:08:43 Erfolgreich BAPI-Response war eine Struktur des Typs BAPIRET2
    2010-06-24 17:08:43 Erfolgreich TYPE='S', Message (ID:/stzh/messages, NUMBER:000): "I:/stzh/messages:000 Beleg wurde erfolgreich gebucht", LOG_NO:, LOG_MSG_NO:000000 (PARAMETER:, ROW:0, FIELD:, SYSTEM:D70450)
    2010-06-24 17:08:43 Erfolgreich BAPI erfolgreich ausgeführt
    2010-06-24 17:08:43 Erfolgreich Commit-Transaktion mit BAPI_TRANSACTION_COMMIT
    2010-06-24 17:08:43 Erfolgreich MP: Verlässt den Modulprozessor
    2010-06-24 17:08:43 Fehler Zustellung der Message an die Anwendung über RFC_http://sap.com/xi/XI/System ist fehlgeschlagen weil: com.sap.aii.af.ra.ms.api.MessageExpiredException: Sync application request expired.. Message wird auf 'fehlgeschlagen' gesetzt
    2010-06-24 17:08:43 Fehler Der Status der Message wurde auf FAIL gesetzt
    2010-06-24 17:08:43 Fehler Rückgabe der synchronen Fehler-Message an rufende Anwendung: com.sap.aii.af.ra.ms.api.MessageExpiredException: Sync application request expired..
    why does the rfc-adapter sends the bapi_transaktion_commit after an soap-error?
    thank you for your help.
    regards
    t.

Maybe you are looking for

  • Someone deleted a video that wasn't backed up on my computer. How to I get it back?

    A friend of mine deleted a video that I took on my iPod. It wasn't backed up on the computer and I'm not sure how to get it back. Help?

  • Windows Live Messenger 2.5.27 - help

    Hello everyone, Does anyone know how to clear the login information from the memory on the new version of messenger 2.5.27  you can set it to not remember the password but I cannot find anywhere to clear the drop down menu that stores the email addre

  • WARNING AY7:36

    Hi I am not really in the know about the back ground runnings of a mac so I'm looking for some easy to follow information ... I have turned on my MacBook Air today and in the tool bar there is a tab open called "WARNING 7:36" - I've looked into it bu

  • Itunes 9 crashes reproducable

    Hi why crashes iTunes 9 or 8 a few seconds after start . This all happens if you delete a file on harddisk that is part of the iTunes library. The problem can only be solved my restore the file (if you still know it)or use itunes library clinic. Is t

  • Cost Center wise profitability

    Hi All, We want the profitability analysis cost center wise. Is it possible? If yes, how the Revenue value, sales quantity and the COGS value can be derived for the cost center wise report in KE30. Please help me as my client has asked this requireme