How to check a timertask calendar is still active or not?

Hello

I created the following code:

class StateTracker extends TimerTask
{
Minu private;
        
public StateTracker()
{
Timer = new Timer();
Timer.Schedule (this, 5000, 150000); begins after 5seconds Repeat task every 150 seconds
}

public void run()

....

}

The code runs allright, unless, in certain circumstances, the task stopped after a few periodic race (I suspect is disconnected network). Y at - there any API I could use to check whether the calendar is still active or not.

I would like to reschedule the timertask if the original schedule was disrupted.

timertasks should not be used for the treatment of blocking. I would say to put the actual work load in an own thread.

as long as the enforcement code is surrounded by exception handling, execution continues. There is no method to check if the timer is running correctly.

Tags: BlackBerry Developers

Similar Questions

  • How to check the type of memory installed (ECC or not)?

    all!

    I have some servers Dell PowerEdge R420 and I want to upgrade memory, install more...

    How to check the type of memory installed (ECC or not)?

    Dmidecode output here:

    Drive.google.com/.../View

    Hello.

    Unfortunately, we are not able to open the link you have provided. You can display information about your memory on the web iDRAC under hardware and memory interface. You see the type of error correction (ECC or Non ECC) within the information memory page. You can also view the same information on OpenManage Server Administrator and even make use of the memory part number to find out more information.

  • How to check if a string exists in varray or not

    Hi all

    How to check if a string exists in varray or not.

    Version Details 
    
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> get test
      1  DECLARE
      2     TYPE dnames_var IS VARRAY(7) OF VARCHAR2(30);
      3     dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5    if dept_names.exists('Shipping')
      6    then
      7       dbms_output.put_line('Exists ................');
      8    end if ;
      9  /*   DBMS_OUTPUT.PUT_LINE('dept_names has ' || dept_names.COUNT
     10                          || ' elements now');
     11     DBMS_OUTPUT.PUT_LINE('dept_names''s type can hold a maximum of '
     12                           || dept_names.LIMIT || ' elements');
     13     DBMS_OUTPUT.PUT_LINE('The maximum number you can use with '
     14         || 'dept_names.EXTEND() is ' || (dept_names.LIMIT - dept_names.COUNT));
     15  */
     16* END;
     17  
     18  /
    DECLARE
    *
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 5
    
    
    SQL> 
    
    Any help in this regard is appreciated ...
    Thank you
    Prakash P

    Published by: prakash on April 29, 2012 05:42

    EXISTS checks for the existence of an element, not a value. Since you're using VARRAY (btw, it is not recommended), your only choice is a loop through:

    SQL> DECLARE
      2       TYPE dnames_var IS VARRAY(7) OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      for i in 1..dept_names.count loop
      6        if dept_names(i) = 'Shipping'
      7          then
      8            dbms_output.put_line('Exists ................');
      9            exit;
     10        end if;
     11      end loop;
     12  END;
     13  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL>  
    

    If you use the nested table, you can use MEMBER, SUMBULTISET, MULTISET EXCEPT:

    SQL> DECLARE
      2       TYPE dnames_var IS TABLE OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      if 'Shipping' member of dept_names
      6      then
      7         dbms_output.put_line('Exists ................');
      8      end if ;
      9  END;
     10  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL> DECLARE
      2       TYPE dnames_var IS TABLE OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      if dnames_var('Shipping') submultiset dept_names
      6      then
      7         dbms_output.put_line('Exists ................');
      8      end if ;
      9  END;
     10  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL> DECLARE
      2       TYPE dnames_var IS TABLE OF VARCHAR2(30);
      3       dept_names dnames_var := dnames_var('Shipping','Sales','Finance','Payroll');
      4  BEGIN
      5      if dnames_var('Shipping') multiset except dept_names = dnames_var()
      6      then
      7         dbms_output.put_line('Exists ................');
      8      end if ;
      9  END;
     10  /
    Exists ................
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • How to check if a numeric value is around or not?

    Hello

    A form in LiveCycle Designer ES4, how to check (at the exit of field), if a numeric value is around or not?

    Hello

    You can verify if the rawValue contains a ', 'or'. ' using indexOf

    like the following

    If (NumericField1.rawValue.toString (.indexOf(","))! = - 1 |) NumericField1.rawValue.toString (.indexOf("."))! = -1) {}

    This is not an integer

    }

    Hope this will help you

  • How to check the slider back row contains data or not

    Hi all


    How to check whether or not the cursor returned row contains data in one of its field.


    Thank you and best regards,
    Prakash P

    Use ROWCOUNT %
    Use % NOTFOUND

    example of

    DECLARE
    
       id    number;
       desc varchar2(10);
       CURSOR cursor_one IS
          SELECT
              id, desc
          FROM
              table;
    BEGIN
       OPEN cursor_one;
       LOOP
          FETCH cursor_one INTO id, desc;
          EXIT WHEN cursor_one%ROWCOUNT > 20 OR cursor_one%NOTFOUND;
       ...
       END LOOP;
       CLOSE cursor_one;
    END;
    
  • How do I know that the XDB is activated or not?

    Dear friends,

    We can change the settings file to disable the functionality of Oracle XDB. But during execution, how could I know that this feature is running or not? Is there a table or a view to search for that?

    Thank you
    Ricky

    Use the following syntax:

    Select ComputerName, status, version
    of DBA_REGISTRY
    where ComputerName = "Oracle XML Database";

    concerning

  • How to check if R12 staged media is correct or not?

    Hello
    I copied the full R12 (12.0.4) media (software) on the external drive by making all the directories of resprected as follows:

    startCD - Start copied disc here
    oraApps - copied APPL_TOP Disk1, Disk2
    Orleans - copied disc TOOLS
    oraDB - copied disc RDBMS
    oraAppDB - copied databases Disk9 Disk1

    How can I check or ensure that installation can go smoothly with this media staging?

    Concerning

    arizuddin wrote:
    Hello
    I copied the full R12 (12.0.4) media (software) on the external drive by making all the directories of resprected as follows:

    startCD - Start copied disc here
    oraApps - copied APPL_TOP Disk1, Disk2
    Orleans - copied disc TOOLS
    oraDB - copied disc RDBMS
    oraAppDB - copied databases Disk9 Disk1

    How can I check or ensure that installation can go smoothly with this media staging?

    Concerning

    You must run the script adautostg.pl to create the scene area directory, copies only the files is not the right approach.

    Page 1-13 and 1-14, set up the scenic space
    http://docs.Oracle.com/CD/B40089_10/current/Acrobat/120oaig.PDF

    Thank you
    Hussein

  • How to check the value (if it is null or not) in the application process

    Hello

    I click on a particular record to access the home page of my search after go touch, but I need to check a validation of NULL at this point, if a particular column is null, then I need to make it false.
    My column type is BLOB.

    Can someone suggest me how to find whether or NOT this column is NULL.


    Thank you
    Mahesh

    Published by: user8996062 on August 25, 2010 10:35

    Mahesh

    If you receive the null pointer exception to

    XxafpEepStageRebateHdrVOImpl vo = (XxafpEepStageRebateHdrVOImpl) am.findViewObject ("XxafpEepStageRebateHdrVO1");

    This means that you not give the good instance of vo. Do something please post your VO.xml and AM.xml files.

    Thank you
    AJ

  • How to check...  DST 2007 applies or not?

    I have Oracle 10 g R2 on HP - UX box. How about DST 2007 patch is applied or not this database?
    Thank you
    Smith

    Smith,

    Check this Doc ID: 471451.1 on metalink

    Concerning

  • How to check if the exe called by labview does not respond?

    Hi all

    Here's the situation:

    I have a main executable VI which calls on several other screws which are all in the form of exe.  Sometimes, when these other .exe are called, they open reduced as they are supposed to, but they begin the desired process because they become inadmissible.

    Basically, I wonder if there is a way to check if a window responds or not.  I'm using LabVIEW 2010 on a computer with Windows 7.  All the subVIs called by this VI have this problem but to different degrees.

    I thought that I might be able to do this through a reference application and research somehow the title of the window for "(ne répond pas) ', but I have not found a way to implement it."

    Thank you

    M

    I sometimes use a library of 3rd party called AutoIT to do things like move windows and check names, window titles.  Related download installs an ActiveX control that allows you to do.

    See here for a list of the supported control functions.  Look at the end (all functions starting with "Win").

  • How to check if the Message was open / read or not

    I always get the same result when I check if a message is read or not.

    By using this code:

                    me.getMessage();
                    if(me.getStatus()==Message.Status.TX_READ){
                        Dialog.alert("Read "+me.getStatus());
                    }else{
                        Dialog.alert("Not Read "+me.getStatus());
                    }
    

    He always says that he does not play, even if the message has been opened before.

    what I'm doing wrong here?

    Check the value of the getFlags, it's a bitpattern, not a number (like the flags of a field style)

  • Just check that the forum is still active

    Not seen any new or updated messages for a few days now - just a test.

    Still here.

  • How to check if a virtual machine has active hotplug?

    Hello

    I am trying to create a workflow that is supposed to change the amount of vCPUs and memory on a virtual computer.

    (for those who arrive suspicious: I'm continuing / edition work of Munel, another user here)

    Since we have different types of VMS, I need to check if a virtual machine is capable of hotplugging processors and memory.

    Now the workflow is designed in a way, it first tries to change the values, and if it runs into an error, it checks if the error code says that the vhardware is not active hotplug then stop the virtual machine or throws an exception.

    This is not a very nice solution and must be changed.

    Is there a way to check the ability before hotplug actually trying to change the vhardware?

    Thanks in advance

    Andreas

    Hi Andreas,

    To check if a virtual machine has a hot connection activated, you have the following options:

    Check if memory hot add is enabled:

    virtual_machine_instance.config.memoryHotAddEnabled

    Check if the CPU hot add is enabled

    virtual_machine_instance.config.cpuHotAddEnabled

    Check if the hot removal of CPU is enabled

    virtual_machine_instance.config.cpuHotRemoveEnabled

    If you have the vSphere client, tree options above are located in the Configuration dialog box of the virtual machine on the tab Options-> memory/CPU hotplug.

    Hope this helps,

    Martin

  • How to check if something is changed on page or not

    I have an edit page where even if the user doesn't change anything and simply click on save page button gets submitted. I want to display a message to the user saying no changes to save if the user does not change anything on the page... Could you please guide me how to do this

    Use this:

    testVOImpl vo = am.findViewObject ("testVO1") (testVOImpl);
    if(vo!=null)
    {
    If (VO. IsDirty())
    {
    Go to a page of dialogue saying that page changed the changes.
    }

    }

    Thank you
    Gerard

  • How to check if a SQL profile is used or not?

    Hello

    We have a few plans and profiles SQL in the database. There has been some changes to the code and it is now difficult to follow if a SQL profile or outline is still used? Is it possible to find out who?

    Thanks in advance

    Look for the entry corresponding to the SQL statement you are reviewing in V$ SQL. Look at the OUTLINE_CATEGORY and SQL_PROFILE columns. NULL indicates that no plan/profile has been used.

Maybe you are looking for